dijkstra-backend-cloudron/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/74/3a/d9818eab8969925dd823cd7eafb3c28e56bf688e561a30ab61866b5c13f9e0509722805176481c6ab122317bd6047fa74fae07b2d225b8d12d13f59a2fd9

1 line
590 KiB
Plaintext
Raw Permalink Blame History

{"code":"!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=120)}([function(t,e){\"function\"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){t.exports=lodash},function(t,e,r){var n=r(3),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},s.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},s.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},function(t,e,r){\"use strict\";(function(t){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\nvar n=r(131),i=r(132),o=r(66);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError(\"Invalid typed array length\");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if(\"number\"==typeof t){if(\"string\"==typeof e)throw new Error(\"If encoding is specified then the first argument must be a string\");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if(\"number\"==typeof e)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError(\"'offset' is out of bounds\");if(e.byteLength<r+(n||0))throw new RangeError(\"'length' is out of bounds\");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=l(t,e);return t}(t,e,r,n):\"string\"==typeof e?function(t,e,r){\"string\"==typeof r&&\"\"!==r||(r=\"utf8\");if(!c.isEncoding(r))throw new TypeError('\"encoding\" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if(\"undefined\"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||\"length\"in e)return\"number\"!=typeof e.length||(n=e.length)!=n?a(t,0):l(t,e);if(\"Buffer\"===e.type&&o(e.data))return l(t,e.data)}var n;throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(t,e)}function h(t){if(\"number\"!=typeof t)throw new TypeError('\"size\" argument must be a number');if(t<0)throw new RangeError('\"size\" argument must not be negative')}function f(t,e){if(h(e),t=a(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s().toString(16)+\" bytes\");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return U(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return D(t).length;default:if(n)return U(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(t,e,r,n,i){var o,s=1,a=t.length,c=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===c)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,l=0;l<c;l++)if(u(t,o+l)!==u(e,l)){f=!1;break}if(f)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError(\"Invalid hex string\");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return F(U(e,t.length-r),t,r,n)}function v(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return v(t,e,r,n)}function E(t,e,r,n){return F(D(e),t,r,n)}function x(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,c,u=t[i],h=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(h=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(h=c);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(h=c)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=f}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=C));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&\"function\"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?a(t,e):void 0!==r?\"string\"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError(\"Arguments must be Buffers\");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,e){if(!o(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!c.isBuffer(s))throw new TypeError('\"list\" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?\"\":0===arguments.length?A(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return R(this,e,r);case\"utf8\":case\"utf-8\":return A(this,e,r);case\"ascii\":return k(this,e,r);case\"latin1\":case\"binary\":return T(this,e,r);case\"base64\":return S(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return M(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t=\"\",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,r).match(/.{2}/g).join(\" \"),this.length>r&&(t+=\" ... \")),\"<Buffer \"+t+\">\"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),h=t.slice(e,r),f=0;f<a;++f)if(u[f]!==h[f]){o=u[f],s=h[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e|=0,isFinite(r)?(r|=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var o=!1;;)switch(n){case\"hex\":return y(this,t,e,r);case\"utf8\":case\"utf-8\":return _(this,t,e,r);case\"ascii\":return v(this,t,e,r);case\"latin1\":case\"binary\":return w(this,t,e,r);case\"base64\":return E(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return x(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function k(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i=\"\",o=e;o<r;++o)i+=$(t[o]);return i}function M(t,e,r){for(var n=t.slice(e,r),i=\"\",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function I(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function O(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function B(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function q(t,e,r,n,o){return o||B(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,o){return o||B(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return q(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return q(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!c.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n)}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=c.isBuffer(t)?t:U(new c(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var L=/[^+\\/0-9A-Za-z-_]/g;function $(t){return t<16?\"0\"+t.toString(16):t.toString(16)}function U(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}(t).replace(L,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function F(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(8))},function(t,e,r){(function(t){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(210).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),\"-\"===t[0]&&(this.negative=1),this.strip(),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h<a;h+=n)u=c(t,h,h+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(t,h,t.length,e),h=0;h<s;h++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var u=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var h=c>>>26,f=67108863&c,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,c=0|h}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],d=f[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length <= 0\"),this.strip();var s,a,c=\"le\"===e,u=new t(o),h=this.clone();if(c){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),u[o-a-1]=s}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,c=r.words,u=0,h=0|s[0],f=8191&h,l=h>>>13,d=0|s[1],p=8191&d,m=d>>>13,b=0|s[2],g=8191&b,y=b>>>13,_=0|s[3],v=8191&_,w=_>>>13,E=0|s[4],x=8191&E,S=E>>>13,A=0|s[5],C=8191&A,k=A>>>13,T=0|s[6],R=8191&T,M=T>>>13,j=0|s[7],I=8191&j,N=j>>>13,O=0|s[8],B=8191&O,q=O>>>13,P=0|s[9],L=8191&P,$=P>>>13,U=0|a[0],D=8191&U,F=U>>>13,z=0|a[1],H=8191&z,Q=z>>>13,W=0|a[2],K=8191&W,V=W>>>13,Y=0|a[3],G=8191&Y,X=Y>>>13,J=0|a[4],Z=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ct=8191&at,ut=at>>>13,ht=0|a[8],ft=8191&ht,lt=ht>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var bt=(u+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;u=((o=Math.imul(l,F))+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(l,H)|0))<<13)|0;u=((o=o+Math.imul(l,Q)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(y,D)|0,o=Math.imul(y,F),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Q)|0;var yt=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,V)|0)+Math.imul(l,K)|0))<<13)|0;u=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(v,D),i=(i=Math.imul(v,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,Q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var _t=(u+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,G)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(S,D)|0,o=Math.imul(S,F),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,X)|0;var vt=(u+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Z)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,D),i=(i=Math.imul(R,F))+Math.imul(M,D)|0,o=Math.imul(M,F),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Et=(u+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,F))+Math.imul(N,D)|0,o=Math.imul(N,F),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var xt=(u+(n=n+Math.imul(f,ct)|0)|0)+((8191&(i=(i=i+Math.imul(f,ut)|0)+Math.imul(l,ct)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ut)|0;var St=(u+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;u=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,D),i=(i=Math.imul(L,F))+Math.imul($,D)|0,o=Math.imul($,F),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(q,H)|0,o=o+Math.imul(q,Q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(g,ct)|0,i=(i=i+Math.imul(g,ut)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ut)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var At=(u+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Q))+Math.imul($,H)|0,o=Math.imul($,Q),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(q,K)|0,o=o+Math.imul(q,V)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ut)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,lt)|0;var Ct=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,V))+Math.imul($,K)|0,o=Math.imul($,V),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(q,G)|0,o=o+Math.imul(q,X)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ut)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var kt=(u+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,X))+Math.imul($,G)|0,o=Math.imul($,X),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(q,Z)|0,o=o+Math.imul(q,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,lt)|0;var Tt=(u+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,tt))+Math.imul($,Z)|0,o=Math.imul($,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(q,rt)|0,o=o+Math.imul(q,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(R,ct)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(M,ct)|0,o=o+Math.imul(M,ut)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Rt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;u=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul($,rt)|0,o=Math.imul($,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(q,ot)|0,o=o+Math.imul(q,st)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ut)|0)+Math.imul(N,ct)|0,o=o+Math.imul(N,ut)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Mt=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul($,ot)|0,o=Math.imul($,st),n=n+Math.imul(B,ct)|0,i=(i=i+Math.imul(B,ut)|0)+Math.imul(q,ct)|0,o=o+Math.imul(q,ut)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var jt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,ut))+Math.imul($,ct)|0,o=Math.imul($,ut),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,lt)|0)+Math.imul(q,ft)|0,o=o+Math.imul(q,lt)|0;var It=(u+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,lt))+Math.imul($,ft)|0,o=Math.imul($,lt);var Nt=(u+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(q,pt)|0))<<13)|0;u=((o=o+Math.imul(q,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var Ot=(u+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul($,pt)|0))<<13)|0;return u=((o=Math.imul($,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,c[0]=bt,c[1]=gt,c[2]=yt,c[3]=_t,c[4]=vt,c[5]=wt,c[6]=Et,c[7]=xt,c[8]=St,c[9]=At,c[10]=Ct,c[11]=kt,c[12]=Tt,c[13]=Rt,c[14]=Mt,c[15]=jt,c[16]=It,c[17]=Nt,c[18]=Ot,0!==u&&(c[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=c;u++){var h=o-u,f=(0|t.words[h])*(0|e.words[u]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=c,l=u,d=0;d<s;d++){var p=r[h+d],m=n[h+d],b=r[h+d+s],g=n[h+d+s],y=f*b-l*g;g=f*g+l*b,b=y,r[h+d]=p+b,n[h+d]=m+g,r[h+d+s]=p-b,n[h+d+s]=m-g,d!==a&&(y=c*f-u*l,l=c*l+u*f,f=y)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),u=new Array(n),h=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,c,n,i),this.transform(u,o,h,f,n,i);for(var d=0;d<n;d++){var p=a[d]*h[d]-c[d]*f[d];c[d]=a[d]*f[d]+c[d]*h[d],a[d]=p}return this.conjugate(a,c,n),this.transform(a,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,c=(0|this.words[e])-a<<r;this.words[e]=c|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var h=0;for(u=this.length-1;u>=0&&(0!==h||u>=i);u--){var f=0|this.words[u];this.words[u]=h<<26-o|f>>>o,h=f&a}return c&&0!==h&&(c.words[c.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var c=(0|t.words[i])*e;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,a&&(a.words[c]=1));for(var f=c-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(h),c.isub(f)),a.iushrn(1),c.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(c)):(r.isub(e),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,h=1;0==(e.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function _(){g.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function v(){g.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function w(){g.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,g),i(v,g),i(w,g),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if(\"k256\"===t)e=new y;else if(\"p224\"===t)e=new _;else if(\"p192\"===t)e=new v;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new w}return b[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,u).cmp(c);)h.redIAdd(c);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,b=0;0!==m.cmp(a);b++)m=m.redSqr();n(b<p);var g=this.pow(f,new o(1).iushln(p-b-1));l=l.redMul(g),f=g.redSqr(),d=d.redMul(f),p=b}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,c=e.bitLength()%26;for(0===c&&(c=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],h=c-1;h>=0;h--){var f=u>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(77)(t))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r=\"function\"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n=\"function\"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var c,u=[],h=!1,f=-1;function l(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!h){var t=a(l);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||h||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title=\"browser\",i.browser=!0,i.env={},i.argv=[],i.version=\"\",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error(\"process.binding is not supported\")},i.cwd=function(){return\"/\"},i.chdir=function(t){throw new Error(\"process.chdir is not supported\")},i.umask=function(){return 0}},function(t,e,r){\"use strict\";var n=e;n.version=r(216).version,n.utils=r(217),n.rand=r(98),n.curve=r(40),n.curves=r(222),n.ec=r(230),n.eddsa=r(234)},function(t,e,r){(function(e,r,n){var i;i=function(){var t,i,o;return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var c=\"function\"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error(\"Cannot find module '\"+s+\"'\");throw u.code=\"MODULE_NOT_FOUND\",u}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return i(r||t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o=\"function\"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},{}],2:[function(t,r,n){\"use strict\";var i;try{throw new Error}catch(t){i=t}var o=t(\"./schedule\"),s=t(\"./queue\");function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new s(16),this._normalQueue=new s(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=o}function c(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if(\"function\"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,r){r?(e.stderr.write(\"Fatal \"+(t instanceof Error?t.stack:t)+\"\\n\"),e.exit(2)):this.throwLater(t)},a.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),\"undefined\"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error(\"No async scheduler available\\n\\n See http://goo.gl/MqrFmX\\n\")}},a.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},a.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},a.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},a.prototype._drainQueues=function(){c(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,c(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},r.exports=a,r.exports.firstLineError=i},{\"./queue\":26,\"./schedule\":29}],3:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var u=r(o),h=new t(e);h._propagateFrom(this,1);var f=this._target();if(h._setBoundTo(u),u instanceof t){var l={promiseRejectionQueued:!1,promise:h,target:f,bindingPromise:u};f._then(e,s,void 0,h,l),u._then(a,c,void 0,h,l),h._setOnCancel(u)}else h._resolveCallback(f);return h},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){\"use strict\";var n;\"undefined\"!=typeof Promise&&(n=Promise);var i=t(\"./promise\")();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},e.exports=i},{\"./promise\":22}],5:[function(t,e,r){\"use strict\";var n=Object.create;if(n){var i=n(null),o=n(null);i[\" size\"]=o[\" size\"]=0}e.exports=function(e){var r=t(\"./util\"),n=r.canEvaluate;r.isIdentifier;function i(t){return function(t,n){var i;if(null!=t&&(i=t[n]),\"function\"!=typeof i){var o=\"Object \"+r.classString(t)+\" has no method '\"+r.toString(n)+\"'\";throw new e.TypeError(o)}return i}(t,this.pop()).apply(t,this)}function o(t){return t[this]}function s(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(i,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if(\"number\"==typeof t)e=s;else if(n){var r=(void 0)(t);e=null!==r?r:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{\"./util\":36}],6:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i){var o=t(\"./util\"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn(\"cancellation is disabled\");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if(\"function\"==typeof t){if(!e){var n=s(t).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),c.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{\"./util\":36}],7:[function(t,e,r){\"use strict\";e.exports=function(e){var r=t(\"./util\"),n=t(\"./es5\").keys,i=r.tryCatch,o=r.errorObj;return function(t,s,a){return function(c){var u=a._boundValue();t:for(var h=0;h<t.length;++h){var f=t[h];if(f===Error||null!=f&&f.prototype instanceof Error){if(c instanceof f)return i(s).call(u,c)}else if(\"function\"==typeof f){var l=i(f).call(u,c);if(l===o)return l;if(l)return i(s).call(u,c)}else if(r.isObject(c)){for(var d=n(f),p=0;p<d.length;++p){var m=d[p];if(f[m]!=c[m])continue t}return i(s).call(u,c)}}return e}}}},{\"./es5\":13,\"./util\":36}],8:[function(t,e,r){\"use strict\";e.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,r,n){\"use strict\";r.exports=function(r,n,i,o){var s,a,c,u,h=r._async,f=t(\"./errors\").Warning,l=t(\"./util\"),d=t(\"./es5\"),p=l.canAttachTrace,m=/[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/,b=/\\((?:timers\\.js):\\d+:\\d+\\)/,g=/[\\/<\\(](.+?):(\\d+):(\\d+)\\)?\\s*$/,y=null,_=null,v=!1,w=!(0==l.env(\"BLUEBIRD_DEBUG\")),E=!(0==l.env(\"BLUEBIRD_WARNINGS\")||!w&&!l.env(\"BLUEBIRD_WARNINGS\")),x=!(0==l.env(\"BLUEBIRD_LONG_STACK_TRACES\")||!w&&!l.env(\"BLUEBIRD_LONG_STACK_TRACES\")),S=0!=l.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\")&&(E||!!l.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));!function(){var t=[];function e(){for(var e=0;e<t.length;++e)t[e]._notifyUnhandledRejection();n()}function n(){t.length=0}u=function(r){t.push(r),setTimeout(e,1)},d.defineProperty(r,\"_unhandledRejectionCheck\",{value:e}),d.defineProperty(r,\"_unhandledRejectionClear\",{value:n})}(),r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},r.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),u(this))},r.prototype._notifyUnhandledRejectionIsHandled=function(){V(\"rejectionHandled\",s,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),V(\"unhandledRejection\",a,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return H(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=r._getContext();a=l.contextBind(e,t)},r.onUnhandledRejectionHandled=function(t){var e=r._getContext();s=l.contextBind(e,t)};var A=function(){};r.longStackTraces=function(){if(h.haveItemsQueued()&&!rt.longStackTraces)throw new Error(\"cannot enable long stack traces after promises have been created\\n\\n See http://goo.gl/MqrFmX\\n\");if(!rt.longStackTraces&&G()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace,i=r.prototype._dereferenceTrace;rt.longStackTraces=!0,A=function(){if(h.haveItemsQueued()&&!rt.longStackTraces)throw new Error(\"cannot enable long stack traces after promises have been created\\n\\n See http://goo.gl/MqrFmX\\n\");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,r.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),rt.longStackTraces=!1},r.prototype._captureStackTrace=D,r.prototype._attachExtraTrace=F,r.prototype._dereferenceTrace=z,n.activateLongStackTraces()}},r.hasLongStackTraces=function(){return rt.longStackTraces&&G()};var C={unhandledrejection:{before:function(){var t=l.global.onunhandledrejection;return l.global.onunhandledrejection=null,t},after:function(t){l.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=l.global.onrejectionhandled;return l.global.onrejectionhandled=null,t},after:function(t){l.global.onrejectionhandled=t}}},k=function(){var t=function(t,e){if(!t)return!l.global.dispatchEvent(e);var r;try{return r=t.before(),!l.global.dispatchEvent(e)}finally{t.after(r)}};try{if(\"function\"==typeof CustomEvent){var e=new CustomEvent(\"CustomEvent\");return l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return d.defineProperty(n,\"promise\",{value:r.promise}),d.defineProperty(n,\"reason\",{value:r.reason}),t(C[e],n)}}if(\"function\"==typeof Event){e=new Event(\"CustomEvent\");return l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,d.defineProperty(n,\"promise\",{value:r.promise}),d.defineProperty(n,\"reason\",{value:r.reason}),t(C[e],n)}}return(e=document.createEvent(\"CustomEvent\")).initCustomEvent(\"testingtheevent\",!1,!0,{}),l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent(\"CustomEvent\");return n.initCustomEvent(e,!1,!0,r),t(C[e],n)}}catch(t){}return function(){return!1}}(),T=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e=\"on\"+t.toLowerCase(),r=l.global[e];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function R(t,e){return{promise:e}}var M={promiseCreated:R,promiseFulfilled:R,promiseRejected:R,promiseResolved:R,promiseCancelled:R,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:R},j=function(t){var e=!1;try{e=T.apply(null,arguments)}catch(t){h.throwLater(t),e=!0}var r=!1;try{r=k(t,M[t].apply(null,arguments))}catch(t){h.throwLater(t),r=!0}return r||e};function I(){return!1}function N(t,e,r){var n=this;try{t(e,r,function(t){if(\"function\"!=typeof t)throw new TypeError(\"onCancel must be a function, got: \"+l.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function O(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function B(){return this._onCancelField}function q(t){this._onCancelField=t}function P(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}r.config=function(t){if(\"longStackTraces\"in(t=Object(t))&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&A()),\"warnings\"in t){var e=t.warnings;rt.warnings=!!e,S=rt.warnings,l.isObject(e)&&\"wForgottenReturn\"in e&&(S=!!e.wForgottenReturn)}if(\"cancellation\"in t&&t.cancellation&&!rt.cancellation){if(h.haveItemsQueued())throw new Error(\"cannot enable cancellation after promises are in use\");r.prototype._clearCancellationData=P,r.prototype._propagateFrom=L,r.prototype._onCancel=B,r.prototype._setOnCancel=q,r.prototype._attachCancellationCallback=O,r.prototype._execute=N,$=L,rt.cancellation=!0}if(\"monitoring\"in t&&(t.monitoring&&!rt.monitoring?(rt.monitoring=!0,r.prototype._fireEvent=j):!t.monitoring&&rt.monitoring&&(rt.monitoring=!1,r.prototype._fireEvent=I)),\"asyncHooks\"in t&&l.nodeSupportsAsyncResource){var n=rt.asyncHooks,s=!!t.asyncHooks;n!==s&&(rt.asyncHooks=s,s?i():o())}return r},r.prototype._fireEvent=I,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._dereferenceTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var $=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function U(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function D(){this._trace=new tt(this._peekContext())}function F(t,e){if(p(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=W(t);l.notEnumerableProp(t,\"stack\",n.message+\"\\n\"+n.stack.join(\"\\n\")),l.notEnumerableProp(t,\"__stackCleaned__\",!0)}}}function z(){this._trace=void 0}function H(t,e,n){if(rt.warnings){var i,o=new f(t);if(e)n._attachExtraTrace(o);else if(rt.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var s=W(o);o.stack=s.message+\"\\n\"+s.stack.join(\"\\n\")}j(\"warning\",o)||K(o,\"\",!0)}}function Q(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=\" (No stack trace)\"===n||y.test(n),o=i&&X(n);i&&!o&&(v&&\" \"!==n.charAt(0)&&(n=\" \"+n),e.push(n))}return e}function W(t){var e=t.stack,r=t.toString();return e=\"string\"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\\s+$/g,\"\").split(\"\\n\"),r=0;r<e.length;++r){var n=e[r];if(\" (No stack trace)\"===n||y.test(n))break}return r>0&&\"SyntaxError\"!=t.name&&(e=e.slice(r)),e}(t):[\" (No stack trace)\"],{message:r,stack:\"SyntaxError\"==t.name?e:Q(e)}}function K(t,e,r){if(\"undefined\"!=typeof console){var n;if(l.isObject(t)){var i=t.stack;n=e+_(i,t)}else n=e+String(t);\"function\"==typeof c?c(n,r):\"function\"!=typeof console.log&&\"object\"!=typeof console.log||console.log(n)}}function V(t,e,r,n){var i=!1;try{\"function\"==typeof e&&(i=!0,\"rejectionHandled\"===t?e(n):e(r,n))}catch(t){h.throwLater(t)}\"unhandledRejection\"===t?j(t,r,n)||i||K(r,\"Unhandled rejection \"):j(t,n)}function Y(t){var e;if(\"function\"==typeof t)e=\"[function \"+(t.name||\"anonymous\")+\"]\";else{e=t&&\"function\"==typeof t.toString?t.toString():l.toString(t);if(/\\[object [a-zA-Z0-9$_]+\\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e=\"(empty array)\")}return\"(<\"+function(t){if(t.length<41)return t;return t.substr(0,38)+\"...\"}(e)+\">, no stack trace)\"}function G(){return\"function\"==typeof et}var X=function(){return!1},J=/[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;function Z(t){var e=t.match(J);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function tt(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);et(this,tt),e>32&&this.uncycle()}l.inherits(tt,Error),n.CapturedTrace=tt,tt.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var s=r[e[n].stack];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var a=n>0?e[n-1]:this;s<t-1?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var c=a._length+1,u=n-2;u>=0;--u)e[u]._length=c,c++;return}}}},tt.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=W(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(Q(i.stack.split(\"\\n\"))),i=i._parent;!function(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var c=n[a];if(e[i]!==c)break;e.pop(),i--}e=n}}(n),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(n),l.notEnumerableProp(t,\"stack\",function(t,e){for(var r=0;r<e.length-1;++r)e[r].push(\"From previous event:\"),e[r]=e[r].join(\"\\n\");return r<e.length&&(e[r]=e[r].join(\"\\n\")),t+\"\\n\"+e.join(\"\\n\")}(r,n)),l.notEnumerableProp(t,\"__stackCleaned__\",!0)}};var et=function(){var t=/^\\s*at\\s*/,e=function(t,e){return\"string\"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():Y(e)};if(\"number\"==typeof Error.stackTraceLimit&&\"function\"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=t,_=e;var r=Error.captureStackTrace;return X=function(t){return m.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if(\"string\"==typeof i.stack&&i.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\")>=0)return y=/@/,_=e,v=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n=\"stack\"in t}return\"stack\"in i||!n||\"number\"!=typeof Error.stackTraceLimit?(_=function(t,e){return\"string\"==typeof t?t:\"object\"!=typeof e&&\"function\"!=typeof e||void 0===e.name||void 0===e.message?Y(e):e.toString()},null):(y=t,_=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();\"undefined\"!=typeof console&&void 0!==console.warn&&(c=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?c=function(t,e){var r=e?\"\u001b[33m\":\"\u001b[31m\";console.warn(r+t+\"\u001b[0m\\n\")}:l.isNode||\"string\"!=typeof(new Error).stack||(c=function(t,e){console.warn(\"%c\"+t,e?\"color: darkorange\":\"color: red\")}));var rt={warnings:E,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return x&&r.longStackTraces(),{asyncHooks:function(){return rt.asyncHooks},longStackTraces:function(){return rt.longStackTraces},warnings:function(){return rt.warnings},cancellation:function(){return rt.cancellation},monitoring:function(){return rt.monitoring},propagateFromFunction:function(){return $},boundValueFunction:function(){return U},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&S){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=\" \");var o=\"\",s=\"\";if(e._trace){for(var a=e._trace.stack.split(\"\\n\"),c=Q(a),u=c.length-1;u>=0;--u){var h=c[u];if(!b.test(h)){var f=h.match(g);f&&(o=\"at \"+f[1]+\":\"+f[2]+\":\"+f[3]+\" \");break}}if(c.length>0){var l=c[0];for(u=0;u<a.length;++u)if(a[u]===l){u>0&&(s=\"\\n\"+a[u-1]);break}}}var d=\"a promise was created in a \"+r+\"handler \"+o+\"but was not returned from it, see http://goo.gl/rRqMUw\"+s;n._warn(d,!0,e)}},setBounds:function(t,e){if(G()){for(var r,n,i=(t.stack||\"\").split(\"\\n\"),o=(e.stack||\"\").split(\"\\n\"),s=-1,a=-1,c=0;c<i.length;++c)if(u=Z(i[c])){r=u.fileName,s=u.line;break}for(c=0;c<o.length;++c){var u;if(u=Z(o[c])){n=u.fileName,a=u.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(X=function(t){if(m.test(t))return!0;var e=Z(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:H,deprecated:function(t,e){var r=t+\" is deprecated and will be removed in a future version.\";return e&&(r+=\" Use \"+e+\" instead.\"),H(r)},CapturedTrace:tt,fireDomEvent:k,fireGlobalEvent:T}}},{\"./errors\":12,\"./es5\":13,\"./util\":36}],10:[function(t,e,r){\"use strict\";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();return this.caught(r,function(){return n})}}},{}],11:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},{}],12:[function(t,e,r){\"use strict\";var n,i,o=t(\"./es5\"),s=o.freeze,a=t(\"./util\"),c=a.inherits,u=a.notEnumerableProp;function h(t,e){function r(n){if(!(this instanceof r))return new r(n);u(this,\"message\",\"string\"==typeof n?n:e),u(this,\"name\",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(r,Error),r}var f=h(\"Warning\",\"warning\"),l=h(\"CancellationError\",\"cancellation error\"),d=h(\"TimeoutError\",\"timeout error\"),p=h(\"AggregateError\",\"aggregate error\");try{n=TypeError,i=RangeError}catch(t){n=h(\"TypeError\",\"type error\"),i=h(\"RangeError\",\"range error\")}for(var m=\"join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse\".split(\" \"),b=0;b<m.length;++b)\"function\"==typeof Array.prototype[m[b]]&&(p.prototype[m[b]]=Array.prototype[m[b]]);o.defineProperty(p.prototype,\"length\",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var g=0;function y(t){if(!(this instanceof y))return new y(t);u(this,\"name\",\"OperationalError\"),u(this,\"message\",t),this.cause=t,this.isOperational=!0,t instanceof Error?(u(this,\"message\",t.message),u(this,\"stack\",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var t=Array(4*g+1).join(\" \"),e=\"\\n\"+t+\"AggregateError of:\\n\";g++,t=Array(4*g+1).join(\" \");for(var r=0;r<this.length;++r){for(var n=this[r]===this?\"[Circular AggregateError]\":this[r]+\"\",i=n.split(\"\\n\"),o=0;o<i.length;++o)i[o]=t+i[o];e+=(n=i.join(\"\\n\"))+\"\\n\"}return g--,e},c(y,Error);var _=Error.__BluebirdErrorTypes__;_||(_=s({CancellationError:l,TimeoutError:d,OperationalError:y,RejectionError:y,AggregateError:p}),o.defineProperty(Error,\"__BluebirdErrorTypes__\",{value:_,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:_.CancellationError,OperationalError:_.OperationalError,TimeoutError:_.TimeoutError,AggregateError:_.AggregateError,Warning:f}},{\"./es5\":13,\"./util\":36}],13:[function(t,e,r){var n=function(){\"use strict\";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var r in t)i.call(t,r)&&e.push(r);return e};e.exports={isArray:function(t){try{return\"[object Array]\"===o.call(t)}catch(t){return!1}},keys:a,names:a,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return s}},isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],15:[function(t,e,r){\"use strict\";e.exports=function(e,r,n){var i=t(\"./util\"),o=e.CancellationError,s=i.errorObj,a=t(\"./catch_filter\")(n);function c(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function u(t){this.finallyHandler=t}function h(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function f(){return d.call(this,this.promise._target()._settledValue())}function l(t){if(!h(this,t))return s.e=t,s}function d(t){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),t);if(c===n)return c;if(void 0!==c){i._setReturnedNonUndefined();var d=r(c,i);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o(\"late cancellation observer\");return i._attachExtraTrace(p),s.e=p,s}d.isPending()&&d._attachCancellationCallback(new u(this))}return d._then(f,l,void 0,this,void 0)}}}return i.isRejected()?(h(this),s.e=t,s):(h(this),t)}return c.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){h(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,n){return\"function\"!=typeof t?this.then():this._then(r,n,void 0,new c(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,d,d)},e.prototype.tap=function(t){return this._passThrough(t,1,d)},e.prototype.tapCatch=function(t){var r=arguments.length;if(1===r)return this._passThrough(t,1,void 0,d);var n,o=new Array(r-1),s=0;for(n=0;n<r-1;++n){var c=arguments[n];if(!i.isObject(c))return e.reject(new TypeError(\"tapCatch statement predicate: expecting an object but got \"+i.classString(c)));o[s++]=c}o.length=s;var u=arguments[n];return this._passThrough(a(o,u,this),1,void 0,d)},c}},{\"./catch_filter\":7,\"./util\":36}],16:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o,s){var a=t(\"./errors\").TypeError,c=t(\"./util\"),u=c.errorObj,h=c.tryCatch,f=[];function l(t,r,i,o){if(s.cancellation()){var a=new e(n),c=this._finallyPromise=new e(n);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new e(n))._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers=\"function\"==typeof i?[i].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}c.inherits(l,o),l.prototype._isResolved=function(){return null===this._promise},l.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},l.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError(\"generator .return() sentinel\");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=h(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},l.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},l.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},l.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},l.prototype.promise=function(){return this._promise},l.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},l.prototype._continue=function(t){var r=this._promise;if(t===u)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof e||null!==(o=function(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=h(r[o])(t);if(n._popContext(),s===u){n._pushContext();var a=e.reject(u.e);return n._popContext(),a}var c=i(s,n);if(c instanceof e)return c}return null}(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()}else this._promiseRejected(new a(\"A value %s was yielded that could not be treated as a promise\\n\\n See http://goo.gl/MqrFmX\\n\\n\".replace(\"%s\",String(n))+\"From coroutine:\\n\"+this._stack.split(\"\\n\").slice(1,-7).join(\"\\n\")))},e.coroutine=function(t,e){if(\"function\"!=typeof t)throw new a(\"generatorFunction must be a function\\n\\n See http://goo.gl/MqrFmX\\n\");var r=Object(e).yieldHandler,n=l,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if(\"function\"!=typeof t)throw new a(\"expecting a function but got \"+c.classString(t));f.push(t)},e.spawn=function(t){if(s.deprecated(\"Promise.spawn()\",\"Promise.coroutine()\"),\"function\"!=typeof t)return r(\"generatorFunction must be a function\\n\\n See http://goo.gl/MqrFmX\\n\");var n=new l(t,this),i=n.promise();return n._run(e.spawn),i}}},{\"./errors\":12,\"./util\":36}],17:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o){var s=t(\"./util\");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;e>0&&\"function\"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var i=new r(n).promise();return void 0!==t?i.spread(t):i}}},{\"./util\":36}],18:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o,s){var a=t(\"./util\"),c=a.tryCatch,u=a.errorObj,h=e._async;function f(t,r,n,i){this.constructor$(t),this._promise._captureStackTrace();var s=e._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0),a.isArray(t))for(var c=0;c<t.length;++c){var u=t[c];u instanceof e&&u.suppressUnhandledRejections()}}function l(t,r,i,o){if(\"function\"!=typeof r)return n(\"expecting a function but got \"+a.classString(r));var s=0;if(void 0!==i){if(\"object\"!=typeof i||null===i)return e.reject(new TypeError(\"options argument must be an object but it is \"+a.classString(i)));if(\"number\"!=typeof i.concurrency)return e.reject(new TypeError(\"'concurrency' must be a number but it is \"+a.classString(i.concurrency)));s=i.concurrency}return new f(t,r,s=\"number\"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),a=this._preservedValues,h=this._limit;if(r<0){if(n[r=-1*r-1]=t,h>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(h>=1&&this._inFlight>=h)return n[r]=t,this._queue.push(r),!1;null!==a&&(a[r]=t);var f=this._promise,l=this._callback,d=f._boundValue();f._pushContext();var p=c(l).call(d,t,r,o),m=f._popContext();if(s.checkForgottenReturns(p,m,null!==a?\"Promise.filter\":\"Promise.map\",f),p===u)return this._reject(p.e),!0;var b=i(p,this._promise);if(b instanceof e){var g=(b=b._target())._bitField;if(0==(50397184&g))return h>=1&&this._inFlight++,n[r]=b,b._proxy(this,-1*(r+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(b._reason()),!0):(this._cancel(),!0);p=b._value()}n[r]=p}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return l(this,t,e,null)},e.map=function(t,e,r,n){return l(t,e,r,n)}}},{\"./util\":36}],19:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o){var s=t(\"./util\"),a=s.tryCatch;e.method=function(t){if(\"function\"!=typeof t)throw new e.TypeError(\"expecting a function but got \"+s.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=a(t).apply(this,arguments),s=n._popContext();return o.checkForgottenReturns(i,s,\"Promise.method\",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(t){if(\"function\"!=typeof t)return i(\"expecting a function but got \"+s.classString(t));var n,c=new e(r);if(c._captureStackTrace(),c._pushContext(),arguments.length>1){o.deprecated(\"calling Promise.try with more than 1 argument\");var u=arguments[1],h=arguments[2];n=s.isArray(u)?a(t).apply(h,u):a(t).call(h,u)}else n=a(t)();var f=c._popContext();return o.checkForgottenReturns(n,f,\"Promise.try\",c),c._resolveFromSyncValue(n),c},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{\"./util\":36}],20:[function(t,e,r){\"use strict\";var n=t(\"./util\"),i=n.maybeWrapAsError,o=t(\"./errors\").OperationalError,s=t(\"./es5\");var a=/^(?:name|message|stack|cause)$/;function c(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=s.keys(t),i=0;i<r.length;++i){var c=r[i];a.test(c)||(e[c]=t[c])}return e}return n.markAsOriginatingFromRejection(t),t}e.exports=function(t,e){return function(r,n){if(null!==t){if(r){var o=c(i(r));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(n);t=null}}}},{\"./errors\":12,\"./es5\":13,\"./util\":36}],21:[function(t,e,r){\"use strict\";e.exports=function(e){var r=t(\"./util\"),n=e._async,i=r.tryCatch,o=r.errorObj;function s(t,e){if(!r.isArray(t))return a.call(this,t,e);var s=i(e).apply(this._boundValue(),[null].concat(t));s===o&&n.throwLater(s.e)}function a(t,e){var r=this._boundValue(),s=void 0===t?i(e).call(r,null):i(e).call(r,null,t);s===o&&n.throwLater(s.e)}function c(t,e){if(!t){var r=new Error(t+\"\");r.cause=t,t=r}var s=i(e).call(this._boundValue(),t);s===o&&n.throwLater(s.e)}e.prototype.asCallback=e.prototype.nodeify=function(t,e){if(\"function\"==typeof t){var r=a;void 0!==e&&Object(e).spread&&(r=s),this._then(r,c,void 0,this,t)}return this}}},{\"./util\":36}],22:[function(t,r,n){\"use strict\";r.exports=function(){var n=function(){return new y(\"circular promise resolution chain\\n\\n See http://goo.gl/MqrFmX\\n\")},i=function(){return new N.PromiseInspection(this._target())},o=function(t){return N.reject(new y(t))};function s(){}var a={},c=t(\"./util\");c.setReflectHandler(i);var u=function(){var t=e.domain;return void 0===t?null:t},h=function(){return{domain:u(),async:null}},f=c.isNode&&c.nodeSupportsAsyncResource?t(\"async_hooks\").AsyncResource:null,l=function(){return{domain:u(),async:new f(\"Bluebird::Promise\")}},d=c.isNode?h:function(){return null};c.notEnumerableProp(N,\"_getContext\",d);var p=t(\"./es5\"),m=t(\"./async\"),b=new m;p.defineProperty(N,\"_async\",{value:b});var g=t(\"./errors\"),y=N.TypeError=g.TypeError;N.RangeError=g.RangeError;var _=N.CancellationError=g.CancellationError;N.TimeoutError=g.TimeoutError,N.OperationalError=g.OperationalError,N.RejectionError=g.OperationalError,N.AggregateError=g.AggregateError;var v=function(){},w={},E={},x=t(\"./thenables\")(N,v),S=t(\"./promise_array\")(N,v,x,o,s),A=t(\"./context\")(N),C=A.create,k=t(\"./debuggability\")(N,A,function(){d=l,c.notEnumerableProp(N,\"_getContext\",l)},function(){d=h,c.notEnumerableProp(N,\"_getContext\",h)}),T=(k.CapturedTrace,t(\"./finally\")(N,x,E)),R=t(\"./catch_filter\")(E),M=t(\"./nodeback\"),j=c.errorObj,I=c.tryCatch;function N(t){t!==v&&function(t,e){if(null==t||t.constructor!==N)throw new y(\"the promise constructor cannot be invoked directly\\n\\n See http://goo.gl/MqrFmX\\n\");if(\"function\"!=typeof e)throw new y(\"expecting a function but got \"+c.classString(e))}(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent(\"promiseCreated\",this)}function O(t){this.promise._resolveCallback(t)}function B(t){this.promise._rejectCallback(t,!1)}function q(t){var e=new N(v);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return N.prototype.toString=function(){return\"[object Promise]\"},N.prototype.caught=N.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var s=arguments[r];if(!c.isObject(s))return o(\"Catch statement predicate: expecting an object but got \"+c.classString(s));n[i++]=s}if(n.length=i,\"function\"!=typeof(t=arguments[r]))throw new y(\"The last argument to .catch() must be a function, got \"+c.toString(t));return this.then(void 0,R(n,t,this))}return this.then(void 0,t)},N.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},N.prototype.then=function(t,e){if(k.warnings()&&arguments.length>0&&\"function\"!=typeof t&&\"function\"!=typeof e){var r=\".then() only accepts functions but was passed: \"+c.classString(t);arguments.length>1&&(r+=\", \"+c.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},N.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},N.prototype.spread=function(t){return\"function\"!=typeof t?o(\"expecting a function but got \"+c.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},N.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},N.prototype.all=function(){return arguments.length>0&&this._warn(\".all() was passed arguments but it does not take any\"),new S(this).promise()},N.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},N.getNewLibraryCopy=r.exports,N.is=function(t){return t instanceof N},N.fromNode=N.fromCallback=function(t){var e=new N(v);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(t)(M(e,r));return n===j&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},N.all=function(t){return new S(t).promise()},N.cast=function(t){var e=x(t);return e instanceof N||((e=new N(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},N.resolve=N.fulfilled=N.cast,N.reject=N.rejected=function(t){var e=new N(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},N.setScheduler=function(t){if(\"function\"!=typeof t)throw new y(\"expecting a function but got \"+c.classString(t));return b.setScheduler(t)},N.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new N(v),a=this._target(),u=a._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&u)?this._boundValue():a===this?void 0:this._boundTo),this._fireEvent(\"promiseChained\",this,s));var h=d();if(0!=(50397184&u)){var f,l,p=a._settlePromiseCtx;0!=(33554432&u)?(l=a._rejectionHandler0,f=t):0!=(16777216&u)?(l=a._fulfillmentHandler0,f=e,a._unsetRejectionIsUnhandled()):(p=a._settlePromiseLateCancellationObserver,l=new _(\"late cancellation observer\"),a._attachExtraTrace(l),f=e),b.invoke(p,a,{handler:c.contextBind(h,f),promise:s,receiver:n,value:l})}else a._addCallbacks(t,e,s,n,h);return s},N.prototype._length=function(){return 65535&this._bitField},N.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},N.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},N.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},N.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent(\"promiseFulfilled\",this)},N.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent(\"promiseRejected\",this)},N.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent(\"promiseResolved\",this)},N.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},N.prototype._isFinal=function(){return(4194304&this._bitField)>0},N.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},N.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent(\"promiseCancelled\",this)},N.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},N.prototype._setAsyncGuaranteed=function(){if(!b.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},N.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},N.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},N.prototype._promiseAt=function(t){return this[4*t-4+2]},N.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},N.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},N.prototype._boundValue=function(){},N.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,r,n,i,null)},N.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=a),this._addCallbacks(r,n,i,o,null)},N.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,\"function\"==typeof t&&(this._fulfillmentHandler0=c.contextBind(i,t)),\"function\"==typeof e&&(this._rejectionHandler0=c.contextBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,\"function\"==typeof t&&(this[s+0]=c.contextBind(i,t)),\"function\"==typeof e&&(this[s+1]=c.contextBind(i,e))}return this._setLength(o+1),o},N.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},N.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=x(t,this);if(!(r instanceof N))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a<s;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var c=new _(\"late cancellation observer\");i._attachExtraTrace(c),this._reject(c)}}else this._reject(n())}},N.prototype._rejectCallback=function(t,e,r){var n=c.ensureErrorObject(t),i=n===t;if(!i&&!r&&k.warnings()){var o=\"a promise was rejected with a non-error: \"+c.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},N.prototype._resolveFromExecutor=function(t){if(t!==v){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},N.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),e===w?r&&\"number\"==typeof r.length?o=I(t).apply(this._boundValue(),r):(o=j).e=new y(\"cannot .spread() a non-array: \"+c.classString(r)):o=I(t).call(e,r);var s=n._popContext();0==(65536&(i=n._bitField))&&(o===E?n._reject(r):o===j?n._rejectCallback(o.e,!1):(k.checkForgottenReturns(o,s,\"\",n,this),n._resolveCallback(o)))}},N.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},N.prototype._followee=function(){return this._rejectionHandler0},N.prototype._setFollowee=function(t){this._rejectionHandler0=t},N.prototype._settlePromise=function(t,e,r,n){var o=t instanceof N,a=this._bitField,c=0!=(134217728&a);0!=(65536&a)?(o&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,I(e).call(r,n)===j&&t._reject(j.e)):e===i?t._fulfill(i.call(r)):r instanceof s?r._promiseCancelled(t):o||t instanceof S?t._cancel():r.cancel()):\"function\"==typeof e?o?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,n,t)):e.call(r,n,t):r instanceof s?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(n,t):r._promiseRejected(n,t)):o&&(c&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(n):t._reject(n))},N.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;\"function\"==typeof e?r instanceof N?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof N&&r._reject(i)},N.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},N.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},N.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},N.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():b.settlePromises(this),this._dereferenceTrace())}},N.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return b.fatalError(t,c.isNode);(65535&e)>0?b.settlePromises(this):this._ensurePossibleRejectionHandled()}},N.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},N.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},N.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},N.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&p.defineProperty(N.prototype,Symbol.toStringTag,{get:function(){return\"Object\"}}),N.defer=N.pending=function(){return k.deprecated(\"Promise.defer\",\"new Promise\"),{promise:new N(v),resolve:O,reject:B}},c.notEnumerableProp(N,\"_makeSelfResolutionError\",n),t(\"./method\")(N,v,x,o,k),t(\"./bind\")(N,v,x,k),t(\"./cancel\")(N,S,o,k),t(\"./direct_resolve\")(N),t(\"./synchronous_inspection\")(N),t(\"./join\")(N,S,x,v,b),N.Promise=N,N.version=\"3.7.2\",t(\"./call_get.js\")(N),t(\"./generators.js\")(N,o,v,x,s,k),t(\"./map.js\")(N,S,o,x,v,k),t(\"./nodeify.js\")(N),t(\"./promisify.js\")(N,v),t(\"./props.js\")(N,S,x,o),t(\"./race.js\")(N,v,x,o),t(\"./reduce.js\")(N,S,o,x,v,k),t(\"./settle.js\")(N,S,k),t(\"./some.js\")(N,S,o),t(\"./timers.js\")(N,v,k),t(\"./using.js\")(N,o,x,C,v,k),t(\"./any.js\")(N),t(\"./each.js\")(N,v),t(\"./filter.js\")(N,v),c.toFastProperties(N),c.toFastProperties(N.prototype),q({a:1}),q({b:2}),q({c:3}),q(1),q(function(){}),q(void 0),q(!1),q(new N(v)),k.setBounds(m.firstLineError,c.lastLineError),N}},{\"./any.js\":1,\"./async\":2,\"./bind\":3,\"./call_get.js\":5,\"./cancel\":6,\"./catch_filter\":7,\"./context\":8,\"./debuggability\":9,\"./direct_resolve\":10,\"./each.js\":11,\"./errors\":12,\"./es5\":13,\"./filter.js\":14,\"./finally\":15,\"./generators.js\":16,\"./join\":17,\"./map.js\":18,\"./method\":19,\"./nodeback\":20,\"./nodeify.js\":21,\"./promise_array\":23,\"./promisify.js\":24,\"./props.js\":25,\"./race.js\":27,\"./reduce.js\":28,\"./settle.js\":30,\"./some.js\":31,\"./synchronous_inspection\":32,\"./thenables\":33,\"./timers.js\":34,\"./using.js\":35,\"./util\":36,async_hooks:void 0}],23:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o){var s=t(\"./util\");s.isArray;function a(t){var n=this._promise=new e(r);t instanceof e&&(n._propagateFrom(t,3),t.suppressUnhandledRejections()),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(r,o){var a=n(this._values,this._promise);if(a instanceof e){var c=(a=a._target())._bitField;if(this._values=a,0==(50397184&c))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var u=i(\"expecting an array or an iterable object but got \"+s.classString(a)).reason();this._promise._rejectCallback(u,!1)}},a.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<r;++a){var c=n(t[a],i);s=c instanceof e?(c=c._target())._bitField:null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0==(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!=(33554432&s)?this._promiseFulfilled(c._value(),a):0!=(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{\"./util\":36}],24:[function(t,e,r){\"use strict\";e.exports=function(e,r){var n={},i=t(\"./util\"),o=t(\"./nodeback\"),s=i.withAppended,a=i.maybeWrapAsError,c=i.canEvaluate,u=t(\"./errors\").TypeError,h={__isPromisified__:!0},f=new RegExp(\"^(?:\"+[\"arity\",\"length\",\"name\",\"arguments\",\"caller\",\"callee\",\"prototype\",\"__isPromisified__\"].join(\"|\")+\")$\"),l=function(t){return i.isIdentifier(t)&&\"_\"!==t.charAt(0)&&\"constructor\"!==t};function d(t){return!f.test(t)}function p(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function m(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,h);return!!n&&p(n)}function b(t,e,r,n){for(var o=i.inheritedDataKeys(t),s=[],a=0;a<o.length;++a){var c=o[a],h=t[c],f=n===l||l(c,h,t);\"function\"!=typeof h||p(h)||m(t,c,e)||!n(c,h,t,f)||s.push(c,h)}return function(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,\"\"),s=0;s<t.length;s+=2)if(t[s]===o)throw new u(\"Cannot promisify an API that has normal methods with '%s'-suffix\\n\\n See http://goo.gl/MqrFmX\\n\".replace(\"%s\",e))}}(s,e,r),s}var g=function(t){return t.replace(/([$])/,\"\\\\$\")};var y=c?void 0:function(t,c,u,h,f,l){var d=function(){return this}(),p=t;function m(){var i=c;c===n&&(i=this);var u=new e(r);u._captureStackTrace();var h=\"string\"==typeof p&&this!==d?this[p]:t,f=o(u,l);try{h.apply(i,s(arguments,f))}catch(t){u._rejectCallback(a(t),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return\"string\"==typeof p&&(t=h),i.notEnumerableProp(m,\"__isPromisified__\",!0),m};function _(t,e,r,o,s){for(var a=new RegExp(g(e)+\"$\"),c=b(t,e,a,r),u=0,h=c.length;u<h;u+=2){var f=c[u],l=c[u+1],d=f+e;if(o===y)t[d]=y(f,n,f,l,e,s);else{var p=o(l,function(){return y(f,n,f,l,e,s)});i.notEnumerableProp(p,\"__isPromisified__\",!0),t[d]=p}}return i.toFastProperties(t),t}e.promisify=function(t,e){if(\"function\"!=typeof t)throw new u(\"expecting a function but got \"+i.classString(t));if(p(t))return t;var r=function(t,e,r){return y(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,d),r},e.promisifyAll=function(t,e){if(\"function\"!=typeof t&&\"object\"!=typeof t)throw new u(\"the target of promisifyAll must be an object or a function\\n\\n See http://goo.gl/MqrFmX\\n\");var r=!!(e=Object(e)).multiArgs,n=e.suffix;\"string\"!=typeof n&&(n=\"Async\");var o=e.filter;\"function\"!=typeof o&&(o=l);var s=e.promisifier;if(\"function\"!=typeof s&&(s=y),!i.isIdentifier(n))throw new RangeError(\"suffix must be a valid identifier\\n\\n See http://goo.gl/MqrFmX\\n\");for(var a=i.inheritedDataKeys(t),c=0;c<a.length;++c){var h=t[a[c]];\"constructor\"!==a[c]&&i.isClass(h)&&(_(h.prototype,n,o,s,r),_(h,n,o,s,r))}return _(t,n,o,s,r)}}},{\"./errors\":12,\"./nodeback\":20,\"./util\":36}],25:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i){var o,s=t(\"./util\"),a=s.isObject,c=t(\"./es5\");\"function\"==typeof Map&&(o=Map);var u=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}();function h(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=u(t),r=!0;else{var n=c.keys(t),i=n.length;e=new Array(2*i);for(var s=0;s<i;++s){var a=n[s];e[s]=t[a],e[s+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function f(t){var r,o=n(t);return a(o)?(r=o instanceof e?o._then(e.props,void 0,void 0,void 0,void 0):new h(o).promise(),o instanceof e&&r._propagateFrom(o,2),r):i(\"cannot await properties of a non-object\\n\\n See http://goo.gl/MqrFmX\\n\")}s.inherits(h,r),h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],s=t[n];e.set(i,s)}return e}(this._values);else{r={};for(var n=this.length(),i=0,s=this.length();i<s;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},h.prototype.shouldCopyValues=function(){return!1},h.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return f(this)},e.props=function(t){return f(t)}}},{\"./es5\":13,\"./util\":36}],26:[function(t,e,r){\"use strict\";function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity<t},n.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},n.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},n.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},e.exports=n},{}],27:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i){var o=t(\"./util\"),s=function(t){return t.then(function(e){return a(e,t)})};function a(t,a){var c=n(t);if(c instanceof e)return s(c);if(null===(t=o.asArray(t)))return i(\"expecting an array or an iterable object but got \"+o.classString(t));var u=new e(r);void 0!==a&&u._propagateFrom(a,3);for(var h=u._fulfill,f=u._reject,l=0,d=t.length;l<d;++l){var p=t[l];(void 0!==p||l in t)&&e.cast(p)._then(h,f,void 0,u,null)}return u}e.race=function(t){return a(t,void 0)},e.prototype.race=function(){return a(this,void 0)}}},{\"./util\":36}],28:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o,s){var a=t(\"./util\"),c=a.tryCatch;function u(t,r,n,i){this.constructor$(t);var s=e._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=e.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function h(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function f(t,e,r,i){return\"function\"!=typeof e?n(\"expecting a function but got \"+a.classString(e)):new u(t,e,r,i).promise()}function l(t){this.accum=t,this.array._gotAccum(t);var r=i(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(t){var r,n=this.array,i=n._promise,o=c(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),t,this.index,this.length):o.call(i._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=r);var a=i._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?\"Promise.each\":\"Promise.reduce\",i),r}a.inherits(u,r),u.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},u.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},u.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},u.prototype._iterate=function(t){var r,n;this._values=t;var i=t.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var s=t[o];s instanceof e&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var a={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,a,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(h,h,void 0,r,this)},e.prototype.reduce=function(t,e){return f(this,t,e,null)},e.reduce=function(t,e,r,n){return f(t,e,r,n)}}},{\"./util\":36}],29:[function(t,i,o){\"use strict\";var s,a=t(\"./util\"),c=a.getNativePromise();if(a.isNode&&\"undefined\"==typeof MutationObserver){var u=r.setImmediate,h=e.nextTick;s=a.isRecentNode?function(t){u.call(r,t)}:function(t){h.call(e,t)}}else if(\"function\"==typeof c&&\"function\"==typeof c.resolve){var f=c.resolve();s=function(t){f.then(t)}}else s=\"undefined\"!=typeof MutationObserver&&(\"undefined\"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&\"classList\"in document.documentElement?function(){var t=document.createElement(\"div\"),e={attributes:!0},r=!1,n=document.createElement(\"div\");new MutationObserver(function(){t.classList.toggle(\"foo\"),r=!1}).observe(n,e);return function(i){var o=new MutationObserver(function(){o.disconnect(),i()});o.observe(t,e),r||(r=!0,n.classList.toggle(\"foo\"))}}():void 0!==n?function(t){n(t)}:\"undefined\"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error(\"No async scheduler available\\n\\n See http://goo.gl/MqrFmX\\n\")};i.exports=s},{\"./util\":36}],30:[function(t,e,r){\"use strict\";e.exports=function(e,r,n){var i=e.PromiseInspection;function o(t){this.constructor$(t)}t(\"./util\").inherits(o,r),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(\".settle()\",\".reflect()\"),new o(t).promise()},e.allSettled=function(t){return new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{\"./util\":36}],31:[function(t,e,r){\"use strict\";e.exports=function(e,r,n){var i=t(\"./util\"),o=t(\"./errors\").RangeError,s=t(\"./errors\").AggregateError,a=i.isArray,c={};function u(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function h(t,e){if((0|e)!==e||e<0)return n(\"expecting a positive integer\\n\\n See http://goo.gl/MqrFmX\\n\");var r=new u(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(u,r),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(t){this._howMany=t},u.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},u.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==c&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(t){this._values.push(t)},u.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(t){var e=\"Input array must contain at least \"+this._howMany+\" items but contains only \"+t+\" items\";return new o(e)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return h(t,e)},e.prototype.some=function(t){return h(this,t)},e._SomePromiseArray=u}},{\"./errors\":12,\"./util\":36}],32:[function(t,e,r){\"use strict\";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\n\\n See http://goo.gl/MqrFmX\\n\");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\n\\n See http://goo.gl/MqrFmX\\n\");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){\"use strict\";e.exports=function(e,r){var n=t(\"./util\"),i=n.errorObj,o=n.isObject;var s={}.hasOwnProperty;return function(t,a){if(o(t)){if(t instanceof e)return t;var c=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(t);if(c===i){a&&a._pushContext();var u=e.reject(c.e);return a&&a._popContext(),u}if(\"function\"==typeof c)return function(t){try{return s.call(t,\"_promise0\")}catch(t){return!1}}(t)?(u=new e(r),t._then(u._fulfill,u._reject,void 0,u,null),u):function(t,o,s){var a=new e(r),c=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var u=!0,h=n.tryCatch(o).call(t,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,u,!0),a=null)});return u=!1,a&&h===i&&(a._rejectCallback(h.e,!0,!0),a=null),c}(t,c,a)}return t}}},{\"./util\":36}],34:[function(t,e,r){\"use strict\";e.exports=function(e,r,n){var i=t(\"./util\"),o=e.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,i){var o,c;return void 0!==i?(o=e.resolve(i)._then(a,null,null,t,void 0),n.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(r),c=setTimeout(function(){o._fulfill()},+t),n.cancellation()&&o._setOnCancel(new s(c)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};e.prototype.delay=function(t){return c(t,this)};function u(t){return clearTimeout(this.handle),t}function h(t){throw clearTimeout(this.handle),t}e.prototype.timeout=function(t,e){var r,a;t=+t;var c=new s(setTimeout(function(){r.isPending()&&function(t,e,r){var n;n=\"string\"!=typeof e?e instanceof Error?e:new o(\"operation timed out\"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,a)},t));return n.cancellation()?(a=this.then(),(r=a._then(u,h,void 0,c,void 0))._setOnCancel(c)):r=this._then(u,h,void 0,c,void 0),r}}},{\"./util\":36}],35:[function(t,e,r){\"use strict\";e.exports=function(e,r,n,i,o,s){var a=t(\"./util\"),c=t(\"./errors\").TypeError,u=t(\"./util\").inherits,h=a.errorObj,f=a.tryCatch,l={};function d(t){setTimeout(function(){throw t},0)}function p(t,r){var i=0,s=t.length,a=new e(o);return function o(){if(i>=s)return a._fulfill();var c=function(t){var e=n(t);return e!==t&&\"function\"==typeof t._isDisposable&&\"function\"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[i++]);if(c instanceof e&&c._isDisposable()){try{c=n(c._getDisposer().tryDispose(r),t.promise)}catch(t){return d(t)}if(c instanceof e)return c._then(o,d,null,null,null)}o()}(),a}function m(t,e,r){this._data=t,this._promise=e,this._context=r}function b(t,e,r){this.constructor$(t,e,r)}function g(t){return m.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function y(t){this.length=t,this.promise=null,this[t-1]=null}m.prototype.data=function(){return this._data},m.prototype.promise=function(){return this._promise},m.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():l},m.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==l?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},m.isDisposer=function(t){return null!=t&&\"function\"==typeof t.resource&&\"function\"==typeof t.tryDispose},u(b,m),b.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},y.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r(\"you must pass at least 2 arguments to Promise.using\");var i,o=arguments[t-1];if(\"function\"!=typeof o)return r(\"expecting a function but got \"+a.classString(o));var c=!0;2===t&&Array.isArray(arguments[0])?(t=(i=arguments[0]).length,c=!1):(i=arguments,t--);for(var u=new y(t),l=0;l<t;++l){var d=i[l];if(m.isDisposer(d)){var b=d;(d=d.promise())._setDisposable(b)}else{var _=n(d);_ instanceof e&&(d=_._then(g,null,null,{resources:u,index:l},void 0))}u[l]=d}var v=new Array(u.length);for(l=0;l<v.length;++l)v[l]=e.resolve(u[l]).reflect();var w=e.all(v).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return h.e=r.error(),h;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=f(o);var n=c?o.apply(void 0,t):o(t),i=E._popContext();return s.checkForgottenReturns(n,i,\"Promise.using\",E),n}),E=w.lastly(function(){var t=new e.PromiseInspection(w);return p(u,t)});return u.promise=E,E._setOnCancel(u),E},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if(\"function\"==typeof t)return new b(t,this,i());throw new c}}},{\"./errors\":12,\"./util\":36}],36:[function(t,n,i){\"use strict\";var o=t(\"./es5\"),s=\"undefined\"==typeof navigator,a={e:{}},c,u=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==r?r:void 0!==this?this:null;function h(){try{var t=c;return c=null,t.apply(this,arguments)}catch(t){return a.e=t,a}}function f(t){return c=t,h}var l=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&\"$\"!==n.charAt(n.length-1)&&(this[n+\"$\"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function d(t){return null==t||!0===t||!1===t||\"string\"==typeof t||\"number\"==typeof t}function p(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}function m(t){return d(t)?new Error(k(t)):t}function b(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function g(t,e,r){if(!o.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(t,e,r){if(d(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(t,e,n),t}function _(t){throw t}var v=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(o.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var s;try{s=r(t)}catch(t){return n}for(var a=0;a<s.length;++a){var c=s[a];if(!i[c]){i[c]=!0;var u=Object.getOwnPropertyDescriptor(t,c);null!=u&&null==u.get&&null==u.set&&n.push(c)}}t=o.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<t.length;++s)if(n.call(t[s],o))continue t;i.push(o)}return i}}(),w=/this\\s*\\.\\s*\\S+\\s*=/;function E(t){try{if(\"function\"==typeof t){var e=o.names(t.prototype),r=o.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&\"constructor\"===e[0]),i=w.test(t+\"\")&&o.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function x(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var S=/^[a-z$_][a-z$_0-9]*$/i;function A(t){return S.test(t)}function C(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function k(t){try{return t+\"\"}catch(t){return\"[no string representation]\"}}function T(t){return t instanceof Error||null!==t&&\"object\"==typeof t&&\"string\"==typeof t.message&&\"string\"==typeof t.name}function R(t){try{y(t,\"isOperational\",!0)}catch(t){}}function M(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function j(t){return T(t)&&o.propertyIsWritable(t,\"stack\")}var I=\"stack\"in new Error?function(t){return j(t)?t:new Error(k(t))}:function(t){if(j(t))return t;try{throw new Error(k(t))}catch(t){return t}};function N(t){return{}.toString.call(t)}function O(t,e,r){for(var n=o.names(t),i=0;i<n.length;++i){var s=n[i];if(r(s))try{o.defineProperty(e,s,o.getDescriptor(t,s))}catch(t){}}}var B=function(t){return o.isArray(t)?t:null};if(\"undefined\"!=typeof Symbol&&Symbol.iterator){var q=\"function\"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};B=function(t){return o.isArray(t)?t:null!=t&&\"function\"==typeof t[Symbol.iterator]?q(t):null}}var P=void 0!==e&&\"[object process]\"===N(e).toLowerCase(),L=void 0!==e&&void 0!==e.env,$;function U(t){return L?e.env[t]:void 0}function D(){if(\"function\"==typeof Promise)try{if(\"[object Promise]\"===N(new Promise(function(){})))return Promise}catch(t){}}function F(t,e){if(null===t||\"function\"!=typeof e||e===$)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){var t=new Array(2).concat([].slice.call(arguments));return t[0]=n,t[1]=this,r.runInAsyncScope.apply(r,t)}}return e}var z={setReflectHandler:function(t){$=t},isClass:E,isIdentifier:A,inheritedDataKeys:v,getDataPropertyOrDefault:g,thrower:_,isArray:o.isArray,asArray:B,notEnumerableProp:y,isPrimitive:d,isObject:p,isError:T,canEvaluate:s,errorObj:a,tryCatch:f,inherits:l,withAppended:b,maybeWrapAsError:m,toFastProperties:x,filledRange:C,toString:k,canAttachTrace:j,ensureErrorObject:I,originatesFromRejection:M,markAsOriginatingFromRejection:R,classString:N,copyDescriptors:O,isNode:P,hasEnvVariables:L,env:U,global:u,getNativePromise:D,contextBind:F},H;z.isRecentNode=z.isNode&&(e.versions&&e.versions.node?H=e.versions.node.split(\".\").map(Number):e.version&&(H=e.version.split(\".\").map(Number)),0===H[0]&&H[1]>10||H[0]>0),z.nodeSupportsAsyncResource=z.isNode&&function(){var e=!1;try{e=\"function\"==typeof t(\"async_hooks\").AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),z.isNode&&z.toFastProperties(e);try{throw new Error}catch(t){z.lastLineError=t}n.exports=z},{\"./es5\":13,async_hooks:void 0}]},{},[4])(4)},t.exports=i(),\"undefined\"!=typeof window&&null!==window?window.P=window.Promise:\"undefined\"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,r(5),r(8),r(64).setImmediate)},function(t,e){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(t){\"object\"==typeof window&&(r=window)}t.exports=r},function(t,e){function r(t,e){if(!t)throw new Error(e||\"Assertion failed\")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||\"Assertion failed: \"+t+\" != \"+e)}},function(t,e,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(124)).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?\"%c\":\"\")+this.namespace+(r?\" %c\":\" \")+t[0]+(r?\"%c \":\" \")+\"+\"+e.humanize(this.diff),!r)return;var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(o=i))}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem(\"debug\"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&\"renderer\"===window.process.type)return!0;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},e.enable(i())}).call(this,r(5))},function(t,e,r){const{isFunction:n,isUndefined:i,isPlainObject:o,isArray:s,isTypedArray:a}=r(1),{CLIENT_ALIASES:c}=r(42);function u(t){let e=!1;if(a(t))return!1;if(t&&n(t.toSQL))return e;if(s(t))for(let r=0;r<t.length&&!e;r++)e=u(t[r]);else o(t)?Object.keys(t).forEach(r=>{e||(e=u(t[r]))}):e=i(t);return e}t.exports={addQueryContext:function(t){t.prototype.queryContext=function(t){return i(t)?this._queryContext:(this._queryContext=t,this)}},containsUndefined:u,normalizeArr:function(){const t=new Array(arguments.length);for(let e=0;e<t.length;e++)t[e]=arguments[e];return Array.isArray(t[0])?t[0]:t},resolveClientNameWithAliases:function(t){return c[t]||t},getUndefinedIndices:function(t){const e=[];return Array.isArray(t)?t.forEach((t,r)=>{u(t)&&e.push(r)}):o(t)?Object.keys(t).forEach(r=>{u(t[r])&&e.push(r)}):e.push(0),e}}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return\"function\"==typeof t}function i(t){return\"object\"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(\"number\"!=typeof t||t<0||isNaN(t))throw TypeError(\"n must be a positive number\");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,s,a,c,u;if(this._events||(this._events={}),\"error\"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified \"error\" event. ('+e+\")\");throw h.context=e,h}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(u=r.slice()).length,c=0;c<s;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(t,e){var s;if(!n(e))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",t,n(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[t].length),\"function\"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError(\"listener must be a function\");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit(\"removeListener\",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit(\"removeListener\",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)\"removeListener\"!==e&&this.removeAllListeners(e);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){\"use strict\";var n=r(9),i=r(0);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?\"0\"+t:t}function a(t){return 7===t.length?\"0\"+t:6===t.length?\"00\"+t:5===t.length?\"000\"+t:4===t.length?\"0000\"+t:3===t.length?\"00000\"+t:2===t.length?\"000000\"+t:1===t.length?\"0000000\"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"==typeof t)if(e){if(\"hex\"===e)for((t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e=\"\",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=o,e.toHex32=function(t,e){for(var r=\"\",n=0;n<t.length;n++){var i=t[n];\"little\"===e&&(i=o(i)),r+=a(i.toString(16))}return r},e.zero2=s,e.zero8=a,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,c=e;a<s.length;a++,c+=4){var u;u=\"big\"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[a]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];\"big\"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var c=0,u=e;return c+=(u=u+n>>>0)<e?1:0,c+=(u=u+o>>>0)<o?1:0,t+r+i+s+(c+=(u=u+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,c,u){var h=0,f=e;return h+=(f=f+n>>>0)<e?1:0,h+=(f=f+o>>>0)<o?1:0,h+=(f=f+a>>>0)<a?1:0,t+r+i+s+c+(h+=(f=f+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,c,u){return e+n+o+a+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){const n=r(0),i=r(11),{EventEmitter:o}=r(12),s=r(10),{assign:a,reduce:c,isPlainObject:u,isObject:h,isUndefined:f,isNumber:l}=r(1),d=r(43),p=r(61),m=s(\"knex:bindings\");function b(t){this.client=t,this.sql=\"\",this.bindings=[],this._wrappedBefore=void 0,this._wrappedAfter=void 0,t&&t.config&&(this._debug=t.config.debug,d(this,4))}n(b,o),a(b.prototype,{set(t,e){return this.sql=t,this.bindings=h(e)&&!e.toSQL||f(e)?e:[e],this},timeout(t,{cancel:e}={}){return l(t)&&t>0&&(this._timeout=t,e&&(this.client.assertCanCancelQuery(),this._cancelOnTimeout=!0)),this},wrap(t,e){return this._wrappedBefore=t,this._wrappedAfter=e,this},toString(){return this.toQuery()},toSQL(t,e){let r;const n=this.client.formatter(this);if(r=Array.isArray(this.bindings)?function(t,e){const r=t.bindings.length,n=t.bindings;let i=0;const o=t.sql.replace(/\\\\?\\?\\??/g,function(t){if(\"\\\\?\"===t)return t;const r=n[i++];return\"??\"===t?e.columnize(r):e.parameter(r)});if(r!==i)throw new Error(`Expected ${r} bindings, saw ${i}`);return{method:\"raw\",sql:o,bindings:e.bindings}}(this,n):this.bindings&&u(this.bindings)?function(t,e){const r=t.bindings;return{method:\"raw\",sql:t.sql.replace(/\\\\?(:(\\w+):(?=::)|:(\\w+):(?!:)|:(\\w+))/g,function(t,n,i,o,s){if(t!==n)return n;const a=i||o||s,c=t.trim(),u=\":\"===c[c.length-1],h=r[a];return void 0===h?(Object.prototype.hasOwnProperty.call(r,a)&&e.bindings.push(h),t):u?t.replace(n,e.columnize(h)):t.replace(n,e.parameter(h))}),bindings:e.bindings}}(this,n):{method:\"raw\",sql:this.sql,bindings:f(this.bindings)?[]:[this.bindings]},this._wrappedBefore&&(r.sql=this._wrappedBefore+r.sql),this._wrappedAfter&&(r.sql=r.sql+this._wrappedAfter),r.options=c(this._options,a,{}),this._timeout&&(r.timeout=this._timeout,this._cancelOnTimeout&&(r.cancelOnTimeout=this._cancelOnTimeout)),r.bindings=r.bindings||[],i.containsUndefined(r.bindings)){const t=i.getUndefinedIndices(this.bindings);throw m(r.bindings),new Error(`Undefined binding(s) detected for keys [${t}] when compiling RAW query: ${r.sql}`)}return r.__knexQueryUid=p.v1(),r}}),r(44)(b),i.addQueryContext(b),t.exports=b},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if(\"%%\"===t)return\"%\";if(r>=o)return t;switch(t){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return t}}),c=n[r];r<o;c=n[++r])m(c)||!v(c)?s+=\" \"+c:s+=\" \"+a(c);return s},e.deprecate=function(r,i){if(y(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;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 r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,t,n.depth)}function c(t,e){var r=a.styles[e];return r?\"\u001b[\"+a.colors[r][0]+\"m\"+t+\"\u001b[\"+a.colors[r][1]+\"m\":t}function u(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return g(i)||(i=h(t,i,n)),i}var o=function(t,e){if(y(e))return t.stylize(\"undefined\",\"undefined\");if(g(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}if(b(e))return t.stylize(\"\"+e,\"number\");if(p(e))return t.stylize(\"\"+e,\"boolean\");if(m(e))return t.stylize(\"null\",\"null\")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf(\"message\")>=0||s.indexOf(\"description\")>=0))return f(r);if(0===s.length){if(x(r)){var c=r.name?\": \"+r.name:\"\";return t.stylize(\"[Function\"+c+\"]\",\"special\")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(w(r))return t.stylize(Date.prototype.toString.call(r),\"date\");if(E(r))return f(r)}var u,v=\"\",S=!1,A=[\"{\",\"}\"];(d(r)&&(S=!0,A=[\"[\",\"]\"]),x(r))&&(v=\" [Function\"+(r.name?\": \"+r.name:\"\")+\"]\");return _(r)&&(v=\" \"+RegExp.prototype.toString.call(r)),w(r)&&(v=\" \"+Date.prototype.toUTCString.call(r)),E(r)&&(v=\" \"+f(r)),0!==s.length||S&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),\"regexp\"):t.stylize(\"[Object]\",\"special\"):(t.seen.push(r),u=S?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)k(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push(\"\");return i.forEach(function(i){i.match(/^\\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}(t,r,n,a,s):s.map(function(e){return l(t,r,n,a,e,S)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf(\"\\n\")>=0&&0,t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0)>60)return r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n \")+\" \"+r[1];return r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(u,v,A)):A[0]+v+A[1]}function f(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function l(t,e,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=c.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):c.set&&(a=t.stylize(\"[Setter]\",\"special\")),k(n,i)||(s=\"[\"+i+\"]\"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?h(t,c.value,null):h(t,c.value,r-1)).indexOf(\"\\n\")>-1&&(a=o?a.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\").substr(2):\"\\n\"+a.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\")):a=t.stylize(\"[Circular]\",\"special\")),y(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=t.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=t.stylize(s,\"string\"))}return s+\": \"+a}function d(t){return Array.isArray(t)}function p(t){return\"boolean\"==typeof t}function m(t){return null===t}function b(t){return\"number\"==typeof t}function g(t){return\"string\"==typeof t}function y(t){return void 0===t}function _(t){return v(t)&&\"[object RegExp]\"===S(t)}function v(t){return\"object\"==typeof t&&null!==t}function w(t){return v(t)&&\"[object Date]\"===S(t)}function E(t){return v(t)&&(\"[object Error]\"===S(t)||t instanceof Error)}function x(t){return\"function\"==typeof t}function S(t){return Object.prototype.toString.call(t)}function A(t){return t<10?\"0\"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(y(o)&&(o=n.env.NODE_DEBUG||\"\"),t=t.toUpperCase(),!s[t])if(new RegExp(\"\\\\b\"+t+\"\\\\b\",\"i\").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error(\"%s %d: %s\",t,r,n)}}else s[t]=function(){};return s[t]},e.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\"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=g,e.isSymbol=function(t){return\"symbol\"==typeof t},e.isUndefined=y,e.isRegExp=_,e.isObject=v,e.isDate=w,e.isError=E,e.isFunction=x,e.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},e.isBuffer=r(142);var C=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log(\"%s - %s\",(t=new Date,r=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(\":\"),[t.getDate(),C[t.getMonth()],r].join(\" \")),e.format.apply(e,arguments))},e.inherits=r(0),e._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,r(8),r(5))},function(t,e,r){var n=r(2).Buffer,i=r(27).Transform,o=r(47).StringDecoder;function s(t){i.call(this),this.hashMode=\"string\"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(s,i),s.prototype.update=function(t,e,r){\"string\"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error(\"trying to get auth tag in unsupported state\")},s.prototype.setAuthTag=function(){throw new Error(\"trying to set auth tag in unsupported state\")},s.prototype.setAAD=function(){throw new Error(\"trying to set aad in unsupported state\")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error(\"can't switch encodings\");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},function(t,e,r){\"use strict\";var n=r(35),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=Object.create(r(28));o.inherits=r(0);var s=r(65),a=r(46);o.inherits(f,s);for(var c=i(a.prototype),u=0;u<c.length;u++){var h=c[u];f.prototype[h]||(f.prototype[h]=a.prototype[h])}function f(t){if(!(this instanceof f))return new f(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once(\"end\",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(f.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,\"destroyed\",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){const n=r(7),{EventEmitter:i}=r(12),o=r(10),s=r(72),a=o(\"knex:tx\"),{uniqueId:c,isUndefined:u}=r(1);class h extends i{constructor(t,e,r,i){super();const o=this.txid=c(\"trx\");e?!r||u(r.doNotRejectOnRollback)?this.doNotRejectOnRollback=!1:this.doNotRejectOnRollback=r.doNotRejectOnRollback:(!r||u(r.doNotRejectOnRollback)?this.doNotRejectOnRollback=!0:this.doNotRejectOnRollback=r.doNotRejectOnRollback,this.initPromise=new Promise((t,r)=>{this.initRejectFn=r,e=(e=>{t(e)})})),this.client=t,this.logger=t.logger,this.outerTx=i,this.trxClient=void 0,this._debug=t.config&&t.config.debug,a(\"%s: Starting %s transaction\",o,i?\"nested\":\"top level\"),this._promise=this.acquireConnection(r,r=>{const i=this.trxClient=function(t,e,r){const i=Object.create(e.constructor.prototype);i.version=e.version,i.config=e.config,i.driver=e.driver,i.connectionSettings=e.connectionSettings,i.transacting=!0,i.valueForUndefined=e.valueForUndefined,i.logger=e.logger,i.on(\"query\",function(r){t.emit(\"query\",r),e.emit(\"query\",r)}),i.on(\"query-error\",function(r,n){t.emit(\"query-error\",r,n),e.emit(\"query-error\",r,n)}),i.on(\"query-response\",function(r,n,i){t.emit(\"query-response\",r,n,i),e.emit(\"query-response\",r,n,i)});const o=i.query;i.query=function(e,s){const a=t.isCompleted();return new n(function(n,c){try{if(e!==r)throw new Error(\"Invalid connection for transaction query.\");a&&f(t,s),n(o.call(i,e,s))}catch(t){c(t)}})};const s=i.stream;return i.stream=function(e,o,a,c){const u=t.isCompleted();return new n(function(n,h){try{if(e!==r)throw new Error(\"Invalid connection for transaction query.\");u&&f(t,o),n(s.call(i,e,o,a,c))}catch(t){h(t)}})},i.acquireConnection=function(){return n.resolve(r)},i.releaseConnection=function(){return n.resolve()},i}(this,t,r),o=t.transacting?this.savepoint(r):this.begin(r),a=new n((t,e)=>{this._resolver=t,this._rejecter=e});return o.then(()=>(function(t,e,r){const n=s(r);n.withUserParams=(()=>{throw new Error(\"Cannot set user params on a transaction - it can only inherit params from main knex instance\")}),n.isTransaction=!0,n.userParams=t.userParams||{},n.transaction=function(e,n){return n?u(n.doNotRejectOnRollback)&&(n.doNotRejectOnRollback=!0):n={doNotRejectOnRollback:!0},e?r.transaction(e,n,t):new Promise((e,i)=>{r.transaction(t=>{e(t)},n,t)})},n.savepoint=function(t,e){return n.transaction(t,e)},t.client.transacting?(n.commit=(r=>t.release(e,r)),n.rollback=(r=>t.rollbackTo(e,r))):(n.commit=(r=>t.commit(e,r)),n.rollback=(r=>t.rollback(e,r)));return n.isCompleted=(()=>t.isCompleted()),n})(this,r,i)).then(t=>{let r;this.initPromise?t.executionPromise=a.catch(t=>{throw t}):t.executionPromise=a;try{r=e(t)}catch(t){r=n.reject(t)}return r&&r.then&&\"function\"==typeof r.then&&r.then(e=>t.commit(e)).catch(e=>t.rollback(e)),null}).catch(t=>this._rejecter(t)),a}).catch(t=>{if(!this.initRejectFn)throw t;this.initRejectFn(t)}),this._completed=!1,this._previousSibling=n.resolve(!0),i&&(i._lastChild&&(this._previousSibling=i._lastChild),i._lastChild=this._promise)}isCompleted(){return this._completed||this.outerTx&&this.outerTx.isCompleted()||!1}begin(t){return this.query(t,\"BEGIN;\")}savepoint(t){return this.query(t,`SAVEPOINT ${this.txid};`)}commit(t,e){return this.query(t,\"COMMIT;\",1,e)}release(t,e){return this.query(t,`RELEASE SAVEPOINT ${this.txid};`,1,e)}rollback(t,e){return this.query(t,\"ROLLBACK\",2,e).timeout(5e3).catch(n.TimeoutError,()=>{this._rejecter(e)})}rollbackTo(t,e){return this.query(t,`ROLLBACK TO SAVEPOINT ${this.txid}`,2,e).timeout(5e3).catch(n.TimeoutError,()=>{this._rejecter(e)})}query(t,e,r,n){const i=this.trxClient.query(t,e).catch(t=>{r=2,n=t,this._completed=!0,a(\"%s error running transaction query\",this.txid)}).then(t=>{if(1===r&&this._resolver(n),2===r){if(u(n)){if(this.doNotRejectOnRollback&&/^ROLLBACK\\b/i.test(e))return void this._resolver();n=new Error(`Transaction rejected with non-error: ${n}`)}this._rejecter(n)}return t});return 1!==r&&2!==r||(this._completed=!0),i}debug(t){return this._debug=!arguments.length||t,this}acquireConnection(t,e){const r=t&&t.connection;return new n((t,e)=>{try{t(r||this.client.acquireConnection())}catch(t){e(t)}}).then(t=>(t.__knexTxId=this.txid,(this._previousSibling?this._previousSibling.catch(()=>{}):Promise.resolve()).then(function(){return t}))).then(async t=>{try{return await e(t)}finally{r?a(\"%s: not releasing external connection\",this.txid):(a(\"%s: releasing connection\",this.txid),this.client.releaseConnection(t))}})}}function f(t,e){const r=\"string\"==typeof e?e:e&&e.sql;throw a(\"%s: Transaction completed: %s\",t.txid,r),new Error(\"Transaction query already complete, run with DEBUG=knex:tx for more info\")}[\"then\",\"bind\",\"catch\",\"finally\",\"asCallback\",\"spread\",\"map\",\"reduce\",\"thenReturn\",\"return\",\"yield\",\"ensure\",\"exec\",\"reflect\",\"get\",\"mapSeries\",\"delay\"].forEach(function(t){h.prototype[t]=function(){return this._promise[t].apply(this._promise,arguments)}}),t.exports=h},function(t,e,r){const n=r(11),i=r(14),o=r(36),s=r(71),a=r(10),{assign:c,bind:u,compact:h,groupBy:f,isEmpty:l,isString:d,isUndefined:p,map:m,omitBy:b,reduce:g,has:y}=r(1),_=r(61),v=a(\"knex:bindings\");function w(t,e){this.client=t,this.method=e._method||\"select\",this.options=e._options,this.single=e._single,this.timeout=e._timeout||!1,this.cancelOnTimeout=e._cancelOnTimeout||!1,this.grouped=f(e._statements,\"grouping\"),this.formatter=t.formatter(e)}const E=[\"columns\",\"join\",\"where\",\"union\",\"group\",\"having\",\"order\",\"limit\",\"offset\",\"lock\",\"waitMode\"];c(w.prototype,{_emptyInsertValue:\"default values\",toSQL(t,e){this._undefinedInWhereClause=!1,this.undefinedBindingsInfo=[];const r=this[t=t||this.method]()||\"\",n={method:t,options:g(this.options,c,{}),timeout:this.timeout,cancelOnTimeout:this.cancelOnTimeout,bindings:this.formatter.bindings||[],__knexQueryUid:_.v1()};if(Object.defineProperties(n,{toNative:{value:()=>({sql:this.client.positionBindings(n.sql),bindings:this.client.prepBindings(n.bindings)}),enumerable:!1}}),d(r)?n.sql=r:c(n,r),\"select\"!==t&&\"first\"!==t||this.single.as&&(n.as=this.single.as),this._undefinedInWhereClause)throw v(n.bindings),new Error(\"Undefined binding(s) detected when compiling \"+`${t.toUpperCase()}. Undefined column(s): [${this.undefinedBindingsInfo.join(\", \")}] query: ${n.sql}`);return n},select(){let t=this.with();const e=E.map(t=>this[t](this));return t+=h(e).join(\" \")},pluck(){let t=this.single.pluck;return-1!==t.indexOf(\".\")&&(t=t.split(\".\").slice(-1)[0]),{sql:this.select(),pluck:t}},insert(){const t=this.single.insert||[];let e=this.with()+`insert into ${this.tableName} `;if(Array.isArray(t)){if(0===t.length)return\"\"}else if(\"object\"==typeof t&&l(t))return e+this._emptyInsertValue;const r=this._prepInsert(t);if(\"string\"==typeof r)e+=r;else if(r.columns.length){e+=`(${this.formatter.columnize(r.columns)}`,e+=\") values (\";let t=-1;for(;++t<r.values.length;)0!==t&&(e+=\"), (\"),e+=this.formatter.parameterize(r.values[t],this.client.valueForUndefined);e+=\")\"}else 1===t.length&&t[0]?e+=this._emptyInsertValue:e=\"\";return e},update(){const t=this.with(),{tableName:e}=this,r=this._prepUpdate(this.single.update),n=this.where();return t+`update ${this.single.only?\"only \":\"\"}${e}`+\" set \"+r.join(\", \")+(n?` ${n}`:\"\")},columns(){let t=\"\";if(this.onlyUnions())return\"\";const e=this.grouped.columns||[];let r=-1,n=[];if(e)for(;++r<e.length;){const i=e[r];i.distinct&&(t=\"distinct \"),i.distinctOn?t=this.distinctOn(i.value):\"aggregate\"===i.type?n.push(...this.aggregate(i)):\"aggregateRaw\"===i.type?n.push(this.aggregateRaw(i)):i.value&&i.value.length>0&&n.push(this.formatter.columnize(i.value))}return 0===n.length&&(n=[\"*\"]),`select ${t}`+n.join(\", \")+(this.tableName?` from ${this.single.only?\"only \":\"\"}${this.tableName}`:\"\")},_aggregate(t,{aliasSeparator:e=\" as \",distinctParentheses:r}={}){const n=t.value,i=t.method,o=t.aggregateDistinct?\"distinct \":\"\",s=t=>this.formatter.wrap(t),a=(t,r)=>r?t+e+s(r):t,c=(t,e)=>{let n=t.map(s).join(\", \");if(o){const t=r?\"(\":\" \",e=r?\")\":\"\";n=o.trim()+t+n+e}return a(`${i}(${n})`,e)},u=(t,e)=>{const r=`${i}(${o+s(t)})`;return a(r,e)};if(Array.isArray(n))return[c(n)];if(\"object\"==typeof n){if(t.alias)throw new Error(\"When using an object explicit alias can not be used\");return Object.entries(n).map(([t,e])=>Array.isArray(e)?c(e,t):u(e,t))}const h=n.toLowerCase().indexOf(\" as \");let f=n,{alias:l}=t;if(-1!==h){if(f=n.slice(0,h),l)throw new Error(`Found multiple aliases for same column: ${f}`);l=n.slice(h+4)}return[u(f,l)]},aggregate(t){return this._aggregate(t)},aggregateRaw(t){const e=t.aggregateDistinct?\"distinct \":\"\";return`${t.method}(${e+this.formatter.unwrapRaw(t.value)})`},join(){let t=\"\",e=-1;const r=this.grouped.join;if(!r)return\"\";for(;++e<r.length;){const n=r[e],i=n.schema?`${n.schema}.${n.table}`:n.table;if(e>0&&(t+=\" \"),\"raw\"===n.joinType)t+=this.formatter.unwrapRaw(n.table);else{t+=n.joinType+\" join \"+this.formatter.wrap(i);let e=-1;for(;++e<n.clauses.length;){const r=n.clauses[e];t+=e>0?` ${r.bool} `:` ${\"onUsing\"===r.type?\"using\":\"on\"} `;const i=this[r.type].call(this,r);i&&(t+=i)}}}return t},onBetween(t){return this.formatter.wrap(t.column)+\" \"+this._not(t,\"between\")+\" \"+m(t.value,u(this.formatter.parameter,this.formatter)).join(\" and \")},onNull(t){return this.formatter.wrap(t.column)+\" is \"+this._not(t,\"null\")},onExists(t){return this._not(t,\"exists\")+\" (\"+this.formatter.rawOrFn(t.value)+\")\"},onIn(t){return Array.isArray(t.column)?this.multiOnIn(t):this.formatter.wrap(t.column)+\" \"+this._not(t,\"in \")+this.wrap(this.formatter.parameterize(t.value))},multiOnIn(t){let e=-1,r=`(${this.formatter.columnize(t.column)}) `;for(r+=this._not(t,\"in \")+\"((\";++e<t.value.length;)0!==e&&(r+=\"),(\"),r+=this.formatter.parameterize(t.value[e]);return r+\"))\"},where(){const t=this.grouped.where;if(!t)return;const e=[];let r=-1;for(;++r<t.length;){const i=t[r];Object.prototype.hasOwnProperty.call(i,\"value\")&&n.containsUndefined(i.value)&&(this.undefinedBindingsInfo.push(i.column),this._undefinedInWhereClause=!0);const o=this[i.type](i);o&&(0===e.length?e[0]=\"where\":e.push(i.bool),e.push(o))}return e.length>1?e.join(\" \"):\"\"},group(){return this._groupsOrders(\"group\")},order(){return this._groupsOrders(\"order\")},having(){const t=this.grouped.having;if(!t)return\"\";const e=[\"having\"];for(let r=0,n=t.length;r<n;r++){const n=t[r],i=this[n.type](n);i&&(0===e.length&&(e[0]=\"where\"),(e.length>1||1===e.length&&\"having\"!==e[0])&&e.push(n.bool),e.push(i))}return e.length>1?e.join(\" \"):\"\"},havingRaw(t){return this._not(t,\"\")+this.formatter.unwrapRaw(t.value)},havingWrapped(t){const e=this.formatter.rawOrFn(t.value,\"where\");return e&&this._not(t,\"\")+\"(\"+e.slice(6)+\")\"||\"\"},havingBasic(t){return this._not(t,\"\")+this.formatter.wrap(t.column)+\" \"+this.formatter.operator(t.operator)+\" \"+this.formatter.parameter(t.value)},havingNull(t){return this.formatter.wrap(t.column)+\" is \"+this._not(t,\"null\")},havingExists(t){return this._not(t,\"exists\")+\" (\"+this.formatter.rawOrFn(t.value)+\")\"},havingBetween(t){return this.formatter.wrap(t.column)+\" \"+this._not(t,\"between\")+\" \"+m(t.value,u(this.formatter.parameter,this.formatter)).join(\" and \")},havingIn(t){return Array.isArray(t.column)?this.multiHavingIn(t):this.formatter.wrap(t.column)+\" \"+this._not(t,\"in \")+this.wrap(this.formatter.parameterize(t.value))},multiHavingIn(t){let e=-1,r=`(${this.formatter.columnize(t.column)}) `;for(r+=this._not(t,\"in \")+\"((\";++e<t.value.length;)0!==e&&(r+=\"),(\"),r+=this.formatter.parameterize(t.value[e]);return r+\"))\"},union(){const t=this.onlyUnions(),e=this.grouped.union;if(!e)return\"\";let r=\"\";for(let n=0,i=e.length;n<i;n++){const i=e[n];n>0&&(r+=\" \"),(n>0||!t)&&(r+=i.clause+\" \");const o=this.formatter.rawOrFn(i.value);o&&(i.wrap&&(r+=\"(\"),r+=o,i.wrap&&(r+=\")\"))}return r},onlyUnions(){return!this.grouped.columns&&this.grouped.union&&!this.tableName},limit(){return!this.single.limit&&0!==this.single.limit?\"\":`limit ${this.formatter.parameter(this.single.limit)}`},offset(){return this.single.offset?`offset ${this.formatter.parameter(this.single.offset)}`:\"\"},del(){const{tableName:t}=this,e=this.with(),r=this.where();return e+`delete from ${this.single.only?\"only \":\"\"}${t}`+(r?` ${r}`:\"\")},truncate(){return`truncate ${this.tableName}`},lock(){if(this.single.lock)return this[this.single.lock]()},waitMode(){if(this.single.waitMode)return this[this.single.waitMode]()},skipLocked(){throw new Error(\".skipLocked() is currently only supported on MySQL 8.0+ and PostgreSQL 9.5+\")},noWait(){throw new Error(\".noWait() is currently only supported on MySQL 8.0+, MariaDB 10.3.0+ and PostgreSQL 9.5+\")},distinctOn(t){throw new Error(\".distinctOn() is currently only supported on PostgreSQL\")},onWrapped(t){const e=this,r=new s;t.value.call(r,r);let n=\"\";return r.clauses.forEach(function(t,r){r>0&&(n+=` ${t.bool} `);const i=e[t.type](t);i&&(n+=i)}),n.length?`(${n})`:\"\"},onBasic(t){return this.formatter.wrap(t.column)+\" \"+this.formatter.operator(t.operator)+\" \"+this.formatter.wrap(t.value)},onVal(t){return this.formatter.wrap(t.column)+\" \"+this.formatter.operator(t.operator)+\" \"+this.formatter.parameter(t.value)},onRaw(t){return this.formatter.unwrapRaw(t.value)},onUsing(t){return\"(\"+this.formatter.columnize(t.column)+\")\"},whereIn(t){let e=null;e=Array.isArray(t.column)?`(${this.formatter.columnize(t.column)})`:this.formatter.wrap(t.column);const r=this.formatter.values(t.value);return`${e} ${this._not(t,\"in \")}${r}`},whereNull(t){return this.formatter.wrap(t.column)+\" is \"+this._not(t,\"null\")},whereBasic(t){return this._not(t,\"\")+this.formatter.wrap(t.column)+\" \"+this.formatter.operator(t.operator)+\" \"+(t.asColumn?this.formatter.wrap(t.value):this.formatter.parameter(t.value))},whereExists(t){return this._not(t,\"exists\")+\" (\"+this.formatter.rawOrFn(t.value)+\")\"},whereWrapped(t){const e=this.formatter.rawOrFn(t.value,\"where\");return e&&this._not(t,\"\")+\"(\"+e.slice(6)+\")\"||\"\"},whereBetween(t){return this.formatter.wrap(t.column)+\" \"+this._not(t,\"between\")+\" \"+m(t.value,u(this.formatter.parameter,this.formatter)).join(\" and \")},whereRaw(t){return this._not(t,\"\")+this.formatter.unwrapRaw(t.value)},wrap:t=>\"(\"!==t.charAt(0)?`(${t})`:t,with(){if(!this.grouped.with||!this.grouped.with.length)return\"\";const t=this.grouped.with;if(!t)return;const e=[];let r=-1,n=!1;for(;++r<t.length;){const i=t[r];i.recursive&&(n=!0);const o=this[i.type](i);e.push(o)}return`with ${n?\"recursive \":\"\"}${e.join(\", \")} `},withWrapped(t){const e=this.formatter.rawOrFn(t.value);return e&&this.formatter.columnize(t.alias)+\" as (\"+e+\")\"||\"\"},_not:(t,e)=>t.not?`not ${e}`:e,_prepInsert(t){const e=this.formatter.rawOrFn(t);if(e)return e;let r=[];const n=[];Array.isArray(t)||(t=t?[t]:[]);let i=-1;for(;++i<t.length&&null!=t[i];){0===i&&(r=Object.keys(t[i]).sort());const e=new Array(r.length),o=Object.keys(t[i]);let s=-1;for(;++s<o.length;){const a=o[s];let c=r.indexOf(a);if(-1===c){c=(r=r.concat(a).sort()).indexOf(a);let t=-1;for(;++t<n.length;)n[t].splice(c,0,void 0);e.splice(c,0,void 0)}e[c]=t[i][a]}n.push(e)}return{columns:r,values:n}},_prepUpdate(t={}){const{counter:e={}}=this.single;for(const r of Object.keys(e)){if(y(t,r)){this.client.logger.warn(\"increment/decrement called for a column that has already been specified in main .update() call. Ignoring increment/decrement and using value from .update() call.\");continue}let n=e[r];const i=n<0?\"-\":\"+\";\"-\"===i&&(n=-n),t[r]=this.client.raw(`?? ${i} ?`,[r,n])}t=b(t,p);const r=[],n=Object.keys(t);let i=-1;for(;++i<n.length;)r.push(this.formatter.wrap(n[i])+\" = \"+this.formatter.parameter(t[n[i]]));if(l(r))throw new Error([\"Empty .update() call detected!\",\"Update data does not contain any values to update.\",\"This will result in a faulty query.\",this.single.table?`Table: ${this.single.table}.`:\"\",this.single.update?`Columns: ${Object.keys(this.single.update)}.`:\"\"].join(\" \"));return r},_formatGroupsItemValue(t){const{formatter:e}=this;return t instanceof i?e.unwrapRaw(t):t instanceof o?\"(\"+e.columnize(t)+\")\":e.columnize(t)},_groupsOrders(t){const e=this.grouped[t];if(!e)return\"\";const{formatter:r}=this,n=e.map(e=>{return this._formatGroupsItemValue(e.value)+(\"order\"===t&&\"orderByRaw\"!==e.type?` ${r.direction(e.direction)}`:\"\")});return n.length?t+\" by \"+n.join(\", \"):\"\"}}),w.prototype.first=w.prototype.select,Object.defineProperty(w.prototype,\"tableName\",{get(){if(!this._tableName){let t=this.single.table;const e=this.single.schema;t&&e&&(t=`${e}.${t}`),this._tableName=t?this.formatter.wrap(t,t instanceof o):\"\"}return this._tableName}}),t.exports=w},function(t,e,r){function n(t){this.columnName=t}n.prototype.toString=function(){return`[object ReturningHelper:${this.columnName}]`},t.exports={generateCombinedName:function(t,e,n,i){const o=r(184);Array.isArray(i)||(i=i?[i]:[]);const s=n.replace(/\\.|-/g,\"_\"),a=i.join(\"_\");let c=`${s}_${a.length?a+\"_\":\"\"}${e}`.toLowerCase();return c.length>30&&(t.warn(`Automatically generated name \"${c}\" exceeds 30 character `+\"limit for Oracle. Using base64 encoded sha1 of that name instead.\"),c=o.createHash(\"sha1\").update(c).digest(\"base64\").replace(\"=\",\"\")),c},isConnectionError:function(t){return[\"ORA-03114\",\"ORA-03113\",\"ORA-03135\",\"ORA-12514\",\"ORA-00022\",\"ORA-00028\",\"ORA-00031\",\"ORA-00045\",\"ORA-00378\",\"ORA-00602\",\"ORA-00603\",\"ORA-00609\",\"ORA-01012\",\"ORA-01041\",\"ORA-01043\",\"ORA-01089\",\"ORA-01092\",\"ORA-02396\",\"ORA-03122\",\"ORA-12153\",\"ORA-12537\",\"ORA-12547\",\"ORA-12570\",\"ORA-12583\",\"ORA-27146\",\"ORA-28511\",\"ORA-56600\",\"NJS-040\",\"NJS-024\",\"NJS-003\"].some(function(e){return 0===t.message.indexOf(e)})},wrapSqlWithCatch:function(t,e){return`begin execute immediate '${t.replace(/'/g,\"''\")}'; `+`exception when others then if sqlcode != ${e} then raise; `+\"end if; end;\"},ReturningHelper:n}},function(t,e,r){const n=r(7),i=r(14),o=r(129),s=r(130),a=r(29),c=r(18),u=r(36),h=r(19),f=r(147),l=r(22),d=r(148),p=r(23),m=r(49),b=r(24),{Pool:g,TimeoutError:y}=r(149),_=r(0),{EventEmitter:v}=r(12),{promisify:w}=r(15),{makeEscape:E}=r(37),{uniqueId:x,cloneDeep:S,defaults:A}=r(1),C=r(154),k=r(10)(\"knex:client\"),T=r(10)(\"knex:query\"),R=r(10)(\"knex:bindings\"),M=(t,e)=>T(t.replace(/%/g,\"%%\"),e),{POOL_CONFIG_OPTIONS:j}=r(42);function I(t={}){if(this.config=t,this.logger=new C(t),this.dialect&&!this.config.client&&this.logger.warn(\"Using 'this.dialect' to identify the client is deprecated and support for it will be removed in the future. Please use configuration option 'client' instead.\"),!(this.config.client||this.dialect))throw new Error(\"knex: Required configuration option 'client' is missing.\");t.version&&(this.version=t.version),t.connection&&t.connection instanceof Function?(this.connectionConfigProvider=t.connection,this.connectionConfigExpirationChecker=(()=>!0)):(this.connectionSettings=S(t.connection||{}),this.connectionConfigExpirationChecker=null),this.driverName&&t.connection&&(this.initializeDriver(),(!t.pool||t.pool&&0!==t.pool.max)&&this.initializePool(t)),this.valueForUndefined=this.raw(\"DEFAULT\"),t.useNullAsDefault&&(this.valueForUndefined=null)}_(I,v),Object.assign(I.prototype,{formatter(t){return new a(this,t)},queryBuilder(){return new u(this)},queryCompiler(t){return new h(this,t)},schemaBuilder(){return new f(this)},schemaCompiler(t){return new l(this,t)},tableBuilder(t,e,r){return new d(this,t,e,r)},tableCompiler(t){return new p(this,t)},columnBuilder(t,e,r){return new m(this,t,e,r)},columnCompiler(t,e){return new b(this,t,e)},runner(t){return new s(this,t)},transaction(t,e,r){return new c(this,t,e,r)},raw(){return new i(this).set(...arguments)},ref(){return new o(this,...arguments)},_formatQuery(t,e,r){e=null==e?[]:[].concat(e);let n=0;return t.replace(/\\\\?\\?/g,t=>{if(\"\\\\?\"===t)return\"?\";if(n===e.length)return t;const i=e[n++];return this._escapeBinding(i,{timeZone:r})})},_escapeBinding:E({escapeString:t=>`'${t.replace(/'/g,\"''\")}'`}),query(t,e){\"string\"==typeof e&&(e={sql:e}),e.bindings=this.prepBindings(e.bindings);const{__knexUid:r,__knexTxId:n}=t;return this.emit(\"query\",Object.assign({__knexUid:r,__knexTxId:n},e)),M(e.sql,n),R(e.bindings,n),e.sql=this.positionBindings(e.sql),this._query(t,e).catch(t=>{throw t.message=this._formatQuery(e.sql,e.bindings)+\" - \"+t.message,this.emit(\"query-error\",t,Object.assign({__knexUid:r,__knexTxId:n},e)),t})},stream(t,e,r,n){\"string\"==typeof e&&(e={sql:e}),e.bindings=this.prepBindings(e.bindings);const{__knexUid:i,__knexTxId:o}=t;return this.emit(\"query\",Object.assign({__knexUid:i,__knexTxId:o},e)),M(e.sql,o),R(e.bindings,o),e.sql=this.positionBindings(e.sql),this._stream(t,e,r,n)},prepBindings:t=>t,positionBindings:t=>t,postProcessResponse(t,e){return this.config.postProcessResponse?this.config.postProcessResponse(t,e):t},wrapIdentifier(t,e){return this.customWrapIdentifier(t,this.wrapIdentifierImpl,e)},customWrapIdentifier(t,e,r){return this.config.wrapIdentifier?this.config.wrapIdentifier(t,e,r):e(t)},wrapIdentifierImpl:t=>\"*\"!==t?`\"${t.replace(/\"/g,'\"\"')}\"`:\"*\",initializeDriver(){try{this.driver=this._driver()}catch(t){const e=`Knex: run\\n$ npm install ${this.driverName} --save`;throw this.logger.error(`${e}\\n${t.message}\\n${t.stack}`),new Error(`${e}\\n${t.message}`)}},poolDefaults:()=>({min:2,max:10,propagateCreateError:!0}),getPoolSettings(t){t=A({},t,this.poolDefaults()),j.forEach(e=>{e in t&&this.logger.warn([`Pool config option \"${e}\" is no longer supported.`,\"See https://github.com/Vincit/tarn.js for possible pool config options.\"].join(\" \"))});const e=[this.config.acquireConnectionTimeout||6e4,t.acquireTimeoutMillis].filter(t=>void 0!==t);t.acquireTimeoutMillis=Math.min(...e);const r=async()=>{if(!this.connectionConfigProvider)return;if(!this.connectionConfigExpirationChecker||!this.connectionConfigExpirationChecker())return;const t=await this.connectionConfigProvider();t.expirationChecker?(this.connectionConfigExpirationChecker=t.expirationChecker,delete t.expirationChecker):this.connectionConfigExpirationChecker=null,this.connectionSettings=t};return Object.assign(t,{create:async()=>{await r();const e=await this.acquireRawConnection();return e.__knexUid=x(\"__knexUid\"),t.afterCreate&&await w(t.afterCreate)(e),e},destroy:t=>{if(void 0!==t)return this.destroyRawConnection(t)},validate:t=>t.__knex__disposed?(this.logger.warn(`Connection Error: ${t.__knex__disposed}`),!1):this.validateConnection(t)})},initializePool(t=this.config){if(this.pool)return void this.logger.warn(\"The pool has already been initialized\");const e={...this.getPoolSettings(t.pool)};e.afterCreate&&delete e.afterCreate,this.pool=new g(e)},validateConnection:t=>!0,acquireConnection(){if(!this.pool)return n.reject(new Error(\"Unable to acquire a connection\"));try{return n.try(()=>this.pool.acquire().promise).then(t=>(k(\"acquired connection from pool: %s\",t.__knexUid),t)).catch(y,()=>{throw new n.TimeoutError(\"Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?\")})}catch(t){return n.reject(t)}},releaseConnection(t){return k(\"releasing connection to pool: %s\",t.__knexUid),this.pool.release(t)||k(\"pool refused connection: %s\",t.__knexUid),n.resolve()},destroy(t){const e=this.pool&&this.pool.destroy();return n.resolve(e).then(()=>{this.pool=void 0,\"function\"==typeof t&&t()}).catch(e=>(\"function\"==typeof t&&t(e),n.reject(e)))},database(){return this.connectionSettings.database},toString:()=>\"[object KnexClient]\",canCancelQuery:!1,assertCanCancelQuery(){if(!this.canCancelQuery)throw new Error(\"Query cancelling not supported for this dialect\")},cancelQuery(){throw new Error(\"Query cancelling not supported for this dialect\")}}),t.exports=I},function(t,e,r){const{pushQuery:n,pushAdditional:i,unshiftQuery:o}=r(48),{isUndefined:s}=r(1);function a(t,e){this.builder=e,this._commonBuilder=this.builder,this.client=t,this.schema=e._schema,this.formatter=t.formatter(e),this.sequence=[]}function c(t){throw new Error(`${t} is not supported for this dialect (only PostgreSQL supports it currently).`)}function u(t){return function(e,r){const n=this.client.tableBuilder(t,e,r),i=this.builder.queryContext();!s(i)&&s(n.queryContext())&&n.queryContext(i),n.setSchema(this.schema);const o=n.toSQL();for(let t=0,e=o.length;t<e;t++)this.sequence.push(o[t])}}function h(t,e){return t?`${t}.${e}`:e}Object.assign(a.prototype,{pushQuery:n,pushAdditional:i,unshiftQuery:o,createTable:u(\"create\"),createTableIfNotExists:u(\"createIfNot\"),createSchema:()=>{c(\"createSchema\")},createSchemaIfNotExists:()=>{c(\"createSchemaIfNotExists\")},dropSchema:()=>{c(\"dropSchema\")},dropSchemaIfExists:()=>{c(\"dropSchemaIfExists\")},alterTable:u(\"alter\"),dropTablePrefix:\"drop table \",dropTable(t){this.pushQuery(this.dropTablePrefix+this.formatter.wrap(h(this.schema,t)))},dropTableIfExists(t){this.pushQuery(this.dropTablePrefix+\"if exists \"+this.formatter.wrap(h(this.schema,t)))},raw(t,e){this.sequence.push(this.client.raw(t,e).toSQL())},toSQL(){const t=this.builder._sequence;for(let e=0,r=t.length;e<r;e++){const r=t[e];this[r.method].apply(this,r.args)}return this.sequence}}),t.exports=a},function(t,e,r){const{pushAdditional:n,pushQuery:i,unshiftQuery:o}=r(48),s=r(11),{groupBy:a,reduce:c,map:u,first:h,tail:f,isEmpty:l,indexOf:d,isArray:p,isUndefined:m}=r(1);function b(t,e){this.client=t,this.tableBuilder=e,this._commonBuilder=this.tableBuilder,this.method=e._method,this.schemaNameRaw=e._schemaName,this.tableNameRaw=e._tableName,this.single=e._single,this.grouped=a(e._statements,\"grouping\"),this.formatter=t.formatter(e),this.sequence=[],this._formatting=t.config&&t.config.formatting}b.prototype.pushQuery=i,b.prototype.pushAdditional=n,b.prototype.unshiftQuery=o,b.prototype.toSQL=function(){return this[this.method](),this.sequence},b.prototype.lowerCase=!0,b.prototype.createAlterTableMethods=null,b.prototype.create=function(t){const e=this.getColumns().map(t=>t.toSQL()),r=this.getColumnTypes(e);this.createAlterTableMethods&&this.alterTableForCreate(r),this.createQuery(r,t),this.columnQueries(e),delete this.single.comment,this.alterTable()},b.prototype.createIfNot=function(){this.create(!0)},b.prototype.alter=function(){const t=this.getColumns().map(t=>t.toSQL()),e=this.getColumns(\"alter\"),r=e.map(t=>t.toSQL()),n=this.getColumnTypes(t),i=this.getColumnTypes(r);this.addColumns(n),this.alterColumns(i,e),this.columnQueries(t),this.columnQueries(r),this.alterTable()},b.prototype.foreign=function(t){if(t.inTable&&t.references){const e=t.keyName?this.formatter.wrap(t.keyName):this._indexCommand(\"foreign\",this.tableNameRaw,t.column),r=this.formatter.columnize(t.column),n=this.formatter.columnize(t.references),i=this.formatter.wrap(t.inTable),o=t.onUpdate?(this.lowerCase?\" on update \":\" ON UPDATE \")+t.onUpdate:\"\",s=t.onDelete?(this.lowerCase?\" on delete \":\" ON DELETE \")+t.onDelete:\"\";this.lowerCase?this.pushQuery((this.forCreate?\"\":`alter table ${this.tableName()} add `)+\"constraint \"+e+\" foreign key (\"+r+\") references \"+i+\" (\"+n+\")\"+o+s):this.pushQuery((this.forCreate?\"\":`ALTER TABLE ${this.tableName()} ADD `)+\"CONSTRAINT \"+e+\" FOREIGN KEY (\"+r+\") REFERENCES \"+i+\" (\"+n+\")\"+o+s)}},b.prototype.getColumnTypes=(t=>c(u(t,h),function(t,e){return t.sql.push(e.sql),t.bindings.concat(e.bindings),t},{sql:[],bindings:[]})),b.prototype.columnQueries=function(t){const e=c(u(t,f),function(t,e){return l(e)?t:t.concat(e)},[]);for(const t of e)this.pushQuery(t)},b.prototype.addColumnsPrefix=\"add column \",b.prototype.addColumns=function(t,e){if(e=e||this.addColumnsPrefix,t.sql.length>0){const r=u(t.sql,t=>e+t);this.pushQuery({sql:(this.lowerCase?\"alter table \":\"ALTER TABLE \")+this.tableName()+\" \"+r.join(\", \"),bindings:t.bindings})}},b.prototype.alterColumnsPrefix=\"alter column \",b.prototype.alterColumns=function(t,e){t.sql.length>0&&this.addColumns(t,this.alterColumnsPrefix,e)},b.prototype.getColumns=function(t){const e=this.grouped.columns||[];t=t||\"add\";const r=this.tableBuilder.queryContext();return e.filter(e=>e.builder._method===t).map(t=>(!m(r)&&m(t.builder.queryContext())&&t.builder.queryContext(r),this.client.columnCompiler(this,t.builder)))},b.prototype.tableName=function(){const t=this.schemaNameRaw?`${this.schemaNameRaw}.${this.tableNameRaw}`:this.tableNameRaw;return this.formatter.wrap(t)},b.prototype.alterTable=function(){const t=this.grouped.alterTable||[];for(let e=0,r=t.length;e<r;e++){const r=t[e];this[r.method]?this[r.method].apply(this,r.args):this.client.logger.error(`Debug: ${r.method} does not exist`)}for(const t in this.single)\"function\"==typeof this[t]&&this[t](this.single[t])},b.prototype.alterTableForCreate=function(t){this.forCreate=!0;const e=this.sequence,r=this.grouped.alterTable||[];this.grouped.alterTable=[];for(let e=0,n=r.length;e<n;e++){const n=r[e];d(this.createAlterTableMethods,n.method)<0?this.grouped.alterTable.push(n):this[n.method]?(this.sequence=[],this[n.method].apply(this,n.args),t.sql.push(this.sequence[0].sql)):this.client.logger.error(`Debug: ${n.method} does not exist`)}this.sequence=e,this.forCreate=!1},b.prototype.dropIndex=function(t){this.pushQuery(`drop index${t}`)},b.prototype.dropUnique=b.prototype.dropForeign=function(){throw new Error(\"Method implemented in the dialect driver\")},b.prototype.dropColumnPrefix=\"drop column \",b.prototype.dropColumn=function(){const t=s.normalizeArr.apply(null,arguments),e=u(p(t)?t:[t],t=>this.dropColumnPrefix+this.formatter.wrap(t));this.pushQuery((this.lowerCase?\"alter table \":\"ALTER TABLE \")+this.tableName()+\" \"+e.join(\", \"))},b.prototype._indexCommand=function(t,e,r){p(r)||(r=r?[r]:[]);const n=(e.replace(/\\.|-/g,\"_\")+\"_\"+r.join(\"_\")+\"_\"+t).toLowerCase();return this.formatter.wrap(n)},t.exports=b},function(t,e,r){const n=r(14),i=r(48),{groupBy:o,first:s,tail:a,has:c,isObject:u}=r(1);function h(t,e,r){this.client=t,this.tableCompiler=e,this.columnBuilder=r,this._commonBuilder=this.columnBuilder,this.args=r._args,this.type=r._type.toLowerCase(),this.grouped=o(r._statements,\"grouping\"),this.modified=r._modifiers,this.isIncrements=-1!==this.type.indexOf(\"increments\"),this.formatter=t.formatter(r),this.sequence=[],this.modifiers=[]}h.prototype.pushQuery=i.pushQuery,h.prototype.pushAdditional=i.pushAdditional,h.prototype.unshiftQuery=i.unshiftQuery,h.prototype._defaultMap={columnName:function(){if(!this.isIncrements)throw new Error(`You did not specify a column name for the ${this.type} column.`);return\"id\"}},h.prototype.defaults=function(t){if(Object.prototype.hasOwnProperty.call(this._defaultMap,t))return this._defaultMap[t].bind(this)();throw new Error(`There is no default for the specified identifier ${t}`)},h.prototype.toSQL=function(){return this.pushQuery(this.compileColumn()),this.sequence.additional&&(this.sequence=this.sequence.concat(this.sequence.additional)),this.sequence},h.prototype.compileColumn=function(){return this.formatter.wrap(this.getColumnName())+\" \"+this.getColumnType()+this.getModifiers()},h.prototype.getColumnName=function(){return s(this.args)||this.defaults(\"columnName\")},h.prototype.getColumnType=function(){const t=this[this.type];return\"function\"==typeof t?t.apply(this,a(this.args)):t},h.prototype.getModifiers=function(){const t=[];for(let e=0,r=this.modifiers.length;e<r;e++){const r=this.modifiers[e];if((!this.isIncrements||this.isIncrements&&\"comment\"===r)&&c(this.modified,r)){const e=this[r].apply(this,this.modified[r]);e&&t.push(e)}}return t.length>0?` ${t.join(\" \")}`:\"\"},h.prototype.increments=\"integer not null primary key autoincrement\",h.prototype.bigincrements=\"integer not null primary key autoincrement\",h.prototype.integer=h.prototype.smallint=h.prototype.mediumint=\"integer\",h.prototype.biginteger=\"bigint\",h.prototype.varchar=function(t){return`varchar(${this._num(t,255)})`},h.prototype.text=\"text\",h.prototype.tinyint=\"tinyint\",h.prototype.floating=function(t,e){return`float(${this._num(t,8)}, ${this._num(e,2)})`},h.prototype.decimal=function(t,e){if(null===t)throw new Error(\"Specifying no precision on decimal columns is not supported for that SQL dialect.\");return`decimal(${this._num(t,8)}, ${this._num(e,2)})`},h.prototype.binary=\"blob\",h.prototype.bool=\"boolean\",h.prototype.date=\"date\",h.prototype.datetime=\"datetime\",h.prototype.time=\"time\",h.prototype.timestamp=\"timestamp\",h.prototype.enu=\"varchar\",h.prototype.bit=h.prototype.json=\"text\",h.prototype.uuid=\"char(36)\",h.prototype.specifictype=(t=>t),h.prototype.nullable=(t=>!1===t?\"not null\":\"null\"),h.prototype.notNullable=function(){return this.nullable(!1)},h.prototype.defaultTo=function(t){return void 0===t?\"\":(null===t?t=\"null\":t instanceof n?t=t.toQuery():\"bool\"===this.type?(\"false\"===t&&(t=0),t=`'${t?1:0}'`):t=\"json\"!==this.type&&\"jsonb\"!==this.type||!u(t)?`'${t}'`:`'${JSON.stringify(t)}'`,`default ${t}`)},h.prototype._num=function(t,e){if(null==t)return e;const r=parseInt(t,10);return isNaN(r)?e:r},t.exports=h},function(t,e,r){\"use strict\";(function(e,n){var i=r(2).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,r){if(t>65536)throw new Error(\"requested too many random bytes\");var s=new e.Uint8Array(t);t>0&&o.getRandomValues(s);var a=i.from(s.buffer);if(\"function\"==typeof r)return n.nextTick(function(){r(null,a)});return a}:t.exports=function(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}}).call(this,r(8),r(5))},function(t,e,r){var n=r(2).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){\"string\"==typeof t&&(e=e||\"utf8\",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var c=s%i,u=Math.min(o-a,i-c),h=0;h<u;h++)r[c+h]=t[a+h];a+=u,(s+=u)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},t.exports=i},function(t,e,r){t.exports=i;var n=r(12).EventEmitter;function i(){n.call(this)}r(0)(i,n),i.Readable=r(45),i.Writable=r(138),i.Duplex=r(139),i.Transform=r(140),i.PassThrough=r(141),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on(\"data\",i),t.on(\"drain\",o),t._isStdio||e&&!1===e.end||(r.on(\"end\",a),r.on(\"close\",c));var s=!1;function a(){s||(s=!0,t.end())}function c(){s||(s=!0,\"function\"==typeof t.destroy&&t.destroy())}function u(t){if(h(),0===n.listenerCount(this,\"error\"))throw t}function h(){r.removeListener(\"data\",i),t.removeListener(\"drain\",o),r.removeListener(\"end\",a),r.removeListener(\"close\",c),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",h),r.removeListener(\"close\",h),t.removeListener(\"close\",h)}return r.on(\"error\",u),t.on(\"error\",u),r.on(\"end\",h),r.on(\"close\",h),t.on(\"close\",h),t.emit(\"pipe\",r),t}},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):\"[object Array]\"===r(t)},e.isBoolean=function(t){return\"boolean\"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return\"number\"==typeof t},e.isString=function(t){return\"string\"==typeof t},e.isSymbol=function(t){return\"symbol\"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return\"[object RegExp]\"===r(t)},e.isObject=function(t){return\"object\"==typeof t&&null!==t},e.isDate=function(t){return\"[object Date]\"===r(t)},e.isError=function(t){return\"[object Error]\"===r(t)||t instanceof Error},e.isFunction=function(t){return\"function\"==typeof t},e.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(3).Buffer)},function(t,e,r){const n=r(36),i=r(14),{transform:o}=r(1),s=[\"asc\",\"desc\"],a=o([\"=\",\"<\",\">\",\"<=\",\">=\",\"<>\",\"!=\",\"like\",\"not like\",\"between\",\"not between\",\"ilike\",\"not ilike\",\"exists\",\"not exist\",\"rlike\",\"not rlike\",\"regexp\",\"not regexp\",\"&\",\"|\",\"^\",\"<<\",\">>\",\"~\",\"~*\",\"!~\",\"!~*\",\"#\",\"&&\",\"@>\",\"<@\",\"||\",\"&<\",\"&>\",\"-|-\",\"@@\",\"!!\",[\"?\",\"\\\\?\"],[\"?|\",\"\\\\?|\"],[\"?&\",\"\\\\?&\"]],(t,e)=>{Array.isArray(e)?t[e[0]]=e[1]:t[e]=e},{});t.exports=class{constructor(t,e){this.client=t,this.builder=e,this.bindings=[]}columnize(t){const e=Array.isArray(t)?t:[t];let r=\"\",n=-1;for(;++n<e.length;)n>0&&(r+=\", \"),r+=this.wrap(e[n]);return r}parameterize(t,e){if(\"function\"==typeof t)return this.parameter(t);t=Array.isArray(t)?t:[t];let r=\"\",n=-1;for(;++n<t.length;)n>0&&(r+=\", \"),r+=this.parameter(void 0===t[n]?e:t[n]);return r}values(t){return Array.isArray(t)?Array.isArray(t[0])?`(${t.map(t=>`(${this.parameterize(t)})`).join(\", \")})`:`(${this.parameterize(t)})`:t instanceof i?`(${this.parameter(t)})`:this.parameter(t)}parameter(t){return\"function\"==typeof t?this.outputQuery(this.compileCallback(t),!0):this.unwrapRaw(t,!0)||\"?\"}unwrapRaw(t,e){let r;return t instanceof n?((r=this.client.queryCompiler(t).toSQL()).bindings&&(this.bindings=this.bindings.concat(r.bindings)),this.outputQuery(r,e)):t instanceof i?(t.client=this.client,this.builder._queryContext&&(t.queryContext=(()=>this.builder._queryContext)),(r=t.toSQL()).bindings&&(this.bindings=this.bindings.concat(r.bindings)),r.sql):void(e&&this.bindings.push(t))}rawOrFn(t,e){return\"function\"==typeof t?this.outputQuery(this.compileCallback(t,e)):this.unwrapRaw(t)||\"\"}wrap(t,e){const r=this.unwrapRaw(t,e);if(r)return r;switch(typeof t){case\"function\":return this.outputQuery(this.compileCallback(t),!0);case\"object\":return this.parseObject(t);case\"number\":return t;default:return this.wrapString(t+\"\")}}wrapAsIdentifier(t){const e=this.builder.queryContext();return this.client.wrapIdentifier((t||\"\").trim(),e)}alias(t,e){return t+\" as \"+e}operator(t){const e=this.unwrapRaw(t);if(e)return e;const r=a[(t||\"\").toLowerCase()];if(!r)throw new TypeError(`The operator \"${t}\" is not permitted`);return r}direction(t){const e=this.unwrapRaw(t);return e||(-1!==s.indexOf((t||\"\").toLowerCase())?t:\"asc\")}compileCallback(t,e){const{client:r}=this,n=r.queryBuilder();t.call(n,n);const i=r.queryCompiler(n);return i.formatter=this,i.toSQL(e||n._method||\"select\")}outputQuery(t,e){let r=t.sql||\"\";return r&&(\"select\"===t.method||\"first\"===t.method)&&(e||t.as)&&(r=`(${r})`,t.as)?this.alias(r,this.wrap(t.as)):r}parseObject(t){const e=[];for(const r in t){const i=t[r];if(\"function\"==typeof i){const t=this.compileCallback(i);t.as=r,e.push(this.outputQuery(t,!0))}else i instanceof n?e.push(this.alias(`(${this.wrap(i)})`,this.wrapAsIdentifier(r))):e.push(this.alias(this.wrap(i),this.wrapAsIdentifier(r)))}return e.join(\", \")}wrapString(t){const e=t.toLowerCase().indexOf(\" as \");if(-1!==e){const r=t.slice(0,e),n=t.slice(e+4);return this.alias(this.wrap(r),this.wrapAsIdentifier(n))}const r=[];let n=-1;const i=t.split(\".\");for(;++n<i.length;)t=i[n],0===n&&i.length>1?r.push(this.wrap((t||\"\").trim())):r.push(this.wrapAsIdentifier(t));return r.join(\".\")}}},function(t,e,r){\"use strict\";var n=r(0),i=r(51),o=r(52),s=r(53),a=r(16);function c(t){a.call(this,\"digest\"),this._hash=t}n(c,a),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return\"md5\"===(t=t.toLowerCase())?new i:\"rmd160\"===t||\"ripemd160\"===t?new o:new c(s(t))}},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(this,r(3).Buffer)},function(t,e,r){\"use strict\";var n=r(13),i=r(9);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=\"big\",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,\"big\"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,e,r){var n=e;n.bignum=r(4),n.define=r(238).define,n.base=r(34),n.constants=r(104),n.decoders=r(244),n.encoders=r(246)},function(t,e,r){var n=e;n.Reporter=r(241).Reporter,n.DecoderBuffer=r(103).DecoderBuffer,n.EncoderBuffer=r(103).EncoderBuffer,n.Node=r(242)},function(t,e,r){\"use strict\";(function(e){void 0===e||!e.version||0===e.version.indexOf(\"v0.\")||0===e.version.indexOf(\"v1.\")&&0!==e.version.indexOf(\"v1.8.\")?t.exports={nextTick:function(t,r,n,i){if(\"function\"!=typeof t)throw new TypeError('\"callback\" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,r(5))},function(t,e,r){const n=r(70),i=r(0),{EventEmitter:o}=r(12),s=r(14),a=r(11),c=r(71),{assign:u,clone:h,each:f,isBoolean:l,isEmpty:d,isFunction:p,isNil:m,isNumber:b,isObject:g,isString:y,isUndefined:_,tail:v,toArray:w,reject:E,includes:x,last:S,isPlainObject:A}=r(1),C=r(43),{lockMode:k,waitMode:T}=r(143);function R(t){this.client=t,this.and=this,this._single={},this._statements=[],this._method=\"select\",t.config&&(C(this,5),this._debug=t.config.debug),this._joinFlag=\"inner\",this._boolFlag=\"and\",this._notFlag=!1,this._asColumnFlag=!1}i(R,o);const M=function(t,e,r){if(\"string\"!=typeof t)throw new Error(`${r}() first argument must be a string`);if(!(\"function\"==typeof e||e instanceof R||e instanceof s))throw new Error(`${r}() second argument must be a function / QueryBuilder or a raw`)};u(R.prototype,{toString(){return this.toQuery()},toSQL(t,e){return this.client.queryCompiler(this).toSQL(t||this._method,e)},clone(){const t=new this.constructor(this.client);return t._method=this._method,t._single=h(this._single),t._statements=h(this._statements),t._debug=this._debug,_(this._options)||(t._options=h(this._options)),_(this._queryContext)||(t._queryContext=h(this._queryContext)),_(this._connection)||(t._connection=this._connection),t},timeout(t,{cancel:e}={}){return b(t)&&t>0&&(this._timeout=t,e&&(this.client.assertCanCancelQuery(),this._cancelOnTimeout=!0)),this},with(t,e){return M(t,e,\"with\"),this.withWrapped(t,e)},withWrapped(t,e){return this._statements.push({grouping:\"with\",type:\"withWrapped\",alias:t,value:e}),this},withRecursive(t,e){return M(t,e,\"withRecursive\"),this.withRecursiveWrapped(t,e)},withRecursiveWrapped(t,e){return this.withWrapped(t,e),this._statements[this._statements.length-1].recursive=!0,this},columns(t){return t||0===t?(this._statements.push({grouping:\"columns\",value:a.normalizeArr.apply(null,arguments)}),this):this},as(t){return this._single.as=t,this},withSchema(t){return this._single.schema=t,this},table(t,e={}){return this._single.table=t,this._single.only=!0===e.only,this},distinct(){return this._statements.push({grouping:\"columns\",value:a.normalizeArr.apply(null,arguments),distinct:!0}),this},distinctOn(){const t=a.normalizeArr.apply(null,arguments);if(d(t))throw new Error(\"distinctOn requires atleast on argument\");return this._statements.push({grouping:\"columns\",value:t,distinctOn:!0}),this},join(t,e){let r;const{schema:n}=this._single,i=this._joinType();return\"function\"==typeof e?(r=new c(t,i,n),e.call(r,r)):\"raw\"===i?r=new c(this.client.raw(t,e),\"raw\"):(r=new c(t,i,t instanceof R?void 0:n),arguments.length>1&&r.on.apply(r,w(arguments).slice(1))),this._statements.push(r),this},innerJoin(){return this._joinType(\"inner\").join.apply(this,arguments)},leftJoin(){return this._joinType(\"left\").join.apply(this,arguments)},leftOuterJoin(){return this._joinType(\"left outer\").join.apply(this,arguments)},rightJoin(){return this._joinType(\"right\").join.apply(this,arguments)},rightOuterJoin(){return this._joinType(\"right outer\").join.apply(this,arguments)},outerJoin(){return this._joinType(\"outer\").join.apply(this,arguments)},fullOuterJoin(){return this._joinType(\"full outer\").join.apply(this,arguments)},crossJoin(){return this._joinType(\"cross\").join.apply(this,arguments)},joinRaw(){return this._joinType(\"raw\").join.apply(this,arguments)},where(t,e,r){if(!1===t||!0===t)return this.where(1,\"=\",t?1:0);if(\"function\"==typeof t)return this.whereWrapped(t);if(t instanceof s&&1===arguments.length)return this.whereRaw(t);if(g(t)&&!(t instanceof s))return this._objectWhere(t);if(2===arguments.length&&(r=e,e=\"=\",null===r))return this.whereNull(t);const n=`${e}`.toLowerCase().trim();if(3===arguments.length){if(\"in\"===n||\"not in\"===n)return this._not(\"not in\"===n).whereIn(arguments[0],arguments[2]);if(\"between\"===n||\"not between\"===n)return this._not(\"not between\"===n).whereBetween(arguments[0],arguments[2])}return null!==r||\"is\"!==n&&\"is not\"!==n?(this._statements.push({grouping:\"where\",type:\"whereBasic\",column:t,operator:e,value:r,not:this._not(),bool:this._bool(),asColumn:this._asColumnFlag}),this):this._not(\"is not\"===n).whereNull(t)},whereColumn(t,e,r){return this._asColumnFlag=!0,this.where.apply(this,arguments),this._asColumnFlag=!1,this},orWhere(){this._bool(\"or\");const t=arguments[0];return!g(t)||p(t)||t instanceof s?this.where.apply(this,arguments):this.whereWrapped(function(){for(const e in t)this.andWhere(e,t[e])})},orWhereColumn(){this._bool(\"or\");const t=arguments[0];return!g(t)||p(t)||t instanceof s?this.whereColumn.apply(this,arguments):this.whereWrapped(function(){for(const e in t)this.andWhereColumn(e,\"=\",t[e])})},whereNot(){return this._not(!0).where.apply(this,arguments)},whereNotColumn(){return this._not(!0).whereColumn.apply(this,arguments)},orWhereNot(){return this._bool(\"or\").whereNot.apply(this,arguments)},orWhereNotColumn(){return this._bool(\"or\").whereNotColumn.apply(this,arguments)},_objectWhere(t){const e=this._bool(),r=this._not()?\"Not\":\"\";for(const n in t)this[e+\"Where\"+r](n,t[n]);return this},whereRaw(t,e){const r=t instanceof s?t:this.client.raw(t,e);return this._statements.push({grouping:\"where\",type:\"whereRaw\",value:r,not:this._not(),bool:this._bool()}),this},orWhereRaw(t,e){return this._bool(\"or\").whereRaw(t,e)},whereWrapped(t){return this._statements.push({grouping:\"where\",type:\"whereWrapped\",value:t,not:this._not(),bool:this._bool()}),this},whereExists(t){return this._statements.push({grouping:\"where\",type:\"whereExists\",value:t,not:this._not(),bool:this._bool()}),this},orWhereExists(t){return this._bool(\"or\").whereExists(t)},whereNotExists(t){return this._not(!0).whereExists(t)},orWhereNotExists(t){return this._bool(\"or\").whereNotExists(t)},whereIn(t,e){return Array.isArray(e)&&d(e)?this.where(this._not()):(this._statements.push({grouping:\"where\",type:\"whereIn\",column:t,value:e,not:this._not(),bool:this._bool()}),this)},orWhereIn(t,e){return this._bool(\"or\").whereIn(t,e)},whereNotIn(t,e){return this._not(!0).whereIn(t,e)},orWhereNotIn(t,e){return this._bool(\"or\")._not(!0).whereIn(t,e)},whereNull(t){return this._statements.push({grouping:\"where\",type:\"whereNull\",column:t,not:this._not(),bool:this._bool()}),this},orWhereNull(t){return this._bool(\"or\").whereNull(t)},whereNotNull(t){return this._not(!0).whereNull(t)},orWhereNotNull(t){return this._bool(\"or\").whereNotNull(t)},whereBetween(t,e){return n(Array.isArray(e),\"The second argument to whereBetween must be an array.\"),n(2===e.length,\"You must specify 2 values for the whereBetween clause\"),this._statements.push({grouping:\"where\",type:\"whereBetween\",column:t,value:e,not:this._not(),bool:this._bool()}),this},whereNotBetween(t,e){return this._not(!0).whereBetween(t,e)},orWhereBetween(t,e){return this._bool(\"or\").whereBetween(t,e)},orWhereNotBetween(t,e){return this._bool(\"or\").whereNotBetween(t,e)},groupBy(t){return t instanceof s?this.groupByRaw.apply(this,arguments):(this._statements.push({grouping:\"group\",type:\"groupByBasic\",value:a.normalizeArr.apply(null,arguments)}),this)},groupByRaw(t,e){const r=t instanceof s?t:this.client.raw(t,e);return this._statements.push({grouping:\"group\",type:\"groupByRaw\",value:r}),this},orderBy(t,e){return Array.isArray(t)?this._orderByArray(t):(this._statements.push({grouping:\"order\",type:\"orderByBasic\",value:t,direction:e}),this)},_orderByArray(t){for(let e=0;e<t.length;e++){const r=t[e];g(r)?this._statements.push({grouping:\"order\",type:\"orderByBasic\",value:r.column,direction:r.order}):y(r)&&this._statements.push({grouping:\"order\",type:\"orderByBasic\",value:r})}return this},orderByRaw(t,e){const r=t instanceof s?t:this.client.raw(t,e);return this._statements.push({grouping:\"order\",type:\"orderByRaw\",value:r}),this},_union(t,e){let r=e[0],n=e[1];if(1===e.length||2===e.length&&l(n)){Array.isArray(r)||(r=[r]);for(let e=0,i=r.length;e<i;e++)this._statements.push({grouping:\"union\",clause:t,value:r[e],wrap:n||!1})}else r=w(e).slice(0,e.length-1),n=e[e.length-1],l(n)||(r.push(n),n=!1),this._union(t,[r,n]);return this},union(...t){return this._union(\"union\",t)},unionAll(...t){return this._union(\"union all\",t)},intersect(t,e){if(1===arguments.length||2===arguments.length&&l(e)){Array.isArray(t)||(t=[t]);for(let r=0,n=t.length;r<n;r++)this._statements.push({grouping:\"union\",clause:\"intersect\",value:t[r],wrap:e||!1})}else t=w(arguments).slice(0,arguments.length-1),e=arguments[arguments.length-1],l(e)||(t.push(e),e=!1),this.intersect(t,e);return this},having(t,e,r){return t instanceof s&&1===arguments.length?this.havingRaw(t):\"function\"==typeof t?this.havingWrapped(t):(this._statements.push({grouping:\"having\",type:\"havingBasic\",column:t,operator:e,value:r,bool:this._bool(),not:this._not()}),this)},orHaving:function(){this._bool(\"or\");const t=arguments[0];return!g(t)||p(t)||t instanceof s?this.having.apply(this,arguments):this.havingWrapped(function(){for(const e in t)this.andHaving(e,t[e])})},havingWrapped(t){return this._statements.push({grouping:\"having\",type:\"havingWrapped\",value:t,bool:this._bool(),not:this._not()}),this},havingNull(t){return this._statements.push({grouping:\"having\",type:\"havingNull\",column:t,not:this._not(),bool:this._bool()}),this},orHavingNull(t){return this._bool(\"or\").havingNull(t)},havingNotNull(t){return this._not(!0).havingNull(t)},orHavingNotNull(t){return this._not(!0)._bool(\"or\").havingNull(t)},havingExists(t){return this._statements.push({grouping:\"having\",type:\"havingExists\",value:t,not:this._not(),bool:this._bool()}),this},orHavingExists(t){return this._bool(\"or\").havingExists(t)},havingNotExists(t){return this._not(!0).havingExists(t)},orHavingNotExists(t){return this._not(!0)._bool(\"or\").havingExists(t)},havingBetween(t,e){return n(Array.isArray(e),\"The second argument to havingBetween must be an array.\"),n(2===e.length,\"You must specify 2 values for the havingBetween clause\"),this._statements.push({grouping:\"having\",type:\"havingBetween\",column:t,value:e,not:this._not(),bool:this._bool()}),this},orHavingBetween(t,e){return this._bool(\"or\").havingBetween(t,e)},havingNotBetween(t,e){return this._not(!0).havingBetween(t,e)},orHavingNotBetween(t,e){return this._not(!0)._bool(\"or\").havingBetween(t,e)},havingIn(t,e){return Array.isArray(e)&&d(e)?this.where(this._not()):(this._statements.push({grouping:\"having\",type:\"havingIn\",column:t,value:e,not:this._not(),bool:this._bool()}),this)},orHavingIn(t,e){return this._bool(\"or\").havingIn(t,e)},havingNotIn(t,e){return this._not(!0).havingIn(t,e)},orHavingNotIn(t,e){return this._bool(\"or\")._not(!0).havingIn(t,e)},havingRaw(t,e){const r=t instanceof s?t:this.client.raw(t,e);return this._statements.push({grouping:\"having\",type:\"havingRaw\",value:r,bool:this._bool(),not:this._not()}),this},orHavingRaw(t,e){return this._bool(\"or\").havingRaw(t,e)},offset(t){if(m(t)||t instanceof s||t instanceof R)this._single.offset=t;else{const e=parseInt(t,10);isNaN(e)?this.client.logger.warn(\"A valid integer must be provided to offset\"):this._single.offset=e}return this},limit(t){const e=parseInt(t,10);return isNaN(e)?this.client.logger.warn(\"A valid integer must be provided to limit\"):this._single.limit=e,this},count(t,e){return this._aggregate(\"count\",t||\"*\",e)},min(t,e){return this._aggregate(\"min\",t,e)},max(t,e){return this._aggregate(\"max\",t,e)},sum(t,e){return this._aggregate(\"sum\",t,e)},avg(t,e){return this._aggregate(\"avg\",t,e)},countDistinct(){let t,e=a.normalizeArr.apply(null,arguments);return e.length>1&&A(S(e))&&([t]=e.splice(e.length-1,1)),e.length?1===e.length&&(e=e[0]):e=\"*\",this._aggregate(\"count\",e,{...t,distinct:!0})},sumDistinct(t,e){return this._aggregate(\"sum\",t,{...e,distinct:!0})},avgDistinct(t,e){return this._aggregate(\"avg\",t,{...e,distinct:!0})},increment(t,e=1){if(g(t)){for(const e in t)this._counter(e,t[e]);return this}return this._counter(t,e)},decrement(t,e=1){if(g(t)){for(const e in t)this._counter(e,-t[e]);return this}return this._counter(t,-e)},clearCounters(){return this._single.counter={},this},first(){if(!this._isSelectQuery())throw new Error(`Cannot chain .first() on \"${this._method}\" query!`);const t=new Array(arguments.length);for(let e=0;e<t.length;e++)t[e]=arguments[e];return this.select.apply(this,t),this._method=\"first\",this.limit(1),this},connection(t){return this._connection=t,this},pluck(t){return this._method=\"pluck\",this._single.pluck=t,this._statements.push({grouping:\"columns\",type:\"pluck\",value:t}),this},clearSelect(){return this._clearGrouping(\"columns\"),this},clearWhere(){return this._clearGrouping(\"where\"),this},clearOrder(){return this._clearGrouping(\"order\"),this},clearHaving(){return this._clearGrouping(\"having\"),this},insert(t,e){return this._method=\"insert\",d(e)||this.returning(e),this._single.insert=t,this},update(t,e){let r;const n=this._single.update||{};if(this._method=\"update\",y(t))n[t]=e,arguments.length>2&&(r=arguments[2]);else{const e=Object.keys(t);this._single.update&&this.client.logger.warn(\"Update called multiple times with objects.\");let i=-1;for(;++i<e.length;)n[e[i]]=t[e[i]];r=arguments[1]}return d(r)||this.returning(r),this._single.update=n,this},returning(t){return this._single.returning=t,this},delete(t){return this._method=\"del\",d(t)||this.returning(t),this},truncate(t){return this._method=\"truncate\",t&&(this._single.table=t),this},columnInfo(t){return this._method=\"columnInfo\",this._single.columnInfo=t,this},forUpdate(){return this._single.lock=k.forUpdate,this._single.lockTables=a.normalizeArr.apply(null,arguments),this},forShare(){return this._single.lock=k.forShare,this._single.lockTables=a.normalizeArr.apply(null,arguments),this},skipLocked(){if(!this._isSelectQuery())throw new Error(`Cannot chain .skipLocked() on \"${this._method}\" query!`);if(!this._hasLockMode())throw new Error(\".skipLocked() can only be used after a call to .forShare() or .forUpdate()!\");if(this._single.waitMode===T.noWait)throw new Error(\".skipLocked() cannot be used together with .noWait()!\");return this._single.waitMode=T.skipLocked,this},noWait(){if(!this._isSelectQuery())throw new Error(`Cannot chain .noWait() on \"${this._method}\" query!`);if(!this._hasLockMode())throw new Error(\".noWait() can only be used after a call to .forShare() or .forUpdate()!\");if(this._single.waitMode===T.skipLocked)throw new Error(\".noWait() cannot be used together with .skipLocked()!\");return this._single.waitMode=T.noWait,this},fromJS(t){return f(t,(t,e)=>{\"function\"!=typeof this[e]&&this.client.logger.warn(`Knex Error: unknown key ${e}`),Array.isArray(t)?this[e].apply(this,t):this[e](t)}),this},modify(t){return t.apply(this,[this].concat(v(arguments))),this},_counter(t,e){return e=parseFloat(e),this._method=\"update\",this._single.counter=this._single.counter||{},this._single.counter[t]=e,this},_bool(t){if(1===arguments.length)return this._boolFlag=t,this;const e=this._boolFlag;return this._boolFlag=\"and\",e},_not(t){if(1===arguments.length)return this._notFlag=t,this;const e=this._notFlag;return this._notFlag=!1,e},_joinType(t){if(1===arguments.length)return this._joinFlag=t,this;const e=this._joinFlag||\"inner\";return this._joinFlag=\"inner\",e},_aggregate(t,e,r={}){return this._statements.push({grouping:\"columns\",type:e instanceof s?\"aggregateRaw\":\"aggregate\",method:t,value:e,aggregateDistinct:r.distinct||!1,alias:r.as}),this},_clearGrouping(t){this._statements=E(this._statements,{grouping:t})},_isSelectQuery(){return x([\"pluck\",\"first\",\"select\"],this._method)},_hasLockMode(){return x([k.forShare,k.forUpdate],this._single.lock)}}),Object.defineProperty(R.prototype,\"or\",{get(){return this._bool(\"or\")}}),Object.defineProperty(R.prototype,\"not\",{get(){return this._not(!0)}}),R.prototype.select=R.prototype.columns,R.prototype.column=R.prototype.columns,R.prototype.andWhereNot=R.prototype.whereNot,R.prototype.andWhereNotColumn=R.prototype.whereNotColumn,R.prototype.andWhere=R.prototype.where,R.prototype.andWhereColumn=R.prototype.whereColumn,R.prototype.andWhereRaw=R.prototype.whereRaw,R.prototype.andWhereBetween=R.prototype.whereBetween,R.prototype.andWhereNotBetween=R.prototype.whereNotBetween,R.prototype.andHaving=R.prototype.having,R.prototype.andHavingIn=R.prototype.havingIn,R.prototype.andHavingNotIn=R.prototype.havingNotIn,R.prototype.andHavingNull=R.prototype.havingNull,R.prototype.andHavingNotNull=R.prototype.havingNotNull,R.prototype.andHavingExists=R.prototype.havingExists,R.prototype.andHavingNotExists=R.prototype.havingNotExists,R.prototype.andHavingBetween=R.prototype.havingBetween,R.prototype.andHavingNotBetween=R.prototype.havingNotBetween,R.prototype.from=R.prototype.table,R.prototype.into=R.prototype.table,R.prototype.del=R.prototype.delete,r(44)(R),a.addQueryContext(R),R.extend=((t,e)=>{if(Object.prototype.hasOwnProperty.call(R.prototype,t))throw new Error(`Can't extend QueryBuilder with existing method ('${t}').`);u(R.prototype,{[t]:e})}),t.exports=R},function(t,e,r){(function(e){const r=/[\\0\\b\\t\\n\\r\\x1a\"'\\\\]/g,n={\"\\0\":\"\\\\0\",\"\\b\":\"\\\\b\",\"\\t\":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\r\":\"\\\\r\",\"\u001a\":\"\\\\Z\",'\"':'\\\\\"',\"'\":\"\\\\'\",\"\\\\\":\"\\\\\\\\\"};function i(t){return function e(r,n={}){return t(r,e,n)}}function o(t,e,r){return t&&\"function\"==typeof t.toSQL?t.toSQL(r):JSON.stringify(t)}function s(t,e,r){let n=\"\";for(let i=0;i<t.length;i++){const o=t[i];Array.isArray(o)?n+=(0===i?\"\":\", \")+\"(\"+s(o,e,r)+\")\":n+=(0===i?\"\":\", \")+e(o,r)}return n}function a(t){return\"X\"+c(t.toString(\"hex\"))}function c(t,e,i){let o,s=r.lastIndex=0,a=\"\";for(;o=r.exec(t);)a+=t.slice(s,o.index)+n[o[0]],s=r.lastIndex;return 0===s?\"'\"+t+\"'\":s<t.length?\"'\"+a+t.slice(s)+\"'\":\"'\"+a+\"'\"}function u(t,e,r){const n=r.timeZone||\"local\",i=new Date(t);let o,s,a,c,u,f,l;if(\"local\"===n)o=i.getFullYear(),s=i.getMonth()+1,a=i.getDate(),c=i.getHours(),u=i.getMinutes(),f=i.getSeconds(),l=i.getMilliseconds();else{const t=function(t){if(\"Z\"===t)return 0;const e=t.match(/([+\\-\\s])(\\d\\d):?(\\d\\d)?/);if(e)return(\"-\"==e[1]?-1:1)*(parseInt(e[2],10)+(e[3]?parseInt(e[3],10):0)/60)*60;return!1}(n);!1!==t&&0!==t&&i.setTime(i.getTime()+6e4*t),o=i.getUTCFullYear(),s=i.getUTCMonth()+1,a=i.getUTCDate(),c=i.getUTCHours(),u=i.getUTCMinutes(),f=i.getUTCSeconds(),l=i.getUTCMilliseconds()}return h(o,4)+\"-\"+h(s,2)+\"-\"+h(a,2)+\" \"+h(c,2)+\":\"+h(u,2)+\":\"+h(f,2)+\".\"+h(l,3)}function h(t,e){for(t=t.toString();t.length<e;)t=\"0\"+t;return t}t.exports={arrayToList:s,bufferToString:a,dateToString:u,escapeString:c,charsRegex:r,charsMap:n,escapeObject:o,makeEscape:function(t={}){const r=t.escapeDate||u,n=t.escapeArray||s,h=t.escapeBuffer||a,f=t.escapeString||c,l=t.escapeObject||o,d=t.wrap||i;function p(t,i,o){if(null==t)return\"NULL\";switch(typeof t){case\"boolean\":return t?\"true\":\"false\";case\"number\":return t+\"\";case\"object\":if(!(t instanceof Date))return Array.isArray(t)?n(t,i,o):e.isBuffer(t)?h(t,i,o):l(t,i,o);t=r(t,i,o)}return f(t,i,o)}return d?d(p):p}}}).call(this,r(3).Buffer)},function(t,e,r){var n=r(2).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,c,u=r[0],h=r[1],f=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],b=t[3]^e[3],g=4,y=1;y<i;y++)o=u[d>>>24]^h[p>>>16&255]^f[m>>>8&255]^l[255&b]^e[g++],s=u[p>>>24]^h[m>>>16&255]^f[b>>>8&255]^l[255&d]^e[g++],a=u[m>>>24]^h[b>>>16&255]^f[d>>>8&255]^l[255&p]^e[g++],c=u[b>>>24]^h[d>>>16&255]^f[p>>>8&255]^l[255&m]^e[g++],d=o,p=s,m=a,b=c;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&b])^e[g++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[b>>>8&255]<<8|n[255&d])^e[g++],a=(n[m>>>24]<<24|n[b>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[g++],c=(n[b>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[g++],[o>>>=0,s>>>=0,a>>>=0,c>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,c=0;c<256;++c){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var h=t[s],f=t[h],l=t[f],d=257*t[u]^16843008*u;i[0][s]=d<<24|d>>>8,i[1][s]=d<<16|d>>>16,i[2][s]=d<<8|d>>>24,i[3][s]=d,d=16843009*l^65537*f^257*h^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=a=1:(s=h^t[t[t[l^h]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(t){this._key=i(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=c.SBOX[s>>>24]<<24|c.SBOX[s>>>16&255]<<16|c.SBOX[s>>>8&255]<<8|c.SBOX[255&s]),i[o]=i[o-e]^s}for(var u=[],h=0;h<n;h++){var f=n-h,l=i[f-(h%4?0:4)];u[h]=h<4||f<=4?l:c.INV_SUB_MIX[0][c.SBOX[l>>>24]]^c.INV_SUB_MIX[1][c.SBOX[l>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[l>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},function(t,e,r){var n=r(2).Buffer,i=r(51);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,\"binary\")),e&&(n.isBuffer(e)||(e=n.from(e,\"binary\")),8!==e.length))throw new RangeError(\"salt should be Buffer with 8 byte length\");for(var s=r/8,a=n.alloc(s),c=n.alloc(o||0),u=n.alloc(0);s>0||o>0;){var h=new i;h.update(u),h.update(t),e&&h.update(e),u=h.digest();var f=0;if(s>0){var l=a.length-s;f=Math.min(s,u.length),u.copy(a,l,0,f),s-=f}if(f<u.length&&o>0){var d=c.length-o,p=Math.min(o,u.length-f);u.copy(c,d,f,f+p),o-=p}}return u.fill(0),{key:a,iv:c}}},function(t,e,r){\"use strict\";var n=e;n.base=r(218),n.short=r(219),n.mont=r(220),n.edwards=r(221)},function(t,e,r){(function(e){var n=r(237),i=r(249),o=r(250),s=r(55),a=r(87);function c(t){var r;\"object\"!=typeof t||e.isBuffer(t)||(r=t.passphrase,t=t.key),\"string\"==typeof t&&(t=new e(t));var c,u,h=o(t,r),f=h.tag,l=h.data;switch(f){case\"CERTIFICATE\":u=n.certificate.decode(l,\"der\").tbsCertificate.subjectPublicKeyInfo;case\"PUBLIC KEY\":switch(u||(u=n.PublicKey.decode(l,\"der\")),c=u.algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPublicKey.decode(u.subjectPublicKey.data,\"der\");case\"1.2.840.10045.2.1\":return u.subjectPrivateKey=u.subjectPublicKey,{type:\"ec\",data:u};case\"1.2.840.10040.4.1\":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,\"der\"),{type:\"dsa\",data:u.algorithm.params};default:throw new Error(\"unknown key id \"+c)}throw new Error(\"unknown key type \"+f);case\"ENCRYPTED PRIVATE KEY\":l=function(t,r){var n=t.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),c=i[t.algorithm.decrypt.cipher.algo.join(\".\")],u=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,f=parseInt(c.split(\"-\")[1],10)/8,l=a.pbkdf2Sync(r,n,o,f),d=s.createDecipheriv(c,l,u),p=[];return p.push(d.update(h)),p.push(d.final()),e.concat(p)}(l=n.EncryptedPrivateKey.decode(l,\"der\"),r);case\"PRIVATE KEY\":switch(c=(u=n.PrivateKey.decode(l,\"der\")).algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPrivateKey.decode(u.subjectPrivateKey,\"der\");case\"1.2.840.10045.2.1\":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,\"der\").privateKey};case\"1.2.840.10040.4.1\":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,\"der\"),{type:\"dsa\",params:u.algorithm.params};default:throw new Error(\"unknown key id \"+c)}throw new Error(\"unknown key type \"+f);case\"RSA PUBLIC KEY\":return n.RSAPublicKey.decode(l,\"der\");case\"RSA PRIVATE KEY\":return n.RSAPrivateKey.decode(l,\"der\");case\"DSA PRIVATE KEY\":return{type:\"dsa\",params:n.DSAPrivateKey.decode(l,\"der\")};case\"EC PRIVATE KEY\":return{curve:(l=n.ECPrivateKey.decode(l,\"der\")).parameters.value,privateKey:l.privateKey};default:throw new Error(\"unknown key type \"+f)}}t.exports=c,c.signature=n.signature}).call(this,r(3).Buffer)},function(t,e,r){const{keys:n}=r(1),i=Object.freeze({pg:\"postgres\",postgresql:\"postgres\",sqlite:\"sqlite3\"}),o=Object.freeze([\"mssql\",\"mysql\",\"mysql2\",\"oracledb\",\"postgres\",\"redshift\",\"sqlite3\"].concat(n(i))),s=Object.freeze([\"maxWaitingClients\",\"testOnBorrow\",\"fifo\",\"priorityRange\",\"autostart\",\"evictionRunIntervalMillis\",\"numTestsPerRun\",\"softIdleTimeoutMillis\",\"Promise\"]);t.exports={CLIENT_ALIASES:i,SUPPORTED_CLIENTS:o,POOL_CONFIG_OPTIONS:s}},function(t,e){t.exports=function(t,e){if(t.client.config.asyncStackTraces){const r=(new Error).stack.split(\"\\n\");r.splice(0,e),t._asyncStack=r}}},function(t,e,r){const{isEmpty:n,map:i,clone:o,each:s}=r(1),a=r(7);t.exports=function(t){t.prototype.toQuery=function(t){let e=this.toSQL(this._method,t);return Array.isArray(e)||(e=[e]),i(e,e=>this.client._formatQuery(e.sql,e.bindings,t)).join(\";\\n\")},t.prototype.then=function(){let t=this.client.runner(this).run();return this.client.config.asyncStackTraces&&(t=t.catch(t=>{t.originalStack=t.stack;const e=t.stack.split(\"\\n\")[0];throw this._asyncStack.unshift(e),t.stack=this._asyncStack.join(\"\\n\"),t})),a.resolve(t.then.apply(t,arguments))},t.prototype.options=function(t){return this._options=this._options||[],this._options.push(o(t)||{}),this},t.prototype.connection=function(t){return this._connection=t,this},t.prototype.debug=function(t){return this._debug=!arguments.length||t,this},t.prototype.transacting=function(t){if(t&&t.client&&(t.client.transacting?this.client=t.client:t.client.logger.warn(`Invalid transaction value: ${t.client}`)),n(t))throw this.client.logger.error(\"Invalid value on transacting call, potential bug\"),Error(\"Invalid transacting value (null, undefined or empty object)\");return this},t.prototype.stream=function(t){return this.client.runner(this).stream(t)},t.prototype.pipe=function(t,e){return this.client.runner(this).pipe(t,e)},s([\"bind\",\"catch\",\"finally\",\"asCallback\",\"spread\",\"map\",\"reduce\",\"thenReturn\",\"return\",\"yield\",\"ensure\",\"reflect\",\"get\",\"mapSeries\",\"delay\"],function(e){t.prototype[e]=function(){const t=this.then();return t[e].apply(t,arguments)}})}},function(t,e,r){(e=t.exports=r(65)).Stream=e,e.Readable=e,e.Writable=r(46),e.Duplex=r(17),e.Transform=r(69),e.PassThrough=r(137)},function(t,e,r){\"use strict\";(function(e,n,i){var o=r(35);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var a,c=!e.browser&&[\"v0.10\",\"v0.9.\"].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=g;var u=Object.create(r(28));u.inherits=r(0);var h={deprecate:r(136)},f=r(67),l=r(2).Buffer,d=i.Uint8Array||function(){};var p,m=r(68);function b(){}function g(t,e){a=a||r(17),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,u=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit(\"error\",n)):(i(n),t._writableState.errorEmitted=!0,t.emit(\"error\",n),S(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?c(v,t,r,s,i):v(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(t){if(a=a||r(17),!(p.call(y,this)||this instanceof a))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),f.call(this)}function _(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function v(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)i[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;i.allBuffers=c,_(t,e,!0,e.length,i,\"\",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,h=r.encoding,f=r.callback;if(_(t,e,!1,e.objectMode?1:u.length,u,h,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(r){e.pendingcb--,r&&t.emit(\"error\",r),e.prefinished=!0,t.emit(\"prefinish\"),S(t,e)})}function S(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||(\"function\"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"))),r}u.inherits(y,f),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,\"buffer\",{get:h.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof g)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},y.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,l.isBuffer(n)||n instanceof d);return a&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),\"function\"==typeof e&&(r=e,e=null),a?e=\"buffer\":e||(e=i.defaultEncoding),\"function\"!=typeof r&&(r=b),i.ended?function(t,e){var r=new Error(\"write after end\");t.emit(\"error\",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError(\"May not write null values to stream\"):\"string\"==typeof r||void 0===r||e.objectMode||(s=new TypeError(\"Invalid non-string/buffer chunk\")),s&&(t.emit(\"error\",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=l.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i=\"buffer\",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,n,i,o);return c}(this,i,a,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if(\"string\"==typeof t&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new TypeError(\"Unknown encoding: \"+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error(\"_write() is not implemented\"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;\"function\"==typeof t?(r=t,t=null,e=null):\"function\"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once(\"finish\",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(5),r(64).setImmediate,r(8))},function(t,e,r){\"use strict\";var n=r(2).Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){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 t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=c,this.end=u,e=4;break;case\"utf8\":this.fillLast=a,e=4;break;case\"base64\":this.text=h,this.end=f,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"<22>\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"<22>\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"<22>\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):\"\"}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\"\"},o.prototype.end=function(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"<22>\":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){const{isString:n,tail:i}=r(1);t.exports={pushAdditional:function(t){const e=new this.constructor(this.client,this.tableCompiler,this.columnBuilder);t.call(e,i(arguments)),this.sequence.additional=(this.sequence.additional||[]).concat(e.sequence)},pushQuery:function(t){t&&(n(t)&&(t={sql:t}),t.bindings||(t.bindings=this.formatter.bindings),this.sequence.push(t),this.formatter=this.client.formatter(this._commonBuilder))},unshiftQuery:function(t){t&&(n(t)&&(t={sql:t}),t.bindings||(t.bindings=this.formatter.bindings),this.sequence.unshift(t),this.formatter=this.client.formatter(this._commonBuilder))}}},function(t,e,r){const{extend:n,each:i,toArray:o}=r(1),{addQueryContext:s}=r(11);function a(t,e,r,i){this.client=t,this._method=\"add\",this._single={},this._modifiers={},this._statements=[],this._type=h[r]||r,this._args=i,this._tableBuilder=e,\"alter\"===e._method&&n(this,u)}const c={default:\"defaultTo\",defaultsTo:\"defaultTo\"};i([\"default\",\"defaultsTo\",\"defaultTo\",\"unsigned\",\"nullable\",\"first\",\"after\",\"comment\",\"collate\"],function(t){const e=c[t]||t;a.prototype[t]=function(){return this._modifiers[e]=o(arguments),this}}),s(a),a.prototype.notNull=a.prototype.notNullable=function(){return this.nullable(!1)},i([\"index\",\"primary\",\"unique\"],function(t){a.prototype[t]=function(){return-1===this._type.toLowerCase().indexOf(\"increments\")&&this._tableBuilder[t].apply(this._tableBuilder,[this._args[0]].concat(o(arguments))),this}}),a.prototype.references=function(t){return this._tableBuilder.foreign.call(this._tableBuilder,this._args[0],void 0,this)._columnBuilder(this).references(t)};const u={drop:function(){return this._single.drop=!0,this},alterType:function(t){return this._statements.push({grouping:\"alterType\",value:t}),this},alter:function(){return this._method=\"alter\",this}},h={float:\"floating\",enum:\"enu\",boolean:\"bool\",string:\"varchar\",bigint:\"bigInteger\"};t.exports=a},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(152);function i(t){return\"number\"==typeof t&&t===Math.round(t)&&t>0}e.defer=function(){let t=null,e=null;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}},e.now=function(){return Date.now()},e.duration=function(t,e){return Math.abs(e-t)},e.checkOptionalTime=function(t){return void 0===t||i(t)},e.checkRequiredTime=i,e.delay=function(t){return new Promise(e=>setTimeout(e,t))},e.reflect=function(t){return t.then(t=>new n.PromiseInspection({value:t})).catch(t=>new n.PromiseInspection({error:t}))},e.tryPromise=function(t){try{const e=t();return Promise.resolve(e)}catch(t){return Promise.reject(t)}}},function(t,e,r){\"use strict\";var n=r(0),i=r(81),o=r(2).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(t,e){return t<<e|t>>>32-e}function u(t,e,r,n,i,o,s){return c(t+(e&r|~e&n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return c(t+(e&n|r&~n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return c(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return c(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,t[0],3614090360,7),o=u(o,r,n,i,t[1],3905402710,12),i=u(i,o,r,n,t[2],606105819,17),n=u(n,i,o,r,t[3],3250441966,22),r=u(r,n,i,o,t[4],4118548399,7),o=u(o,r,n,i,t[5],1200080426,12),i=u(i,o,r,n,t[6],2821735955,17),n=u(n,i,o,r,t[7],4249261313,22),r=u(r,n,i,o,t[8],1770035416,7),o=u(o,r,n,i,t[9],2336552879,12),i=u(i,o,r,n,t[10],4294925233,17),n=u(n,i,o,r,t[11],2304563134,22),r=u(r,n,i,o,t[12],1804603682,7),o=u(o,r,n,i,t[13],4254626195,12),i=u(i,o,r,n,t[14],2792965006,17),r=h(r,n=u(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=h(o,r,n,i,t[6],3225465664,9),i=h(i,o,r,n,t[11],643717713,14),n=h(n,i,o,r,t[0],3921069994,20),r=h(r,n,i,o,t[5],3593408605,5),o=h(o,r,n,i,t[10],38016083,9),i=h(i,o,r,n,t[15],3634488961,14),n=h(n,i,o,r,t[4],3889429448,20),r=h(r,n,i,o,t[9],568446438,5),o=h(o,r,n,i,t[14],3275163606,9),i=h(i,o,r,n,t[3],4107603335,14),n=h(n,i,o,r,t[8],1163531501,20),r=h(r,n,i,o,t[13],2850285829,5),o=h(o,r,n,i,t[2],4243563512,9),i=h(i,o,r,n,t[7],1735328473,14),r=f(r,n=h(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=l(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e,r){\"use strict\";var n=r(3).Buffer,i=r(0),o=r(81),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,r,n,i,o,s,a){return p(t+(e^r^n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return p(t+(e&r|~e&n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return p(t+((e|~r)^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return p(t+(e&n|r&~n)+o+s|0,a)+i|0}function _(t,e,r,n,i,o,s,a){return p(t+(e^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,v=0|this._a,w=0|this._b,E=0|this._c,x=0|this._d,S=0|this._e,A=0;A<80;A+=1){var C,k;A<16?(C=m(r,n,i,o,d,t[a[A]],f[0],u[A]),k=_(v,w,E,x,S,t[c[A]],l[0],h[A])):A<32?(C=b(r,n,i,o,d,t[a[A]],f[1],u[A]),k=y(v,w,E,x,S,t[c[A]],l[1],h[A])):A<48?(C=g(r,n,i,o,d,t[a[A]],f[2],u[A]),k=g(v,w,E,x,S,t[c[A]],l[2],h[A])):A<64?(C=y(r,n,i,o,d,t[a[A]],f[3],u[A]),k=b(v,w,E,x,S,t[c[A]],l[3],h[A])):(C=_(r,n,i,o,d,t[a[A]],f[4],u[A]),k=m(v,w,E,x,S,t[c[A]],l[4],h[A])),r=d,d=o,o=p(i,10),i=n,n=C,v=S,S=x,x=p(E,10),E=w,w=k}var T=this._b+i+x|0;this._b=this._c+o+S|0,this._c=this._d+d+v|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+\" is not supported (we accept pull requests)\");return new r}).sha=r(185),e.sha1=r(186),e.sha224=r(187),e.sha256=r(82),e.sha384=r(188),e.sha512=r(83)},function(t,e,r){\"use strict\";e.utils=r(194),e.Cipher=r(195),e.DES=r(196),e.CBC=r(197),e.EDE=r(198)},function(t,e,r){var n=r(199),i=r(207),o=r(93);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n={ECB:r(200),CBC:r(201),CFB:r(202),CFB8:r(203),CFB1:r(204),OFB:r(205),CTR:r(91),GCM:r(91)},i=r(93);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){(function(e){var n=r(4),i=r(25);function o(t,r){var i=function(t){var e=s(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(r),o=r.modulus.byteLength(),a=(n.mont(r.modulus),new n(t).mul(i.blinder).umod(r.modulus)),c=a.toRed(n.mont(r.prime1)),u=a.toRed(n.mont(r.prime2)),h=r.coefficient,f=r.prime1,l=r.prime2,d=c.redPow(r.exponent1),p=u.redPow(r.exponent2);d=d.fromRed(),p=p.fromRed();var m=d.isub(p).imul(h).umod(f);return m.imul(l),p.iadd(m),new e(p.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(t){for(var e=t.modulus.byteLength(),r=new n(i(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}t.exports=o,o.getr=s}).call(this,r(3).Buffer)},function(t,e,r){var n=e;n.utils=r(13),n.common=r(32),n.sha=r(223),n.ripemd=r(227),n.hmac=r(228),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){const n=r(20),i={renameColumnTrigger:function(t,e,r,i){const o=n.generateCombinedName(t,\"autoinc_trg\",e);return\"DECLARE PK_NAME VARCHAR(200); IS_AUTOINC NUMBER := 0; BEGIN\"+` EXECUTE IMMEDIATE ('ALTER TABLE \"${e}\" RENAME COLUMN \"${r}\" TO \"${i}\"');`+` SELECT COUNT(*) INTO IS_AUTOINC from \"USER_TRIGGERS\" where trigger_name = '${o}';`+\" IF (IS_AUTOINC > 0) THEN SELECT cols.column_name INTO PK_NAME FROM all_constraints cons, all_cons_columns cols WHERE cons.constraint_type = 'P' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner\"+` AND cols.table_name = '${e}';`+` IF ('${i}' = PK_NAME) THEN`+` EXECUTE IMMEDIATE ('DROP TRIGGER \"${o}\"');`+` EXECUTE IMMEDIATE ('create or replace trigger \"${o}\"`+` BEFORE INSERT on \"${e}\" for each row`+\" declare checking number := 1; begin\"+` if (:new.\"${i}\" is null) then`+\" while checking >= 1 loop\"+` select \"${n.generateCombinedName(t,\"seq\",e)}\".nextval into :new.\"${i}\" from dual;`+` select count(\"${i}\") into checking from \"${e}\"`+` where \"${i}\" = :new.\"${i}\";`+\" end loop; end if; end;'); end if; end if;END;\"},createAutoIncrementTrigger:function(t,e){const r=n.generateCombinedName(t,\"autoinc_trg\",e),i=n.generateCombinedName(t,\"seq\",e);return\"DECLARE PK_NAME VARCHAR(200); BEGIN\"+` EXECUTE IMMEDIATE ('CREATE SEQUENCE \"${i}\"');`+\" SELECT cols.column_name INTO PK_NAME FROM all_constraints cons, all_cons_columns cols WHERE cons.constraint_type = 'P' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner\"+` AND cols.table_name = '${e}';`+` execute immediate ('create or replace trigger \"${r}\"`+` BEFORE INSERT on \"${e}\"`+\" for each row declare checking number := 1; begin if (:new.\\\"' || PK_NAME || '\\\" is null) then while checking >= 1 loop\"+` select \"${i}\".nextval into :new.\"' || PK_NAME || '\" from dual;`+` select count(\"' || PK_NAME || '\") into checking from \"${e}\"`+\" where \\\"' || PK_NAME || '\\\" = :new.\\\"' || PK_NAME || '\\\"; end loop; end if; end;'); END;\"},renameTableAndAutoIncrementTrigger:function(t,e,r){const i=n.generateCombinedName(t,\"autoinc_trg\",e),o=n.generateCombinedName(t,\"seq\",e),s=n.generateCombinedName(t,\"autoinc_trg\",r),a=n.generateCombinedName(t,\"seq\",r);return\"DECLARE PK_NAME VARCHAR(200); IS_AUTOINC NUMBER := 0; BEGIN\"+` EXECUTE IMMEDIATE ('RENAME \"${e}\" TO \"${r}\"');`+` SELECT COUNT(*) INTO IS_AUTOINC from \"USER_TRIGGERS\" where trigger_name = '${i}';`+\" IF (IS_AUTOINC > 0) THEN\"+` EXECUTE IMMEDIATE ('DROP TRIGGER \"${i}\"');`+` EXECUTE IMMEDIATE ('RENAME \"${o}\" TO \"${a}\"');`+\" SELECT cols.column_name INTO PK_NAME FROM all_constraints cons, all_cons_columns cols WHERE cons.constraint_type = 'P' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner\"+` AND cols.table_name = '${r}';`+` EXECUTE IMMEDIATE ('create or replace trigger \"${s}\"`+` BEFORE INSERT on \"${r}\" for each row`+\" declare checking number := 1; begin if (:new.\\\"' || PK_NAME || '\\\" is null) then while checking >= 1 loop\"+` select \"${a}\".nextval into :new.\"' || PK_NAME || '\" from dual;`+` select count(\"' || PK_NAME || '\") into checking from \"${r}\"`+\" where \\\"' || PK_NAME || '\\\" = :new.\\\"' || PK_NAME || '\\\"; end loop; end if; end;'); end if;END;\"}};t.exports=i},function(t,e,r){const n=r(20);function i(t,e){this.columnName=t,this.value=e,this.returning=!1}i.prototype.toString=function(){return\"[object BlobHelper:\"+this.columnName+\"]\"},n.BlobHelper=i,t.exports=n},function(t,e,r){var n=r(126),i=r(127),o=i;o.v1=n,o.v4=i,t.exports=o},function(t,e){var r=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||\"undefined\"!=typeof msCrypto&&\"function\"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);t.exports=function(){return r(n),n}}else{var i=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}},function(t,e){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.exports=function(t,e){var n=e||0,i=r;return[i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],\"-\",i[t[n++]],i[t[n++]],\"-\",i[t[n++]],i[t[n++]],\"-\",i[t[n++]],i[t[n++]],\"-\",i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]]].join(\"\")}},function(t,e,r){(function(t){var n=void 0!==t&&t||\"undefined\"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(128),e.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(8))},function(t,e,r){\"use strict\";(function(e,n){var i=r(35);t.exports=_;var o,s=r(66);_.ReadableState=y;r(12).EventEmitter;var a=function(t,e){return t.listeners(e).length},c=r(67),u=r(2).Buffer,h=e.Uint8Array||function(){};var f=Object.create(r(28));f.inherits=r(0);var l=r(133),d=void 0;d=l&&l.debuglog?l.debuglog(\"stream\"):function(){};var p,m=r(134),b=r(68);f.inherits(_,c);var g=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function y(t,e){t=t||{};var n=e instanceof(o=o||r(17));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(47).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function _(t){if(o=o||r(17),!(this instanceof _))return new _(t);this._readableState=new y(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function v(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,u.isBuffer(n)||n instanceof h||\"string\"==typeof e||void 0===e||t.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\"));var n;return r}(s,e)),o?t.emit(\"error\",o):s.objectMode||e&&e.length>0?(\"string\"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n?s.endEmitted?t.emit(\"error\",new Error(\"stream.unshift() after end event\")):w(t,s,e,!0):s.ended?t.emit(\"error\",new Error(\"stream.push() after EOF\")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):C(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit(\"data\",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),C(t,e)}Object.defineProperty(_.prototype,\"destroyed\",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),_.prototype.destroy=b.destroy,_.prototype._undestroy=b.undestroy,_.prototype._destroy=function(t,e){this.push(null),e(t)},_.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=\"\"),r=!0),v(this,t,e,!1,r)},_.prototype.unshift=function(t){return v(this,t,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return p||(p=r(47).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d(\"emit readable\"),t.emit(\"readable\"),M(t)}function C(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d(\"maybeReadMore read 0\"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function T(t){d(\"readable nexttick read 0\"),t.read(0)}function R(t,e){e.reading||(d(\"resume read 0\"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit(\"resume\"),M(t),e.flowing&&!e.reading&&t.read(0)}function M(t){var e=t._readableState;for(d(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function j(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=u.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('\"endReadable()\" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"))}function O(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}_.prototype.read=function(t){d(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?I(this):S(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&I(this),null;var n,i=e.needReadable;return d(\"need readable\",i),(0===e.length||e.length-t<e.highWaterMark)&&d(\"length less than watermark\",i=!0),e.ended||e.reading?d(\"reading or ended\",i=!1):i&&(d(\"do read\"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?j(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit(\"data\",n),n},_.prototype._read=function(t){this.emit(\"error\",new Error(\"_read() is not implemented\"))},_.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d(\"pipe count=%d opts=%j\",o.pipesCount,e);var c=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?h:_;function u(e,n){d(\"onunpipe\"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d(\"cleanup\"),t.removeListener(\"close\",g),t.removeListener(\"finish\",y),t.removeListener(\"drain\",f),t.removeListener(\"error\",b),t.removeListener(\"unpipe\",u),r.removeListener(\"end\",h),r.removeListener(\"end\",_),r.removeListener(\"data\",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function h(){d(\"onend\"),t.end()}o.endEmitted?i.nextTick(c):r.once(\"end\",c),t.on(\"unpipe\",u);var f=function(t){return function(){var e=t._readableState;d(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,M(t))}}(r);t.on(\"drain\",f);var l=!1;var p=!1;function m(e){d(\"ondata\"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==O(o.pipes,t))&&!l&&(d(\"false write response, pause\",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function b(e){d(\"onerror\",e),_(),t.removeListener(\"error\",b),0===a(t,\"error\")&&t.emit(\"error\",e)}function g(){t.removeListener(\"finish\",y),_()}function y(){d(\"onfinish\"),t.removeListener(\"close\",g),_()}function _(){d(\"unpipe\"),r.unpipe(t)}return r.on(\"data\",m),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",b),t.once(\"close\",g),t.once(\"finish\",y),t.emit(\"pipe\",r),o.flowing||(d(\"pipe resume\"),r.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit(\"unpipe\",this,r);return this}var s=O(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r),this)},_.prototype.on=function(t,e){var r=c.prototype.on.call(this,t,e);if(\"data\"===t)!1!==this._readableState.flowing&&this.resume();else if(\"readable\"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&S(this):i.nextTick(T,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var t=this._readableState;return t.flowing||(d(\"resume\"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(R,t,e))}(this,t)),this},_.prototype.pause=function(){return d(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(d(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this},_.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",function(){if(d(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on(\"data\",function(i){(d(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){d(\"wrapped _read\",e),n&&(n=!1,t.resume())},this},Object.defineProperty(_.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=j}).call(this,r(8),r(5))},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},function(t,e,r){t.exports=r(12).EventEmitter},function(t,e,r){\"use strict\";var n=r(35);function i(t,e){t.emit(\"error\",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),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.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){\"use strict\";t.exports=o;var n=r(17),i=Object.create(r(28));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit(\"error\",new Error(\"write callback called multiple times\"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(\"function\"==typeof t.transform&&(this._transform=t.transform),\"function\"==typeof t.flush&&(this._flush=t.flush)),this.on(\"prefinish\",s)}function s(){var t=this;\"function\"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit(\"error\",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error(\"Calling transform done when ws.length != 0\");if(t._transformState.transforming)throw new Error(\"Calling transform done when still transforming\");return t.push(null)}i.inherits=r(0),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error(\"_transform() is not implemented\")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit(\"close\")})}},function(t,e,r){\"use strict\";(function(e){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license MIT\n */\nfunction n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&\"function\"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(15),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,c=\"foo\"===function(){}.name;function u(t){return Object.prototype.toString.call(t)}function h(t){return!i(t)&&(\"function\"==typeof e.ArrayBuffer&&(\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=t.exports=g,l=/\\s*function\\s+([^\\(\\s]*)\\s*/;function d(t){if(o.isFunction(t)){if(c)return t.name;var e=t.toString().match(l);return e&&e[1]}}function p(t,e){return\"string\"==typeof t?t.length<e?t:t.slice(0,e):t}function m(t){if(c||!o.isFunction(t))return o.inspect(t);var e=d(t);return\"[Function\"+(e?\": \"+e:\"\")+\"]\"}function b(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function g(t,e){t||b(t,!0,e,\"==\",f.ok)}function y(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\"object\"==typeof t||null!==e&&\"object\"==typeof e){if(h(t)&&h(e)&&u(t)===u(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var c=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==c&&c===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=_(t),s=_(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),y(t,e,r);var c,u,h=E(t),f=E(e);if(h.length!==f.length)return!1;for(h.sort(),f.sort(),u=h.length-1;u>=0;u--)if(h[u]!==f[u])return!1;for(u=h.length-1;u>=0;u--)if(c=h[u],!y(t[c],e[c],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function _(t){return\"[object Arguments]\"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if(\"[object RegExp]\"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if(\"function\"!=typeof e)throw new TypeError('\"block\" argument must be a function');\"string\"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\" (\"+r.name+\").\":\".\")+(n?\" \"+n:\".\"),t&&!i&&b(i,r,\"Missing expected exception\"+n);var s=\"string\"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&v(i,r)||a)&&b(i,r,\"Got unwanted exception\"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name=\"AssertionError\",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=p(m((e=this).actual),128)+\" \"+e.operator+\" \"+p(m(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=d(r),s=i.indexOf(\"\\n\"+o);if(s>=0){var a=i.indexOf(\"\\n\",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=b,f.ok=g,f.equal=function(t,e,r){t!=e&&b(t,e,r,\"==\",f.equal)},f.notEqual=function(t,e,r){t==e&&b(t,e,r,\"!=\",f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||b(t,e,r,\"deepEqual\",f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||b(t,e,r,\"deepStrictEqual\",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&&b(t,e,r,\"notDeepEqual\",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&b(e,r,n,\"notDeepStrictEqual\",t)},f.strictEqual=function(t,e,r){t!==e&&b(t,e,r,\"===\",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&b(t,e,r,\"!==\",f.notStrictEqual)},f.throws=function(t,e,r){w(!0,t,e,r)},f.doesNotThrow=function(t,e,r){w(!1,t,e,r)},f.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(8))},function(t,e,r){const n=r(70);function i(t,e,r){this.schema=r,this.table=t,this.joinType=e,this.and=this,this.clauses=[]}function o(t,e,r,n,i){let o=null;if(\"function\"==typeof r)o={type:\"onWrapped\",value:r,bool:e};else switch(arguments.length){case 3:o={type:\"onRaw\",value:r,bool:e};break;case 4:o={type:t,column:r,operator:\"=\",value:n,bool:e};break;default:o={type:t,column:r,operator:n,value:i,bool:e}}return o}Object.assign(i.prototype,{grouping:\"join\",on(t){if(\"object\"==typeof t&&\"function\"!=typeof t.toSQL){const e=Object.keys(t);let r=-1;const n=\"or\"===this._bool()?\"orOn\":\"on\";for(;++r<e.length;)this[n](e[r],t[e[r]]);return this}const e=o(\"onBasic\",this._bool(),...arguments);return e&&this.clauses.push(e),this},using(t){return this.clauses.push({type:\"onUsing\",column:t,bool:this._bool()})},orOn(t,e,r){return this._bool(\"or\").on.apply(this,arguments)},onVal(t){if(\"object\"==typeof t&&\"function\"!=typeof t.toSQL){const e=Object.keys(t);let r=-1;const n=\"or\"===this._bool()?\"orOnVal\":\"onVal\";for(;++r<e.length;)this[n](e[r],t[e[r]]);return this}const e=o(\"onVal\",this._bool(),...arguments);return e&&this.clauses.push(e),this},andOnVal(){return this.onVal(...arguments)},orOnVal(){return this._bool(\"or\").onVal(...arguments)},onBetween(t,e){return n(Array.isArray(e),\"The second argument to onBetween must be an array.\"),n(2===e.length,\"You must specify 2 values for the onBetween clause\"),this.clauses.push({type:\"onBetween\",column:t,value:e,bool:this._bool(),not:this._not()}),this},onNotBetween(t,e){return this._not(!0).onBetween(t,e)},orOnBetween(t,e){return this._bool(\"or\").onBetween(t,e)},orOnNotBetween(t,e){return this._bool(\"or\")._not(!0).onBetween(t,e)},onIn(t,e){return Array.isArray(e)&&0===e.length?this.on(1,\"=\",0):(this.clauses.push({type:\"onIn\",column:t,value:e,not:this._not(),bool:this._bool()}),this)},onNotIn(t,e){return this._not(!0).onIn(t,e)},orOnIn(t,e){return this._bool(\"or\").onIn(t,e)},orOnNotIn(t,e){return this._bool(\"or\")._not(!0).onIn(t,e)},onNull(t){return this.clauses.push({type:\"onNull\",column:t,not:this._not(),bool:this._bool()}),this},orOnNull(t){return this._bool(\"or\").onNull(t)},onNotNull(t){return this._not(!0).onNull(t)},orOnNotNull(t){return this._not(!0)._bool(\"or\").onNull(t)},onExists(t){return this.clauses.push({type:\"onExists\",value:t,not:this._not(),bool:this._bool()}),this},orOnExists(t){return this._bool(\"or\").onExists(t)},onNotExists(t){return this._not(!0).onExists(t)},orOnNotExists(t){return this._not(!0)._bool(\"or\").onExists(t)},type(t){return this.joinType=t,this},_bool(t){if(1===arguments.length)return this._boolFlag=t,this;const e=this._boolFlag||\"and\";return this._boolFlag=\"and\",e},_not(t){if(1===arguments.length)return this._notFlag=t,this;const e=this._notFlag;return this._notFlag=!1,e}}),Object.defineProperty(i.prototype,\"or\",{get(){return this._bool(\"or\")}}),i.prototype.andOn=i.prototype.on,i.prototype.andOnIn=i.prototype.onIn,i.prototype.andOnNotIn=i.prototype.onNotIn,i.prototype.andOnNull=i.prototype.onNull,i.prototype.andOnNotNull=i.prototype.onNotNull,i.prototype.andOnExists=i.prototype.onExists,i.prototype.andOnNotExists=i.prototype.onNotExists,i.prototype.andOnBetween=i.prototype.onBetween,i.prototype.andOnNotBetween=i.prototype.onNotBetween,t.exports=i},function(t,e,r){const{EventEmitter:n}=r(12),{Migrator:i}=r(73),o=r(73),s=r(144),a=r(74),{merge:c}=r(1),u=r(145);function h(t){function e(t,r){return m(e.context,t,r)}return d(e,t),e}function f(t){const e=t.context||{};Object.assign(e,{queryBuilder(){return this.client.queryBuilder()},raw(){return this.client.raw.apply(this.client,arguments)},batchInsert(t,e,r=1e3){return u(this,t,e,r)},transaction(t,e){const r=this.client.transaction(t,e);return r.userParams=this.userParams,t?r:r.initPromise},transactionProvider(t){let e;return()=>(e||(e=this.transaction(void 0,t)),e)},initialize(t){return this.client.initializePool(t)},destroy(t){return this.client.destroy(t)},ref(t){return this.client.ref(t)},disableProcessing(){this.userParams.isProcessingDisabled||(this.userParams.wrapIdentifier=this.client.config.wrapIdentifier,this.userParams.postProcessResponse=this.client.config.postProcessResponse,this.client.config.wrapIdentifier=null,this.client.config.postProcessResponse=null,this.userParams.isProcessingDisabled=!0)},enableProcessing(){this.userParams.isProcessingDisabled&&(this.client.config.wrapIdentifier=this.userParams.wrapIdentifier,this.client.config.postProcessResponse=this.userParams.postProcessResponse,this.userParams.isProcessingDisabled=!1)},withUserParams(e){const r=function(t){const e=Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),r={},n=((t,e)=>m(r,t,e)).bind(e);return Object.assign(n,t),n._context=r,n}(t);return this.client&&(r.client=Object.create(this.client.constructor.prototype),c(r.client,this.client),r.client.config=Object.assign({},this.client.config)),d(r,r.client),l(\"query\",t,r),l(\"query-error\",t,r),l(\"query-response\",t,r),l(\"start\",t,r),r.userParams=e,r}}),t.context||(t.context=e)}function l(t,e,r){e.listeners(t).forEach(e=>{r.on(t,e)})}function d(t,e){a.forEach(function(e){t[e]=function(){const r=t.queryBuilder();return r[e].apply(r,arguments)}}),Object.defineProperties(t,{context:{get:()=>t._context,set(e){t._context=e,t.raw=e.raw,t.batchInsert=e.batchInsert,t.transaction=e.transaction,t.transactionProvider=e.transactionProvider,t.initialize=e.initialize,t.destroy=e.destroy,t.ref=e.ref,t.withUserParams=e.withUserParams,t.queryBuilder=e.queryBuilder,t.disableProcessing=e.disableProcessing,t.enableProcessing=e.enableProcessing},configurable:!0},client:{get:()=>t.context.client,set(e){t.context.client=e},configurable:!0},userParams:{get:()=>t.context.userParams,set(e){t.context.userParams=e},configurable:!0},schema:{get:()=>t.client.schemaBuilder(),configurable:!0},migrate:{get:()=>new i(t),configurable:!0},seed:{get:()=>new o(t),configurable:!0},fn:{get:()=>new s(t.client),configurable:!0}}),f(t),t.client=e,t.client.makeKnex=h,t.userParams={};const r=new n;for(const e in r)t[e]=r[e];t._internalListeners&&t._internalListeners.forEach(({eventName:e,listener:r})=>{t.client.removeListener(e,r)}),t._internalListeners=[],p(t,\"start\",e=>{t.emit(\"start\",e)}),p(t,\"query\",e=>{t.emit(\"query\",e)}),p(t,\"query-error\",(e,r)=>{t.emit(\"query-error\",e,r)}),p(t,\"query-response\",(e,r,n)=>{t.emit(\"query-response\",e,r,n)})}function p(t,e,r){t.client.on(e,r),t._internalListeners.push({eventName:e,listener:r})}function m(t,e,r){const n=t.queryBuilder();return e||t.client.logger.warn(\"calling knex without a tableName is deprecated. Use knex.queryBuilder() instead.\"),e?n.table(e,r):n}t.exports=h},function(t,e){t.exports=function(){}},function(t,e){t.exports=[\"with\",\"withRecursive\",\"select\",\"as\",\"columns\",\"column\",\"from\",\"fromJS\",\"into\",\"withSchema\",\"table\",\"distinct\",\"join\",\"joinRaw\",\"innerJoin\",\"leftJoin\",\"leftOuterJoin\",\"rightJoin\",\"rightOuterJoin\",\"outerJoin\",\"fullOuterJoin\",\"crossJoin\",\"where\",\"andWhere\",\"orWhere\",\"whereNot\",\"orWhereNot\",\"whereRaw\",\"whereWrapped\",\"havingWrapped\",\"orWhereRaw\",\"whereExists\",\"orWhereExists\",\"whereNotExists\",\"orWhereNotExists\",\"whereIn\",\"orWhereIn\",\"whereNotIn\",\"orWhereNotIn\",\"whereNull\",\"orWhereNull\",\"whereNotNull\",\"orWhereNotNull\",\"whereBetween\",\"whereNotBetween\",\"andWhereBetween\",\"andWhereNotBetween\",\"orWhereBetween\",\"orWhereNotBetween\",\"groupBy\",\"groupByRaw\",\"orderBy\",\"orderByRaw\",\"union\",\"unionAll\",\"intersect\",\"having\",\"havingRaw\",\"orHaving\",\"orHavingRaw\",\"offset\",\"limit\",\"count\",\"countDistinct\",\"min\",\"max\",\"sum\",\"sumDistinct\",\"avg\",\"avgDistinct\",\"increment\",\"decrement\",\"first\",\"debug\",\"pluck\",\"clearSelect\",\"clearWhere\",\"clearOrder\",\"clearHaving\",\"insert\",\"update\",\"returning\",\"del\",\"delete\",\"truncate\",\"transacting\",\"connection\"]},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.TimeoutError=class extends Error{}},function(t,e,r){\"use strict\";var n=r(157),i=r(158);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=_,e.resolve=function(t,e){return _(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=_(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,u=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),h=[\"'\"].concat(u),f=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(h),l=[\"/\",\"?\",\"#\"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,\"javascript:\":!0},b={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},y=r(159);function _(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var o=t.indexOf(\"?\"),a=-1!==o&&o<t.indexOf(\"#\")?\"?\":\"#\",u=t.split(a);u[0]=u[0].replace(/\\\\/g,\"/\");var _=t=u.join(a);if(_=_.trim(),!r&&1===t.split(\"#\").length){var v=c.exec(_);if(v)return this.path=_,this.href=_,this.pathname=v[1],v[2]?(this.search=v[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search=\"\",this.query={}),this}var w=s.exec(_);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,_=_.substr(w.length)}if(r||w||_.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var x=\"//\"===_.substr(0,2);!x||w&&b[w]||(_=_.substr(2),this.slashes=!0)}if(!b[w]&&(x||w&&!g[w])){for(var S,A,C=-1,k=0;k<l.length;k++){-1!==(T=_.indexOf(l[k]))&&(-1===C||T<C)&&(C=T)}-1!==(A=-1===C?_.lastIndexOf(\"@\"):_.lastIndexOf(\"@\",C))&&(S=_.slice(0,A),_=_.slice(A+1),this.auth=decodeURIComponent(S)),C=-1;for(k=0;k<f.length;k++){var T;-1!==(T=_.indexOf(f[k]))&&(-1===C||T<C)&&(C=T)}-1===C&&(C=_.length),this.host=_.slice(0,C),_=_.slice(C),this.parseHost(),this.hostname=this.hostname||\"\";var R=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!R)for(var M=this.hostname.split(/\\./),j=(k=0,M.length);k<j;k++){var I=M[k];if(I&&!I.match(d)){for(var N=\"\",O=0,B=I.length;O<B;O++)I.charCodeAt(O)>127?N+=\"x\":N+=I[O];if(!N.match(d)){var q=M.slice(0,k),P=M.slice(k+1),L=I.match(p);L&&(q.push(L[1]),P.unshift(L[2])),P.length&&(_=\"/\"+P.join(\".\")+_),this.hostname=q.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var $=this.port?\":\"+this.port:\"\",U=this.hostname||\"\";this.host=U+$,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==_[0]&&(_=\"/\"+_))}if(!m[E])for(k=0,j=h.length;k<j;k++){var D=h[k];if(-1!==_.indexOf(D)){var F=encodeURIComponent(D);F===D&&(F=escape(D)),_=_.split(D).join(F)}}var z=_.indexOf(\"#\");-1!==z&&(this.hash=_.substr(z),_=_.slice(0,z));var H=_.indexOf(\"?\");if(-1!==H?(this.search=_.substr(H),this.query=_.substr(H+1),e&&(this.query=y.parse(this.query)),_=_.slice(0,H)):e&&(this.search=\"\",this.query={}),_&&(this.pathname=_),g[E]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){$=this.pathname||\"\";var Q=this.search||\"\";this.path=$+Q}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||\"\";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,\":\"),t+=\"@\");var e=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",o=!1,s=\"\";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(o+=\":\"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&\"?\"+s||\"\";return e&&\":\"!==e.substr(-1)&&(e+=\":\"),this.slashes||(!e||g[e])&&!1!==o?(o=\"//\"+(o||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):o||(o=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),a&&\"?\"!==a.charAt(0)&&(a=\"?\"+a),e+o+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace(\"#\",\"%23\"))+n},o.prototype.resolve=function(t){return this.resolveObject(_(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,\"\"===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var c=Object.keys(t),u=0;u<c.length;u++){var h=c[u];\"protocol\"!==h&&(r[h]=t[h])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname=\"/\"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var f=Object.keys(t),l=0;l<f.length;l++){var d=f[l];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||b[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||\"\").split(\"/\");p.length&&!(t.host=p.shift()););t.host||(t.host=\"\"),t.hostname||(t.hostname=\"\"),\"\"!==p[0]&&p.unshift(\"\"),p.length<2&&p.unshift(\"\"),r.pathname=p.join(\"/\")}if(r.search=t.search,r.query=t.query,r.host=t.host||\"\",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||\"\",y=r.search||\"\";r.path=m+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&\"/\"===r.pathname.charAt(0),v=t.host||t.pathname&&\"/\"===t.pathname.charAt(0),w=v||_||r.host&&t.pathname,E=w,x=r.pathname&&r.pathname.split(\"/\")||[],S=(p=t.pathname&&t.pathname.split(\"/\")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===x[0]?x[0]=r.host:x.unshift(r.host)),r.host=\"\",t.protocol&&(t.hostname=null,t.port=null,t.host&&(\"\"===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),w=w&&(\"\"===p[0]||\"\"===x[0])),v)r.host=t.host||\"\"===t.host?t.host:r.host,r.hostname=t.hostname||\"\"===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,x=p;else if(p.length)x||(x=[]),x.pop(),x=x.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(S)r.hostname=r.host=x.shift(),(R=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var A=x.slice(-1)[0],C=(r.host||t.host||x.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,k=0,T=x.length;T>=0;T--)\".\"===(A=x[T])?x.splice(T,1):\"..\"===A?(x.splice(T,1),k++):k&&(x.splice(T,1),k--);if(!w&&!E)for(;k--;k)x.unshift(\"..\");!w||\"\"===x[0]||x[0]&&\"/\"===x[0].charAt(0)||x.unshift(\"\"),C&&\"/\"!==x.join(\"/\").substr(-1)&&x.push(\"\");var R,M=\"\"===x[0]||x[0]&&\"/\"===x[0].charAt(0);S&&(r.hostname=r.host=M?\"\":x.length?x.shift():\"\",(R=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(w=w||r.host&&x.length)&&!M&&x.unshift(\"\"),x.length?r.pathname=x.join(\"/\"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,\"loaded\",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,\"id\",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){const n=r(0),{map:i,defer:o}=r(1),{promisify:s}=r(15),a=r(21),c=r(7),u=r(175),h=r(176),f=r(177),l=r(178),d=r(179),{makeEscape:p}=r(37);function m(t){a.call(this,t)}n(m,a),Object.assign(m.prototype,{dialect:\"mysql\",driverName:\"mysql\",_driver:()=>r(180),queryCompiler(){return new h(this,...arguments)},schemaCompiler(){return new f(this,...arguments)},tableCompiler(){return new l(this,...arguments)},columnCompiler(){return new d(this,...arguments)},transaction(){return new u(this,...arguments)},_escapeBinding:p(),wrapIdentifierImpl:t=>\"*\"!==t?`\\`${t.replace(/`/g,\"``\")}\\``:\"*\",acquireRawConnection(){return new c((t,e)=>{const r=this.driver.createConnection(this.connectionSettings);r.on(\"error\",t=>{r.__knex__disposed=t}),r.connect(n=>{if(n)return r.removeAllListeners(),e(n);t(r)})})},async destroyRawConnection(t){try{const e=s(e=>t.end(e));return await e()}catch(e){t.__knex__disposed=e}finally{o(()=>t.removeAllListeners())}},validateConnection:t=>\"connected\"===t.state||\"authenticated\"===t.state,_stream(t,e,r,n){n=n||{};const i=Object.assign({sql:e.sql},e.options);return new c((o,s)=>{r.on(\"error\",s),r.on(\"end\",o);const a=t.query(i,e.bindings).stream(n);a.on(\"error\",t=>{s(t),r.emit(\"error\",t)}),a.pipe(r)})},_query:(t,e)=>(e&&\"string\"!=typeof e||(e={sql:e}),new c(function(r,n){if(!e.sql)return void r();const i=Object.assign({sql:e.sql},e.options);t.query(i,e.bindings,function(t,i,o){if(t)return n(t);e.response=[i,o],r(e)})})),processResponse(t,e){if(null==t)return;const{response:r}=t,{method:n}=t,o=r[0],s=r[1];if(t.output)return t.output.call(e,o,s);switch(n){case\"select\":case\"pluck\":case\"first\":return\"pluck\"===n?i(o,t.pluck):\"first\"===n?o[0]:o;case\"insert\":return[o.insertId];case\"del\":case\"update\":case\"counter\":return o.affectedRows;default:return r}},canCancelQuery:!0,cancelQuery(t){const e=this.acquireConnection();return e.timeout(100).then(e=>this.query(e,{method:\"raw\",sql:\"KILL QUERY ?\",bindings:[t.threadId],options:{}})).finally(()=>{e.then(t=>this.releaseConnection(t))})}}),t.exports=m},function(t,e,r){(function(e){const{map:n,flatten:i,values:o}=r(1),{promisify:s}=r(15),a=r(0),c=r(21),u=r(7),{bufferToString:h}=r(37),f=r(80),l=r(257),d=r(111),p=r(258),m=r(259),b=r(112),g=r(260),{ReturningHelper:y,isConnectionError:_}=r(20);function v(t){c.call(this,t)}a(v,c),Object.assign(v.prototype,{dialect:\"oracle\",driverName:\"oracle\",_driver:()=>r(261),transaction(){return new l(this,...arguments)},formatter(){return new f(this,...arguments)},queryCompiler(){return new d(this,...arguments)},schemaCompiler(){return new p(this,...arguments)},columnBuilder(){return new m(this,...arguments)},columnCompiler(){return new b(this,...arguments)},tableCompiler(){return new g(this,...arguments)},prepBindings(t){return n(t,t=>t instanceof y&&this.driver?new this.driver.OutParam(this.driver.OCCISTRING):\"boolean\"==typeof t?t?1:0:e.isBuffer(t)?h(t):t)},acquireRawConnection(){return new u((t,e)=>{this.driver.connect(this.connectionSettings,(r,n)=>{if(r)return e(r);u.promisifyAll(n),this.connectionSettings.prefetchRowCount&&n.setPrefetchRowCount(this.connectionSettings.prefetchRowCount),t(n)})})},destroyRawConnection:async t=>s(e=>t.close(e))(),database(){return this.connectionSettings.database},positionBindings(t){let e=0;return t.replace(/\\?/g,function(){return`:${e+=1}`})},_stream:(t,e,r,n)=>new u(function(i,o){r.on(\"error\",e=>{_(e)&&(t.__knex__disposed=e),o(e)}),r.on(\"end\",i);const s=t.queryStream(e.sql,e.bindings,n);s.pipe(r),s.on(\"error\",function(t){o(t),r.emit(\"error\",t)})}),_query(t,e){if(!e.sql)throw new Error(\"The query is empty\");return t.executeAsync(e.sql,e.bindings).then(function(r){if(!e.returning)return r;const n=e.outParams.map((t,e)=>r[`returnParam${e||\"\"}`]);return t.executeAsync(e.returningSql,n)}).then(function(t){return e.response=t,e.rowsAffected=t.updateCount,e}).catch(e=>{throw _(e)&&(t.__knex__disposed=e),e})},processResponse(t,e){let{response:r}=t;const{method:s}=t;if(t.output)return t.output.call(e,r);switch(s){case\"select\":case\"pluck\":case\"first\":return\"pluck\"===t.method&&(r=n(r,t.pluck)),\"first\"===t.method?r[0]:r;case\"insert\":case\"del\":case\"update\":case\"counter\":return t.returning?t.returning.length>1||\"*\"===t.returning[0]?r:i(n(r,o)):t.rowsAffected;default:return r}}}),t.exports=v}).call(this,r(3).Buffer)},function(t,e,r){const n=r(29),{ReturningHelper:i}=r(20);t.exports=class extends n{alias(t,e){return t+\" \"+e}parameter(t,e){return t instanceof i&&this.client.driver?t=new this.client.driver.OutParam(this.client.driver.OCCISTRING):\"boolean\"==typeof t&&(t=t?1:0),super.parameter(t,e)}}},function(t,e,r){\"use strict\";var n=r(2).Buffer,i=r(27).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&\"string\"!=typeof t)throw new TypeError(e+\" must be a string or a buffer\")}(t,\"Data\"),this._finalized)throw new Error(\"Digest already called\");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error(\"_update is not implemented\")},o.prototype.digest=function(t){if(this._finalized)throw new Error(\"Digest already called\");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error(\"_digest is not implemented\")},t.exports=o},function(t,e,r){var n=r(0),i=r(26),o=r(2).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,p=0|this._f,m=0|this._g,b=0|this._h,g=0;g<16;++g)r[g]=t.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((e=r[g-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[g-7]+d(r[g-15])+r[g-16];for(var y=0;y<64;++y){var _=b+l(c)+u(c,p,m)+s[y]+r[y]|0,v=f(n)+h(n,i,o)|0;b=m,m=p,p=c,c=a+_|0,a=o,o=i,i=n,n=_+v|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=b+this._h|0},c.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=c},function(t,e,r){var n=r(0),i=r(26),o=r(2).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0<e>>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,y=0|this._gh,_=0|this._hh,v=0|this._al,w=0|this._bl,E=0|this._cl,x=0|this._dl,S=0|this._el,A=0|this._fl,C=0|this._gl,k=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var R=e[T-30],M=e[T-30+1],j=d(R,M),I=p(M,R),N=m(R=e[T-4],M=e[T-4+1]),O=b(M,R),B=e[T-14],q=e[T-14+1],P=e[T-32],L=e[T-32+1],$=I+q|0,U=j+B+g($,I)|0;U=(U=U+N+g($=$+O|0,O)|0)+P+g($=$+L|0,L)|0,e[T]=U,e[T+1]=$}for(var D=0;D<160;D+=2){U=e[D],$=e[D+1];var F=h(r,n,i),z=h(v,w,E),H=f(r,v),Q=f(v,r),W=l(a,S),K=l(S,a),V=s[D],Y=s[D+1],G=u(a,c,y),X=u(S,A,C),J=k+K|0,Z=_+W+g(J,k)|0;Z=(Z=(Z=Z+G+g(J=J+X|0,X)|0)+V+g(J=J+Y|0,Y)|0)+U+g(J=J+$|0,$)|0;var tt=Q+z|0,et=H+F+g(tt,Q)|0;_=y,k=C,y=c,C=A,c=a,A=S,a=o+Z+g(S=x+J|0,x)|0,o=i,x=E,i=n,E=w,n=r,w=v,r=Z+et+g(v=J+tt|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+x|0,this._el=this._el+S|0,this._fl=this._fl+A|0,this._gl=this._gl+C|0,this._hl=this._hl+k|0,this._ah=this._ah+r+g(this._al,v)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,E)|0,this._dh=this._dh+o+g(this._dl,x)|0,this._eh=this._eh+a+g(this._el,S)|0,this._fh=this._fh+c+g(this._fl,A)|0,this._gh=this._gh+y+g(this._gl,C)|0,this._hh=this._hh+_+g(this._hl,k)|0},c.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=c},function(t,e,r){\"use strict\";var n=r(0),i=r(189),o=r(16),s=r(2).Buffer,a=r(85),c=r(52),u=r(53),h=s.alloc(128);function f(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=s.from(e));var r=\"sha512\"===t||\"sha384\"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=(\"rmd160\"===t?new c:u(t)).update(e).digest():e.length<r&&(e=s.concat([e,h],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash=\"rmd160\"===t?new c:u(t),this._hash.update(n)}n(f,o),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){var t=this._hash.digest();return(\"rmd160\"===this._alg?new c:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return\"rmd160\"===(t=t.toLowerCase())||\"ripemd160\"===t?new f(\"rmd160\",e):\"md5\"===t?new i(a,e):new f(t,e)}},function(t,e,r){var n=r(51);t.exports=function(t){return(new n).update(t).digest()}},function(t){t.exports={sha224WithRSAEncryption:{sign:\"rsa\",hash:\"sha224\",id:\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{sign:\"ecdsa/rsa\",hash:\"sha224\",id:\"302d300d06096086480165030402040500041c\"},sha256WithRSAEncryption:{sign:\"rsa\",hash:\"sha256\",id:\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{sign:\"ecdsa/rsa\",hash:\"sha256\",id:\"3031300d060960864801650304020105000420\"},sha384WithRSAEncryption:{sign:\"rsa\",hash:\"sha384\",id:\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{sign:\"ecdsa/rsa\",hash:\"sha384\",id:\"3041300d060960864801650304020205000430\"},sha512WithRSAEncryption:{sign:\"rsa\",hash:\"sha512\",id:\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{sign:\"ecdsa/rsa\",hash:\"sha512\",id:\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{sign:\"rsa\",hash:\"sha1\",id:\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{sign:\"ecdsa\",hash:\"sha1\",id:\"\"},sha256:{sign:\"ecdsa\",hash:\"sha256\",id:\"\"},sha224:{sign:\"ecdsa\",hash:\"sha224\",id:\"\"},sha384:{sign:\"ecdsa\",hash:\"sha384\",id:\"\"},sha512:{sign:\"ecdsa\",hash:\"sha512\",id:\"\"},\"DSA-SHA\":{sign:\"dsa\",hash:\"sha1\",id:\"\"},\"DSA-SHA1\":{sign:\"dsa\",hash:\"sha1\",id:\"\"},DSA:{sign:\"dsa\",hash:\"sha1\",id:\"\"},\"DSA-WITH-SHA224\":{sign:\"dsa\",hash:\"sha224\",id:\"\"},\"DSA-SHA224\":{sign:\"dsa\",hash:\"sha224\",id:\"\"},\"DSA-WITH-SHA256\":{sign:\"dsa\",hash:\"sha256\",id:\"\"},\"DSA-SHA256\":{sign:\"dsa\",hash:\"sha256\",id:\"\"},\"DSA-WITH-SHA384\":{sign:\"dsa\",hash:\"sha384\",id:\"\"},\"DSA-SHA384\":{sign:\"dsa\",hash:\"sha384\",id:\"\"},\"DSA-WITH-SHA512\":{sign:\"dsa\",hash:\"sha512\",id:\"\"},\"DSA-SHA512\":{sign:\"dsa\",hash:\"sha512\",id:\"\"},\"DSA-RIPEMD160\":{sign:\"dsa\",hash:\"rmd160\",id:\"\"},ripemd160WithRSA:{sign:\"rsa\",hash:\"rmd160\",id:\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{sign:\"rsa\",hash:\"rmd160\",id:\"3021300906052b2403020105000414\"},md5WithRSAEncryption:{sign:\"rsa\",hash:\"md5\",id:\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{sign:\"rsa\",hash:\"md5\",id:\"3020300c06082a864886f70d020505000410\"}}},function(t,e,r){e.pbkdf2=r(191),e.pbkdf2Sync=r(90)},function(t,e,r){(function(e){var r=Math.pow(2,30)-1;function n(t,r){if(\"string\"!=typeof t&&!e.isBuffer(t))throw new TypeError(r+\" must be a buffer or string\")}t.exports=function(t,e,i,o){if(n(t,\"Password\"),n(e,\"Salt\"),\"number\"!=typeof i)throw new TypeError(\"Iterations not a number\");if(i<0)throw new TypeError(\"Bad iterations\");if(\"number\"!=typeof o)throw new TypeError(\"Key length not a number\");if(o<0||o>r||o!=o)throw new TypeError(\"Bad key length\")}}).call(this,r(3).Buffer)},function(t,e,r){(function(e){var r;e.browser?r=\"utf-8\":r=parseInt(e.version.split(\".\")[0].slice(1),10)>=6?\"utf-8\":\"binary\";t.exports=r}).call(this,r(5))},function(t,e,r){var n=r(85),i=r(52),o=r(53),s=r(88),a=r(89),c=r(2).Buffer,u=c.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,r){var s=function(t){return\"rmd160\"===t||\"ripemd160\"===t?function(t){return(new i).update(t).digest()}:\"md5\"===t?n:function(e){return o(t).update(e).digest()}}(t),a=\"sha512\"===t||\"sha384\"===t?128:64;e.length>a?e=s(e):e.length<a&&(e=c.concat([e,u],a));for(var f=c.allocUnsafe(a+h[t]),l=c.allocUnsafe(a+h[t]),d=0;d<a;d++)f[d]=54^e[d],l[d]=92^e[d];var p=c.allocUnsafe(a+r+4);f.copy(p,0,0,a),this.ipad1=p,this.ipad2=f,this.opad=l,this.alg=t,this.blocksize=a,this.hash=s,this.size=h[t]}f.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){s(t,e,r,n),c.isBuffer(t)||(t=c.from(t,a)),c.isBuffer(e)||(e=c.from(e,a));var o=new f(i=i||\"sha1\",t,e.length),u=c.allocUnsafe(n),l=c.allocUnsafe(e.length+4);e.copy(l,0,0,e.length);for(var d=0,p=h[i],m=Math.ceil(n/p),b=1;b<=m;b++){l.writeUInt32BE(b,e.length);for(var g=o.run(l,o.ipad1),y=g,_=1;_<r;_++){y=o.run(y,o.ipad2);for(var v=0;v<p;v++)g[v]^=y[v]}g.copy(u,d),d+=p}return u}},function(t,e,r){var n=r(31),i=r(2).Buffer,o=r(92);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var c=s(t),u=o+16*a;t._cache.writeUInt32BE(c[0],u+0),t._cache.writeUInt32BE(c[1],u+4),t._cache.writeUInt32BE(c[2],u+8),t._cache.writeUInt32BE(c[3],u+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,h)}},function(t,e){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},function(t){t.exports={\"aes-128-ecb\":{cipher:\"AES\",key:128,iv:0,mode:\"ECB\",type:\"block\"},\"aes-192-ecb\":{cipher:\"AES\",key:192,iv:0,mode:\"ECB\",type:\"block\"},\"aes-256-ecb\":{cipher:\"AES\",key:256,iv:0,mode:\"ECB\",type:\"block\"},\"aes-128-cbc\":{cipher:\"AES\",key:128,iv:16,mode:\"CBC\",type:\"block\"},\"aes-192-cbc\":{cipher:\"AES\",key:192,iv:16,mode:\"CBC\",type:\"block\"},\"aes-256-cbc\":{cipher:\"AES\",key:256,iv:16,mode:\"CBC\",type:\"block\"},aes128:{cipher:\"AES\",key:128,iv:16,mode:\"CBC\",type:\"block\"},aes192:{cipher:\"AES\",key:192,iv:16,mode:\"CBC\",type:\"block\"},aes256:{cipher:\"AES\",key:256,iv:16,mode:\"CBC\",type:\"block\"},\"aes-128-cfb\":{cipher:\"AES\",key:128,iv:16,mode:\"CFB\",type:\"stream\"},\"aes-192-cfb\":{cipher:\"AES\",key:192,iv:16,mode:\"CFB\",type:\"stream\"},\"aes-256-cfb\":{cipher:\"AES\",key:256,iv:16,mode:\"CFB\",type:\"stream\"},\"aes-128-cfb8\":{cipher:\"AES\",key:128,iv:16,mode:\"CFB8\",type:\"stream\"},\"aes-192-cfb8\":{cipher:\"AES\",key:192,iv:16,mode:\"CFB8\",type:\"stream\"},\"aes-256-cfb8\":{cipher:\"AES\",key:256,iv:16,mode:\"CFB8\",type:\"stream\"},\"aes-128-cfb1\":{cipher:\"AES\",key:128,iv:16,mode:\"CFB1\",type:\"stream\"},\"aes-192-cfb1\":{cipher:\"AES\",key:192,iv:16,mode:\"CFB1\",type:\"stream\"},\"aes-256-cfb1\":{cipher:\"AES\",key:256,iv:16,mode:\"CFB1\",type:\"stream\"},\"aes-128-ofb\":{cipher:\"AES\",key:128,iv:16,mode:\"OFB\",type:\"stream\"},\"aes-192-ofb\":{cipher:\"AES\",key:192,iv:16,mode:\"OFB\",type:\"stream\"},\"aes-256-ofb\":{cipher:\"AES\",key:256,iv:16,mode:\"OFB\",type:\"stream\"},\"aes-128-ctr\":{cipher:\"AES\",key:128,iv:16,mode:\"CTR\",type:\"stream\"},\"aes-192-ctr\":{cipher:\"AES\",key:192,iv:16,mode:\"CTR\",type:\"stream\"},\"aes-256-ctr\":{cipher:\"AES\",key:256,iv:16,mode:\"CTR\",type:\"stream\"},\"aes-128-gcm\":{cipher:\"AES\",key:128,iv:12,mode:\"GCM\",type:\"auth\"},\"aes-192-gcm\":{cipher:\"AES\",key:192,iv:12,mode:\"GCM\",type:\"auth\"},\"aes-256-gcm\":{cipher:\"AES\",key:256,iv:12,mode:\"GCM\",type:\"auth\"}}},function(t,e,r){var n=r(38),i=r(2).Buffer,o=r(16),s=r(0),a=r(206),c=r(31),u=r(92);function h(t,e,r,s){o.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(e);var h=this._cipher.encryptBlock(c);this._ghash=new a(h),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var c=8*o,h=i.alloc(8);h.writeUIntBE(c,0,8),n.update(h),t._finID=n.state;var f=i.from(t._finID);return u(f),f}(this,r,h),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(h,o),h.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error(\"Unsupported state or unable to authenticate data\");var t=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error(\"Unsupported state or unable to authenticate data\");this._authTag=t,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error(\"Attempting to get auth tag in unsupported state\");return this._authTag},h.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error(\"Attempting to set auth tag in unsupported state\");this._authTag=t},h.prototype.setAAD=function(t){if(this._called)throw new Error(\"Attempting to set AAD in unsupported state\");this._ghash.update(t),this._alen+=t.length},t.exports=h},function(t,e,r){var n=r(38),i=r(2).Buffer,o=r(16);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(0)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},function(t,e,r){var n=r(25);t.exports=y,y.simpleSieve=b,y.fermatTest=g;var i=r(4),o=new i(24),s=new(r(97)),a=new i(1),c=new i(2),u=new i(5),h=(new i(16),new i(8),new i(10)),f=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return p=t,t}function b(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function g(t){var e=i.mont(t);return 0===c.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function y(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(c),e.cmp(c)){if(!e.cmp(u))for(;r.mod(h).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(b(p=r.shrn(1))&&b(r)&&g(p)&&g(r)&&s.test(p)&&s.test(r))return r}}},function(t,e,r){var n=r(4),i=r(98);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),c=0;!a.testn(c);c++);for(var u=t.shrn(c),h=a.toRed(o);e>0;e--){var f=this._randrange(new n(2),a);r&&r(f);var l=f.toRed(o).redPow(u);if(0!==l.cmp(s)&&0!==l.cmp(h)){for(var d=1;d<c;d++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(h))break}if(d===c)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var c=t.shrn(a),u=s.toRed(i);e>0;e--){var h=this._randrange(new n(2),s),f=t.gcd(h);if(0!==f.cmpn(1))return f;var l=h.toRed(i).redPow(c);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var d=1;d<a;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(u))break}if(d===a)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},\"object\"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:\"object\"==typeof window&&(i.prototype._rand=function(){throw new Error(\"Not implemented yet\")});else try{var o=r(211);if(\"function\"!=typeof o.randomBytes)throw new Error(\"Not supported\");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,r){\"use strict\";var n=e;function i(t){return 1===t.length?\"0\"+t:t}function o(t){for(var e=\"\",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if(\"hex\"===e)for((t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return\"hex\"===e?o(t):t}},function(t,e,r){\"use strict\";var n=r(13).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){\"use strict\";var n=r(13),i=r(32),o=r(100),s=r(9),a=n.sum32,c=n.sum32_4,u=n.sum32_5,h=o.ch32,f=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,b=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(y,b),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=c(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],b=this.h[2],g=this.h[3],y=this.h[4],_=this.h[5],v=this.h[6],w=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var E=u(w,d(y),h(y,_,v),this.k[n],r[n]),x=a(l(i),f(i,o,b));w=v,v=_,_=y,y=a(g,E),g=b,b=o,o=i,i=a(E,x)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],b),this.h[3]=a(this.h[3],g),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],_),this.h[6]=a(this.h[6],v),this.h[7]=a(this.h[7],w)},y.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},function(t,e,r){\"use strict\";var n=r(13),i=r(32),o=r(9),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,h=n.sum64,f=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,b=n.sum64_5_lo,g=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function v(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function w(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function E(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function x(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function S(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function C(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}function j(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(_,g),t.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=M(r[n-4],r[n-3]),o=j(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],c=T(r[n-30],r[n-29]),u=R(r[n-30],r[n-29]),h=r[n-32],f=r[n-31];r[n]=d(i,o,s,a,c,u,h,f),r[n+1]=p(i,o,s,a,c,u,h,f)}},_.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],u=this.h[5],d=this.h[6],p=this.h[7],g=this.h[8],y=this.h[9],_=this.h[10],T=this.h[11],R=this.h[12],M=this.h[13],j=this.h[14],I=this.h[15];o(this.k.length===r.length);for(var N=0;N<r.length;N+=2){var O=j,B=I,q=C(g,y),P=k(g,y),L=v(g,y,_,T,R),$=w(g,y,_,T,R,M),U=this.k[N],D=this.k[N+1],F=r[N],z=r[N+1],H=m(O,B,q,P,L,$,U,D,F,z),Q=b(O,B,q,P,L,$,U,D,F,z);O=S(n,i),B=A(n,i),q=E(n,i,s,a,c),P=x(n,i,s,a,c,u);var W=f(O,B,q,P),K=l(O,B,q,P);j=R,I=M,R=_,M=T,_=g,T=y,g=f(d,p,H,Q),y=l(p,p,H,Q),d=c,p=u,c=s,u=a,s=n,a=i,n=f(H,Q,W,K),i=l(H,Q,W,K)}h(this.h,0,n,i),h(this.h,2,s,a),h(this.h,4,c,u),h(this.h,6,d,p),h(this.h,8,g,y),h(this.h,10,_,T),h(this.h,12,R,M),h(this.h,14,j,I)},_.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},function(t,e,r){var n=r(0),i=r(34).Reporter,o=r(3).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error(\"Input not Buffer\")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t},this);else if(\"number\"==typeof t){if(!(0<=t&&t<=255))return e.error(\"non-byte EncoderBuffer value\");this.value=t,this.length=1}else if(\"string\"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error(\"Unsupported type: \"+typeof t);this.value=t,this.length=t.length}}n(s,i),e.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||\"DecoderBuffer overrun\")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||\"DecoderBuffer overrun\");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):(\"number\"==typeof this.value?t[e]=this.value:\"string\"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=r(243)},function(t,e,r){var n=r(0),i=r(33),o=i.base,s=i.bignum,a=i.constants.der;function c(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.Node.call(this,\"der\",t)}function h(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error(\"length octect is too long\");n=0;for(var o=0;o<i;o++){n<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;n|=s}return n}t.exports=c,c.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},n(u,o.Node),u.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=h(t,'Failed to peek tag: \"'+e+'\"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+\"of\"===e||r)},u.prototype._decodeTag=function(t,e,r){var n=h(t,'Failed to decode tag of \"'+e+'\"');if(t.isError(n))return n;var i=f(t,n.primitive,'Failed to get length of \"'+e+'\"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+\"of\"!==e)return t.error('Failed to match tag: \"'+e+'\"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: \"'+e+'\"');var o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: \"'+this.tag+'\"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: \"'+e+'\"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var r=h(t,e);if(t.isError(r))return r;var n,i=f(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if(\"end\"===r.tagStr)break}},u.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,\"end\");if(t.isError(o))return o;var s=r.decode(t,\"der\",n);if(t.isError(s)&&o)break;i.push(s)}return i},u.prototype._decodeStr=function(t,e){if(\"bitstr\"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if(\"bmpstr\"===e){var n=t.raw();if(n.length%2==1)return t.error(\"Decoding of string type: bmpstr length mismatch\");for(var i=\"\",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if(\"numstr\"===e){var s=t.raw().toString(\"ascii\");return this._isNumstr(s)?s:t.error(\"Decoding of string type: numstr unsupported characters\")}if(\"octstr\"===e)return t.raw();if(\"objDesc\"===e)return t.raw();if(\"printstr\"===e){var a=t.raw().toString(\"ascii\");return this._isPrintstr(a)?a:t.error(\"Decoding of string type: printstr unsupported characters\")}return/str$/.test(e)?t.raw().toString():t.error(\"Decoding of string type: \"+e+\" unsupported\")},u.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var s=t.readUInt8();o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0)}128&s&&i.push(o);var a=i[0]/40|0,c=i[0]%40;if(n=r?i:[a,c].concat(i.slice(1)),e){var u=e[n.join(\" \")];void 0===u&&(u=e[n.join(\".\")]),void 0!==u&&(n=u)}return n},u.prototype._decodeTime=function(t,e){var r=t.raw().toString();if(\"gentime\"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),c=0|r.slice(12,14);else{if(\"utctime\"!==e)return t.error(\"Decoding \"+e+\" time is not supported yet\");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),c=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,c,0)},u.prototype._decodeNull=function(t){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var r=t.raw(),n=new s(r);return e&&(n=e[n.toString(10)]||n),n},u.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getDecoder(\"der\").tree}},function(t,e,r){var n=r(0),i=r(3).Buffer,o=r(33),s=o.base,a=o.constants.der;function c(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){s.Node.call(this,\"der\",t)}function h(t){return t<10?\"0\"+t:t}t.exports=c,c.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,s.Node),u.prototype._encodeComposite=function(t,e,r,n){var o,s=function(t,e,r,n){var i;\"seqof\"===t?t=\"seq\":\"setof\"===t&&(t=\"set\");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if(\"number\"!=typeof t||(0|t)!==t)return n.error(\"Unknown tag: \"+t);i=t}if(i>=31)return n.error(\"Multi-octet tag encoding unsupported\");e||(i|=32);return i|=a.tagClassByName[r||\"universal\"]<<6}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var c=1,u=n.length;u>=256;u>>=8)c++;(o=new i(2+c))[0]=s,o[1]=128|c;u=1+c;for(var h=n.length;h>0;u--,h>>=8)o[u]=255&h;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(t,e){if(\"bitstr\"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if(\"bmpstr\"===e){for(var r=new i(2*t.length),n=0;n<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return\"numstr\"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: numstr supports only digits and space\"):\"printstr\"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark\"):/str$/.test(e)?this._createEncoderBuffer(t):\"objDesc\"===e?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: \"+e+\" unsupported\")},u.prototype._encodeObjid=function(t,e,r){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"string objid given, but no values map found\");if(!e.hasOwnProperty(t))return this.reporter.error(\"objid not found in values map\");t=e[t].split(/[\\s\\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error(\"objid() should be either array or string, got: \"+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error(\"Second objid identifier OOB\");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n<t.length;n++){var s=t[n];for(o++;s>=128;s>>=7)o++}var a=new i(o),c=a.length-1;for(n=t.length-1;n>=0;n--){s=t[n];for(a[c--]=127&s;(s>>=7)>0;)a[c--]=128|127&s}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return\"gentime\"===e?r=[h(n.getFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):\"utctime\"===e?r=[h(n.getFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):this.reporter.error(\"Encoding \"+e+\" time is not supported yet\"),this._encodeStr(r,\"octstr\")},u.prototype._encodeNull=function(){return this._createEncoderBuffer(\"\")},u.prototype._encodeInt=function(t,e){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"String int or enum given, but no values map\");if(!e.hasOwnProperty(t))return this.reporter.error(\"Values map doesn't contain: \"+JSON.stringify(t));t=e[t]}if(\"number\"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var s=t;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getEncoder(\"der\").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(t){t.exports={\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}},function(t,e,r){var n=r(30),i=r(2).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length<e;)r=o(a++),s=i.concat([s,n(\"sha1\").update(t).update(r).digest()]);return s.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},function(t,e,r){var n=r(4),i=r(2).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},function(t,e,r){const{assign:n,isPlainObject:i,isEmpty:o,isString:s,map:a,reduce:c,compact:u,identity:h}=r(1),f=r(0),l=r(19),{ReturningHelper:d}=r(20),p=[\"columns\",\"join\",\"where\",\"union\",\"group\",\"having\",\"order\",\"lock\"];function m(t,e){l.call(this,t,e)}f(m,l),n(m.prototype,{insert(){let t=this.single.insert||[],{returning:e}=this.single;if(!Array.isArray(t)&&i(this.single.insert)&&(t=[this.single.insert]),e&&!Array.isArray(e)&&(e=[e]),Array.isArray(t)&&1===t.length&&o(t[0]))return this._addReturningToSqlAndConvert(`insert into ${this.tableName} (${this.formatter.wrap(this.single.returning)}) values (default)`,e,this.tableName);if(o(this.single.insert)&&\"function\"!=typeof this.single.insert)return\"\";const r=this._prepInsert(t),n={};if(s(r))return this._addReturningToSqlAndConvert(`insert into ${this.tableName} ${r}`,e);if(1===r.values.length)return this._addReturningToSqlAndConvert(`insert into ${this.tableName} (${this.formatter.columnize(r.columns)}) values (${this.formatter.parameterize(r.values[0])})`,e,this.tableName);const c=0===r.columns.length;return n.sql=\"begin \"+a(r.values,t=>{let i;const o=c?\"\":this.formatter.parameterize(t,this.client.valueForUndefined),s=Array.isArray(e)?e:[e];let a=`insert into ${this.tableName} `;e&&(i=new d(s.join(\":\")),n.outParams=(n.outParams||[]).concat(i)),a+=c?`(${this.formatter.wrap(this.single.returning)}) values (default)`:`(${this.formatter.columnize(r.columns)}) values (${o})`,a+=e?` returning ROWID into ${this.formatter.parameter(i)}`:\"\",a=this.formatter.client.positionBindings(a);const u=o.replace(\"DEFAULT, \",\"\").replace(\", DEFAULT\",\"\");return`execute immediate '${a.replace(/'/g,\"''\")}`+(u||e?\"' using \":\"\")+u+(u&&e?\", \":\"\")+(e?\"out ?\":\"\")+\";\"}).join(\" \")+\"end;\",e&&(n.returning=e,n.returningSql=`select ${this.formatter.columnize(e)}`+\" from \"+this.tableName+\" where ROWID in (\"+n.outParams.map((t,e)=>`:${e+1}`).join(\", \")+\") order by case ROWID \"+n.outParams.map((t,e)=>`when CHARTOROWID(:${e+1}) then ${e}`).join(\" \")+\" end\"),n},update(){const t=this._prepUpdate(this.single.update),e=this.where();let{returning:r}=this.single;const n=`update ${this.tableName}`+\" set \"+t.join(\", \")+(e?` ${e}`:\"\");return r?(Array.isArray(r)||(r=[r]),this._addReturningToSqlAndConvert(n,r,this.tableName)):n},truncate(){return`truncate table ${this.tableName}`},forUpdate:()=>\"for update\",forShare(){return this.client.logger.warn(\"lock for share is not supported by oracle dialect\"),\"\"},columnInfo(){const t=this.single.columnInfo;return{sql:`select * from xmltable( '/ROWSET/ROW'\\n passing dbms_xmlgen.getXMLType('\\n select char_col_decl_length, column_name, data_type, data_default, nullable\\n from user_tab_columns where table_name = ''${this.client.customWrapIdentifier(this.single.table,h)}'' ')\\n columns\\n CHAR_COL_DECL_LENGTH number, COLUMN_NAME varchar2(200), DATA_TYPE varchar2(106),\\n DATA_DEFAULT clob, NULLABLE varchar2(1))`,output(e){const r=c(e,function(t,e){return t[e.COLUMN_NAME]={type:e.DATA_TYPE,defaultValue:e.DATA_DEFAULT,maxLength:e.CHAR_COL_DECL_LENGTH,nullable:\"Y\"===e.NULLABLE},t},{});return t&&r[t]||r}}},select(){let t=this.with();const e=a(p,t=>this[t]());return t+=u(e).join(\" \"),this._surroundQueryWithLimitAndOffset(t)},aggregate(t){return this._aggregate(t,{aliasSeparator:\" \"})},_addReturningToSqlAndConvert(t,e,r){const n={sql:t};if(!e)return n;const i=Array.isArray(e)?e:[e],o=new d(i.join(\":\"));return n.sql=t+\" returning ROWID into \"+this.formatter.parameter(o),n.returningSql=`select ${this.formatter.columnize(e)} from ${r} where ROWID = :1`,n.outParams=[o],n.returning=e,n},_surroundQueryWithLimitAndOffset(t){let{limit:e}=this.single;const{offset:r}=this.single,n=e||0===e||\"0\"===e;if(e=+e,!n&&!r)return t;if(t=t||\"\",n&&!r)return`select * from (${t}) where rownum <= ${this.formatter.parameter(e)}`;const i=+r+(n?e:1e13);return\"select * from (select row_.*, ROWNUM rownum_ from (\"+t+\") row_ where rownum <= \"+this.formatter.parameter(i)+\") where rownum_ > \"+this.formatter.parameter(r)}}),m.prototype.first=m.prototype.select,t.exports=m},function(t,e,r){const{uniq:n,map:i}=r(1),o=r(0),s=r(14),a=r(24),c=r(59);function u(){a.apply(this,arguments),this.modifiers=[\"defaultTo\",\"checkIn\",\"nullable\",\"comment\"]}o(u,a),Object.assign(u.prototype,{_createAutoIncrementTriggerAndSequence(){this.pushAdditional(function(){const t=this.tableCompiler.tableNameRaw,e=c.createAutoIncrementTrigger(this.client.logger,t);this.pushQuery(e)})},increments(){return this._createAutoIncrementTriggerAndSequence(),\"integer not null primary key\"},bigincrements(){return this._createAutoIncrementTriggerAndSequence(),\"number(20, 0) not null primary key\"},floating(t){const e=this._num(t,0);return`float${e?`(${e})`:\"\"}`},double(t,e){return`number(${this._num(t,8)}, ${this._num(e,2)})`},decimal(t,e){return null===t?\"decimal\":`decimal(${this._num(t,8)}, ${this._num(e,2)})`},integer(t){return t?`number(${this._num(t,11)})`:\"integer\"},tinyint:\"smallint\",smallint:\"smallint\",mediumint:\"integer\",biginteger:\"number(20, 0)\",text:\"clob\",enu(t){const e=((t=n(t))||[]).reduce((t,e)=>Math.max(t,String(e).length),1);return this.columnBuilder._modifiers.checkIn=[t],`varchar2(${e})`},time:\"timestamp with time zone\",datetime:t=>t?\"timestamp\":\"timestamp with time zone\",timestamp:t=>t?\"timestamp\":\"timestamp with time zone\",bit:\"clob\",json:\"clob\",bool(){return this.columnBuilder._modifiers.checkIn=[[0,1]],\"number(1, 0)\"},varchar(t){return`varchar2(${this._num(t,255)})`},comment(t){const e=this.args[0]||this.defaults(\"columnName\");this.pushAdditional(function(){this.pushQuery(`comment on column ${this.tableCompiler.tableName()}.`+this.formatter.wrap(e)+\" is '\"+(t||\"\")+\"'\")},t)},checkIn(t){return void 0===t?\"\":(t=t instanceof s?t.toQuery():Array.isArray(t)?i(t,t=>`'${t}'`).join(\", \"):`'${t}'`,`check (${this.formatter.wrap(this.args[0])} in (${t}))`)}}),t.exports=u},function(t,e){},function(t,e,r){(function(e){const{map:n,extend:i,isString:o}=r(1),{promisify:s}=r(15),a=r(0),c=r(21),u=r(7),h=r(115),f=r(116),l=r(117),d=r(118),{makeEscape:p}=r(37);function m(t){c.apply(this,arguments),t.returning&&(this.defaultReturning=t.returning),t.searchPath&&(this.searchPath=t.searchPath)}a(m,c),Object.assign(m.prototype,{queryCompiler(){return new h(this,...arguments)},columnCompiler(){return new f(this,...arguments)},schemaCompiler(){return new d(this,...arguments)},tableCompiler(){return new l(this,...arguments)},dialect:\"postgresql\",driverName:\"pg\",_driver:()=>r(119),_escapeBinding:p({escapeArray:(t,e)=>e(function t(e,r){let n=\"{\";for(let i=0;i<e.length;i++){i>0&&(n+=\",\");const o=e[i];null==o?n+=\"NULL\":Array.isArray(o)?n+=t(o,r):n+=\"number\"==typeof o?o:JSON.stringify(\"string\"==typeof o?o:r(o))}return n+\"}\"}(t,e)),escapeString(t){let e=!1,r=\"'\";for(let n=0;n<t.length;n++){const i=t[n];\"'\"===i?r+=i+i:\"\\\\\"===i?(r+=i+i,e=!0):r+=i}return r+=\"'\",!0===e&&(r=\"E\"+r),r},escapeObject(t,e,r,n=[]){if(t&&\"function\"==typeof t.toPostgres){if(-1!==(n=n||[]).indexOf(t))throw new Error(`circular reference detected while preparing \"${t}\" for query`);return n.push(t),e(t.toPostgres(e),n)}return JSON.stringify(t)}}),wrapIdentifierImpl(t){if(\"*\"===t)return t;let e=\"\";const r=t.match(/(.*?)(\\[[0-9]+\\])/);return r&&(t=r[1],e=r[2]),`\"${t.replace(/\"/g,'\"\"')}\"${e}`},acquireRawConnection(){const t=this;return new u(function(e,r){new t.driver.Client(t.connectionSettings).connect(function(n,i){return n?r(n):(i.on(\"error\",t=>{i.__knex__disposed=t}),i.on(\"end\",t=>{i.__knex__disposed=t||\"Connection ended unexpectedly\"}),t.version?void e(i):t.checkVersion(i).then(function(r){t.version=r,e(i)}))})}).then(function(e){return t.setSchemaSearchPath(e),e})},destroyRawConnection:async t=>s(e=>t.end(e))(),checkVersion:t=>new u(function(e,r){t.query(\"select version();\",function(t,n){if(t)return r(t);e(/^PostgreSQL (.*?)( |$)/.exec(n.rows[0].version)[1])})}),positionBindings(t){let e=0;return t.replace(/(\\\\*)(\\?)/g,function(t,r){return r.length%2?\"?\":`$${++e}`})},setSchemaSearchPath(t,e){let r=e||this.searchPath;if(!r)return u.resolve(!0);if(!Array.isArray(r)&&!o(r))throw new TypeError(`knex: Expected searchPath to be Array/String, got: ${typeof r}`);if(o(r)){if(r.includes(\",\")){const t=`[${r.split(\",\").map(t=>`'${t}'`).join(\", \")}]`;this.logger.warn(`Detected comma in searchPath \"${r}\".`+`If you are trying to specify multiple schemas, use Array syntax: ${t}`)}r=[r]}return r=r.map(t=>`\"${t}\"`).join(\",\"),new u(function(e,n){t.query(`set search_path to ${r}`,function(t){if(t)return n(t);e(!0)})})},_stream(t,n,i,o){const s=e.browser?void 0:r(266),a=n.sql;return new u(function(e,r){const c=t.query(new s(a,n.bindings,o));c.on(\"error\",function(t){r(t),i.emit(\"error\",t)}),i.on(\"end\",e),c.pipe(i)})},_query(t,e){let r={text:e.sql,values:e.bindings||[]};return e.options&&(r=i(r,e.options)),new u(function(n,i){t.query(r,function(t,r){if(t)return i(t);e.response=r,n(e)})})},processResponse(t,e){const r=t.response;if(t.output)return t.output.call(e,r);if(\"raw\"===t.method)return r;const{returning:i}=t;if(\"SELECT\"===r.command)return\"first\"===t.method?r.rows[0]:\"pluck\"===t.method?n(r.rows,t.pluck):r.rows;if(i){const t=[];for(let e=0,n=r.rows.length;e<n;e++){const n=r.rows[e];\"*\"===i||Array.isArray(i)?t[e]=n:t[e]=n[Object.keys(n)[0]]}return t}return\"UPDATE\"===r.command||\"DELETE\"===r.command?r.rowCount:r},canCancelQuery:!0,cancelQuery(t){return this.acquireConnection().then(e=>this._wrappedCancelQueryCall(e,t).finally(()=>{this.releaseConnection(e)}))},_wrappedCancelQueryCall(t,e){return this.query(t,{method:\"raw\",sql:\"SELECT pg_cancel_backend(?);\",bindings:[e.processID],options:{}})}}),t.exports=m}).call(this,r(5))},function(t,e,r){const n=r(0),i=r(19),{reduce:o,identity:s}=r(1);function a(t,e){i.call(this,t,e)}n(a,i),Object.assign(a.prototype,{truncate(){return`truncate ${this.tableName} restart identity`},_defaultInsertValue:\"default\",insert(){const t=i.prototype.insert.call(this);if(\"\"===t)return t;const{returning:e}=this.single;return{sql:t+this._returning(e),returning:e}},update(){const t=this.with(),e=this._prepUpdate(this.single.update),r=this.where(),{returning:n}=this.single;return{sql:t+`update ${this.single.only?\"only \":\"\"}${this.tableName} `+`set ${e.join(\", \")}`+(r?` ${r}`:\"\")+this._returning(n),returning:n}},del(){const t=i.prototype.del.apply(this,arguments),{returning:e}=this.single;return{sql:t+this._returning(e),returning:e}},aggregate(t){return this._aggregate(t,{distinctParentheses:!0})},_returning(t){return t?` returning ${this.formatter.columnize(t)}`:\"\"},_tableNames(t){const e=this.single.schema,r=[];for(let n=0;n<t.length;n++){let i=t[n];i&&(e&&(i=`${e}.${i}`),r.push(this.formatter.wrap(i)))}return r.join(\", \")},forUpdate(){const t=this.single.lockTables||[];return\"for update\"+(t.length?\" of \"+this._tableNames(t):\"\")},forShare(){const t=this.single.lockTables||[];return\"for share\"+(t.length?\" of \"+this._tableNames(t):\"\")},skipLocked:()=>\"skip locked\",noWait:()=>\"nowait\",columnInfo(){const t=this.single.columnInfo;let e=this.single.schema;const r=this.client.customWrapIdentifier(this.single.table,s);e&&(e=this.client.customWrapIdentifier(e,s));let n=\"select * from information_schema.columns where table_name = ? and table_catalog = ?\";const i=[r,this.client.database()];return e?(n+=\" and table_schema = ?\",i.push(e)):n+=\" and table_schema = current_schema()\",{sql:n,bindings:i,output(e){const r=o(e.rows,function(t,e){return t[e.column_name]={type:e.data_type,maxLength:e.character_maximum_length,nullable:\"YES\"===e.is_nullable,defaultValue:e.column_default},t},{});return t&&r[t]||r}}},distinctOn(t){return\"distinct on (\"+this.formatter.columnize(t)+\") \"}}),t.exports=a},function(t,e,r){const n=r(0),i=r(24),{isObject:o}=r(1);function s(){i.apply(this,arguments),this.modifiers=[\"nullable\",\"defaultTo\",\"comment\"]}function a(t,e){return!t.version||parseFloat(t.version)>=9.2?e?\"jsonb\":\"json\":\"text\"}n(s,i),Object.assign(s.prototype,{bigincrements:\"bigserial primary key\",bigint:\"bigint\",binary:\"bytea\",bit:t=>!1!==t.length?`bit(${t.length})`:\"bit\",bool:\"boolean\",enu(t,e){const r=(e=e||{}).useNative&&e.existingType?void 0:t.join(\"', '\");if(e.useNative){let t=\"\";const n=e.schemaName||this.tableCompiler.schemaNameRaw;return n&&(t+=`\"${n}\".`),t+=`\"${e.enumName}\"`,e.existingType||this.tableCompiler.unshiftQuery(`create type ${t} as enum ('${r}')`),t}return`text check (${this.formatter.wrap(this.args[0])} in ('${r}'))`},double:\"double precision\",decimal(t,e){return null===t?\"decimal\":`decimal(${this._num(t,8)}, ${this._num(e,2)})`},floating:\"real\",increments:\"serial primary key\",json(t){return t&&this.client.logger.deprecate(\"json(true)\",\"jsonb()\"),a(this.client,t)},jsonb(){return a(this.client,!0)},smallint:\"smallint\",tinyint:\"smallint\",datetime(t=!1,e){let r;return o(t)?({useTz:r,precision:e}=t):r=!t,`${r?\"timestamptz\":\"timestamp\"}${e?\"(\"+e+\")\":\"\"}`},timestamp(t=!1,e){let r;return o(t)?({useTz:r,precision:e}=t):r=!t,`${r?\"timestamptz\":\"timestamp\"}${e?\"(\"+e+\")\":\"\"}`},uuid:\"uuid\",comment(t){const e=this.args[0]||this.defaults(\"columnName\");this.pushAdditional(function(){this.pushQuery(`comment on column ${this.tableCompiler.tableName()}.`+this.formatter.wrap(e)+\" is \"+(t?`'${t}'`:\"NULL\"))},t)}}),t.exports=s},function(t,e,r){const n=r(0),i=r(23),{has:o}=r(1);function s(){i.apply(this,arguments)}n(s,i),s.prototype.renameColumn=function(t,e){return this.pushQuery({sql:`alter table ${this.tableName()} rename ${this.formatter.wrap(t)} to ${this.formatter.wrap(e)}`})},s.prototype.compileAdd=function(t){const e=this.formatter.wrap(t),r=this.prefixArray(\"add column\",this.getColumns(t));return this.pushQuery({sql:`alter table ${e} ${r.join(\", \")}`})},s.prototype.createQuery=function(t,e){let r=(e?\"create table if not exists \":\"create table \")+this.tableName()+\" (\"+t.sql.join(\", \")+\")\";this.single.inherits&&(r+=` inherits (${this.formatter.wrap(this.single.inherits)})`),this.pushQuery({sql:r,bindings:t.bindings}),o(this.single,\"comment\")&&this.comment(this.single.comment)},s.prototype.addColumns=function(t,e,r){if(e===this.alterColumnsPrefix)for(const t of r){const e=this.tableName(),r=t.getColumnType(),n=this.client.wrapIdentifier(t.getColumnName(),t.columnBuilder.queryContext());this.pushQuery({sql:`alter table ${e} alter column ${n} drop default`,bindings:[]}),this.pushQuery({sql:`alter table ${e} alter column ${n} drop not null`,bindings:[]}),this.pushQuery({sql:`alter table ${e} alter column ${n} type ${r} using (${n}::${r})`,bindings:[]});const i=t.modified.defaultTo;if(i){const r=t.defaultTo.apply(t,i);this.pushQuery({sql:`alter table ${e} alter column ${n} set ${r}`,bindings:[]})}const o=t.modified.nullable;o&&!1===o[0]&&this.pushQuery({sql:`alter table ${e} alter column ${n} set not null`,bindings:[]})}else i.prototype.addColumns.call(this,t,e)},s.prototype.comment=function(t){this.pushQuery(`comment on table ${this.tableName()} is '${this.single.comment}'`)},s.prototype.primary=function(t,e){e=e?this.formatter.wrap(e):this.formatter.wrap(`${this.tableNameRaw}_pkey`),this.pushQuery(`alter table ${this.tableName()} add constraint ${e} primary key (${this.formatter.columnize(t)})`)},s.prototype.unique=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} add constraint ${e}`+\" unique (\"+this.formatter.columnize(t)+\")\")},s.prototype.index=function(t,e,r){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`create index ${e} on ${this.tableName()}${r&&` using ${r}`||\"\"}`+\" (\"+this.formatter.columnize(t)+\")\")},s.prototype.dropPrimary=function(t){t=t?this.formatter.wrap(t):this.formatter.wrap(this.tableNameRaw+\"_pkey\"),this.pushQuery(`alter table ${this.tableName()} drop constraint ${t}`)},s.prototype.dropIndex=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),e=this.schemaNameRaw?`${this.formatter.wrap(this.schemaNameRaw)}.${e}`:e,this.pushQuery(`drop index ${e}`)},s.prototype.dropUnique=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop constraint ${e}`)},s.prototype.dropForeign=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"foreign\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop constraint ${e}`)},t.exports=s},function(t,e,r){const n=r(0),i=r(22);function o(){i.apply(this,arguments)}n(o,i),o.prototype.hasTable=function(t){let e=\"select * from information_schema.tables where table_name = ?\";const r=[t];this.schema?(e+=\" and table_schema = ?\",r.push(this.schema)):e+=\" and table_schema = current_schema()\",this.pushQuery({sql:e,bindings:r,output:t=>t.rows.length>0})},o.prototype.hasColumn=function(t,e){let r=\"select * from information_schema.columns where table_name = ? and column_name = ?\";const n=[t,e];this.schema?(r+=\" and table_schema = ?\",n.push(this.schema)):r+=\" and table_schema = current_schema()\",this.pushQuery({sql:r,bindings:n,output:t=>t.rows.length>0})},o.prototype.qualifiedTableName=function(t){const e=this.schema?`${this.schema}.${t}`:t;return this.formatter.wrap(e)},o.prototype.renameTable=function(t,e){this.pushQuery(`alter table ${this.qualifiedTableName(t)} rename to ${this.formatter.wrap(e)}`)},o.prototype.createSchema=function(t){this.pushQuery(`create schema ${this.formatter.wrap(t)}`)},o.prototype.createSchemaIfNotExists=function(t){this.pushQuery(`create schema if not exists ${this.formatter.wrap(t)}`)},o.prototype.dropSchema=function(t){this.pushQuery(`drop schema ${this.formatter.wrap(t)}`)},o.prototype.dropSchemaIfExists=function(t){this.pushQuery(`drop schema if exists ${this.formatter.wrap(t)}`)},o.prototype.dropExtension=function(t){this.pushQuery(`drop extension ${this.formatter.wrap(t)}`)},o.prototype.dropExtensionIfExists=function(t){this.pushQuery(`drop extension if exists ${this.formatter.wrap(t)}`)},o.prototype.createExtension=function(t){this.pushQuery(`create extension ${this.formatter.wrap(t)}`)},o.prototype.createExtensionIfNotExists=function(t){this.pushQuery(`create extension if not exists ${this.formatter.wrap(t)}`)},t.exports=o},function(t,e){t.exports=pg},function(t,e,r){r(121)},function(t,e,r){t.exports=r(122)},function(t,e,r){const n=r(123);t.exports=n},function(t,e,r){const n=r(14),i=r(21),o=r(36),s=r(74),a=r(72),c=r(156),u=r(164),{SUPPORTED_CLIENTS:h}=r(42),{resolveClientNameWithAliases:f}=r(11);function l(t){if(\"string\"==typeof t){return new l(Object.assign(c(t),arguments[2]))}let e;if(0===arguments.length||!t.client&&!t.dialect)e=i;else if(\"function\"==typeof t.client&&t.client.prototype instanceof i)e=t.client;else{const n=t.client||t.dialect;if(!h.includes(n))throw new Error(`knex: Unknown configuration option 'client' value ${n}. Note that it is case-sensitive, check documentation for supported values.`);const i=f(n);e=r(165)(`./${i}/index.js`)}\"string\"==typeof t.connection&&(t=Object.assign({},t,{connection:c(t.connection).connection}));const n=a(new e(t));return t.userParams&&(n.userParams=t.userParams),n}l.Client=i,l.QueryBuilder={extend:function(t,e){o.extend(t,e),s.push(t)}},l.raw=((t,e)=>(console.warn(\"global Knex.raw is deprecated, use knex.raw (chain off an initialized knex object)\"),new n(u).set(t,e))),t.exports=l},function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),\"string\"!=typeof s[0]&&s.unshift(\"%O\");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if(\"%%\"===r)return r;c++;var i=e.formatters[n];if(\"function\"==typeof i){var o=s[c];r=i.call(t,o),s.splice(c,1),c--}return r}),e.formatArgs.call(t,s),(r.log||e.log||console.log.bind(console)).apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}(t),\"function\"==typeof e.init&&e.init(r),r}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable(\"\")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var r=(\"string\"==typeof t?t:\"\").split(/[\\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(\"-\"===(t=r[i].replace(/\\*/g,\".*?\"))[0]?e.skips.push(new RegExp(\"^\"+t.substr(1)+\"$\")):e.names.push(new RegExp(\"^\"+t+\"$\")))},e.enabled=function(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(125),e.names=[],e.skips=[],e.formatters={}},function(t,e){var r=1e3,n=60*r,i=60*n,o=24*i,s=365.25*o;function a(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+\" \"+r:Math.ceil(t/e)+\" \"+r+\"s\"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if(\"string\"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return a*s;case\"days\":case\"day\":case\"d\":return a*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return a*i;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return a*n;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return a*r;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return a;default:return}}(t);if(\"number\"===u&&!1===isNaN(t))return e.long?a(c=t,o,\"day\")||a(c,i,\"hour\")||a(c,n,\"minute\")||a(c,r,\"second\")||c+\" ms\":function(t){if(t>=o)return Math.round(t/o)+\"d\";if(t>=i)return Math.round(t/i)+\"h\";if(t>=n)return Math.round(t/n)+\"m\";if(t>=r)return Math.round(t/r)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},function(t,e,r){var n,i,o=r(62),s=r(63),a=0,c=0;t.exports=function(t,e,r){var u=e&&r||0,h=e||[],f=(t=t||{}).node||n,l=void 0!==t.clockseq?t.clockseq:i;if(null==f||null==l){var d=o();null==f&&(f=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==l&&(l=i=16383&(d[6]<<8|d[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:c+1,b=p-a+(m-c)/1e4;if(b<0&&void 0===t.clockseq&&(l=l+1&16383),(b<0||p>a)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");a=p,c=m,i=l;var g=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;h[u++]=g>>>24&255,h[u++]=g>>>16&255,h[u++]=g>>>8&255,h[u++]=255&g;var y=p/4294967296*1e4&268435455;h[u++]=y>>>8&255,h[u++]=255&y,h[u++]=y>>>24&15|16,h[u++]=y>>>16&255,h[u++]=l>>>8|128,h[u++]=255&l;for(var _=0;_<6;++_)h[u+_]=f[_];return e||s(h)}},function(t,e,r){var n=r(62),i=r(63);t.exports=function(t,e,r){var o=e&&r||0;\"string\"==typeof t&&(e=\"binary\"===t?new Array(16):null,t=null);var s=(t=t||{}).random||(t.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;++a)e[o+a]=s[a];return e||i(s)}},function(t,e,r){(function(t,e){!function(t,r){\"use strict\";if(!t.setImmediate){var n,i,o,s,a,c=1,u={},h=!1,f=t.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(t);l=l&&l.setTimeout?l:t,\"[object process]\"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){p(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage(\"\",\"*\"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):f&&\"onreadystatechange\"in f.createElement(\"script\")?(i=f.documentElement,n=function(t){var e=f.createElement(\"script\");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(s=\"setImmediate$\"+Math.random()+\"$\",a=function(e){e.source===t&&\"string\"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener(\"message\",a,!1):t.attachEvent(\"onmessage\",a),n=function(e){t.postMessage(s+e,\"*\")}),l.setImmediate=function(t){\"function\"!=typeof t&&(t=new Function(\"\"+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return u[c]=i,n(c),c++},l.clearImmediate=d}function d(t){delete u[t]}function p(t){if(h)setTimeout(p,0,t);else{var e=u[t];if(e){h=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{d(t),h=!1}}}}}(\"undefined\"==typeof self?void 0===t?this:t:self)}).call(this,r(8),r(5))},function(t,e,r){const n=r(14);t.exports=class extends n{constructor(t,e){super(t),this.ref=e,this._schema=null,this._alias=null}withSchema(t){return this._schema=t,this}as(t){return this._alias=t,this}toSQL(){const t=this._schema?`${this._schema}.${this.ref}`:this.ref,e=this.client.formatter(this),r=e.columnize(t),n=this._alias?`${r} as ${e.wrap(this._alias)}`:r;return this.set(n,[]),super.toSQL(...arguments)}}},function(t,e,r){const n=r(7);let i;function o(t,e){this.client=t,this.builder=e,this.queries=[],this.connection=void 0}Object.assign(o.prototype,{run(){const t=this;return this.ensureConnection(function(e){t.connection=e,t.client.emit(\"start\",t.builder),t.builder.emit(\"start\",t.builder);const r=t.builder.toSQL();return t.builder._debug&&t.client.logger.debug(r),Array.isArray(r)?t.queryArray(r):t.query(r)}).catch(function(e){throw t.builder._events&&t.builder._events.error&&t.builder.emit(\"error\",e),e}).then(function(e){return t.builder.emit(\"end\"),e})},stream(t,e){1===arguments.length&&\"function\"==typeof t&&(e=t,t={});const o=\"function\"==typeof e;i=i||r(27).PassThrough;const s=this,a=new i({objectMode:!0});let c=!1;const u=this.ensureConnection(function(e){c=!0,s.connection=e;try{const e=s.builder.toSQL();if(Array.isArray(e)&&o)throw new Error(\"The stream may only be used with a single query statement.\");return s.client.stream(s.connection,e,a,t)}catch(t){throw a.emit(\"error\",t),t}});return o?(e(a),n.resolve(u)):(u.catch(function(t){c||a.emit(\"error\",t)}),a)},pipe(t,e){return this.stream(e).pipe(t)},query:async function(t){const{__knexUid:e,__knexTxId:r}=this.connection;this.builder.emit(\"query\",Object.assign({__knexUid:e,__knexTxId:r},t));const i=this;let o=this.client.query(this.connection,t);return t.timeout&&(o=o.timeout(t.timeout)),o.then(t=>this.client.processResponse(t,i)).then(e=>{const r=this.builder.queryContext(),n=this.client.postProcessResponse(e,r);return this.builder.emit(\"query-response\",n,Object.assign({__knexUid:this.connection.__knexUid},t),this.builder),this.client.emit(\"query-response\",n,Object.assign({__knexUid:this.connection.__knexUid},t),this.builder),n}).catch(n.TimeoutError,e=>{const{timeout:r,sql:i,bindings:o}=t;let s;return t.cancelOnTimeout?s=this.client.cancelQuery(this.connection):(this.connection.__knex__disposed=e,s=n.resolve()),s.catch(t=>{throw this.connection.__knex__disposed=e,Object.assign(t,{message:`After query timeout of ${r}ms exceeded, cancelling of query failed.`,sql:i,bindings:o,timeout:r})}).then(()=>{throw Object.assign(e,{message:`Defined query timeout of ${r}ms exceeded when running query.`,sql:i,bindings:o,timeout:r})})}).catch(e=>{throw this.builder.emit(\"query-error\",e,Object.assign({__knexUid:this.connection.__knexUid},t)),e})},async queryArray(t){if(1===t.length)return this.query(t[0]);const e=[];for(const r of t)e.push(await this.query(r));return e},async ensureConnection(t){return this.builder._connection?t(this.builder._connection):this.connection?t(this.connection):this.client.acquireConnection().catch(n.TimeoutError,t=>{throw this.builder&&(t.sql=this.builder.sql,t.bindings=this.builder.bindings),t}).then(async e=>{try{return await t(e)}finally{await this.client.releaseConnection(this.connection)}})}}),t.exports=o},function(t,e,r){\"use strict\";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=u(t),n=r[0],s=r[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,n,s)),c=0,h=s>0?n-4:n,f=0;f<h;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],a[c++]=e>>16&255,a[c++]=e>>8&255,a[c++]=255&e;2===s&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[c++]=255&e);1===s&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(h(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+\"==\")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\"=\"));return o.join(\"\")};for(var n=[],i=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,c=s.length;a<c;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,f=r?i-1:0,l=r?-1:1,d=t[e+f];for(f+=l,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=l,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,f=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?l/c:l*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}},function(t,e){},function(t,e,r){\"use strict\";var n=r(2).Buffer,i=r(135);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+\" \"+t})},function(t,e){},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&\"true\"===String(r).toLowerCase()}t.exports=function(t,e){if(r(\"noDeprecation\"))return t;var n=!1;return function(){if(!n){if(r(\"throwDeprecation\"))throw new Error(e);r(\"traceDeprecation\")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(8))},function(t,e,r){\"use strict\";t.exports=o;var n=r(69),i=Object.create(r(28));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(0),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(46)},function(t,e,r){t.exports=r(17)},function(t,e,r){t.exports=r(45).Transform},function(t,e,r){t.exports=r(45).PassThrough},function(t,e){t.exports=function(t){return t&&\"object\"==typeof t&&\"function\"==typeof t.copy&&\"function\"==typeof t.fill&&\"function\"==typeof t.readUInt8}},function(t,e){t.exports={lockMode:{forShare:\"forShare\",forUpdate:\"forUpdate\"},waitMode:{skipLocked:\"skipLocked\",noWait:\"noWait\"}}},function(t,e){function r(t){this.client=t}r.prototype.now=function(t){return\"number\"==typeof t?this.client.raw(`CURRENT_TIMESTAMP(${t})`):this.client.raw(\"CURRENT_TIMESTAMP\")},t.exports=r},function(t,e,r){const{isNumber:n,chunk:i,flatten:o}=r(1),s=r(146);t.exports=function(t,e,r,a=1e3){let c=void 0,u=null;return Object.assign(Promise.resolve().then(async()=>{if(!n(a)||a<1)throw new TypeError(`Invalid chunkSize: ${a}`);if(!Array.isArray(r))throw new TypeError(`Invalid batch: Expected array, got ${typeof r}`);const h=i(r,a);return await s(1),(e=>u?e(u):t.transaction(e))(async t=>{const r=[];for(const n of h)r.push(await t(e).insert(n,c));return o(r)})}),{returning(t){return c=t,this},transacting(t){return u=t,this}})}},function(t,e,r){const{promisify:n}=r(15);t.exports=n(setTimeout)},function(t,e,r){const n=r(0),{EventEmitter:i}=r(12),{each:o,toArray:s}=r(1),{addQueryContext:a}=r(11),c=r(43);function u(t){this.client=t,this._sequence=[],t.config&&(this._debug=t.config.debug,c(this,4))}n(u,i),o([\"createTable\",\"createTableIfNotExists\",\"createSchema\",\"createSchemaIfNotExists\",\"dropSchema\",\"dropSchemaIfExists\",\"createExtension\",\"createExtensionIfNotExists\",\"dropExtension\",\"dropExtensionIfExists\",\"table\",\"alterTable\",\"hasTable\",\"hasColumn\",\"dropTable\",\"renameTable\",\"dropTableIfExists\",\"raw\"],function(t){u.prototype[t]=function(){return\"createTableIfNotExists\"===t&&this.client.logger.warn([\"Use async .hasTable to check if table exists and then use plain .createTable. Since \",'.createTableIfNotExists actually just generates plain \"CREATE TABLE IF NOT EXIST...\" ',\"query it will not work correctly if there are any alter table queries generated for \",\"columns afterwards. To not break old migrations this function is left untouched for now\",\", but it should not be used when writing new code and it is removed from documentation.\"].join(\"\")),\"table\"===t&&(t=\"alterTable\"),this._sequence.push({method:t,args:s(arguments)}),this}}),r(44)(u),a(u),u.prototype.withSchema=function(t){return this._schema=t,this},u.prototype.toString=function(){return this.toQuery()},u.prototype.toSQL=function(){return this.client.schemaCompiler(this).toSQL()},t.exports=u},function(t,e,r){const{extend:n,each:i,toArray:o,isString:s,isFunction:a}=r(1),c=r(11);function u(t,e,r,n){if(this.client=t,this._fn=n,this._method=e,this._schemaName=void 0,this._tableName=r,this._statements=[],this._single={},!a(this._fn))throw new TypeError(\"A callback function must be supplied to calls against `.createTable` and `.table`\")}u.prototype.setSchema=function(t){this._schemaName=t},u.prototype.toSQL=function(){return\"alter\"===this._method&&n(this,h),this._fn.call(this,this),this.client.tableCompiler(this).toSQL()},i([\"index\",\"primary\",\"unique\",\"dropPrimary\",\"dropUnique\",\"dropIndex\",\"dropForeign\"],function(t){u.prototype[t]=function(){return this._statements.push({grouping:\"alterTable\",method:t,args:o(arguments)}),this}});i({mysql:[\"engine\",\"charset\",\"collate\"],postgresql:[\"inherits\"]},function(t,e){i(t,function(t){u.prototype[t]=function(r){if(this.client.dialect!==e)throw new Error(`Knex only supports ${t} statement with ${e}.`);if(\"alter\"===this._method)throw new Error(`Knex does not support altering the ${t} outside of create `+\"table, please use knex.raw statement.\");this._single[t]=r}})}),c.addQueryContext(u);i([\"tinyint\",\"smallint\",\"mediumint\",\"int\",\"bigint\",\"decimal\",\"float\",\"double\",\"real\",\"bit\",\"boolean\",\"serial\",\"date\",\"datetime\",\"timestamp\",\"time\",\"year\",\"char\",\"varchar\",\"tinytext\",\"tinyText\",\"text\",\"mediumtext\",\"mediumText\",\"longtext\",\"longText\",\"binary\",\"varbinary\",\"tinyblob\",\"tinyBlob\",\"mediumblob\",\"mediumBlob\",\"blob\",\"longblob\",\"longBlob\",\"enum\",\"set\",\"bool\",\"dateTime\",\"increments\",\"bigincrements\",\"bigIncrements\",\"integer\",\"biginteger\",\"bigInteger\",\"string\",\"json\",\"jsonb\",\"uuid\",\"enu\",\"specificType\"],function(t){u.prototype[t]=function(){const e=o(arguments),r=this.client.columnBuilder(this,t,e);return this._statements.push({grouping:\"columns\",builder:r}),r}}),u.prototype.timestamps=function(){const t=!0===arguments[0]?\"timestamp\":\"datetime\",e=this[t](\"created_at\"),r=this[t](\"updated_at\");if(!0===arguments[1]){const t=this.client.raw(\"CURRENT_TIMESTAMP\");e.notNullable().defaultTo(t),r.notNullable().defaultTo(t)}},u.prototype.comment=function(t){if(\"string\"!=typeof t)throw new TypeError(\"Table comment must be string\");this._single.comment=t},u.prototype.foreign=function(t,e){const r={column:t,keyName:e};this._statements.push({grouping:\"alterTable\",method:\"foreign\",args:[r]});let i={references(t){let e;return s(t)&&(e=t.split(\".\")),e&&1!==e.length?(r.inTable=e[0],r.references=e[1],i):(r.references=e?e[0]:t,{on(t){if(\"string\"!=typeof t)throw new TypeError(`Expected tableName to be a string, got: ${typeof t}`);return r.inTable=t,i},inTable(){return this.on.apply(this,arguments)}})},withKeyName:t=>(r.keyName=t,i),onUpdate:t=>(r.onUpdate=t,i),onDelete:t=>(r.onDelete=t,i),_columnBuilder:t=>(n(t,i),i=t,t)};return i};const h={renameColumn(t,e){return this._statements.push({grouping:\"alterTable\",method:\"renameColumn\",args:[t,e]}),this},dropTimestamps(){return this.dropColumns([\"created_at\",\"updated_at\"])}};h.dropColumn=h.dropColumns=function(){return this._statements.push({grouping:\"alterTable\",method:\"dropColumn\",args:o(arguments)}),this},t.exports=u},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(150);e.Pool=n.Pool;const i=r(75);e.TimeoutError=i.TimeoutError,t.exports={Pool:n.Pool,TimeoutError:i.TimeoutError}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(151),i=r(153),o=r(50),s=r(12);function a(t,e){var r=t.indexOf(e);return-1!==r&&(t.splice(r,1),!0)}e.Pool=class{constructor(t){if(this.destroyed=!1,this.emitter=new s.EventEmitter,!(t=t||{}).create)throw new Error(\"Tarn: opt.create function most be provided\");if(!t.destroy)throw new Error(\"Tarn: opt.destroy function most be provided\");if(\"number\"!=typeof t.min||t.min<0||t.min!==Math.round(t.min))throw new Error(\"Tarn: opt.min must be an integer >= 0\");if(\"number\"!=typeof t.max||t.max<=0||t.max!==Math.round(t.max))throw new Error(\"Tarn: opt.max must be an integer > 0\");if(t.min>t.max)throw new Error(\"Tarn: opt.max is smaller than opt.min\");if(!o.checkOptionalTime(t.acquireTimeoutMillis))throw new Error(\"Tarn: invalid opt.acquireTimeoutMillis \"+JSON.stringify(t.acquireTimeoutMillis));if(!o.checkOptionalTime(t.createTimeoutMillis))throw new Error(\"Tarn: invalid opt.createTimeoutMillis \"+JSON.stringify(t.createTimeoutMillis));if(!o.checkOptionalTime(t.destroyTimeoutMillis))throw new Error(\"Tarn: invalid opt.destroyTimeoutMillis \"+JSON.stringify(t.destroyTimeoutMillis));if(!o.checkOptionalTime(t.idleTimeoutMillis))throw new Error(\"Tarn: invalid opt.idleTimeoutMillis \"+JSON.stringify(t.idleTimeoutMillis));if(!o.checkOptionalTime(t.reapIntervalMillis))throw new Error(\"Tarn: invalid opt.reapIntervalMillis \"+JSON.stringify(t.reapIntervalMillis));if(!o.checkOptionalTime(t.createRetryIntervalMillis))throw new Error(\"Tarn: invalid opt.createRetryIntervalMillis \"+JSON.stringify(t.createRetryIntervalMillis));const e={create:!0,validate:!0,destroy:!0,log:!0,min:!0,max:!0,acquireTimeoutMillis:!0,createTimeoutMillis:!0,destroyTimeoutMillis:!0,idleTimeoutMillis:!0,reapIntervalMillis:!0,createRetryIntervalMillis:!0,propagateCreateError:!0};for(let r of Object.keys(t))if(!e[r])throw new Error(`Tarn: unsupported option opt.${r}`);this.creator=t.create,this.destroyer=t.destroy,this.validate=\"function\"==typeof t.validate?t.validate:()=>!0,this.log=t.log||(()=>{}),this.acquireTimeoutMillis=t.acquireTimeoutMillis||3e4,this.createTimeoutMillis=t.createTimeoutMillis||3e4,this.destroyTimeoutMillis=t.destroyTimeoutMillis||5e3,this.idleTimeoutMillis=t.idleTimeoutMillis||3e4,this.reapIntervalMillis=t.reapIntervalMillis||1e3,this.createRetryIntervalMillis=t.createRetryIntervalMillis||200,this.propagateCreateError=!!t.propagateCreateError,this.min=t.min,this.max=t.max,this.used=[],this.free=[],this.pendingCreates=[],this.pendingAcquires=[],this.pendingDestroys=[],this.destroyed=!1,this.interval=null,this.eventId=1}numUsed(){return this.used.length}numFree(){return this.free.length}numPendingAcquires(){return this.pendingAcquires.length}numPendingCreates(){return this.pendingCreates.length}acquire(){const t=this.eventId++;this._executeEventHandlers(\"acquireRequest\",t);const e=new n.PendingOperation(this.acquireTimeoutMillis);return this.pendingAcquires.push(e),e.promise=e.promise.then(e=>(this._executeEventHandlers(\"acquireSuccess\",t,e),e)).catch(r=>(this._executeEventHandlers(\"acquireFail\",t,r),a(this.pendingAcquires,e),Promise.reject(r))),this._tryAcquireOrCreate(),e}release(t){this._executeEventHandlers(\"release\",t);for(let e=0,r=this.used.length;e<r;++e){const r=this.used[e];if(r.resource===t)return this.used.splice(e,1),this.free.push(r.resolve()),this._tryAcquireOrCreate(),!0}return!1}isEmpty(){return 0===[this.numFree(),this.numUsed(),this.numPendingAcquires(),this.numPendingCreates()].reduce((t,e)=>t+e)}check(){const t=o.now(),e=[],r=this.min-this.used.length,n=this.free.length-r;let i=0;this.free.forEach(r=>{o.duration(t,r.timestamp)>=this.idleTimeoutMillis&&i<n?(i++,this._destroy(r.resource)):e.push(r)}),this.free=e,this.isEmpty()&&this._stopReaping()}destroy(){const t=this.eventId++;return this._executeEventHandlers(\"poolDestroyRequest\",t),this._stopReaping(),this.destroyed=!0,o.reflect(Promise.all(this.pendingCreates.map(t=>o.reflect(t.promise))).then(()=>Promise.all(this.used.map(t=>o.reflect(t.promise)))).then(()=>Promise.all(this.pendingAcquires.map(t=>(t.abort(),o.reflect(t.promise))))).then(()=>Promise.all(this.free.map(t=>o.reflect(this._destroy(t.resource))))).then(()=>Promise.all(this.pendingDestroys.map(t=>t.promise))).then(()=>{this.free=[],this.pendingAcquires=[]})).then(e=>(this._executeEventHandlers(\"poolDestroySuccess\",t),this.emitter.removeAllListeners(),e))}on(t,e){this.emitter.on(t,e)}removeListener(t,e){this.emitter.removeListener(t,e)}removeAllListeners(t){this.emitter.removeAllListeners(t)}_tryAcquireOrCreate(){this.destroyed||(this._hasFreeResources()?this._doAcquire():this._shouldCreateMoreResources()&&this._doCreate())}_hasFreeResources(){return this.free.length>0}_doAcquire(){let t=!1;for(;this._canAcquire();){const e=this.pendingAcquires[0],r=this.free[this.free.length-1];this._validateResource(r.resource)?(this.pendingAcquires.shift(),this.free.pop(),this.used.push(r.resolve()),this._startReaping(),e.resolve(r.resource)):(this.free.pop(),this._destroy(r.resource),t=!0)}t&&this._tryAcquireOrCreate()}_canAcquire(){return this.free.length>0&&this.pendingAcquires.length>0}_validateResource(t){try{return!!this.validate(t)}catch(t){return this.log(\"Tarn: resource validator threw an exception \"+t.stack,\"warn\"),!1}}_shouldCreateMoreResources(){return this.used.length+this.pendingCreates.length<this.max&&this.pendingCreates.length<this.pendingAcquires.length}_doCreate(){const t=this.pendingAcquires.slice();this._create().promise.then(()=>(this._tryAcquireOrCreate(),null)).catch(e=>{this.propagateCreateError&&0!==this.pendingAcquires.length&&this.pendingAcquires[0].reject(e),t.forEach(t=>{t.possibleTimeoutCause=e}),o.delay(this.createRetryIntervalMillis).then(()=>this._tryAcquireOrCreate())})}_create(){const t=this.eventId++;this._executeEventHandlers(\"createRequest\",t);const e=new n.PendingOperation(this.createTimeoutMillis);var r;return this.pendingCreates.push(e),(r=this.creator,new Promise((t,e)=>{const n=(r,n)=>{r?e(r):t(n)};o.tryPromise(()=>r(n)).then(e=>{e&&t(e)}).catch(t=>{e(t)})})).then(r=>(a(this.pendingCreates,e),this.free.push(new i.Resource(r)),e.resolve(r),this._executeEventHandlers(\"createSuccess\",t,r),null)).catch(r=>(a(this.pendingCreates,e),e.reject(r),this._executeEventHandlers(\"createFail\",t,r),null)),e}_destroy(t){const e=this.eventId++;this._executeEventHandlers(\"destroyRequest\",e,t);const r=new n.PendingOperation(this.destroyTimeoutMillis);return Promise.resolve().then(()=>this.destroyer(t)).then(()=>{r.resolve(t)}).catch(t=>{r.reject(t)}),this.pendingDestroys.push(r),r.promise.then(r=>(this._executeEventHandlers(\"destroySuccess\",e,t),r)).catch(r=>this._logDestroyerError(e,t,r)).then(t=>{const e=this.pendingDestroys.findIndex(t=>t===r);return this.pendingDestroys.splice(e,1),t})}_logDestroyerError(t,e,r){this._executeEventHandlers(\"destroyFail\",t,e,r),this.log(\"Tarn: resource destroyer threw an exception \"+r.stack,\"warn\")}_startReaping(){this.interval||(this._executeEventHandlers(\"startReaping\"),this.interval=setInterval(()=>this.check(),this.reapIntervalMillis))}_stopReaping(){null!==this.interval&&(this._executeEventHandlers(\"stopReaping\"),clearInterval(this.interval)),this.interval=null}_executeEventHandlers(t,...e){this.emitter.listeners(t).forEach(r=>{try{r(...e)}catch(e){this.log(`Tarn: event handler \"${t}\" threw an exception ${e.stack}`,\"warn\")}})}}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(75),i=r(50);e.PendingOperation=class{constructor(t){var e,r;this.timeoutMillis=t,this.deferred=i.defer(),this.possibleTimeoutCause=null,this.promise=(e=this.deferred.promise,r=t,new Promise((t,i)=>{const o=setTimeout(()=>i(new n.TimeoutError),r);e.then(e=>{clearTimeout(o),t(e)}).catch(t=>{clearTimeout(o),i(t)})})).catch(t=>(t instanceof n.TimeoutError&&(t=this.possibleTimeoutCause?new n.TimeoutError(this.possibleTimeoutCause.message):new n.TimeoutError(\"operation timed out for an unknown reason\")),Promise.reject(t)))}abort(){this.reject(new Error(\"aborted\"))}reject(t){this.deferred.reject(t)}resolve(t){this.deferred.resolve(t)}}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.PromiseInspection=class{constructor(t){this._value=t.value,this._error=t.error}value(){return this._value}reason(){return this._error}isRejected(){return!!this._error}isFulfilled(){return!!this._value}}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});const n=r(50);class i{constructor(t){this.resource=t,this.resource=t,this.timestamp=n.now(),this.deferred=n.defer()}get promise(){return this.deferred.promise}resolve(){return this.deferred.resolve(void 0),new i(this.resource)}}e.Resource=i},function(t,e,r){(function(e){const n=r(155),{inspect:i}=r(15),{isFunction:o,isNil:s,isString:a}=r(1);t.exports=class{constructor(t){const{log:{debug:r,warn:n,error:i,deprecate:o,inspectionDepth:a,enableColors:c}={}}=t;var u;this._inspectionDepth=a||5,this._enableColors=s(u=c)?!(!e||!e.stdout)&&e.stdout.isTTY:u,this._debug=r,this._warn=n,this._error=i,this._deprecate=o}_log(t,e,r){if(!s(e)&&!o(e))throw new TypeError(\"Extensions to knex logger must be functions!\");o(e)?e(t):(a(t)||(t=i(t,{depth:this._inspectionDepth,colors:this._enableColors})),console.log(r?r(t):t))}debug(t){this._log(t,this._debug)}warn(t){this._log(t,this._warn,n.yellow)}error(t){this._log(t,this._error,n.red)}deprecate(t,e){const r=`${t} is deprecated, please use ${e}`;this._log(r,this._deprecate,n.yellow)}}}).call(this,r(5))},function(t,e,r){\"use strict\";(function(e){let r=!(\"NO_COLOR\"in e.env)&&\"0\"!==e.env.FORCE_COLOR&&(\"win32\"===e.platform||null!=e.stdout&&e.stdout.isTTY&&e.env.TERM&&\"dumb\"!==e.env.TERM);const n=(t,e,n,i)=>o=>r?t+(~(o+=\"\").indexOf(e,4)?o.replace(n,i):o)+e:o,i=(t,e)=>n(`\u001b[${t}m`,`\u001b[${e}m`,new RegExp(`\\\\x1b\\\\[${e}m`,\"g\"),`\u001b[${t}m`);t.exports={options:Object.defineProperty({},\"enabled\",{get:()=>r,set:t=>r=t}),reset:i(0,0),bold:n(\"\u001b[1m\",\"\u001b[22m\",/\\x1b\\[22m/g,\"\u001b[22m\u001b[1m\"),dim:n(\"\u001b[2m\",\"\u001b[22m\",/\\x1b\\[22m/g,\"\u001b[22m\u001b[2m\"),italic:i(3,23),underline:i(4,24),inverse:i(7,27),hidden:i(8,28),strikethrough:i(9,29),black:i(30,39),red:i(31,39),green:i(32,39),yellow:i(33,39),blue:i(34,39),magenta:i(35,39),cyan:i(36,39),white:i(37,39),gray:i(90,39),bgBlack:i(40,49),bgRed:i(41,49),bgGreen:i(42,49),bgYellow:i(43,49),bgBlue:i(44,49),bgMagenta:i(45,49),bgCyan:i(46,49),bgWhite:i(47,49),blackBright:i(90,39),redBright:i(91,39),greenBright:i(92,39),yellowBright:i(93,39),blueBright:i(94,39),magentaBright:i(95,39),cyanBright:i(96,39),whiteBright:i(97,39),bgBlackBright:i(100,49),bgRedBright:i(101,49),bgGreenBright:i(102,49),bgYellowBright:i(103,49),bgBlueBright:i(104,49),bgMagentaBright:i(105,49),bgCyanBright:i(106,49),bgWhiteBright:i(107,49)}}).call(this,r(5))},function(t,e,r){const n=r(76),{parse:i}=r(162),o=i;t.exports=function(t){const e=n.parse(t,!0);let{protocol:r}=e;if(null===r)return{client:\"sqlite3\",connection:{filename:t}};return\":\"===r.slice(-1)&&(r=r.slice(0,-1)),{client:r,connection:[\"postgresql\",\"postgres\"].includes(r)?o(t):function(t){const e={};let r=t.pathname;\"/\"===r[0]&&(r=r.slice(1));e.database=r,t.hostname&&(0===t.protocol.indexOf(\"mssql\")?e.server=t.hostname:e.host=t.hostname);t.port&&(e.port=t.port);if(t.auth){const r=t.auth.indexOf(\":\");-1!==r?(e.user=t.auth.slice(0,r),r<t.auth.length-1&&(e.password=t.auth.slice(r+1))):e.user=t.auth}if(t.query)for(const r in t.query)e[r]=t.query[r];return e}(e)}}},function(t,e,r){(function(t,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s=\"object\"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,h=1,f=26,l=38,d=700,p=72,m=128,b=\"-\",g=/^xn--/,y=/[^\\x20-\\x7E]/,_=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,v={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},w=u-h,E=Math.floor,x=String.fromCharCode;function S(t){throw new RangeError(v[t])}function A(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function C(t,e){var r=t.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",t=r[1]),n+A((t=t.replace(_,\".\")).split(\".\"),e).join(\".\")}function k(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function T(t){return A(t,function(t){var e=\"\";return t>65535&&(e+=x((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=x(t)}).join(\"\")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,r){var n=0;for(t=r?E(t/d):t>>1,t+=E(t/e);t>w*f>>1;n+=u)t=E(t/w);return E(n+(w+1)*t/(t+l))}function j(t){var e,r,n,i,o,s,a,l,d,g,y,_=[],v=t.length,w=0,x=m,A=p;for((r=t.lastIndexOf(b))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&S(\"not-basic\"),_.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<v;){for(o=w,s=1,a=u;i>=v&&S(\"invalid-input\"),((l=(y=t.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||l>E((c-w)/s))&&S(\"overflow\"),w+=l*s,!(l<(d=a<=A?h:a>=A+f?f:a-A));a+=u)s>E(c/(g=u-d))&&S(\"overflow\"),s*=g;A=M(w-o,e=_.length+1,0==o),E(w/e)>c-x&&S(\"overflow\"),x+=E(w/e),w%=e,_.splice(w++,0,x)}return T(_)}function I(t){var e,r,n,i,o,s,a,l,d,g,y,_,v,w,A,C=[];for(_=(t=k(t)).length,e=m,r=0,o=p,s=0;s<_;++s)(y=t[s])<128&&C.push(x(y));for(n=i=C.length,i&&C.push(b);n<_;){for(a=c,s=0;s<_;++s)(y=t[s])>=e&&y<a&&(a=y);for(a-e>E((c-r)/(v=n+1))&&S(\"overflow\"),r+=(a-e)*v,e=a,s=0;s<_;++s)if((y=t[s])<e&&++r>c&&S(\"overflow\"),y==e){for(l=r,d=u;!(l<(g=d<=o?h:d>=o+f?f:d-o));d+=u)A=l-g,w=u-g,C.push(x(R(g+A%w,0))),l=E(A/w);C.push(x(R(l,0))),o=M(r,v,n==i),r=0,++n}++r,++e}return C.join(\"\")}a={version:\"1.4.1\",ucs2:{decode:k,encode:T},decode:j,encode:I,toASCII:function(t){return C(t,function(t){return y.test(t)?\"xn--\"+I(t):t})},toUnicode:function(t){return C(t,function(t){return g.test(t)?j(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(77)(t),r(8))},function(t,e,r){\"use strict\";t.exports={isString:function(t){return\"string\"==typeof t},isObject:function(t){return\"object\"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){\"use strict\";e.decode=e.parse=r(160),e.encode=e.stringify=r(161)},function(t,e,r){\"use strict\";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||\"&\",r=r||\"=\";var s={};if(\"string\"!=typeof t||0===t.length)return s;var a=/\\+/g;t=t.split(e);var c=1e3;o&&\"number\"==typeof o.maxKeys&&(c=o.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var h=0;h<u;++h){var f,l,d,p,m=t[h].replace(a,\"%20\"),b=m.indexOf(r);b>=0?(f=m.substr(0,b),l=m.substr(b+1)):(f=m,l=\"\"),d=decodeURIComponent(f),p=decodeURIComponent(l),n(s,d)?i(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var i=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}},function(t,e,r){\"use strict\";var n=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return\"\"}};t.exports=function(t,e,r,a){return e=e||\"&\",r=r||\"=\",null===t&&(t=void 0),\"object\"==typeof t?o(s(t),function(s){var a=encodeURIComponent(n(s))+r;return i(t[s])?o(t[s],function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[s]))}).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):\"\"};var i=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){\"use strict\";var n=r(76),i=r(163);function o(t){if(\"/\"===t.charAt(0))return{host:(r=t.split(\" \"))[0],database:r[1]};var e=n.parse(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(t)?encodeURI(t).replace(/\\%25(\\d\\d)/g,\"%$1\"):t,!0),r=e.query;for(var o in r)Array.isArray(r[o])&&(r[o]=r[o][r[o].length-1]);var s=(e.auth||\":\").split(\":\");if(r.user=s[0],r.password=s.splice(1).join(\":\"),r.port=e.port,\"socket:\"==e.protocol)return r.host=decodeURI(e.pathname),r.database=e.query.db,r.client_encoding=e.query.encoding,r;r.host=e.hostname;var a=e.pathname;return a&&\"/\"===a.charAt(0)&&(a=e.pathname.slice(1)||null),r.database=a&&decodeURI(a),\"true\"!==r.ssl&&\"1\"!==r.ssl||(r.ssl=!0),\"0\"===r.ssl&&(r.ssl=!1),(r.sslcert||r.sslkey||r.sslrootcert)&&(r.ssl={}),r.sslcert&&(r.ssl.cert=i.readFileSync(r.sslcert).toString()),r.sslkey&&(r.ssl.key=i.readFileSync(r.sslkey).toString()),r.sslrootcert&&(r.ssl.ca=i.readFileSync(r.sslrootcert).toString()),r}t.exports=o,o.parse=o},function(t,e){},function(t,e,r){const n=r(29),i={formatter:t=>new n(i,t)};t.exports=i},function(t,e,r){var n={\"./mssql/index.js\":166,\"./mysql/index.js\":78,\"./mysql2/index.js\":181,\"./oracle/index.js\":79,\"./oracledb/index.js\":262,\"./postgres/index.js\":114,\"./redshift/index.js\":267,\"./sqlite3/index.js\":274};function i(t){var e=o(t);return r(e)}function o(t){var e=n[t];if(!(e+1)){var r=new Error(\"Cannot find module '\"+t+\"'\");throw r.code=\"MODULE_NOT_FOUND\",r}return e}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=165},function(t,e,r){const{map:n,flatten:i,values:o}=r(1),s=r(0),a=r(21),c=r(7),u=r(29),h=r(167),f=r(168),l=r(169),d=r(170),p=r(171),m=-2147483648,b=2147483647,g=-9007199254740991,y=9007199254740991;function _(t={}){t&&t.connection&&t.connection.host&&(t.connection.server=t.connection.host),this.mssqlPoolSettings={min:1,max:1,idleTimeoutMillis:Number.MAX_SAFE_INTEGER,evictionRunIntervalMillis:0},a.call(this,t)}s(_,a),Object.assign(_.prototype,{dialect:\"mssql\",driverName:\"mssql\",_driver(){const t=r(172),e=r(173),n=r(174),i=r(!function(){var t=new Error(\"Cannot find module 'mssql/package.json'\");throw t.code=\"MODULE_NOT_FOUND\",t}()).version;if(\"4.1.0\"===i)e.ConnectionPool.prototype.release=function(t){this.pool&&this.pool.release(t)},e.ConnectionPool.prototype._poolCreate=function(){return new n.Promise((e,r)=>{const i={userName:this.config.user,password:this.config.password,server:this.config.server,options:Object.assign({},this.config.options),domain:this.config.domain};i.options.database=this.config.database,i.options.port=this.config.port,i.options.connectTimeout=this.config.connectionTimeout||this.config.timeout||15e3,i.options.requestTimeout=null!=this.config.requestTimeout?this.config.requestTimeout:15e3,i.options.tdsVersion=i.options.tdsVersion||\"7_4\",i.options.rowCollectionOnDone=!1,i.options.rowCollectionOnRequestCompletion=!1,i.options.useColumnNames=!1,i.options.appName=i.options.appName||\"node-mssql\",i.options.instanceName&&delete i.options.port,isNaN(i.options.requestTimeout)&&(i.options.requestTimeout=15e3),i.options.requestTimeout===1/0&&(i.options.requestTimeout=0),i.options.requestTimeout<0&&(i.options.requestTimeout=0),this.config.debug&&(i.options.debug={packet:!0,token:!0,data:!0,payload:!0});const o=new t.Connection(i);let s=!1;function a(t){s||(s=!0,r(t))}o.once(\"end\",t=>{a(new n.ConnectionError(\"Connection ended unexpectedly during connecting\"))}),o.once(\"connect\",t=>{if(t)return a(t=new n.ConnectionError(t));!function(t){s||(s=!0,e(t))}(o)}),o.on(\"error\",t=>{\"ESOCKET\"!==t.code?this.emit(\"error\",t):o.hasError=!0}),this.config.debug&&o.on(\"debug\",this.emit.bind(this,\"debug\",o))})};else{const[t]=i.split(\".\");if(t<5)throw new Error(\"This knex version only supports mssql driver versions 4.1.0 and 5.0.0+\")}return e},formatter(){return new v(this,...arguments)},transaction(){return new h(this,...arguments)},queryCompiler(){return new f(this,...arguments)},schemaCompiler(){return new l(this,...arguments)},tableCompiler(){return new d(this,...arguments)},columnCompiler(){return new p(this,...arguments)},wrapIdentifierImpl:t=>\"*\"===t?\"*\":`[${t.replace(/[[\\]']+/g,\"\")}]`,acquireRawConnection(){return new c((t,e)=>{const r=Object.assign({},this.connectionSettings);r.pool=this.mssqlPoolSettings;const n=new this.driver.ConnectionPool(r);n.connect(r=>{if(r)return e(r);n.on(\"error\",t=>{n.__knex__disposed=t}),t(n)})})},validateConnection:t=>!0===t.connected,destroyRawConnection:t=>t.close().catch(t=>{}),positionBindings(t){let e=-1;return t.replace(/\\?/g,function(){return`@p${e+=1}`})},_stream(t,e,r){return e&&\"string\"!=typeof e||(e={sql:e}),new c((n,i)=>{r.on(\"error\",t=>{i(t)}),r.on(\"end\",n);const{sql:o}=e;if(!o)return n();const s=(t.tx_||t).request();if(s.multiple=!0,s.stream=!0,e.bindings)for(let t=0;t<e.bindings.length;t++)this._setReqInput(s,t,e.bindings[t]);s.pipe(r),s.query(o)})},_query(t,e){const r=this;return e&&\"string\"!=typeof e||(e={sql:e}),new c((n,i)=>{const{sql:o}=e;if(!o)return n();const s=(t.tx_||t).request();if(s.multiple=!0,e.bindings)for(let t=0;t<e.bindings.length;t++)r._setReqInput(s,t,e.bindings[t]);s.query(o,(t,r)=>{if(t)return i(t);e.response=r.recordsets[0],n(e)})})},_setReqInput(t,e,r){if(\"number\"==typeof r)if(r%1!=0)t.input(`p${e}`,this.driver.Decimal(38,10),r);else if(r<m||r>b){if(r<g||r>y)throw new Error(`Bigint must be safe integer or must be passed as string, saw ${r}`);t.input(`p${e}`,this.driver.BigInt,r)}else t.input(`p${e}`,this.driver.Int,r);else t.input(`p${e}`,r)},processResponse(t,e){if(null==t)return;const{response:r,method:s}=t;if(t.output)return t.output.call(e,r);switch(s){case\"select\":case\"pluck\":case\"first\":return\"pluck\"===s?n(r,t.pluck):\"first\"===s?r[0]:r;case\"insert\":case\"del\":case\"update\":case\"counter\":return t.returning?\"@@rowcount\"===t.returning?r[0][\"\"]:Array.isArray(t.returning)&&t.returning.length>1||\"*\"===t.returning[0]?r:i(n(r,o)):r;default:return r}}});class v extends u{columnizeWithPrefix(t,e){const r=\"string\"==typeof e?[e]:e;let n=\"\",i=-1;for(;++i<r.length;)i>0&&(n+=\", \"),n+=t+this.wrap(r[i]);return n}}t.exports=_},function(t,e,r){const n=r(7),i=r(18),{isUndefined:o}=r(1),s=r(10)(\"knex:tx\");t.exports=class extends i{begin(t){return s(\"%s: begin\",this.txid),t.tx_.begin().then(this._resolver,this._rejecter)}savepoint(t){return s(\"%s: savepoint at\",this.txid),n.resolve().then(()=>this.query(t,`SAVE TRANSACTION ${this.txid}`))}commit(t,e){return this._completed=!0,s(\"%s: commit\",this.txid),t.tx_.commit().then(()=>this._resolver(e),this._rejecter)}release(t,e){return this._resolver(e)}rollback(t,e){return this._completed=!0,s(\"%s: rolling back\",this.txid),t.tx_.rollback().then(()=>{let t=e;if(o(e)){if(this.doNotRejectOnRollback)return void this._resolver();t=new Error(`Transaction rejected with non-error: ${e}`)}this._rejecter(t)},t=>(e&&(t.originalError=e),this._rejecter(t)))}rollbackTo(t,e){return s(\"%s: rolling backTo\",this.txid),n.resolve().then(()=>this.query(t,`ROLLBACK TRANSACTION ${this.txid}`,2,e)).then(()=>this._rejecter(e))}acquireConnection(t,e){const r=t&&t.connection;return new n((t,e)=>{try{t((this.outerTx?this.outerTx.conn:null)||r||this.client.acquireConnection())}catch(t){e(t)}}).then(t=>(t.__knexTxId=this.txid,this.outerTx||(this.conn=t,t.tx_=t.transaction()),t)).then(async t=>{try{return await e(t)}finally{this.outerTx||(t.tx_&&(this._completed||(s(\"%s: unreleased transaction\",this.txid),t.tx_.rollback()),t.tx_=null),this.conn=null,r?s(\"%s: not releasing external connection\",this.txid):(s(\"%s: releasing connection\",this.txid),this.client.releaseConnection(t)))}})}}},function(t,e,r){const n=r(0),i=r(19),{isEmpty:o,compact:s,identity:a}=r(1);function c(t,e){i.call(this,t,e)}n(c,i);const u=[\"columns\",\"join\",\"lock\",\"where\",\"union\",\"group\",\"having\",\"order\",\"limit\",\"offset\"];Object.assign(c.prototype,{_emptyInsertValue:\"default values\",select(){const t=this.with(),e=u.map(t=>this[t](this));return t+s(e).join(\" \")},insert(){const t=this.single.insert||[];let e=this.with()+`insert into ${this.tableName} `;const{returning:r}=this.single,n=r?this._returning(\"insert\",r)+\" \":\"\";if(Array.isArray(t)){if(0===t.length)return\"\"}else if(\"object\"==typeof t&&o(t))return{sql:e+n+this._emptyInsertValue,returning:r};const i=this._prepInsert(t);if(\"string\"==typeof i)e+=i;else if(i.columns.length){e+=`(${this.formatter.columnize(i.columns)}`,e+=`) ${n}values (`;let t=-1;for(;++t<i.values.length;)0!==t&&(e+=\"), (\"),e+=this.formatter.parameterize(i.values[t],this.client.valueForUndefined);e+=\")\"}else 1===t.length&&t[0]?e+=n+this._emptyInsertValue:e=\"\";return{sql:e,returning:r}},update(){const t=this.top(),e=this.with(),r=this._prepUpdate(this.single.update),n=this.join(),i=this.where(),o=this.order(),{returning:s}=this.single;return{sql:e+`update ${t?t+\" \":\"\"}${this.tableName}`+\" set \"+r.join(\", \")+(s?` ${this._returning(\"update\",s)}`:\"\")+(n?` from ${this.tableName} ${n}`:\"\")+(i?` ${i}`:\"\")+(o?` ${o}`:\"\")+(s?\"\":this._returning(\"rowcount\",\"@@rowcount\")),returning:s||\"@@rowcount\"}},del(){const t=this.with(),{tableName:e}=this,r=this.where(),{returning:n}=this.single;return{sql:t+`delete from ${e}`+(n?` ${this._returning(\"del\",n)}`:\"\")+(r?` ${r}`:\"\")+(n?\"\":this._returning(\"rowcount\",\"@@rowcount\")),returning:n||\"@@rowcount\"}},columns(){let t=\"\";if(this.onlyUnions())return\"\";const e=this.top(),r=this.grouped.columns||[];let n=-1,i=[];if(r)for(;++n<r.length;){const e=r[n];e.distinct&&(t=\"distinct \"),e.distinctOn?t=this.distinctOn(e.value):\"aggregate\"===e.type?i.push(...this.aggregate(e)):\"aggregateRaw\"===e.type?i.push(this.aggregateRaw(e)):e.value&&e.value.length>0&&i.push(this.formatter.columnize(e.value))}return 0===i.length&&(i=[\"*\"]),`select ${t}`+(e?e+\" \":\"\")+i.join(\", \")+(this.tableName?` from ${this.tableName}`:\"\")},_returning(t,e){switch(t){case\"update\":case\"insert\":return e?`output ${this.formatter.columnizeWithPrefix(\"inserted.\",e)}`:\"\";case\"del\":return e?`output ${this.formatter.columnizeWithPrefix(\"deleted.\",e)}`:\"\";case\"rowcount\":return e?\";select @@rowcount\":\"\"}},truncate(){return`truncate table ${this.tableName}`},forUpdate:()=>\"with (UPDLOCK)\",forShare:()=>\"with (HOLDLOCK)\",columnInfo(){const t=this.single.columnInfo;let e=this.single.schema;const r=this.client.customWrapIdentifier(this.single.table,a);e&&(e=this.client.customWrapIdentifier(e,a));let n=\"select * from information_schema.columns where table_name = ? and table_catalog = ?\";const i=[r,this.client.database()];return e?(n+=\" and table_schema = ?\",i.push(e)):n+=\" and table_schema = 'dbo'\",{sql:n,bindings:i,output(e){const r=e.reduce(function(t,e){return t[e.COLUMN_NAME]={defaultValue:e.COLUMN_DEFAULT,type:e.DATA_TYPE,maxLength:e.CHARACTER_MAXIMUM_LENGTH,nullable:\"YES\"===e.IS_NULLABLE},t},{});return t&&r[t]||r}}},top(){const t=!this.single.limit&&0!==this.single.limit,e=!this.single.offset;return t||!e?\"\":`top (${this.formatter.parameter(this.single.limit)})`},limit:()=>\"\",offset(){const t=!this.single.limit&&0!==this.single.limit,e=!this.single.offset;if(e)return\"\";let r=`offset ${e?\"0\":this.formatter.parameter(this.single.offset)} rows`;return t||(r+=` fetch next ${this.formatter.parameter(this.single.limit)} rows only`),r}}),t.exports=c},function(t,e,r){const n=r(0),i=r(22);function o(t,e){i.call(this,t,e)}function s(t,e){return t?`${t}.${e}`:e}n(o,i),Object.assign(o.prototype,{dropTablePrefix:\"DROP TABLE \",dropTableIfExists(t){const e=this.formatter.wrap(s(this.schema,t));this.pushQuery(`if object_id('${e}', 'U') is not null DROP TABLE ${e}`)},renameTable(t,e){this.pushQuery(`exec sp_rename ${this.formatter.parameter(s(this.schema,t))}, ${this.formatter.parameter(e)}`)},hasTable(t){const e=\"select object_id from sys.tables \"+`where object_id = object_id(${this.formatter.parameter(this.formatter.wrap(s(this.schema,t)))})`;this.pushQuery({sql:e,output:t=>t.length>0})},hasColumn(t,e){const r=\"select object_id from sys.columns \"+`where name = ${this.formatter.parameter(e)} `+`and object_id = object_id(${this.formatter.parameter(this.formatter.wrap(s(this.schema,t)))})`;this.pushQuery({sql:r,output:t=>t.length>0})}}),t.exports=o},function(t,e,r){const n=r(0),i=r(23),o=r(11);function s(){i.apply(this,arguments)}n(s,i),Object.assign(s.prototype,{createAlterTableMethods:[\"foreign\",\"primary\"],createQuery(t,e){const r=(e?`if object_id('${this.tableName()}', 'U') is null CREATE TABLE `:\"CREATE TABLE \")+this.tableName()+(this._formatting?\" (\\n \":\" (\")+t.sql.join(this._formatting?\",\\n \":\", \")+\")\";if(this.single.comment){const{comment:t}=this.single;t.length>60&&this.client.logger.warn(\"The max length for a table comment is 60 characters\")}this.pushQuery(r)},lowerCase:!1,addColumnsPrefix:\"ADD \",dropColumnPrefix:\"DROP COLUMN \",alterColumnPrefix:\"ALTER COLUMN \",addColumns(t,e){e=e||this.addColumnsPrefix,t.sql.length>0&&this.pushQuery({sql:(this.lowerCase?\"alter table \":\"ALTER TABLE \")+this.tableName()+\" \"+e+t.sql.join(\", \"),bindings:t.bindings})},dropColumn(){const t=this,e=o.normalizeArr.apply(null,arguments),r=(Array.isArray(e)?e:[e]).map(e=>t.formatter.wrap(e));this.pushQuery((this.lowerCase?\"alter table \":\"ALTER TABLE \")+this.tableName()+\" \"+this.dropColumnPrefix+r.join(\", \"))},comment(){},changeType(){},renameColumn(t,e){this.pushQuery(`exec sp_rename ${this.formatter.parameter(this.tableName()+\".\"+t)}, ${this.formatter.parameter(e)}, 'COLUMN'`)},dropFKRefs(t,e){const r=this.client.formatter(this.tableBuilder);return Promise.all(e.map(function(e){const n=r.wrap(e.CONSTRAINT_NAME),i=r.wrap(e.TABLE_NAME);return t.query({sql:`ALTER TABLE ${i} DROP CONSTRAINT ${n}`})}))},createFKRefs(t,e){const r=this.client.formatter(this.tableBuilder);return Promise.all(e.map(function(e){const n=r.wrap(e.TABLE_NAME),i=r.wrap(e.CONSTRAINT_NAME),o=r.columnize(e.COLUMN_NAME),s=r.columnize(e.REFERENCED_COLUMN_NAME),a=r.wrap(e.REFERENCED_TABLE_NAME),c=` ON UPDATE ${e.UPDATE_RULE}`,u=` ON DELETE ${e.DELETE_RULE}`;return t.query({sql:`ALTER TABLE ${n} ADD CONSTRAINT ${i}`+\" FOREIGN KEY (\"+o+\") REFERENCES \"+a+\" (\"+s+\")\"+c+u})}))},index(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`CREATE INDEX ${e} ON ${this.tableName()} (${this.formatter.columnize(t)})`)},primary(t,e){e=e?this.formatter.wrap(e):this.formatter.wrap(`${this.tableNameRaw}_pkey`),this.forCreate?this.pushQuery(`CONSTRAINT ${e} PRIMARY KEY (${this.formatter.columnize(t)})`):this.pushQuery(`ALTER TABLE ${this.tableName()} ADD CONSTRAINT ${e} PRIMARY KEY (${this.formatter.columnize(t)})`)},unique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),Array.isArray(t)||(t=[t]);const r=t.map(t=>this.formatter.columnize(t)+\" IS NOT NULL\").join(\" AND \");this.pushQuery(`CREATE UNIQUE INDEX ${e} ON ${this.tableName()} (${this.formatter.columnize(t)}) WHERE ${r}`)},dropIndex(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`DROP INDEX ${e} ON ${this.tableName()}`)},dropForeign(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"foreign\",this.tableNameRaw,t),this.pushQuery(`ALTER TABLE ${this.tableName()} DROP CONSTRAINT ${e}`)},dropPrimary(t){t=t?this.formatter.wrap(t):this.formatter.wrap(`${this.tableNameRaw}_pkey`),this.pushQuery(`ALTER TABLE ${this.tableName()} DROP CONSTRAINT ${t}`)},dropUnique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`DROP INDEX ${e} ON ${this.tableName()}`)}}),t.exports=s},function(t,e,r){const n=r(0),i=r(24);function o(){i.apply(this,arguments),this.modifiers=[\"nullable\",\"defaultTo\",\"first\",\"after\",\"comment\"]}n(o,i),Object.assign(o.prototype,{increments:\"int identity(1,1) not null primary key\",bigincrements:\"bigint identity(1,1) not null primary key\",bigint:\"bigint\",double:(t,e)=>\"float\",floating:(t,e)=>\"float\",integer:()=>\"int\",mediumint:\"int\",smallint:\"smallint\",tinyint:()=>\"tinyint\",varchar(t){return`nvarchar(${this._num(t,255)})`},text:\"nvarchar(max)\",mediumtext:\"nvarchar(max)\",longtext:\"nvarchar(max)\",enu:\"nvarchar(100)\",uuid:\"uniqueidentifier\",datetime:\"datetime2\",timestamp:({useTz:t=!1}={})=>t?\"datetimeoffset\":\"datetime2\",bit(t){return t>1&&this.client.logger.warn(\"Bit field is exactly 1 bit length for MSSQL\"),\"bit\"},binary(t){return t?`varbinary(${this._num(t)})`:\"varbinary(max)\"},bool:\"bit\",first(){return this.client.logger.warn(\"Column first modifier not available for MSSQL\"),\"\"},after(t){return this.client.logger.warn(\"Column after modifier not available for MSSQL\"),\"\"},comment(t){return t&&t.length>255&&this.client.logger.warn(\"Your comment is longer than the max comment length for MSSQL\"),\"\"}}),t.exports=o},function(t,e){},function(t,e){t.exports=mssql},function(t,e){},function(t,e,r){const n=r(18),i=r(10),{isUndefined:o}=r(1),s=i(\"knex:tx\");class a extends n{}Object.assign(a.prototype,{query(t,e,r,n){const i=this,a=this.trxClient.query(t,e).catch(t=>1305===t.errno,()=>{this.trxClient.logger.warn(\"Transaction was implicitly committed, do not mix transactions and DDL with MySQL (#805)\")}).catch(function(t){r=2,n=t,i._completed=!0,s(\"%s error running transaction query\",i.txid)}).then(function(t){if(1===r&&i._resolver(n),2===r){if(o(n)){if(i.doNotRejectOnRollback&&/^ROLLBACK\\b/i.test(e))return void i._resolver();n=new Error(`Transaction rejected with non-error: ${n}`)}i._rejecter(n)}return t});return 1!==r&&2!==r||(i._completed=!0),a}}),t.exports=a},function(t,e,r){const n=r(0),i=r(19),{identity:o}=r(1);function s(t,e){i.call(this,t,e);const{returning:r}=this.single;r&&this.client.logger.warn(\".returning() is not supported by mysql and will not have any effect.\")}n(s,i),Object.assign(s.prototype,{_emptyInsertValue:\"() values ()\",update(){const t=this.join(),e=this._prepUpdate(this.single.update),r=this.where(),n=this.order(),i=this.limit();return`update ${this.tableName}`+(t?` ${t}`:\"\")+\" set \"+e.join(\", \")+(r?` ${r}`:\"\")+(n?` ${n}`:\"\")+(i?` ${i}`:\"\")},forUpdate:()=>\"for update\",forShare:()=>\"lock in share mode\",skipLocked:()=>\"skip locked\",noWait:()=>\"nowait\",columnInfo(){const t=this.single.columnInfo;return{sql:\"select * from information_schema.columns where table_name = ? and table_schema = ?\",bindings:[this.client.customWrapIdentifier(this.single.table,o),this.client.database()],output(e){const r=e.reduce(function(t,e){return t[e.COLUMN_NAME]={defaultValue:e.COLUMN_DEFAULT,type:e.DATA_TYPE,maxLength:e.CHARACTER_MAXIMUM_LENGTH,nullable:\"YES\"===e.IS_NULLABLE},t},{});return t&&r[t]||r}}},limit(){const t=!this.single.limit&&0!==this.single.limit;return t&&!this.single.offset?\"\":`limit ${this.single.offset&&t?\"18446744073709551615\":this.formatter.parameter(this.single.limit)}`}}),t.exports=s},function(t,e,r){const n=r(0),i=r(22),{some:o}=r(1);function s(t,e){i.call(this,t,e)}n(s,i),Object.assign(s.prototype,{renameTable(t,e){this.pushQuery(`rename table ${this.formatter.wrap(t)} to ${this.formatter.wrap(e)}`)},hasTable(t){let e=\"select * from information_schema.tables where table_name = ?\";const r=[t];this.schema?(e+=\" and table_schema = ?\",r.push(this.schema)):e+=\" and table_schema = database()\",this.pushQuery({sql:e,bindings:r,output:function(t){return t.length>0}})},hasColumn(t,e){this.pushQuery({sql:`show columns from ${this.formatter.wrap(t)}`,output(t){return o(t,t=>this.client.wrapIdentifier(t.Field)===this.client.wrapIdentifier(e))}})}}),t.exports=s},function(t,e,r){const n=r(0),i=r(23);function o(){i.apply(this,arguments)}n(o,i),Object.assign(o.prototype,{createQuery(t,e){const r=e?\"create table if not exists \":\"create table \",{client:n}=this;let i={},o=r+this.tableName()+\" (\"+t.sql.join(\", \")+\")\";n.connectionSettings&&(i=n.connectionSettings);const s=this.single.charset||i.charset||\"\",a=this.single.collate||i.collate||\"\",c=this.single.engine||\"\";if(s&&(o+=` default character set ${s}`),a&&(o+=` collate ${a}`),c&&(o+=` engine = ${c}`),this.single.comment){const t=this.single.comment||\"\";t.length>60&&this.client.logger.warn(\"The max length for a table comment is 60 characters\"),o+=` comment = '${t}'`}this.pushQuery(o)},addColumnsPrefix:\"add \",alterColumnsPrefix:\"modify \",dropColumnPrefix:\"drop \",comment(t){this.pushQuery(`alter table ${this.tableName()} comment = '${t}'`)},changeType(){},renameColumn(t,e){const r=this,n=this.tableName(),i=this.formatter.wrap(t)+\" \"+this.formatter.wrap(e);this.pushQuery({sql:`show fields from ${n} where field = `+this.formatter.parameter(t),output(o){const s=o[0],a=this;return r.getFKRefs(a).then(([o])=>new Promise((t,e)=>{try{o.length||t(),t(r.dropFKRefs(a,o))}catch(t){e(t)}}).then(function(){let t=`alter table ${n} change ${i} ${s.Type}`;return\"YES\"!==String(s.Null).toUpperCase()?t+=\" NOT NULL\":t+=\" NULL\",void 0!==s.Default&&null!==s.Default&&(t+=` DEFAULT '${s.Default}'`),a.query({sql:t})}).then(function(){if(o.length)return r.createFKRefs(a,o.map(function(r){return r.REFERENCED_COLUMN_NAME===t&&(r.REFERENCED_COLUMN_NAME=e),r.COLUMN_NAME===t&&(r.COLUMN_NAME=e),r}))}))}})},getFKRefs(t){const e=this.client.formatter(this.tableBuilder),r=\"SELECT KCU.CONSTRAINT_NAME, KCU.TABLE_NAME, KCU.COLUMN_NAME, KCU.REFERENCED_TABLE_NAME, KCU.REFERENCED_COLUMN_NAME, RC.UPDATE_RULE, RC.DELETE_RULE FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC USING(CONSTRAINT_NAME)WHERE KCU.REFERENCED_TABLE_NAME = \"+e.parameter(this.tableNameRaw)+\" AND KCU.CONSTRAINT_SCHEMA = \"+e.parameter(this.client.database())+\" AND RC.CONSTRAINT_SCHEMA = \"+e.parameter(this.client.database());return t.query({sql:r,bindings:e.bindings})},dropFKRefs(t,e){const r=this.client.formatter(this.tableBuilder);return Promise.all(e.map(function(e){const n=r.wrap(e.CONSTRAINT_NAME),i=r.wrap(e.TABLE_NAME);return t.query({sql:`alter table ${i} drop foreign key ${n}`})}))},createFKRefs(t,e){const r=this.client.formatter(this.tableBuilder);return Promise.all(e.map(function(e){const n=r.wrap(e.TABLE_NAME),i=r.wrap(e.CONSTRAINT_NAME),o=r.columnize(e.COLUMN_NAME),s=r.columnize(e.REFERENCED_COLUMN_NAME),a=r.wrap(e.REFERENCED_TABLE_NAME),c=` ON UPDATE ${e.UPDATE_RULE}`,u=` ON DELETE ${e.DELETE_RULE}`;return t.query({sql:`alter table ${n} add constraint ${i} `+\"foreign key (\"+o+\") references \"+a+\" (\"+s+\")\"+c+u})}))},index(t,e,r){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} add${r?` ${r}`:\"\"} index ${e}(${this.formatter.columnize(t)})`)},primary(t,e){e=e?this.formatter.wrap(e):this.formatter.wrap(`${this.tableNameRaw}_pkey`),this.pushQuery(`alter table ${this.tableName()} add primary key ${e}(${this.formatter.columnize(t)})`)},unique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} add unique ${e}(${this.formatter.columnize(t)})`)},dropIndex(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop index ${e}`)},dropForeign(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"foreign\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop foreign key ${e}`)},dropPrimary(){this.pushQuery(`alter table ${this.tableName()} drop primary key`)},dropUnique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop index ${e}`)}}),t.exports=o},function(t,e,r){const n=r(0),i=r(24),{isObject:o}=r(1);function s(){i.apply(this,arguments),this.modifiers=[\"unsigned\",\"nullable\",\"defaultTo\",\"comment\",\"collate\",\"first\",\"after\"]}n(s,i),Object.assign(s.prototype,{increments:\"int unsigned not null auto_increment primary key\",bigincrements:\"bigint unsigned not null auto_increment primary key\",bigint:\"bigint\",double(t,e){return t?`double(${this._num(t,8)}, ${this._num(e,2)})`:\"double\"},integer(t){return`int${t=t?`(${this._num(t,11)})`:\"\"}`},mediumint:\"mediumint\",smallint:\"smallint\",tinyint(t){return`tinyint${t=t?`(${this._num(t,1)})`:\"\"}`},text(t){switch(t){case\"medium\":case\"mediumtext\":return\"mediumtext\";case\"long\":case\"longtext\":return\"longtext\";default:return\"text\"}},mediumtext(){return this.text(\"medium\")},longtext(){return this.text(\"long\")},enu:t=>`enum('${t.join(\"', '\")}')`,datetime:t=>(o(t)&&({precision:t}=t),\"number\"==typeof t?`datetime(${t})`:\"datetime\"),timestamp:t=>(o(t)&&({precision:t}=t),\"number\"==typeof t?`timestamp(${t})`:\"timestamp\"),time:t=>(o(t)&&({precision:t}=t),\"number\"==typeof t?`time(${t})`:\"time\"),bit(t){return t?`bit(${this._num(t)})`:\"bit\"},binary(t){return t?`varbinary(${this._num(t)})`:\"blob\"},json:()=>\"json\",jsonb:()=>\"json\",defaultTo(t){if(null==t)return;if((\"json\"===this.type||\"jsonb\"===this.type)&&o(t))return`default ('${JSON.stringify(t)}')`;const e=s.super_.prototype.defaultTo.apply(this,arguments);return\"blob\"!==this.type&&-1===this.type.indexOf(\"text\")?e:\"\"},unsigned:()=>\"unsigned\",comment(t){return t&&t.length>255&&this.client.logger.warn(\"Your comment is longer than the max comment length for MySQL\"),t&&`comment '${t}'`},first:()=>\"first\",after(t){return`after ${this.formatter.wrap(t)}`},collate:t=>t&&`collate '${t}'`}),t.exports=s},function(t,e){t.exports=mysql},function(t,e,r){const n=r(0),i=r(78),o=r(182);function s(t){i.call(this,t)}n(s,i),Object.assign(s.prototype,{driverName:\"mysql2\",transaction(){return new o(this,...arguments)},_driver:()=>r(183),validateConnection:t=>!t._fatalError}),t.exports=s},function(t,e,r){const n=r(18),i=r(10)(\"knex:tx\"),{isUndefined:o}=r(1);class s extends n{}Object.assign(s.prototype,{query(t,e,r,n){const s=this,a=this.trxClient.query(t,e).catch(t=>\"ER_SP_DOES_NOT_EXIST\"===t.code,()=>{this.trxClient.logger.warn(\"Transaction was implicitly committed, do not mix transactions and DDL with MySQL (#805)\")}).catch(function(t){r=2,n=t,s._completed=!0,i(\"%s error running transaction query\",s.txid)}).then(function(t){if(1===r&&s._resolver(n),2===r){if(o(n)){if(s.doNotRejectOnRollback&&/^ROLLBACK\\b/i.test(e))return void s._resolver();n=new Error(`Transaction rejected with non-error: ${n}`)}return s._rejecter(n),t}});return 1!==r&&2!==r||(s._completed=!0),a}}),t.exports=s},function(t,e){t.exports=mysql2},function(t,e,r){\"use strict\";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(25),e.createHash=e.Hash=r(30),e.createHmac=e.Hmac=r(84);var n=r(190),i=Object.keys(n),o=[\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"md5\",\"rmd160\"].concat(i);e.getHashes=function(){return o};var s=r(87);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(192);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var c=r(209);e.DiffieHellmanGroup=c.DiffieHellmanGroup,e.createDiffieHellmanGroup=c.createDiffieHellmanGroup,e.getDiffieHellman=c.getDiffieHellman,e.createDiffieHellman=c.createDiffieHellman,e.DiffieHellman=c.DiffieHellman;var u=r(214);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=r(252);var h=r(253);e.publicEncrypt=h.publicEncrypt,e.privateEncrypt=h.privateEncrypt,e.publicDecrypt=h.publicDecrypt,e.privateDecrypt=h.privateDecrypt;var f=r(256);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error([\"sorry, createCredentials is not implemented yet\",\"we accept pull requests\",\"https://github.com/crypto-browserify/crypto-browserify\"].join(\"\\n\"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,r){var n=r(0),i=r(26),o=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=n)<<5|e>>>27)+h(d,i,o,a)+c+r[l]+s[d];c=a,a=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},function(t,e,r){var n=r(0),i=r(26),o=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=u(n)+f(p,i,o,a)+c+r[d]+s[p]|0;c=a,a=o,o=h(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},function(t,e,r){var n=r(0),i=r(82),o=r(26),s=r(2).Buffer,a=new Array(64);function c(){this.init(),this._w=a,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=c},function(t,e,r){var n=r(0),i=r(83),o=r(26),s=r(2).Buffer,a=new Array(160);function c(){this.init(),this._w=a,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=c},function(t,e,r){\"use strict\";var n=r(0),i=r(2).Buffer,o=r(16),s=i.alloc(128),a=64;function c(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),c=0;c<a;c++)r[c]=54^e[c],n[c]=92^e[c];this._hash=[r]}n(c,o),c.prototype._update=function(t){this._hash.push(t)},c.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=c},function(t,e,r){t.exports=r(86)},function(t,e,r){(function(e,n){var i,o=r(88),s=r(89),a=r(90),c=r(2).Buffer,u=e.crypto&&e.crypto.subtle,h={sha:\"SHA-1\",\"sha-1\":\"SHA-1\",sha1:\"SHA-1\",sha256:\"SHA-256\",\"sha-256\":\"SHA-256\",sha384:\"SHA-384\",\"sha-384\":\"SHA-384\",\"sha-512\":\"SHA-512\",sha512:\"SHA-512\"},f=[];function l(t,e,r,n,i){return u.importKey(\"raw\",t,{name:\"PBKDF2\"},!1,[\"deriveBits\"]).then(function(t){return u.deriveBits({name:\"PBKDF2\",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return c.from(t)})}t.exports=function(t,r,d,p,m,b){\"function\"==typeof m&&(b=m,m=void 0);var g=h[(m=m||\"sha1\").toLowerCase()];if(!g||\"function\"!=typeof e.Promise)return n.nextTick(function(){var e;try{e=a(t,r,d,p,m)}catch(t){return b(t)}b(null,e)});if(o(t,r,d,p),\"function\"!=typeof b)throw new Error(\"No callback provided to pbkdf2\");c.isBuffer(t)||(t=c.from(t,s)),c.isBuffer(r)||(r=c.from(r,s)),function(t,e){t.then(function(t){n.nextTick(function(){e(null,t)})},function(t){n.nextTick(function(){e(t)})})}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==f[t])return f[t];var r=l(i=i||c.alloc(8),i,10,128,t).then(function(){return!0}).catch(function(){return!1});return f[t]=r,r}(g).then(function(e){return e?l(t,r,d,p,g):a(t,r,d,p,m)}),b)}}).call(this,r(8),r(5))},function(t,e,r){var n=r(193),i=r(55),o=r(56),s=r(208),a=r(39);function c(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError(\"invalid suite type\")}function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError(\"invalid suite type\")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return c(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=c,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(t,e,r){var n=r(16),i=r(54),o=r(0),s=r(2).Buffer,a={\"des-ede3-cbc\":i.CBC.instantiate(i.EDE),\"des-ede3\":i.EDE,\"des-ede-cbc\":i.CBC.instantiate(i.EDE),\"des-ede\":i.EDE,\"des-cbc\":i.CBC.instantiate(i.DES),\"des-ecb\":i.DES};function c(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?\"decrypt\":\"encrypt\";var o=t.key;s.isBuffer(o)||(o=s.from(o)),\"des-ede\"!==r&&\"des-ede-cbc\"!==r||(o=s.concat([o,o.slice(0,8)]));var c=t.iv;s.isBuffer(c)||(c=s.from(c)),this._des=i.create({key:o,iv:c,type:e})}a.des=a[\"des-cbc\"],a.des3=a[\"des-ede3-cbc\"],t.exports=c,o(c,n),c.prototype._update=function(t){return s.from(this._des.update(t))},c.prototype._final=function(){return s.from(this._des.final())}},function(t,e,r){\"use strict\";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,i){for(var o=0,s=0,a=n.length>>>1,c=0;c<a;c++)o<<=1,o|=t>>>n[c]&1;for(c=a;c<n.length;c++)s<<=1,s|=e>>>n[c]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<o.length;r++)e<<=1,e|=t>>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n=\"0\"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(\" \")}},function(t,e,r){\"use strict\";var n=r(9);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:\"decrypt\"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r=\"encrypt\"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,\"Not enough data to decrypt\");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,r){\"use strict\";var n=r(9),i=r(0),o=r(54),s=o.utils,a=o.Cipher;function c(){this.tmp=new Array(2),this.keys=null}function u(t){a.call(this,t);var e=new c;this._desState=e,this.deriveKeys(e,t.key)}i(u,a),t.exports=u,u.create=function(t){return new u(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,\"Invalid key length\");var r=s.readUInt32BE(e,0),i=s.readUInt32BE(e,4);s.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=h[o>>>1];r=s.r28shl(r,a),i=s.r28shl(i,a),s.pc2(r,i,t.keys,o)}},u.prototype._update=function(t,e,r,n){var i=this._desState,o=s.readUInt32BE(t,e),a=s.readUInt32BE(t,e+4);s.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],\"encrypt\"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],s.writeUInt32BE(r,o,n),s.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var o=e,a=r,c=0;c<t.keys.length;c+=2){var u=t.keys[c],h=t.keys[c+1];s.expand(a,t.tmp,0),u^=t.tmp[0],h^=t.tmp[1];var f=s.substitute(u,h),l=a;a=(o^s.permute(f))>>>0,o=l}s.rip(a,o,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var o=r,a=e,c=t.keys.length-2;c>=0;c-=2){var u=t.keys[c],h=t.keys[c+1];s.expand(o,t.tmp,0),u^=t.tmp[0],h^=t.tmp[1];var f=s.substitute(u,h),l=o;o=(a^s.permute(f))>>>0,a=l}s.rip(o,a,n,i)}},function(t,e,r){\"use strict\";var n=r(9),i=r(0),o={};function s(t){n.equal(t.length,8,\"Invalid IV length\"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if(\"encrypt\"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},function(t,e,r){\"use strict\";var n=r(9),i=r(0),o=r(54),s=o.Cipher,a=o.DES;function c(t,e){n.equal(e.length,24,\"Invalid key length\");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers=\"encrypt\"===t?[a.create({type:\"encrypt\",key:r}),a.create({type:\"decrypt\",key:i}),a.create({type:\"encrypt\",key:o})]:[a.create({type:\"decrypt\",key:o}),a.create({type:\"encrypt\",key:i}),a.create({type:\"decrypt\",key:r})]}function u(t){s.call(this,t);var e=new c(this.type,this.options.key);this._edeState=e}i(u,s),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},function(t,e,r){var n=r(56),i=r(94),o=r(2).Buffer,s=r(95),a=r(16),c=r(38),u=r(39);function h(t,e,r){a.call(this),this._cache=new l,this._cipher=new c.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(0)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);if(\"string\"==typeof r&&(r=o.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);return\"stream\"===a.type?new s(a.module,e,r):\"auth\"===a.type?new i(a.module,e,r):new h(a.module,e,r)}h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(f))throw this._cipher.scrub(),new Error(\"data not multiple of block length\")},h.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var i=u(e,!1,r.key,r.iv);return d(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(31);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){var n=r(2).Buffer,i=r(31);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},function(t,e,r){var n=r(2).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){var n=r(2).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){(function(t){var n=r(31);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(this,r(3).Buffer)},function(t,e,r){var n=r(2).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},function(t,e,r){var n=r(94),i=r(2).Buffer,o=r(56),s=r(95),a=r(16),c=r(38),u=r(39);function h(t,e,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new c.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof r&&(r=i.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);if(\"string\"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);return\"stream\"===a.type?new s(a.module,e,r,!0):\"auth\"===a.type?new n(a.module,e,r,!0):new h(a.module,e,r)}r(0)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error(\"unable to decrypt data\");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error(\"unable to decrypt data\");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error(\"data not multiple of block length\")},h.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=i.concat([this.cache,t])},f.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var n=u(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},function(t,e){e[\"des-ecb\"]={key:8,iv:0},e[\"des-cbc\"]=e.des={key:8,iv:8},e[\"des-ede3-cbc\"]=e.des3={key:24,iv:8},e[\"des-ede3\"]={key:24,iv:0},e[\"des-ede-cbc\"]={key:16,iv:8},e[\"des-ede\"]={key:16,iv:0}},function(t,e,r){(function(t){var n=r(96),i=r(212),o=r(213);var s={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(i[e].prime,\"hex\"),n=new t(i[e].gen,\"hex\");return new o(r,n)},e.createDiffieHellman=e.DiffieHellman=function e(r,i,a,c){return t.isBuffer(i)||void 0===s[i]?e(r,\"binary\",i,a):(i=i||\"binary\",c=c||\"binary\",a=a||new t([2]),t.isBuffer(a)||(a=new t(a,c)),\"number\"==typeof r?new o(n(r,a),a,!0):(t.isBuffer(r)||(r=new t(r,i)),new o(r,a,!0)))}}).call(this,r(3).Buffer)},function(t,e){},function(t,e){},function(t){t.exports={modp1:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff\"},modp2:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff\"},modp5:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff\"},modp14:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff\"},modp15:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff\"},modp16:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff\"},modp17:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff\"},modp18:{gen:\"02\",prime:\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff\"}}},function(t,e,r){(function(e){var n=r(4),i=new(r(97)),o=new n(24),s=new n(11),a=new n(10),c=new n(3),u=new n(7),h=r(96),f=r(25);function l(t,r){return r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r)),this._pub=new n(t),this}function d(t,r){return r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r)),this._priv=new n(t),this}t.exports=m;var p={};function m(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function b(t,r){var n=new e(t.toArray());return r?n.toString(r):n}Object.defineProperty(m.prototype,\"verifyError\",{enumerable:!0,get:function(){return\"number\"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString(\"hex\"),n=[r,t.toString(16)].join(\"_\");if(n in p)return p[n];var f,l=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!i.test(t))return l+=1,l+=\"02\"===r||\"05\"===r?8:4,p[n]=l,l;switch(i.test(t.shrn(1))||(l+=2),r){case\"02\":t.mod(o).cmp(s)&&(l+=8);break;case\"05\":(f=t.mod(a)).cmp(c)&&f.cmp(u)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var r=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(r.toArray()),o=this.getPrime();if(i.length<o.length){var s=new e(o.length-i.length);s.fill(0),i=e.concat([s,i])}return i},m.prototype.getPublicKey=function(t){return b(this._pub,t)},m.prototype.getPrivateKey=function(t){return b(this._priv,t)},m.prototype.getPrime=function(t){return b(this.__prime,t)},m.prototype.getGenerator=function(t){return b(this._gen,t)},m.prototype.setGenerator=function(t,r){return r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r)),this.__gen=t,this._gen=new n(t),this}}).call(this,r(3).Buffer)},function(t,e,r){(function(e){var n=r(30),i=r(27),o=r(0),s=r(215),a=r(251),c=r(86);function u(t){i.Writable.call(this);var e=c[t];if(!e)throw new Error(\"Unknown message digest\");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){i.Writable.call(this);var e=c[t];if(!e)throw new Error(\"Unknown message digest\");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){return new u(t)}function l(t){return new h(t)}Object.keys(c).forEach(function(t){c[t].id=new e(c[t].id,\"hex\"),c[t.toLowerCase()]=c[t]}),o(u,i.Writable),u.prototype._write=function(t,e,r){this._hash.update(t),r()},u.prototype.update=function(t,r){return\"string\"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},u.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},o(h,i.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(t,r){return\"string\"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},h.prototype.verify=function(t,r,n){\"string\"==typeof r&&(r=new e(r,n)),this.end();var i=this._hash.digest();return a(r,i,t,this._signType,this._tag)},t.exports={Sign:f,Verify:l,createSign:f,createVerify:l}}).call(this,r(3).Buffer)},function(t,e,r){(function(e){var n=r(84),i=r(57),o=r(6).ec,s=r(4),a=r(41),c=r(107);function u(t,r,i,o){if((t=new e(t.toArray())).length<r.byteLength()){var s=new e(r.byteLength()-t.length);s.fill(0),t=e.concat([s,t])}var a=i.length,c=function(t,r){t=(t=h(t,r)).mod(r);var n=new e(t.toArray());if(n.length<r.byteLength()){var i=new e(r.byteLength()-n.length);i.fill(0),n=e.concat([i,n])}return n}(i,r),u=new e(a);u.fill(1);var f=new e(a);return f.fill(0),f=n(o,f).update(u).update(new e([0])).update(t).update(c).digest(),u=n(o,f).update(u).digest(),{k:f=n(o,f).update(u).update(new e([1])).update(t).update(c).digest(),v:u=n(o,f).update(u).digest()}}function h(t,e){var r=new s(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function f(t,r,i){var o,s;do{for(o=new e(0);8*o.length<t.bitLength();)r.v=n(i,r.k).update(r.v).digest(),o=e.concat([o,r.v]);s=h(o,t),r.k=n(i,r.k).update(r.v).update(new e([0])).digest(),r.v=n(i,r.k).update(r.v).digest()}while(-1!==s.cmp(t));return s}function l(t,e,r,n){return t.toRed(s.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,r,n,d,p){var m=a(r);if(m.curve){if(\"ecdsa\"!==d&&\"ecdsa/rsa\"!==d)throw new Error(\"wrong private key type\");return function(t,r){var n=c[r.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.curve.join(\".\"));var i=new o(n).keyFromPrivate(r.privateKey).sign(t);return new e(i.toDER())}(t,m)}if(\"dsa\"===m.type){if(\"dsa\"!==d)throw new Error(\"wrong private key type\");return function(t,r,n){for(var i,o=r.params.priv_key,a=r.params.p,c=r.params.q,d=r.params.g,p=new s(0),m=h(t,c).mod(c),b=!1,g=u(o,c,t,n);!1===b;)i=f(c,g,n),p=l(d,i,a,c),0===(b=i.invm(c).imul(m.add(o.mul(p))).mod(c)).cmpn(0)&&(b=!1,p=new s(0));return function(t,r){t=t.toArray(),r=r.toArray(),128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r));var n=[48,t.length+r.length+4,2,t.length];return n=n.concat(t,[2,r.length],r),new e(n)}(p,b)}(t,m,n)}if(\"rsa\"!==d&&\"ecdsa/rsa\"!==d)throw new Error(\"wrong private key type\");t=e.concat([p,t]);for(var b=m.modulus.byteLength(),g=[0,1];t.length+g.length+1<b;)g.push(255);g.push(0);for(var y=-1;++y<t.length;)g.push(t[y]);return i(g,m)},t.exports.getKey=u,t.exports.makeKey=f}).call(this,r(3).Buffer)},function(t){t.exports={_from:\"elliptic@^6.0.0\",_id:\"elliptic@6.4.1\",_inBundle:!1,_integrity:\"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==\",_location:\"/elliptic\",_phantomChildren:{},_requested:{type:\"range\",registry:!0,raw:\"elliptic@^6.0.0\",name:\"elliptic\",escapedName:\"elliptic\",rawSpec:\"^6.0.0\",saveSpec:null,fetchSpec:\"^6.0.0\"},_requiredBy:[\"/browserify-sign\",\"/create-ecdh\"],_resolved:\"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz\",_shasum:\"c2d0b7776911b86722c632c3c06c60f2f819939a\",_spec:\"elliptic@^6.0.0\",_where:\"/Users/yairh/dev/import-size/packages/vscode-import-cost/node_modules/browserify-sign\",author:{name:\"Fedor Indutny\",email:\"fedor@indutny.com\"},bugs:{url:\"https://github.com/indutny/elliptic/issues\"},bundleDependencies:!1,dependencies:{\"bn.js\":\"^4.4.0\",brorand:\"^1.0.1\",\"hash.js\":\"^1.0.0\",\"hmac-drbg\":\"^1.0.0\",inherits:\"^2.0.1\",\"minimalistic-assert\":\"^1.0.0\",\"minimalistic-crypto-utils\":\"^1.0.0\"},deprecated:!1,description:\"EC cryptography\",devDependencies:{brfs:\"^1.4.3\",coveralls:\"^2.11.3\",grunt:\"^0.4.5\",\"grunt-browserify\":\"^5.0.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-connect\":\"^1.0.0\",\"grunt-contrib-copy\":\"^1.0.0\",\"grunt-contrib-uglify\":\"^1.0.1\",\"grunt-mocha-istanbul\":\"^3.0.1\",\"grunt-saucelabs\":\"^8.6.2\",istanbul:\"^0.4.2\",jscs:\"^2.9.0\",jshint:\"^2.6.0\",mocha:\"^2.1.0\"},files:[\"lib\"],homepage:\"https://github.com/indutny/elliptic\",keywords:[\"EC\",\"Elliptic\",\"curve\",\"Cryptography\"],license:\"MIT\",main:\"lib/elliptic.js\",name:\"elliptic\",repository:{type:\"git\",url:\"git+ssh://git@github.com/indutny/elliptic.git\"},scripts:{jscs:\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",jshint:\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",lint:\"npm run jscs && npm run jshint\",test:\"npm run lint && npm run unit\",unit:\"istanbul test _mocha --reporter=spec test/index.js\",version:\"grunt dist && git add dist/\"},version:\"6.4.1\"}},function(t,e,r){\"use strict\";var n=e,i=r(4),o=r(9),s=r(99);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e){for(var r=[],n=1<<e+1,i=t.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(n-1);o=s>(n>>1)-1?(n>>1)-s:s,i.isubn(o)}else o=0;r.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,c=1;c<a;c++)r.push(0);i.iushrn(a)}return r},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,s,a,c=t.andln(3)+n&3,u=e.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),o=0==(1&c)?0:3!=(a=t.andln(7)+n&7)&&5!==a||2!==u?c:-c,r[0].push(o),s=0==(1&u)?0:3!=(a=e.andln(7)+i&7)&&5!==a||2!==c?u:-u,r[1].push(s),2*n===o+1&&(n=1-n),2*i===s+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n=\"_\"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return\"string\"==typeof t?n.toArray(t,\"hex\"):t},n.intFromLE=function(t){return new i(t,\"hex\",\"le\")}},function(t,e,r){\"use strict\";var n=r(4),i=r(6).utils,o=i.getNAF,s=i.getJSF,a=i.assert;function c(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error(\"Not implemented\")},c.prototype.validate=function(){throw new Error(\"Not implemented\")},c.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var s=[],c=0;c<n.length;c+=r.step){var u=0;for(e=c+r.step-1;e>=c;e--)u=(u<<1)+n[e];s.push(u)}for(var h=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(c=0;c<s.length;c++){(u=s[c])===l?f=f.mixedAdd(r.points[c]):u===-l&&(f=f.mixedAdd(r.points[c].neg()))}h=h.add(f)}return h.toP()},c.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r),c=this.jpoint(null,null,null),u=s.length-1;u>=0;u--){for(e=0;u>=0&&0===s[u];u--)e++;if(u>=0&&e++,c=c.dblp(e),u<0)break;var h=s[u];a(0!==h),c=\"affine\"===t.type?h>0?c.mixedAdd(i[h-1>>1]):c.mixedAdd(i[-h-1>>1].neg()):h>0?c.add(i[h-1>>1]):c.add(i[-h-1>>1].neg())}return\"affine\"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,r,n,i){for(var a=this._wnafT1,c=this._wnafT2,u=this._wnafT3,h=0,f=0;f<n;f++){var l=(A=e[f])._getNAFPoints(t);a[f]=l.wnd,c[f]=l.points}for(f=n-1;f>=1;f-=2){var d=f-1,p=f;if(1===a[d]&&1===a[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],g=s(r[d],r[p]);h=Math.max(g[0].length,h),u[d]=new Array(h),u[p]=new Array(h);for(var y=0;y<h;y++){var _=0|g[0][y],v=0|g[1][y];u[d][y]=b[3*(_+1)+(v+1)],u[p][y]=0,c[d]=m}}else u[d]=o(r[d],a[d]),u[p]=o(r[p],a[p]),h=Math.max(u[d].length,h),h=Math.max(u[p].length,h)}var w=this.jpoint(null,null,null),E=this._wnafT4;for(f=h;f>=0;f--){for(var x=0;f>=0;){var S=!0;for(y=0;y<n;y++)E[y]=0|u[y][f],0!==E[y]&&(S=!1);if(!S)break;x++,f--}if(f>=0&&x++,w=w.dblp(x),f<0)break;for(y=0;y<n;y++){var A,C=E[y];0!==C&&(C>0?A=c[y][C-1>>1]:C<0&&(A=c[y][-C-1>>1].neg()),w=\"affine\"===A.type?w.mixedAdd(A):w.add(A))}}for(f=0;f<n;f++)c[f]=null;return i?w:w.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error(\"Not implemented\")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error(\"Unknown point format\")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray(\"be\",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray(\"be\",e))},u.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e,r){\"use strict\";var n=r(40),i=r(6),o=r(4),s=r(0),a=n.base,c=i.utils.assert;function u(t){a.call(this,\"short\",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(t,e,r,n){a.BasePoint.call(this,t,\"affine\"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(e,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){a.BasePoint.call(this,t,\"jacobian\"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(e,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(u,a),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new o(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new o(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map(function(t){return{a:new o(t.a,16),b:new o(t.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:o.mont(t),r=new o(2).toRed(e).redInvm(),n=r.redNeg(),i=new o(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,i,s,a,c,u,h,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),p=new o(1),m=new o(0),b=new o(0),g=new o(1),y=0;0!==l.cmpn(0);){var _=d.div(l);u=d.sub(_.mul(l)),h=b.sub(_.mul(p));var v=g.sub(_.mul(m));if(!n&&u.cmp(f)<0)e=c.neg(),r=p,n=u.neg(),i=h;else if(n&&2==++y)break;c=u,d=l,l=u,b=p,p=h,g=m,m=v}s=u.neg(),a=h;var w=n.sqr().add(i.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:i},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:c.add(u).neg()}},u.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error(\"invalid point\");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return u},s(h,a.BasePoint),u.prototype.point=function(t,e,r){return new h(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return h.fromJSON(this,t,e)},h.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},h.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},h.fromJSON=function(t,e,r){\"string\"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},h.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new o(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},h.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),f=n.redMul(u),l=c.redSqr().redIAdd(h).redISub(f).redISub(f),d=c.redMul(f.redISub(l)).redISub(o.redMul(h)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),h=r.redMul(c),f=a.redSqr().redIAdd(u).redISub(h).redISub(h),l=a.redMul(h.redISub(f)).redISub(i.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(f,l,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s);for(r=0;r<t;r++){var h=o.redSqr(),f=u.redSqr(),l=f.redSqr(),d=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(c)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),b=p.redISub(m),g=d.redMul(b);g=g.redIAdd(g).redISub(l);var y=u.redMul(a);r+1<t&&(c=c.redMul(l)),o=m,a=y,u=g}return this.curve.jpoint(o,u.redMul(i),a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=c,e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),f=this.y.redSqr(),l=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(h).redISub(l);d=d.redIAdd(d);var p=h.redAdd(h).redIAdd(h),m=p.redSqr(),b=l.redIAdd(l);b=(b=b.redIAdd(b)).redIAdd(b),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);t=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),f=this.y.redSqr(),l=this.x.redMul(f),d=this.x.redSub(h).redMul(this.x.redAdd(h));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(h);var b=f.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),e=d.redMul(p.redISub(t)).redISub(b)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),c=e.redAdd(e),u=(c=c.redIAdd(c)).redMul(s),h=a.redSqr().redISub(u.redAdd(u)),f=u.redISub(h),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=a.redMul(f).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(h,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),h=e.redMul(u);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.x.redMul(a).redISub(h);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,l,d)},f.prototype.mul=function(t,e){return t=new o(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if(\"affine\"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?\"<EC JPoint Infinity>\":\"<EC JPoint x: \"+this.x.toString(16,2)+\" y: \"+this.y.toString(16,2)+\" z: \"+this.z.toString(16,2)+\">\"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){\"use strict\";var n=r(40),i=r(4),o=r(0),s=n.base,a=r(6).utils;function c(t){s.call(this,\"mont\",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){s.BasePoint.call(this,t,\"projective\"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(c,s),t.exports=c,c.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},o(u,s.BasePoint),c.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},c.prototype.point=function(t,e){return new u(this,t,e)},c.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray(\"be\",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),c=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,c)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.jumlAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){\"use strict\";var n=r(40),i=r(6),o=r(4),s=r(0),a=n.base,c=i.utils.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,\"edwards\",t),this.a=new o(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,r,n,i){a.BasePoint.call(this,t,\"projective\"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(e,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(u,a),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(i.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");var c=a.fromRed().isOdd();return(e&&!c||!e&&c)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(i.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error(\"invalid point\");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},s(h,a.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new h(this,t,e,r,n)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),c=i.redMul(s),u=o.redMul(a),h=i.redMul(a),f=s.redMul(o);return this.curve.point(c,u,f,h)},h.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(u=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(u.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),c=s.redSub(a).redISub(a);t=n.redSub(i).redISub(o).redMul(c),e=s.redMul(u.redSub(o)),r=s.redMul(c)}}else{var u=i.redAdd(o);a=this.curve._mulC(this.z).redSqr(),c=u.redSub(a).redSub(a);t=this.curve._mulC(n.redISub(u)).redMul(c),e=this.curve._mulC(u).redMul(i.redISub(o)),r=u.redMul(c)}return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(e),u=o.redMul(s),h=a.redMul(c),f=o.redMul(c),l=s.redMul(a);return this.curve.point(u,h,l,f)},h.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),u=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),f=n.redMul(c).redMul(h);return this.curve.twisted?(e=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(u)):(e=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(f,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},function(t,e,r){\"use strict\";var n,i=e,o=r(58),s=r(6),a=s.utils.assert;function c(t){\"short\"===t.type?this.curve=new s.curve.short(t):\"edwards\"===t.type?this.curve=new s.curve.edwards(t):this.curve=new s.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),\"Invalid curve\"),a(this.g.mul(this.n).isInfinity(),\"Invalid curve, G*N != O\")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new c(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u(\"p192\",{type:\"short\",prime:\"p192\",p:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",b:\"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",n:\"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",hash:o.sha256,gRed:!1,g:[\"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"]}),u(\"p224\",{type:\"short\",prime:\"p224\",p:\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",b:\"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",n:\"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",hash:o.sha256,gRed:!1,g:[\"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"]}),u(\"p256\",{type:\"short\",prime:null,p:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",a:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",b:\"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",n:\"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",hash:o.sha256,gRed:!1,g:[\"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"]}),u(\"p384\",{type:\"short\",prime:null,p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",a:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",b:\"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",n:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",hash:o.sha384,gRed:!1,g:[\"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"]}),u(\"p521\",{type:\"short\",prime:null,p:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",a:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",b:\"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",n:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",hash:o.sha512,gRed:!1,g:[\"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"]}),u(\"curve25519\",{type:\"mont\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"76d06\",b:\"1\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"9\"]}),u(\"ed25519\",{type:\"edwards\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"-1\",c:\"1\",d:\"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\"6666666666666666666666666666666666666666666666666666666666666658\"]});try{n=r(229)}catch(t){n=void 0}u(\"secp256k1\",{type:\"short\",prime:\"k256\",p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",a:\"0\",b:\"7\",n:\"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",h:\"1\",hash:o.sha256,beta:\"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",lambda:\"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",basis:[{a:\"3086d221a7d46bcde86c90e49284eb15\",b:\"-e4437ed6010e88286f547fa90abfe4c3\"},{a:\"114ca50f7a8e2f3f657c1108d9d44cfd8\",b:\"3086d221a7d46bcde86c90e49284eb15\"}],gRed:!1,g:[\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",n]})},function(t,e,r){\"use strict\";e.sha1=r(224),e.sha224=r(225),e.sha256=r(101),e.sha384=r(226),e.sha512=r(102)},function(t,e,r){\"use strict\";var n=r(13),i=r(32),o=r(100),s=n.rotl32,a=n.sum32,c=n.sum32_5,u=o.ft_1,h=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,h),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=c(s(i,5),u(p,o,h,l),d,r[n],f[p]);d=l,l=h,h=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],h),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],d)},l.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},function(t,e,r){\"use strict\";var n=r(13),i=r(101);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,7),\"big\"):n.split32(this.h.slice(0,7),\"big\")}},function(t,e,r){\"use strict\";var n=r(13),i=r(102);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,12),\"big\"):n.split32(this.h.slice(0,12),\"big\")}},function(t,e,r){\"use strict\";var n=r(13),i=r(32),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function h(){if(!(this instanceof h))return new h;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian=\"little\"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(h,u),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],h=this.h[4],y=r,_=n,v=i,w=u,E=h,x=0;x<80;x++){var S=s(o(c(r,f(x,n,i,u),t[p[x]+e],l(x)),b[x]),h);r=h,h=u,u=o(i,10),i=n,n=S,S=s(o(c(y,f(79-x,_,v,w),t[m[x]+e],d(x)),g[x]),E),y=E,E=w,w=o(v,10),v=_,_=S}S=a(this.h[1],i,w),this.h[1]=a(this.h[2],u,E),this.h[2]=a(this.h[3],h,y),this.h[3]=a(this.h[4],r,_),this.h[4]=a(this.h[0],n,v),this.h[0]=S},h.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"little\"):n.split32(this.h,\"little\")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,r){\"use strict\";var n=r(13),i=r(9);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[[\"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"],[\"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"],[\"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"],[\"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"],[\"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"],[\"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"],[\"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"],[\"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"],[\"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"],[\"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"],[\"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"],[\"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"],[\"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"],[\"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"],[\"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"],[\"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"],[\"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"],[\"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"],[\"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"],[\"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"],[\"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"],[\"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"],[\"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"],[\"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"],[\"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"],[\"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"],[\"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"],[\"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"],[\"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"],[\"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"],[\"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"],[\"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"],[\"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"],[\"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"],[\"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"],[\"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"],[\"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"],[\"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"],[\"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"],[\"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"],[\"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"],[\"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"],[\"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"],[\"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"],[\"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"],[\"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"],[\"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"],[\"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"],[\"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"],[\"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"],[\"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"],[\"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"],[\"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"],[\"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"],[\"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"],[\"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"],[\"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"],[\"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"],[\"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"],[\"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"],[\"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"],[\"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"],[\"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"],[\"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"],[\"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"]]},naf:{wnd:7,points:[[\"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"],[\"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"],[\"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"],[\"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"],[\"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"],[\"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"],[\"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"],[\"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"],[\"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"],[\"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"],[\"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"],[\"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"],[\"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"],[\"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"],[\"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"],[\"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"],[\"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"],[\"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"],[\"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"],[\"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"],[\"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"],[\"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"],[\"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"],[\"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"],[\"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"],[\"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"],[\"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"],[\"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"],[\"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"],[\"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"],[\"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"],[\"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"],[\"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"],[\"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"],[\"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"],[\"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"],[\"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"],[\"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"],[\"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"],[\"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"],[\"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"],[\"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"],[\"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"],[\"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"],[\"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"],[\"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"],[\"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"],[\"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"],[\"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"],[\"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"],[\"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"],[\"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"],[\"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"],[\"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"],[\"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"],[\"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"],[\"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"],[\"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"],[\"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"],[\"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"],[\"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"],[\"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"],[\"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"],[\"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"],[\"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"],[\"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"],[\"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"],[\"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"],[\"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"],[\"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"],[\"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"],[\"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"],[\"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"],[\"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"],[\"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"],[\"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"],[\"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"],[\"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"],[\"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"],[\"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"],[\"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"],[\"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"],[\"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"],[\"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"],[\"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"],[\"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"],[\"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"],[\"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"],[\"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"],[\"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"],[\"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"],[\"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"],[\"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"],[\"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"],[\"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"],[\"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"],[\"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"],[\"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"],[\"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"],[\"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"],[\"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"],[\"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"],[\"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"],[\"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"],[\"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"],[\"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"],[\"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"],[\"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"],[\"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"],[\"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"],[\"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"],[\"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"],[\"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"],[\"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"],[\"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"],[\"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"],[\"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"],[\"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"],[\"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"],[\"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"],[\"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"],[\"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"],[\"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"],[\"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"],[\"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"],[\"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"],[\"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"]]}}},function(t,e,r){\"use strict\";var n=r(4),i=r(231),o=r(6),s=o.utils.assert,a=r(232),c=r(233);function u(t){if(!(this instanceof u))return new u(t);\"string\"==typeof t&&(s(o.curves.hasOwnProperty(t),\"Unknown curve \"+t),t=o.curves[t]),t instanceof o.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=u,u.prototype.keyPair=function(t){return new a(this,t)},u.prototype.keyFromPrivate=function(t,e){return a.fromPrivate(this,t,e)},u.prototype.keyFromPublic=function(t,e){return a.fromPublic(this,t,e)},u.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||\"utf8\",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||\"utf8\",nonce:this.n.toArray()}),r=this.n.byteLength(),s=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},u.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},u.prototype.sign=function(t,e,r,o){\"object\"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray(\"be\",s),u=t.toArray(\"be\",s),h=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||\"utf8\"}),f=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(h.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(f)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),b=m.umod(this.n);if(0!==b.cmpn(0)){var g=d.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(b)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new c({r:b,s:g,recoveryParam:y})}}}}}},u.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new c(e,\"hex\")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),h=u.mul(t).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},u.prototype.recoverPubKey=function(t,e,r,i){s((3&r)===r,\"The recovery param is more than two bits\"),e=new c(e,i);var o=this.n,a=new n(t),u=e.r,h=e.s,f=1&r,l=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error(\"Unable to find sencond key candinate\");u=l?this.curve.pointFromX(u.add(this.curve.n),f):this.curve.pointFromX(u,f);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,u,m)},u.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new c(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error(\"Unable to find valid recovery factor\")}},function(t,e,r){\"use strict\";var n=r(58),i=r(99),o=r(9);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||\"hex\"),r=i.toArray(t.nonce,t.nonceEnc||\"hex\"),n=i.toArray(t.pers,t.persEnc||\"hex\");o(e.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){\"string\"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error(\"Reseed is required\");\"string\"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||\"hex\"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},function(t,e,r){\"use strict\";var n=r(4),i=r(6).utils.assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:\"Invalid public key\"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:\"Public key * N != O\"}:{result:!1,reason:\"Public key is not a point\"}},o.prototype.getPublic=function(t,e){return\"string\"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return\"hex\"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return\"mont\"===this.ec.curve.type?i(t.x,\"Need x coordinate\"):\"short\"!==this.ec.curve.type&&\"edwards\"!==this.ec.curve.type||i(t.x&&t.y,\"Need both x and y coordinate\"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return\"<Key priv: \"+(this.priv&&this.priv.toString(16,2))+\" pub: \"+(this.pub&&this.pub.inspect())+\" >\"}},function(t,e,r){\"use strict\";var n=r(4),i=r(6).utils,o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,\"Signature without r or s\"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function c(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s];return e.place=s,i}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function h(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;if(c(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=c(t,r),s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var u=c(t,r);if(t.length!==u+r.place)return!1;var h=t.slice(r.place,u+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===h[0]&&128&h[1]&&(h=h.slice(1)),this.r=new n(s),this.s=new n(h),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,e.length),(n=n.concat(e)).push(2),h(n,r.length);var o=n.concat(r),s=[48];return h(s,o.length),s=s.concat(o),i.encode(s,t)}},function(t,e,r){\"use strict\";var n=r(58),i=r(6),o=i.utils,s=o.assert,a=o.parseBytes,c=r(235),u=r(236);function h(t){if(s(\"ed25519\"===t,\"only tested with ed25519 so far\"),!(this instanceof h))return new h(t);t=i.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=h,h.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),c=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},h.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(t){return c.fromPublic(this,t)},h.prototype.keyFromSecret=function(t){return c.fromSecret(this,t)},h.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},h.prototype.encodePoint=function(t){var e=t.getY().toArray(\"le\",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},h.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},h.prototype.encodeInt=function(t){return t.toArray(\"le\",this.encodingLength)},h.prototype.decodeInt=function(t){return o.intFromLE(t)},h.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,r){\"use strict\";var n=r(6).utils,i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,\"pubBytes\",function(){return this.eddsa.encodePoint(this.pub())}),s(a,\"pub\",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),s(a,\"privBytes\",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),s(a,\"priv\",function(){return this.eddsa.decodeInt(this.privBytes())}),s(a,\"hash\",function(){return this.eddsa.hash().update(this.secret()).digest()}),s(a,\"messagePrefix\",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(t){return i(this._secret,\"KeyPair can only verify\"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,\"KeyPair is public only\"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},function(t,e,r){\"use strict\";var n=r(4),i=r(6).utils,o=i.assert,s=i.cachedProperty,a=i.parseBytes;function c(t,e){this.eddsa=t,\"object\"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,\"Signature without R or S\"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(c,\"S\",function(){return this.eddsa.decodeInt(this.Sencoded())}),s(c,\"R\",function(){return this.eddsa.decodePoint(this.Rencoded())}),s(c,\"Rencoded\",function(){return this.eddsa.encodePoint(this.R())}),s(c,\"Sencoded\",function(){return this.eddsa.encodeInt(this.S())}),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),\"hex\").toUpperCase()},t.exports=c},function(t,e,r){\"use strict\";var n=r(33);e.certificate=r(248);var i=n.define(\"RSAPrivateKey\",function(){this.seq().obj(this.key(\"version\").int(),this.key(\"modulus\").int(),this.key(\"publicExponent\").int(),this.key(\"privateExponent\").int(),this.key(\"prime1\").int(),this.key(\"prime2\").int(),this.key(\"exponent1\").int(),this.key(\"exponent2\").int(),this.key(\"coefficient\").int())});e.RSAPrivateKey=i;var o=n.define(\"RSAPublicKey\",function(){this.seq().obj(this.key(\"modulus\").int(),this.key(\"publicExponent\").int())});e.RSAPublicKey=o;var s=n.define(\"SubjectPublicKeyInfo\",function(){this.seq().obj(this.key(\"algorithm\").use(a),this.key(\"subjectPublicKey\").bitstr())});e.PublicKey=s;var a=n.define(\"AlgorithmIdentifier\",function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"none\").null_().optional(),this.key(\"curve\").objid().optional(),this.key(\"params\").seq().obj(this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int()).optional())}),c=n.define(\"PrivateKeyInfo\",function(){this.seq().obj(this.key(\"version\").int(),this.key(\"algorithm\").use(a),this.key(\"subjectPrivateKey\").octstr())});e.PrivateKey=c;var u=n.define(\"EncryptedPrivateKeyInfo\",function(){this.seq().obj(this.key(\"algorithm\").seq().obj(this.key(\"id\").objid(),this.key(\"decrypt\").seq().obj(this.key(\"kde\").seq().obj(this.key(\"id\").objid(),this.key(\"kdeparams\").seq().obj(this.key(\"salt\").octstr(),this.key(\"iters\").int())),this.key(\"cipher\").seq().obj(this.key(\"algo\").objid(),this.key(\"iv\").octstr()))),this.key(\"subjectPrivateKey\").octstr())});e.EncryptedPrivateKey=u;var h=n.define(\"DSAPrivateKey\",function(){this.seq().obj(this.key(\"version\").int(),this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int(),this.key(\"pub_key\").int(),this.key(\"priv_key\").int())});e.DSAPrivateKey=h,e.DSAparam=n.define(\"DSAparam\",function(){this.int()});var f=n.define(\"ECPrivateKey\",function(){this.seq().obj(this.key(\"version\").int(),this.key(\"privateKey\").octstr(),this.key(\"parameters\").optional().explicit(0).use(l),this.key(\"publicKey\").optional().explicit(1).bitstr())});e.ECPrivateKey=f;var l=n.define(\"ECParameters\",function(){this.choice({namedCurve:this.objid()})});e.signature=n.define(\"signature\",function(){this.seq().obj(this.key(\"r\").int(),this.key(\"s\").int())})},function(t,e,r){var n=r(33),i=r(0);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(239).runInThisContext(\"(function \"+this.name+\"(entity) {\\n this._initNamed(entity);\\n})\")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||\"der\",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||\"der\",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(module,exports,__webpack_require__){var indexOf=__webpack_require__(240),Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},\"_\",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=[\"Array\",\"Boolean\",\"Date\",\"Error\",\"EvalError\",\"Function\",\"Infinity\",\"JSON\",\"Math\",\"NaN\",\"Number\",\"Object\",\"RangeError\",\"ReferenceError\",\"RegExp\",\"String\",\"SyntaxError\",\"TypeError\",\"URIError\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"undefined\",\"unescape\"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError(\"needs a 'context' argument.\");var e=document.createElement(\"iframe\");e.style||(e.style={}),e.style.display=\"none\",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,\"null\"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return forEach(Object_keys(e),function(r){t[r]=e[r]}),r},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return\"object\"==typeof t&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e,r){var n=r(0);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join(\"/\")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map(function(t){return\"[\"+JSON.stringify(t)+\"]\"}).join(\"\"),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+\" at: \"+(this.path||\"(shallow)\"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,r){var n=r(34).Reporter,i=r(34).EncoderBuffer,o=r(34).DecoderBuffer,s=r(9),a=[\"seq\",\"seqof\",\"set\",\"setof\",\"objid\",\"bool\",\"gentime\",\"utctime\",\"null_\",\"enum\",\"int\",\"objDesc\",\"bitstr\",\"bmpstr\",\"charstr\",\"genstr\",\"graphstr\",\"ia5str\",\"iso646str\",\"numstr\",\"octstr\",\"printstr\",\"t61str\",\"unistr\",\"utf8str\",\"videostr\"],c=[\"key\",\"obj\",\"use\",\"optional\",\"explicit\",\"implicit\",\"def\",\"choice\",\"any\",\"contains\"].concat(a);function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=u;var h=[\"enc\",\"parent\",\"children\",\"tag\",\"args\",\"reverseArgs\",\"choice\",\"optional\",\"any\",\"obj\",\"use\",\"alteredUse\",\"key\",\"default\",\"explicit\",\"implicit\",\"contains\"];u.prototype.clone=function(){var t=this._baseState,e={};h.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;c.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},u.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),s.equal(e.children.length,1,\"Root node can have only one child\")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if(\"object\"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},[\"_peekTag\",\"_decodeTag\",\"_use\",\"_decodeStr\",\"_decodeObjid\",\"_decodeTime\",\"_decodeNull\",\"_decodeInt\",\"_decodeBool\",\"_decodeList\",\"_encodeComposite\",\"_encodeStr\",\"_encodeObjid\",\"_encodeTime\",\"_encodeNull\",\"_encodeInt\",\"_encodeBool\"].forEach(function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+\" not implemented for encoding: \"+e.enc)}}),a.forEach(function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}}),u.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},u.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var c=null;if(null!==r.explicit?c=r.explicit:null!==r.implicit?c=r.implicit:null!==r.tag&&(c=r.tag),null!==c||r.any){if(s=this._peekTag(t,c,r.any),t.isError(s))return s}else{var u=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(u)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var h=this._decodeTag(t,r.explicit);if(t.isError(h))return h;t=h}var f=t.offset;if(null===r.use&&null===r.choice){if(r.any)u=t.save();var l=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(l))return l;r.any?i=t.raw(u):t=l}if(e&&e.track&&null!==r.tag&&e.track(t.path(),f,t.length,\"tagged\"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,\"content\"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&(\"octstr\"===r.tag||\"bitstr\"===r.tag)){var d=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},u.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return\"seq\"===t||\"set\"===t?null:\"seqof\"===t||\"setof\"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):\"objid\"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):\"objid\"===t?this._decodeObjid(e,null,null,r):\"gentime\"===t||\"utctime\"===t?this._decodeTime(e,t,r):\"null_\"===t?this._decodeNull(e,r):\"bool\"===t?this._decodeBool(e,r):\"objDesc\"===t?this._decodeStr(e,t,r):\"int\"===t||\"enum\"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error(\"unknown tag: \"+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var s=t.save(),a=r.choice[o];try{var c=a._decode(t,e);if(t.isError(c))return!1;n={type:o,value:c},i=!0}catch(e){return t.restore(s),!1}return!0},this),i?n:t.error(\"Choice not matched\")},u.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},u.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},u.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map(function(r){if(\"null_\"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error(\"Child should have a key\");var n=e.enterKey(r._baseState.key);if(\"object\"!=typeof t)return e.error(\"Child expected, but input is not object\");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),s=this._createEncoderBuffer(s);else if(\"seqof\"===i.tag||\"setof\"===i.tag){if(!i.args||1!==i.args.length)return e.error(\"Too many args for : \"+i.tag);if(!Array.isArray(t))return e.error(\"seqof/setof, but data is not Array\");var c=this.clone();c._baseState.implicit=null,s=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},c))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,h=null===i.implicit?\"universal\":\"context\";null===u?null===i.use&&e.error(\"Tag could be omitted only for .use()\"):null===i.use&&(o=this._encodeComposite(u,a,h,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,\"context\",o)),o},u.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+\" not found in \"+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if(\"objid\"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if(\"objid\"===t)return this._encodeObjid(e,null,null);if(\"gentime\"===t||\"utctime\"===t)return this._encodeTime(e,t);if(\"null_\"===t)return this._encodeNull();if(\"int\"===t||\"enum\"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if(\"bool\"===t)return this._encodeBool(e);if(\"objDesc\"===t)return this._encodeStr(e,t);throw new Error(\"Unsupported tag: \"+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\\(\\)\\+,\\-\\.\\/:=\\?]*$/.test(t)}},function(t,e,r){var n=r(104);e.tagClass={0:\"universal\",1:\"application\",2:\"context\",3:\"private\"},e.tagClassByName=n._reverse(e.tagClass),e.tag={0:\"end\",1:\"bool\",2:\"int\",3:\"bitstr\",4:\"octstr\",5:\"null_\",6:\"objid\",7:\"objDesc\",8:\"external\",9:\"real\",10:\"enum\",11:\"embed\",12:\"utf8str\",13:\"relativeOid\",16:\"seq\",17:\"set\",18:\"numstr\",19:\"printstr\",20:\"t61str\",21:\"videostr\",22:\"ia5str\",23:\"utctime\",24:\"gentime\",25:\"graphstr\",26:\"iso646str\",27:\"genstr\",28:\"unistr\",29:\"charstr\",30:\"bmpstr\"},e.tagByName=n._reverse(e.tag)},function(t,e,r){var n=e;n.der=r(105),n.pem=r(245)},function(t,e,r){var n=r(0),i=r(3).Buffer,o=r(105);function s(t){o.call(this,t),this.enc=\"pem\"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\\r\\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,c=-1,u=0;u<r.length;u++){var h=r[u].match(s);if(null!==h&&h[2]===n){if(-1!==a){if(\"END\"!==h[1])break;c=u;break}if(\"BEGIN\"!==h[1])break;a=u}}if(-1===a||-1===c)throw new Error(\"PEM section not found for: \"+n);var f=r.slice(a+1,c).join(\"\");f.replace(/[^a-z0-9\\+\\/=]+/gi,\"\");var l=new i(f,\"base64\");return o.prototype.decode.call(this,l,e)}},function(t,e,r){var n=e;n.der=r(106),n.pem=r(247)},function(t,e,r){var n=r(0),i=r(106);function o(t){i.call(this,t),this.enc=\"pem\"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString(\"base64\"),n=[\"-----BEGIN \"+e.label+\"-----\"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push(\"-----END \"+e.label+\"-----\"),n.join(\"\\n\")}},function(t,e,r){\"use strict\";var n=r(33),i=n.define(\"Time\",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define(\"AttributeTypeValue\",function(){this.seq().obj(this.key(\"type\").objid(),this.key(\"value\").any())}),s=n.define(\"AlgorithmIdentifier\",function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"parameters\").optional())}),a=n.define(\"SubjectPublicKeyInfo\",function(){this.seq().obj(this.key(\"algorithm\").use(s),this.key(\"subjectPublicKey\").bitstr())}),c=n.define(\"RelativeDistinguishedName\",function(){this.setof(o)}),u=n.define(\"RDNSequence\",function(){this.seqof(c)}),h=n.define(\"Name\",function(){this.choice({rdnSequence:this.use(u)})}),f=n.define(\"Validity\",function(){this.seq().obj(this.key(\"notBefore\").use(i),this.key(\"notAfter\").use(i))}),l=n.define(\"Extension\",function(){this.seq().obj(this.key(\"extnID\").objid(),this.key(\"critical\").bool().def(!1),this.key(\"extnValue\").octstr())}),d=n.define(\"TBSCertificate\",function(){this.seq().obj(this.key(\"version\").explicit(0).int(),this.key(\"serialNumber\").int(),this.key(\"signature\").use(s),this.key(\"issuer\").use(h),this.key(\"validity\").use(f),this.key(\"subject\").use(h),this.key(\"subjectPublicKeyInfo\").use(a),this.key(\"issuerUniqueID\").implicit(1).bitstr().optional(),this.key(\"subjectUniqueID\").implicit(2).bitstr().optional(),this.key(\"extensions\").explicit(3).seqof(l).optional())}),p=n.define(\"X509Certificate\",function(){this.seq().obj(this.key(\"tbsCertificate\").use(d),this.key(\"signatureAlgorithm\").use(s),this.key(\"signatureValue\").bitstr())});t.exports=p},function(t){t.exports={\"2.16.840.1.101.3.4.1.1\":\"aes-128-ecb\",\"2.16.840.1.101.3.4.1.2\":\"aes-128-cbc\",\"2.16.840.1.101.3.4.1.3\":\"aes-128-ofb\",\"2.16.840.1.101.3.4.1.4\":\"aes-128-cfb\",\"2.16.840.1.101.3.4.1.21\":\"aes-192-ecb\",\"2.16.840.1.101.3.4.1.22\":\"aes-192-cbc\",\"2.16.840.1.101.3.4.1.23\":\"aes-192-ofb\",\"2.16.840.1.101.3.4.1.24\":\"aes-192-cfb\",\"2.16.840.1.101.3.4.1.41\":\"aes-256-ecb\",\"2.16.840.1.101.3.4.1.42\":\"aes-256-cbc\",\"2.16.840.1.101.3.4.1.43\":\"aes-256-ofb\",\"2.16.840.1.101.3.4.1.44\":\"aes-256-cfb\"}},function(t,e,r){(function(e){var n=/Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r\\+\\/\\=]+)[\\n\\r]+/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----([0-9A-z\\n\\r\\+\\/\\=]+)-----END \\1-----$/m,s=r(39),a=r(55);t.exports=function(t,r){var c,u=t.toString(),h=u.match(n);if(h){var f=\"aes\"+h[1],l=new e(h[2],\"hex\"),d=new e(h[3].replace(/[\\r\\n]/g,\"\"),\"base64\"),p=s(r,l.slice(0,8),parseInt(h[1],10)).key,m=[],b=a.createDecipheriv(f,p,l);m.push(b.update(d)),m.push(b.final()),c=e.concat(m)}else{var g=u.match(o);c=new e(g[2].replace(/[\\r\\n]/g,\"\"),\"base64\")}return{tag:u.match(i)[1],data:c}}}).call(this,r(3).Buffer)},function(t,e,r){(function(e){var n=r(4),i=r(6).ec,o=r(41),s=r(107);function a(t,e){if(t.cmpn(0)<=0)throw new Error(\"invalid sig\");if(t.cmp(e)>=e)throw new Error(\"invalid sig\")}t.exports=function(t,r,c,u,h){var f=o(c);if(\"ec\"===f.type){if(\"ecdsa\"!==u&&\"ecdsa/rsa\"!==u)throw new Error(\"wrong public key type\");return function(t,e,r){var n=s[r.data.algorithm.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.data.algorithm.curve.join(\".\"));var o=new i(n),a=r.data.subjectPrivateKey.data;return o.verify(e,t,a)}(t,r,f)}if(\"dsa\"===f.type){if(\"dsa\"!==u)throw new Error(\"wrong public key type\");return function(t,e,r){var i=r.data.p,s=r.data.q,c=r.data.g,u=r.data.pub_key,h=o.signature.decode(t,\"der\"),f=h.s,l=h.r;a(f,s),a(l,s);var d=n.mont(i),p=f.invm(s);return 0===c.toRed(d).redPow(new n(e).mul(p).mod(s)).fromRed().mul(u.toRed(d).redPow(l.mul(p).mod(s)).fromRed()).mod(i).mod(s).cmp(l)}(t,r,f)}if(\"rsa\"!==u&&\"ecdsa/rsa\"!==u)throw new Error(\"wrong public key type\");r=e.concat([h,r]);for(var l=f.modulus.byteLength(),d=[1],p=0;r.length+d.length+2<l;)d.push(255),p++;d.push(0);for(var m=-1;++m<r.length;)d.push(r[m]);d=new e(d);var b=n.mont(f.modulus);t=(t=new n(t).toRed(b)).redPow(new n(f.publicExponent)),t=new e(t.fromRed().toArray());var g=p<8?1:0;for(l=Math.min(t.length,d.length),t.length!==d.length&&(g=1),m=-1;++m<l;)g|=t[m]^d[m];return 0===g}}).call(this,r(3).Buffer)},function(t,e,r){(function(e){var n=r(6),i=r(4);t.exports=function(t){return new s(t)};var o={secp256k1:{name:\"secp256k1\",byteLength:32},secp224r1:{name:\"p224\",byteLength:28},prime256v1:{name:\"p256\",byteLength:32},prime192v1:{name:\"p192\",byteLength:24},ed25519:{name:\"ed25519\",byteLength:32},secp384r1:{name:\"p384\",byteLength:48},secp521r1:{name:\"p521\",byteLength:66}};function s(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(t,r,n){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(n&&i.length<n){var o=new e(n-i.length);o.fill(0),i=e.concat([o,i])}return r?i.toString(r):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},s.prototype.computeSecret=function(t,r,n){return r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r)),a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},s.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic(\"compressed\"===e,!0);return\"hybrid\"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),a(r,t)},s.prototype.getPrivateKey=function(t){return a(this.keys.getPrivate(),t)},s.prototype.setPublicKey=function(t,r){return r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r)),this.keys._importPublic(t),this},s.prototype.setPrivateKey=function(t,r){r=r||\"utf8\",e.isBuffer(t)||(t=new e(t,r));var n=new i(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(3).Buffer)},function(t,e,r){e.publicEncrypt=r(254),e.privateDecrypt=r(255),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},function(t,e,r){var n=r(41),i=r(25),o=r(30),s=r(108),a=r(109),c=r(4),u=r(110),h=r(57),f=r(2).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===l)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,u=o(\"sha1\").update(f.alloc(0)).digest(),h=u.length,l=2*h;if(n>r-l-2)throw new Error(\"message too long\");var d=f.alloc(r-n-l-2),p=r-h-1,m=i(h),b=a(f.concat([u,d,f.alloc(1,1),e],p),s(m,p)),g=a(m,s(b,h));return new c(f.concat([f.alloc(1),g,b],r))}(p,e);else if(1===l)d=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error(\"message too long\");n=r?f.alloc(s-o-3,255):function(t){var e,r=f.allocUnsafe(t),n=0,o=i(2*t),s=0;for(;n<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3);return new c(f.concat([f.from([0,r?1:2]),n,f.alloc(1),e],s))}(p,e,r);else{if(3!==l)throw new Error(\"unknown padding\");if((d=new c(e)).cmp(p.modulus)>=0)throw new Error(\"data too long for modulus\")}return r?h(d,p):u(d,p)}},function(t,e,r){var n=r(41),i=r(108),o=r(109),s=r(4),a=r(57),c=r(30),u=r(110),h=r(2).Buffer;t.exports=function(t,e,r){var f;f=t.padding?t.padding:r?1:4;var l,d=n(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error(\"decryption error\");l=r?u(new s(e),d):a(e,d);var m=h.alloc(p-l.length);if(l=h.concat([m,l],p),4===f)return function(t,e){var r=t.modulus.byteLength(),n=c(\"sha1\").update(h.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error(\"decryption error\");var a=e.slice(1,s+1),u=e.slice(s+1),f=o(a,i(u,s)),l=o(u,i(f,r-s-1));if(function(t,e){t=h.from(t),e=h.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,l.slice(0,s)))throw new Error(\"decryption error\");var d=s;for(;0===l[d];)d++;if(1!==l[d++])throw new Error(\"decryption error\");return l.slice(d)}(d,l);if(1===f)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);(\"0002\"!==n.toString(\"hex\")&&!r||\"0001\"!==n.toString(\"hex\")&&r)&&o++;s.length<8&&o++;if(o)throw new Error(\"decryption error\");return e.slice(i)}(0,l,r);if(3===f)return l;throw new Error(\"unknown padding\")}},function(t,e,r){\"use strict\";(function(t,n){function i(){throw new Error(\"secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11\")}var o=r(2),s=r(25),a=o.Buffer,c=o.kMaxLength,u=t.crypto||t.msCrypto,h=Math.pow(2,32)-1;function f(t,e){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"offset must be a number\");if(t>h||t<0)throw new TypeError(\"offset must be a uint32\");if(t>c||t>e)throw new RangeError(\"offset out of range\")}function l(t,e,r){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"size must be a number\");if(t>h||t<0)throw new TypeError(\"size must be a uint32\");if(t+e>r||t>c)throw new RangeError(\"buffer too small\")}function d(t,e,r,i){if(n.browser){var o=t.buffer,a=new Uint8Array(o,e,r);return u.getRandomValues(a),i?void n.nextTick(function(){i(null,t)}):t}if(!i)return s(r).copy(t,e),t;s(r,function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)})}u&&u.getRandomValues||!n.browser?(e.randomFill=function(e,r,n,i){if(!(a.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');if(\"function\"==typeof r)i=r,r=0,n=e.length;else if(\"function\"==typeof n)i=n,n=e.length-r;else if(\"function\"!=typeof i)throw new TypeError('\"cb\" argument must be a function');return f(r,e.length),l(n,r,e.length),d(e,r,n,i)},e.randomFillSync=function(e,r,n){void 0===r&&(r=0);if(!(a.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');f(r,e.length),void 0===n&&(n=e.length-r);return l(n,r,e.length),d(e,r,n)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,r(8),r(5))},function(t,e,r){const n=r(7),i=r(18),{isUndefined:o}=r(1),s=r(10)(\"knex:tx\");t.exports=class extends i{begin(){return n.resolve()}commit(t,e){return this._completed=!0,t.commitAsync().then(()=>e).then(this._resolver,this._rejecter)}release(t,e){return this._resolver(e)}rollback(t,e){return this._completed=!0,s(\"%s: rolling back\",this.txid),t.rollbackAsync().throw(e).catch(t=>{if(o(t)){if(this.doNotRejectOnRollback)return void this._resolver();t=new Error(`Transaction rejected with non-error: ${t}`)}return this._rejecter(t)})}acquireConnection(t,e){const r=t&&t.connection;return new n((t,e)=>{try{t(r||this.client.acquireConnection())}catch(t){e(t)}}).then(t=>(t.__knexTxId=this.txid,t)).then(t=>(this.outerTx||t.setAutoCommit(!1),t)).then(async t=>{try{return await e(t)}finally{s(\"%s: releasing connection\",this.txid),t.setAutoCommit(!0),r?s(\"%s: not releasing external connection\",this.txid):this.client.releaseConnection(t)}})}}},function(t,e,r){const n=r(0),i=r(22),o=r(20),s=r(59);function a(){i.apply(this,arguments)}n(a,i),a.prototype.renameTable=function(t,e){const r=s.renameTableAndAutoIncrementTrigger(this.client.logger,t,e);this.pushQuery(r)},a.prototype.hasTable=function(t){this.pushQuery({sql:\"select TABLE_NAME from USER_TABLES where TABLE_NAME = \"+this.formatter.parameter(t),output:t=>t.length>0})},a.prototype.hasColumn=function(t,e){const r=\"select COLUMN_NAME from USER_TAB_COLUMNS \"+`where TABLE_NAME = ${this.formatter.parameter(t)} `+`and COLUMN_NAME = ${this.formatter.parameter(e)}`;this.pushQuery({sql:r,output:t=>t.length>0})},a.prototype.dropSequenceIfExists=function(t){this.pushQuery(o.wrapSqlWithCatch(`drop sequence ${this.formatter.wrap(t)}`,-2289))},a.prototype._dropRelatedSequenceIfExists=function(t){const e=o.generateCombinedName(this.client.logger,\"seq\",t);this.dropSequenceIfExists(e)},a.prototype.dropTable=function(t){this.pushQuery(`drop table ${this.formatter.wrap(t)}`),this._dropRelatedSequenceIfExists(t)},a.prototype.dropTableIfExists=function(t){this.pushQuery(o.wrapSqlWithCatch(`drop table ${this.formatter.wrap(t)}`,-942)),this._dropRelatedSequenceIfExists(t)},t.exports=a},function(t,e,r){const n=r(0),i=r(49),{toArray:o}=r(1);function s(){i.apply(this,arguments)}n(s,i),s.prototype.checkIn=function(){return this._modifiers.checkIn=o(arguments),this},t.exports=s},function(t,e,r){const n=r(0),i=r(20),o=r(23),s=r(11),a=r(59),{map:c}=r(1);function u(){o.apply(this,arguments)}n(u,o),Object.assign(u.prototype,{addColumns(t,e){if(t.sql.length>0){e=e||this.addColumnsPrefix;const r=c(t.sql,t=>t);let n=`${this.lowerCase?\"alter table \":\"ALTER TABLE \"}${this.tableName()} ${e}`;t.sql.length>1?n+=`(${r.join(\", \")})`:n+=r.join(\", \"),this.pushQuery({sql:n,bindings:t.bindings})}},renameColumn(t,e){const r=this.tableName().slice(1,-1);return this.pushQuery(a.renameColumnTrigger(this.client.logger,r,t,e))},compileAdd(t){const e=this.formatter.wrap(t),r=this.prefixArray(\"add column\",this.getColumns(t));return this.pushQuery({sql:`alter table ${e} ${r.join(\", \")}`})},createQuery(t,e){const r=`create table ${this.tableName()} (${t.sql.join(\", \")})`;this.pushQuery({sql:e?i.wrapSqlWithCatch(r,-955):r,bindings:t.bindings}),this.single.comment&&this.comment(this.single.comment)},comment(t){this.pushQuery(`comment on table ${this.tableName()} is '${t}'`)},addColumnsPrefix:\"add \",alterColumnsPrefix:\"modify \",dropColumn(){const t=s.normalizeArr.apply(null,arguments);this.pushQuery(`alter table ${this.tableName()} drop (${this.formatter.columnize(t)})`)},changeType(){},_indexCommand(t,e,r){return this.formatter.wrap(i.generateCombinedName(this.client.logger,t,e,r))},primary(t,e){e=e?this.formatter.wrap(e):this.formatter.wrap(`${this.tableNameRaw}_pkey`),this.pushQuery(`alter table ${this.tableName()} add constraint ${e} primary key (${this.formatter.columnize(t)})`)},dropPrimary(t){t=t?this.formatter.wrap(t):this.formatter.wrap(this.tableNameRaw+\"_pkey\"),this.pushQuery(`alter table ${this.tableName()} drop constraint ${t}`)},index(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`create index ${e} on ${this.tableName()}`+\" (\"+this.formatter.columnize(t)+\")\")},dropIndex(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`drop index ${e}`)},unique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} add constraint ${e}`+\" unique (\"+this.formatter.columnize(t)+\")\")},dropUnique(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop constraint ${e}`)},dropForeign(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"foreign\",this.tableNameRaw,t),this.pushQuery(`alter table ${this.tableName()} drop constraint ${e}`)}}),t.exports=u},function(t,e){},function(t,e,r){(function(e,n){const i=r(1),o=r(0),s=r(263),a=r(264),{BlobHelper:c,ReturningHelper:u,isConnectionError:h}=r(60),f=r(7),l=r(27),{promisify:d}=r(15),p=r(265),m=r(79),b=r(80);function g(){m.apply(this,arguments),this.driver&&(e.env.UV_THREADPOOL_SIZE=e.env.UV_THREADPOOL_SIZE||1,e.env.UV_THREADPOOL_SIZE=parseInt(e.env.UV_THREADPOOL_SIZE)+this.driver.poolMax)}o(g,m),g.prototype.driverName=\"oracledb\",g.prototype._driver=function(){const t=this,e=r(113);return t.fetchAsString=[],this.config.fetchAsString&&i.isArray(this.config.fetchAsString)&&this.config.fetchAsString.forEach(function(r){i.isString(r)&&(r=r.toUpperCase(),e[r]&&(\"NUMBER\"!==r&&\"DATE\"!==r&&\"CLOB\"!==r&&this.logger.warn('Only \"date\", \"number\" and \"clob\" are supported for fetchAsString'),t.fetchAsString.push(e[r])))}),e},g.prototype.queryCompiler=function(){return new s(this,...arguments)},g.prototype.columnCompiler=function(){return new a(this,...arguments)},g.prototype.formatter=function(){return new _(this,...arguments)},g.prototype.transaction=function(){return new p(this,...arguments)},g.prototype.prepBindings=function(t){return i.map(t,t=>t instanceof c&&this.driver?{type:this.driver.BLOB,dir:this.driver.BIND_OUT}:t instanceof u&&this.driver?{type:this.driver.STRING,dir:this.driver.BIND_OUT}:\"boolean\"==typeof t?t?1:0:t)},g.prototype.acquireRawConnection=function(){const t=this;return new f(function(e,r){const n=t.connectionSettings.externalAuth?{externalAuth:t.connectionSettings.externalAuth}:{user:t.connectionSettings.user,password:t.connectionSettings.password};n.connectString=t.connectionSettings.connectString||t.connectionSettings.host+\"/\"+t.connectionSettings.database,t.connectionSettings.prefetchRowCount&&(n.prefetchRows=t.connectionSettings.prefetchRowCount),i.isUndefined(t.connectionSettings.stmtCacheSize)||(n.stmtCacheSize=t.connectionSettings.stmtCacheSize),t.driver.fetchAsString=t.fetchAsString,t.driver.getConnection(n,function(n,i){if(n)return r(n);i.commitAsync=function(){return new f((t,e)=>{if(i.isTransaction)return t();this.commit(function(r){if(r)return e(r);t()})})},i.rollbackAsync=function(){return new f((t,e)=>{this.rollback(function(r){if(r)return e(r);t()})})};const o=d(function(e,r,n,o){if((n=n||{}).outFormat=t.driver.OUT_FORMAT_OBJECT||t.driver.OBJECT,!n.outFormat)throw new Error(\"not found oracledb.outFormat constants\");n.resultSet?i.execute(e,r||[],n,function(t,e){if(t)return h(t)&&(i.close().catch(function(t){}),i.__knex__disposed=t),o(t);const r={rows:[],resultSet:e.resultSet},n=function(t,e,i){e.getRows(i,function(s,a){if(s)h(s)&&(t.close().catch(function(t){}),t.__knex__disposed=s),e.close(function(){return o(s)});else{if(0===a.length)return o(null,r);if(a.length>0){if(a.length!==i)return r.rows=r.rows.concat(a),o(null,r);r.rows=r.rows.concat(a),n(t,e,i)}}})};n(i,e.resultSet,100)}):i.execute(e,r||[],n,function(t,e){return t?(h(t)&&(i.close().catch(function(t){}),i.__knex__disposed=t),o(t)):o(null,e)})});i.executeAsync=function(t,e,r){return o(t,e,r).then(async t=>{const e=()=>t.resultSet?d(t.resultSet.close).call(t.resultSet):Promise.resolve(),r=[];if(t.rows&&Array.isArray(t.rows))for(let e=0;e<t.rows.length;e++){const n=t.rows[e];for(const t in n)n[t]instanceof l.Readable&&r.push({index:e,key:t,stream:n[t]})}try{for(const e of r)t.rows[e.index][e.key]=await y(e.stream)}catch(t){throw await e().catch(()=>{}),t}return await e(),t})},e(i)})})},g.prototype.destroyRawConnection=function(t){return t.release()},g.prototype._query=function(t,e){if(!e.sql)throw new Error(\"The query is empty\");const r={autoCommit:!1};return\"select\"===e.method&&(r.resultSet=!0),f.resolve(t.executeAsync(e.sql,e.bindings,r)).then(async function(r){let n=i.flatten(r.outBinds);if(e.response=r.rows||[],e.rowsAffected=r.rows?r.rows.rowsAffected:r.rowsAffected,\"raw\"===e.method&&n.length>0)return{response:n};if(\"update\"===e.method){const t=e.rowsAffected.length||e.rowsAffected,r=[],o=[],s=e=>(function(r,i){const s=i*t;o.push(n[e+s])});for(let n=0;n<t;n++)r.push(e.outBinding[0]),i.each(e.outBinding[0],s(n));n=o,e.outBinding=r}if(!e.returning&&0===n.length)return await t.commitAsync(),e;const o=[];let s=0;for(let t=0;t<e.outBinding.length;t++){const r=e.outBinding[t];s+=e.outBinding[t-1]?e.outBinding[t-1].length:0;for(let i=0;i<r.length;i++){const a=r[i];await new Promise(function(r,u){if(a instanceof c){const o=n[i+s];a.returning&&(e.response[t]=e.response[t]||{},e.response[t][a.columnName]=a.value),o.on(\"error\",function(t){u(t)}),o.on(\"finish\",function(){r()}),o.write(a.value),o.end()}else\"ROWID\"===e.outBinding[t][i]?(o.push(n[i+s]),r()):(e.response[t]=e.response[t]||{},e.response[t][a]=n[i+s],r())})}}return t.commitAsync().then(function(){return e.returningSql?t.executeAsync(e.returningSql(),o,{resultSet:!0}).then(function(t){return e.response=t.rows,e}):e})})},g.prototype.processResponse=function(t,e){let r=t.response;const n=t.method;if(t.output)return t.output.call(e,r);switch(n){case\"select\":case\"pluck\":case\"first\":return\"pluck\"===t.method&&(r=i.map(r,t.pluck)),\"first\"===t.method?r[0]:r;case\"insert\":case\"del\":case\"update\":case\"counter\":return t.returning&&!i.isEmpty(t.returning)?1===t.returning.length&&\"*\"!==t.returning[0]?i.flatten(i.map(r,i.values)):r:i.isUndefined(t.rowsAffected)?1:t.rowsAffected;default:return r}};const y=function(t){const e=r(113);let i;if(t.type)t.type===e.BLOB?i=\"buffer\":t.type===e.CLOB&&(i=\"string\");else{if(!t.iLob)throw new Error(\"Unrecognized oracledb lob stream type\");t.iLob.type===e.CLOB?i=\"string\":t.iLob.type===e.BLOB&&(i=\"buffer\")}return\"string\"===i&&t.setEncoding(\"utf-8\"),function(t,e){return new Promise((r,i)=>{let o=\"string\"===e?\"\":n.alloc(0);t.on(\"error\",function(t){i(t)}),t.on(\"data\",function(t){\"string\"===e?o+=t:o=n.concat([o,t])}),t.on(\"end\",function(){r(o)})})}(t,i)};class _ extends b{parameter(t){return\"function\"==typeof t?this.outputQuery(this.compileCallback(t),!0):t instanceof c?\"EMPTY_BLOB()\":this.unwrapRaw(t,!0)||\"?\"}}t.exports=g}).call(this,r(5),r(3).Buffer)},function(t,e,r){(function(e){const n=r(1),i=r(0),o=r(111),s=r(60).ReturningHelper,a=r(60).BlobHelper;function c(t,e){o.call(this,t,e)}i(c,o),n.assign(c.prototype,{insert:function(){const t=this,e=this._prepOutbindings(this.single.insert,this.single.returning),r=e.outBinding,i=e.returning,o=e.values;if(Array.isArray(o)&&1===o.length&&n.isEmpty(o[0]))return this._addReturningToSqlAndConvert(\"insert into \"+this.tableName+\" (\"+this.formatter.wrap(this.single.returning)+\") values (default)\",r[0],this.tableName,i);if(n.isEmpty(this.single.insert)&&\"function\"!=typeof this.single.insert)return\"\";const c=this._prepInsert(o),u={};if(n.isString(c))return this._addReturningToSqlAndConvert(\"insert into \"+this.tableName+\" \"+c,r[0],this.tableName,i);if(1===c.values.length)return this._addReturningToSqlAndConvert(\"insert into \"+this.tableName+\" (\"+this.formatter.columnize(c.columns)+\") values (\"+this.formatter.parameterize(c.values[0])+\")\",r[0],this.tableName,i);const h=0===c.columns.length;return u.returning=i,u.sql=\"begin \"+n.map(c.values,function(e,i){const o=h?\"\":t.formatter.parameterize(e,t.client.valueForUndefined);let u=\"insert into \"+t.tableName;u+=h?\" (\"+t.formatter.wrap(t.single.returning)+\") values (default)\":\" (\"+t.formatter.columnize(c.columns)+\") values (\"+o+\")\";let f=\"\",l=\"\",d=\"\",p=\"\";n.each(e,function(t){t instanceof a||(d+=\" ?,\")}),d=d.slice(0,-1),n.each(r[i],function(e){const r=e.columnName||e;if(f+=t.formatter.wrap(r)+\",\",l+=\" ?,\",p+=\" out ?,\",e instanceof a)return t.formatter.bindings.push(e);t.formatter.bindings.push(new s(r))}),f=f.slice(0,-1),l=l.slice(0,-1),p=p.slice(0,-1),f&&l&&(u+=\" returning \"+f+\" into\"+l),u=t.formatter.client.positionBindings(u);const m=o.replace(\"DEFAULT, \",\"\").replace(\", DEFAULT\",\"\").replace(\"EMPTY_BLOB(), \",\"\").replace(\", EMPTY_BLOB()\",\"\");return\"execute immediate '\"+u.replace(/'/g,\"''\")+(m||e?\"' using \":\"\")+m+(m&&p?\",\":\"\")+p+\";\"}).join(\" \")+\"end;\",u.outBinding=r,\"*\"===i[0]&&(u.returningSql=function(){return\"select * from \"+t.tableName+\" where ROWID in (\"+this.outBinding.map(function(t,e){return\":\"+(e+1)}).join(\", \")+\") order by case ROWID \"+this.outBinding.map(function(t,e){return\"when CHARTOROWID(:\"+(e+1)+\") then \"+e}).join(\" \")+\" end\"}),u},_addReturningToSqlAndConvert:function(t,e,r,i){const o=this,c={sql:t};if(!e)return c;const u=Array.isArray(e)?e:[e];let h=\"\",f=\"\";return n.each(u,function(t){const e=t.columnName||t;if(h+=o.formatter.wrap(e)+\",\",f+=\"?,\",t instanceof a)return o.formatter.bindings.push(t);o.formatter.bindings.push(new s(e))}),c.sql=t,h=h.slice(0,-1),f=f.slice(0,-1),h&&f&&(c.sql+=\" returning \"+h+\" into \"+f),c.outBinding=[e],\"*\"===i[0]&&(c.returningSql=function(){return\"select * from \"+o.tableName+\" where ROWID = :1\"}),c.returning=i,c},_prepOutbindings:function(t,r){const i={};let o=t||[],s=r||[];!Array.isArray(o)&&n.isPlainObject(t)&&(o=[o]),s&&!Array.isArray(s)&&(s=[s]);const c=[];return n.each(o,function(t,r){\"*\"===s[0]?c[r]=[\"ROWID\"]:c[r]=n.clone(s),n.each(t,function(i,s){if(i instanceof e){t[s]=new a(s,i);const e=c[r].indexOf(s);e>=0&&(c[r].splice(e,1),t[s].returning=!0),c[r].push(t[s])}n.isUndefined(i)&&delete o[r][s]})}),i.returning=s,i.outBinding=c,i.values=o,i},update:function(){const t=this,e={},r=this._prepOutbindings(this.single.update||this.single.counter,this.single.returning),i=r.outBinding,o=r.returning,c=this._prepUpdate(this.single.update),u=this.where();let h=\"\",f=\"\";return n.isEmpty(c)&&\"function\"!=typeof this.single.update?\"\":(n.each(i,function(e){n.each(e,function(e){const r=e.columnName||e;if(h+=t.formatter.wrap(r)+\",\",f+=\" ?,\",e instanceof a)return t.formatter.bindings.push(e);t.formatter.bindings.push(new s(r))})}),h=h.slice(0,-1),f=f.slice(0,-1),e.outBinding=i,e.returning=o,e.sql=\"update \"+this.tableName+\" set \"+c.join(\", \")+(u?\" \"+u:\"\"),i.length&&!n.isEmpty(i[0])&&(e.sql+=\" returning \"+h+\" into\"+f),\"*\"===o[0]&&(e.returningSql=function(){let e=\"select * from \"+t.tableName;const r=this.rowsAffected.length||this.rowsAffected;let n=\" where ROWID in (\",i=\") order by case ROWID \";for(let t=0;t<r;t++)\"*\"===this.returning[0]&&(n+=\":\"+(t+1)+\", \",i+=\"when CHARTOROWID(:\"+(t+1)+\") then \"+t+\" \");return\"*\"===this.returning[0]&&(this.returning=this.returning.slice(0,-1),n=n.slice(0,-2),i=i.slice(0,-1)),e+(n+i+\" end\")}),e)}}),t.exports=c}).call(this,r(3).Buffer)},function(t,e,r){const n=r(0),i=r(112),{isObject:o}=r(1);function s(){i.apply(this,arguments)}n(s,i),Object.assign(s.prototype,{time:\"timestamp with local time zone\",datetime:function(t){let e;return o(t)?({useTz:e}=t):e=!t,e?\"timestamp with local time zone\":\"timestamp\"},timestamp:function(t){let e;return o(t)?({useTz:e}=t):e=!t,e?\"timestamp with local time zone\":\"timestamp\"}}),t.exports=s},function(t,e,r){const{isUndefined:n}=r(1),i=r(7),o=r(18),s=r(10)(\"knex:tx\");t.exports=class extends o{begin(){return i.resolve()}commit(t,e){return this._completed=!0,t.commitAsync().then(()=>e).then(this._resolver,this._rejecter)}release(t,e){return this._resolver(e)}rollback(t,e){const r=this;return this._completed=!0,s(\"%s: rolling back\",this.txid),t.rollbackAsync().timeout(5e3).catch(i.TimeoutError,function(t){r._rejecter(t)}).then(function(){if(n(e)){if(r.doNotRejectOnRollback)return void r._resolver();e=new Error(`Transaction rejected with non-error: ${e}`)}r._rejecter(e)})}savepoint(t){return this.query(t,`SAVEPOINT ${this.txid}`)}acquireConnection(t,e){const r=t&&t.connection,n=this;return new i((t,e)=>{try{this.client.acquireConnection().then(e=>{e.__knexTxId=this.txid,e.isTransaction=!0,t(e)}).catch(e)}catch(t){e(t)}}).then(async t=>{try{return await e(t)}finally{s(\"%s: releasing connection\",this.txid),t.isTransaction=!1;try{await t.commitAsync()}catch(t){n._rejecter(t)}finally{r?s(\"%s: not releasing external connection\",n.txid):await n.client.releaseConnection(t)}}})}}},function(t,e){},function(t,e,r){const n=r(0),i=r(114),{map:o}=r(1),s=r(268),a=r(269),c=r(270),u=r(271),h=r(272),f=r(273);function l(t){i.apply(this,arguments)}n(l,i),Object.assign(l.prototype,{transaction(){return new s(this,...arguments)},queryCompiler(){return new a(this,...arguments)},columnBuilder(){return new c(this,...arguments)},columnCompiler(){return new u(this,...arguments)},tableCompiler(){return new h(this,...arguments)},schemaCompiler(){return new f(this,...arguments)},dialect:\"redshift\",driverName:\"pg-redshift\",_driver:()=>r(119),processResponse(t,e){const r=t.response;return t.output?t.output.call(e,r):\"raw\"===t.method?r:\"SELECT\"===r.command?\"first\"===t.method?r.rows[0]:\"pluck\"===t.method?o(r.rows,t.pluck):r.rows:\"INSERT\"===r.command||\"UPDATE\"===r.command||\"DELETE\"===r.command?r.rowCount:r}}),t.exports=l},function(t,e,r){const n=r(18);t.exports=class extends n{savepoint(t){return this.trxClient.logger(\"Redshift does not support savepoints.\"),Promise.resolve()}release(t,e){return this.trxClient.logger(\"Redshift does not support savepoints.\"),Promise.resolve()}rollbackTo(t,e){return this.trxClient.logger(\"Redshift does not support savepoints.\"),Promise.resolve()}}},function(t,e,r){const n=r(0),i=r(19),o=r(115),{reduce:s,identity:a}=r(1);function c(t,e){o.call(this,t,e)}n(c,o),Object.assign(c.prototype,{truncate(){return`truncate ${this.tableName.toLowerCase()}`},insert(){const t=i.prototype.insert.apply(this,arguments);return\"\"===t?t:(this._slightReturn(),{sql:t})},update(){const t=i.prototype.update.apply(this,arguments);return this._slightReturn(),{sql:t}},del(){const t=i.prototype.del.apply(this,arguments);return this._slightReturn(),{sql:t}},_slightReturn(){this.single.isReturning&&this.client.logger.warn(\"insert/update/delete returning is not supported by redshift dialect\")},forUpdate(){return this.client.logger.warn(\"table lock is not supported by redshift dialect\"),\"\"},forShare(){return this.client.logger.warn(\"lock for share is not supported by redshift dialect\"),\"\"},columnInfo(){const t=this.single.columnInfo;let e=this.single.schema;const r=this.client.customWrapIdentifier(this.single.table,a);e&&(e=this.client.customWrapIdentifier(e,a));let n=\"select * from information_schema.columns where table_name = ? and table_catalog = ?\";const i=[r.toLowerCase(),this.client.database().toLowerCase()];return e?(n+=\" and table_schema = ?\",i.push(e)):n+=\" and table_schema = current_schema()\",{sql:n,bindings:i,output(e){const r=s(e.rows,function(t,e){return t[e.column_name]={type:e.data_type,maxLength:e.character_maximum_length,nullable:\"YES\"===e.is_nullable,defaultValue:e.column_default},t},{});return t&&r[t]||r}}}}),t.exports=c},function(t,e,r){const n=r(0),i=r(49);function o(){i.apply(this,arguments)}n(o,i),o.prototype.primary=function(){return this.notNullable(),i.prototype.primary.apply(this,arguments)},o.prototype.index=function(){return this.client.logger.warn(\"Redshift does not support the creation of indexes.\"),this},t.exports=o},function(t,e,r){const n=r(0),i=r(116);function o(){i.apply(this,arguments)}n(o,i),Object.assign(o.prototype,{bigincrements:\"bigint identity(1,1) primary key not null\",binary:\"varchar(max)\",bit:t=>!1!==t.length?`char(${t.length})`:\"char(1)\",blob:\"varchar(max)\",enu:\"varchar(255)\",enum:\"varchar(255)\",increments:\"integer identity(1,1) primary key not null\",json:\"varchar(max)\",jsonb:\"varchar(max)\",longblob:\"varchar(max)\",mediumblob:\"varchar(16777218)\",set:\"text\",text:\"varchar(max)\",datetime:t=>t?\"timestamp\":\"timestamptz\",timestamp:t=>t?\"timestamp\":\"timestamptz\",tinyblob:\"varchar(256)\",uuid:\"char(36)\",varbinary:\"varchar(max)\",bigint:\"bigint\",bool:\"boolean\",double:\"double precision\",floating:\"real\",smallint:\"smallint\",tinyint:\"smallint\",comment(t){this.pushAdditional(function(){this.pushQuery(`comment on column ${this.tableCompiler.tableName()}.`+this.formatter.wrap(this.args[0])+\" is \"+(t?`'${t}'`:\"NULL\"))},t)}}),t.exports=o},function(t,e,r){const n=r(0),{has:i}=r(1),o=r(117);function s(){o.apply(this,arguments)}n(s,o),s.prototype.index=function(t,e,r){this.client.logger.warn(\"Redshift does not support the creation of indexes.\")},s.prototype.dropIndex=function(t,e){this.client.logger.warn(\"Redshift does not support the deletion of indexes.\")},s.prototype.createQuery=function(t,e){let r=(e?\"create table if not exists \":\"create table \")+this.tableName()+\" (\"+t.sql.join(\", \")+\")\";this.single.inherits&&(r+=` like (${this.formatter.wrap(this.single.inherits)})`),this.pushQuery({sql:r,bindings:t.bindings}),i(this.single,\"comment\")&&this.comment(this.single.comment)},s.prototype.primary=function(t,e){e=e?this.formatter.wrap(e):this.formatter.wrap(`${this.tableNameRaw}_pkey`),t.constructor!==Array&&(t=[t]);const r=this.grouped.columns;if(r)for(let e=0;e<t.length;e++){let n=r.find(r=>\"columns\"===r.grouping&&r.builder&&\"add\"===r.builder._method&&r.builder._args&&r.builder._args.indexOf(t[e])>-1);if(n&&(n=n.builder),!(n&&n._modifiers&&n._modifiers.nullable&&!1===n._modifiers.nullable[0]))return n?this.client.logger.warn(\"Redshift does not allow primary keys to contain nullable columns.\"):this.client.logger.warn(\"Redshift does not allow primary keys to contain nonexistent columns.\")}return this.pushQuery(`alter table ${this.tableName()} add constraint ${e} primary key (${this.formatter.columnize(t)})`)},s.prototype.addColumns=function(t,e,r){if(e===this.alterColumnsPrefix)o.prototype.addColumns.call(this,t,e,r);else{e=e||this.addColumnsPrefix,r=r||this.getColumns();for(const t of r){const r=this.tableName(),n=t.compileColumn();this.pushQuery({sql:`alter table ${r} ${e}${n}`,bindings:[]})}}},t.exports=s},function(t,e,r){const n=r(0),i=r(118);function o(){i.apply(this,arguments)}n(o,i),t.exports=o},function(t,e,r){const n=r(7),i=r(0),{isUndefined:o,map:s,defaults:a}=r(1),{promisify:c}=r(15),u=r(21),h=r(275),f=r(276),l=r(277),d=r(278),p=r(279),m=r(280);function b(t){u.call(this,t),o(t.useNullAsDefault)&&this.logger.warn(\"sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).\")}i(b,u),Object.assign(b.prototype,{dialect:\"sqlite3\",driverName:\"sqlite3\",_driver:()=>r(281),schemaCompiler(){return new f(this,...arguments)},queryCompiler(){return new h(this,...arguments)},columnCompiler(){return new l(this,...arguments)},tableCompiler(){return new d(this,...arguments)},ddl(t,e,r){return new p(this,t,e,r)},wrapIdentifierImpl:t=>\"*\"!==t?`\\`${t.replace(/`/g,\"``\")}\\``:\"*\",acquireRawConnection(){return new n((t,e)=>{const r=new this.driver.Database(this.connectionSettings.filename,n=>{if(n)return e(n);t(r)})})},destroyRawConnection:async t=>c(e=>t.close(e))(),_query(t,e){const{method:r}=e;let i;switch(r){case\"insert\":case\"update\":case\"counter\":case\"del\":i=\"run\";break;default:i=\"all\"}return new n(function(r,n){if(!t||!t[i])return n(new Error(`Error calling ${i} on connection.`));t[i](e.sql,e.bindings,function(t,i){return t?n(t):(e.response=i,e.context=this,r(e))})})},_stream(t,e,r){const i=this;return new n(function(n,o){return r.on(\"error\",o),r.on(\"end\",n),i._query(t,e).then(t=>t.response).then(t=>t.forEach(t=>r.write(t))).catch(function(t){r.emit(\"error\",t)}).then(function(){r.end()})})},processResponse(t,e){const r=t.context;let{response:n}=t;if(t.output)return t.output.call(e,n);switch(t.method){case\"select\":case\"pluck\":case\"first\":return\"pluck\"===t.method&&(n=s(n,t.pluck)),\"first\"===t.method?n[0]:n;case\"insert\":return[r.lastID];case\"del\":case\"update\":case\"counter\":return r.changes;default:return n}},poolDefaults(){return a({min:1,max:1},u.prototype.poolDefaults.call(this))},formatter(){return new m(this,...arguments)}}),t.exports=b},function(t,e,r){const n=r(0),i=r(19),{assign:o,each:s,isEmpty:a,isString:c,noop:u,reduce:h,identity:f}=r(1);function l(t,e){i.call(this,t,e);const{returning:r}=this.single;r&&this.client.logger.warn(\".returning() is not supported by sqlite3 and will not have any effect.\")}function d(){return\"\"}n(l,i),o(l.prototype,{forShare:d,forUpdate:d,insert(){const t=this.single.insert||[];let e=this.with()+`insert into ${this.tableName} `;if(Array.isArray(t)){if(0===t.length)return\"\";if(1===t.length&&t[0]&&a(t[0]))return e+this._emptyInsertValue}else if(\"object\"==typeof t&&a(t))return e+this._emptyInsertValue;const r=this._prepInsert(t);if(c(r))return e+r;if(0===r.columns.length)return\"\";if(e+=`(${this.formatter.columnize(r.columns)})`,null!==this.client.valueForUndefined&&s(r.values,t=>{s(t,t=>{if(void 0===t)throw new TypeError(\"`sqlite` does not support inserting default values. Specify values explicitly or use the `useNullAsDefault` config flag. (see docs http://knexjs.org/#Builder-insert).\")})}),1===r.values.length){return e+` values (${this.formatter.parameterize(r.values[0],this.client.valueForUndefined)})`}const n=[];let i=-1;for(;++i<r.values.length;){let t=-1;const e=n[i]=[];let o=r.values[i];for(o=void 0===o?this.client.valueForUndefined:o;++t<r.columns.length;)e.push(this.formatter.alias(this.formatter.parameter(o[t]),this.formatter.wrap(r.columns[t])));n[i]=e.join(\", \")}return e+\" select \"+n.join(\" union all select \")},truncate(){const{table:t}=this.single;return{sql:`delete from ${this.tableName}`,output(){return this.query({sql:`delete from sqlite_sequence where name = '${t}'`}).catch(u)}}},columnInfo(){const t=this.single.columnInfo;return{sql:`PRAGMA table_info(\\`${this.client.customWrapIdentifier(this.single.table,f)}\\`)`,output(e){const r=/.*\\((\\d+)\\)/,n=h(e,function(t,e){let{type:n}=e,i=n.match(r);return i&&(i=i[1]),n=i?n.split(\"(\")[0]:n,t[e.name]={type:n.toLowerCase(),maxLength:i,nullable:!e.notnull,defaultValue:e.dflt_value},t},{});return t&&n[t]||n}}},limit(){const t=!this.single.limit&&0!==this.single.limit;return t&&!this.single.offset?\"\":`limit ${this.formatter.parameter(t?-1:this.single.limit)}`}}),t.exports=l},function(t,e,r){const n=r(0),i=r(22),{some:o}=r(1);function s(){i.apply(this,arguments)}n(s,i),s.prototype.hasTable=function(t){const e=\"select * from sqlite_master \"+`where type = 'table' and name = ${this.formatter.parameter(t)}`;this.pushQuery({sql:e,output:t=>t.length>0})},s.prototype.hasColumn=function(t,e){this.pushQuery({sql:`PRAGMA table_info(${this.formatter.wrap(t)})`,output(t){return o(t,t=>this.client.wrapIdentifier(t.name.toLowerCase())===this.client.wrapIdentifier(e.toLowerCase()))}})},s.prototype.renameTable=function(t,e){this.pushQuery(`alter table ${this.formatter.wrap(t)} rename to ${this.formatter.wrap(e)}`)},t.exports=s},function(t,e,r){const n=r(0),i=r(24);function o(){i.apply(this,arguments),this.modifiers=[\"nullable\",\"defaultTo\"]}n(o,i),o.prototype.double=o.prototype.decimal=o.prototype.floating=\"float\",o.prototype.timestamp=\"datetime\",o.prototype.enu=function(t){return`text check (${this.formatter.wrap(this.args[0])} in ('${t.join(\"', '\")}'))`},o.prototype.json=\"json\",t.exports=o},function(t,e,r){const n=r(0),i=r(23),{filter:o,values:s}=r(1);function a(){i.apply(this,arguments),this.primaryKey=void 0}n(a,i),a.prototype.createQuery=function(t,e){let r=(e?\"create table if not exists \":\"create table \")+this.tableName()+\" (\"+t.sql.join(\", \");r+=this.foreignKeys()||\"\",r+=this.primaryKeys()||\"\",r+=\")\",this.pushQuery(r)},a.prototype.addColumns=function(t,e){if(e)throw new Error(\"Sqlite does not support alter column.\");for(let e=0,r=t.sql.length;e<r;e++)this.pushQuery({sql:`alter table ${this.tableName()} add column ${t.sql[e]}`,bindings:t.bindings[e]})},a.prototype.dropUnique=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),this.pushQuery(`drop index ${e}`)},a.prototype.dropIndex=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),this.pushQuery(`drop index ${e}`)},a.prototype.unique=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"unique\",this.tableNameRaw,t),t=this.formatter.columnize(t),this.pushQuery(`create unique index ${e} on ${this.tableName()} (${t})`)},a.prototype.index=function(t,e){e=e?this.formatter.wrap(e):this._indexCommand(\"index\",this.tableNameRaw,t),t=this.formatter.columnize(t),this.pushQuery(`create index ${e} on ${this.tableName()} (${t})`)},a.prototype.primary=a.prototype.foreign=function(){\"create\"!==this.method&&\"createIfNot\"!==this.method&&this.client.logger.warn(\"SQLite3 Foreign & Primary keys may only be added on create\")},a.prototype.primaryKeys=function(){const t=o(this.grouped.alterTable||[],{method:\"primary\"});if(t.length>0&&t[0].args.length>0){const e=t[0].args[0];let r=t[0].args[1]||\"\";return r&&(r=\" constraint \"+this.formatter.wrap(r)),`,${r} primary key (${this.formatter.columnize(e)})`}},a.prototype.foreignKeys=function(){let t=\"\";const e=o(this.grouped.alterTable||[],{method:\"foreign\"});for(let r=0,n=e.length;r<n;r++){const n=e[r].args[0],i=this.formatter.columnize(n.column),o=this.formatter.columnize(n.references),s=this.formatter.wrap(n.inTable);let a=n.keyName||\"\";a&&(a=\" constraint \"+this.formatter.wrap(a)),t+=`,${a} foreign key(${i}) references ${s}(${o})`,n.onDelete&&(t+=` on delete ${n.onDelete}`),n.onUpdate&&(t+=` on update ${n.onUpdate}`)}return t},a.prototype.createTableBlock=function(){return this.getColumns().concat().join(\",\")},a.prototype.renameColumn=function(t,e){const r=this;this.pushQuery({sql:`PRAGMA table_info(${this.tableName()})`,output(n){return r.client.ddl(r,n,this.connection).renameColumn(t,e)}})},a.prototype.dropColumn=function(){const t=this,e=s(arguments);this.pushQuery({sql:`PRAGMA table_info(${this.tableName()})`,output(r){return t.client.ddl(t,r,this.connection).dropColumn(e)}})},t.exports=a},function(t,e,r){const{assign:n,uniqueId:i,find:o,identity:s,map:a,omit:c,invert:u,fromPairs:h,some:f,negate:l,isEmpty:d,chunk:p}=r(1);function m(t,e,r,n){this.client=t,this.tableCompiler=e,this.pragma=r,this.tableNameRaw=this.tableCompiler.tableNameRaw,this.alteredName=i(\"_knex_temp_alter\"),this.connection=n,this.formatter=t&&t.config&&t.config.wrapIdentifier?t.config.wrapIdentifier:t=>t}n(m.prototype,{tableName(){return this.formatter(this.tableNameRaw,t=>t)},getColumn:async function(t){const e=o(this.pragma,e=>this.client.wrapIdentifier(e.name).toLowerCase()===this.client.wrapIdentifier(t).toLowerCase());if(!e)throw new Error(`The column ${t} is not in the ${this.tableName()} table`);return e},getTableSql(){return this.trx.disableProcessing(),this.trx.raw(`SELECT name, sql FROM sqlite_master WHERE type=\"table\" AND name=\"${this.tableName()}\"`).then(t=>(this.trx.enableProcessing(),t))},renameTable:async function(){return this.trx.raw(`ALTER TABLE \"${this.tableName()}\" RENAME TO \"${this.alteredName}\"`)},dropOriginal(){return this.trx.raw(`DROP TABLE \"${this.tableName()}\"`)},dropTempTable(){return this.trx.raw(`DROP TABLE \"${this.alteredName}\"`)},copyData(){return this.trx.raw(`SELECT * FROM \"${this.tableName()}\"`).then(t=>this.insertChunked(20,this.alteredName,s,t))},reinsertData(t){return this.trx.raw(`SELECT * FROM \"${this.alteredName}\"`).then(e=>this.insertChunked(20,this.tableName(),t,e))},async insertChunked(t,e,r,n){r=r||s;const i=p(n,t);for(const t of i)await this.trx.queryBuilder().table(e).insert(a(t,r))},createTempTable(t){return this.trx.raw(t.sql.replace(this.tableName(),this.alteredName))},_doReplace(t,e,r){const n=t.replace(/\\s+/g,\" \"),i=n.match(/^CREATE TABLE\\s+(\\S+)\\s*\\((.*)\\)/),o=i[1],s=i[2];if(!s)throw new Error(\"No column definitions in this statement!\");let a=0,c=[],u=0,h=0;const p=s.length;for(h=0;h<p;h++)switch(s[h]){case\"(\":a++;break;case\")\":a--;break;case\",\":0===a&&(c.push(s.slice(u,h)),u=h+1);break;case\" \":u===h&&(u=h+1)}c.push(s.slice(u,h));const m=e.replace(/[`\"'[\\]]/g,\"\");if(0===(c=(c=c.map(t=>{let e=t.trim().split(\" \");const n=[new RegExp(`\\`${m}\\``,\"i\"),new RegExp(`\"${m}\"`,\"i\"),new RegExp(`'${m}'`,\"i\"),new RegExp(`\\\\[${m}\\\\]`,\"i\")];m.match(/^\\S+$/)&&n.push(new RegExp(`\\\\b${m}\\\\b`,\"i\"));const i=t=>n.reduce((t,e)=>t.replace(e,r),t);if((t=>f(n,e=>t.match(e)))(e[0]))return r?(e[0]=r,e.join(\" \")):\"\";const s=/constraint/i.test(e[0])?2:0;if(/primary|unique/i.test(e[s])){const e=t.replace(/\\(.*\\)/,i);return e!==t&&d(r)?\"\":e}if(/foreign/.test(e[s])){const n=i((e=t.split(/ references /i))[0]);if(e[0]!==n){if(d(r))return\"\";e[0]=n}if(e[1].slice(0,o.length)===o){const t=e[1].replace(/\\(.*\\)/,i);if(e[1]!==t){if(d(r))return\"\";e[1]=t}}return e.join(\" references \")}return t})).filter(l(d))).length)throw new Error(\"Unable to drop last column from table\");return n.replace(/\\(.*\\)/,()=>`(${c.join(\", \")})`).replace(/,\\s*([,)])/,\"$1\")},renameColumn:async function(t,e){return this.client.transaction(async r=>{this.trx=r;const n=await this.getColumn(t),i=await this.getTableSql(n),o=this.client.wrapIdentifier(t),s=this.client.wrapIdentifier(e),a=i[0],h=this._doReplace(a.sql,o,s);if(i===h)throw new Error(\"Unable to find the column to change\");const{from:f,to:l}=u(this.client.postProcessResponse(u({from:t,to:e})));return this.reinsertMapped(a,h,t=>(t[l]=t[f],c(t,f)))},{connection:this.connection})},dropColumn:async function(t){return this.client.transaction(e=>(this.trx=e,Promise.all(t.map(t=>this.getColumn(t))).then(()=>this.getTableSql()).then(e=>{const r=e[0];let n=r.sql;if(t.forEach(t=>{const e=this.client.wrapIdentifier(t);n=this._doReplace(n,e,\"\")}),e===n)throw new Error(\"Unable to find the column to change\");const i=Object.keys(this.client.postProcessResponse(h(t.map(t=>[t,t]))));return this.reinsertMapped(r,n,t=>c(t,...i))})),{connection:this.connection})},reinsertMapped(t,e,r){return Promise.resolve().then(()=>this.createTempTable(t)).then(()=>this.copyData()).then(()=>this.dropOriginal()).then(()=>this.trx.raw(e)).then(()=>this.reinsertData(r)).then(()=>this.dropTempTable())}}),t.exports=m},function(t,e,r){const n=r(29),i=r(14);t.exports=class extends n{values(t){return Array.isArray(t)?Array.isArray(t[0])?`( values ${t.map(t=>`(${this.parameterize(t)})`).join(\", \")})`:`(${this.parameterize(t)})`:t instanceof i?`(${this.parameter(t)})`:this.parameter(t)}}},function(t,e){t.exports=sqlite3}]);","extractedComments":[]}