mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 18:51:18 +01:00
7 lines
72 KiB
JavaScript
7 lines
72 KiB
JavaScript
var ledgerwebsocket=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=63)}([function(t,e){var r=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=r)},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(31)("wks"),o=r(18),i=r(1).Symbol,u="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=n},function(t,e,r){var n=r(1),o=r(0),i=r(10),u=r(8),s=function(t,e,r){var a,f,c,l=t&s.F,h=t&s.G,p=t&s.S,v=t&s.P,d=t&s.B,y=t&s.W,g=h?o:o[e]||(o[e]={}),m=g.prototype,_=h?n:p?n[e]:(n[e]||{}).prototype;h&&(r=e);for(a in r)(f=!l&&_&&void 0!==_[a])&&a in g||(c=f?_[a]:r[a],g[a]=h&&"function"!=typeof _[a]?r[a]:d&&f?i(c,n):y&&_[a]==c?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):v&&"function"==typeof c?i(Function.call,c):c,v&&((g.virtual||(g.virtual={}))[a]=c,t&s.R&&m&&!m[a]&&u(m,a,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,r){var n=r(5),o=r(42),i=r(26),u=Object.defineProperty;e.f=r(7)?Object.defineProperty:function(t,e,r){if(n(t),e=i(e,!0),n(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(6);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){t.exports=!r(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(4),o=r(13);t.exports=r(7)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(17);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(74),o=r(24);t.exports=function(t){return n(o(t))}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){var n=r(4).f,o=r(9),i=r(2)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){"use strict";(function(t){function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(n()<e)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=i.prototype):(null===t&&(t=new i(e)),t.length=e),t}function i(t,e,r){if(!(i.TYPED_ARRAY_SUPPORT||this instanceof i))return new i(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?h(t,e,r,n):"string"==typeof e?c(t,e,r):p(t,e)}function s(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 a(t,e,r,n){return s(e),e<=0?o(t,e):void 0!==r?"string"==typeof n?o(t,e).fill(r,n):o(t,e).fill(r):o(t,e)}function f(t,e){if(s(e),t=o(t,e<0?0:0|v(e)),!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function c(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!i.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,r);t=o(t,n);var u=t.write(e,r);return u!==n&&(t=t.slice(0,u)),t}function l(t,e){var r=e.length<0?0:0|v(e.length);t=o(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(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");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),i.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=i.prototype):t=l(t,e),t}function p(t,e){if(i.isBuffer(e)){var r=0|v(e.length);return t=o(t,r),0===t.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||Q(e.length)?o(t,0):l(t,e);if("Buffer"===e.type&&Z(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),i.alloc(+t)}function y(t,e){if(i.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 W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return W(t).length;e=(""+e).toLowerCase(),n=!0}}function g(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,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,o){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=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){function i(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,s=t.length,a=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;u=2,s/=2,a/=2,r/=2}var f;if(o){var c=-1;for(f=r;f<s;f++)if(i(t,f)===i(e,-1===c?0:f-c)){if(-1===c&&(c=f),f-c+1===a)return c*u}else-1!==c&&(f-=f-c),c=-1}else for(r+a>s&&(r=s-a),f=r;f>=0;f--){for(var l=!0,h=0;h<a;h++)if(i(t,f+h)!==i(e,h)){l=!1;break}if(l)return f}return-1}function b(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var s=parseInt(e.substr(2*u,2),16);if(isNaN(s))return u;t[r+u]=s}return u}function E(t,e,r,n){return z(W(e,t.length-r),t,r,n)}function S(t,e,r,n){return z(V(e),t,r,n)}function x(t,e,r,n){return S(t,e,r,n)}function P(t,e,r,n){return z(H(e),t,r,n)}function T(t,e,r,n){return z(K(e,t.length-r),t,r,n)}function R(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],u=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){var a,f,c,l;switch(s){case 1:i<128&&(u=i);break;case 2:a=t[o+1],128==(192&a)&&(l=(31&i)<<6|63&a)>127&&(u=l);break;case 3:a=t[o+1],f=t[o+2],128==(192&a)&&128==(192&f)&&(l=(15&i)<<12|(63&a)<<6|63&f)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[o+1],f=t[o+2],c=t[o+3],128==(192&a)&&128==(192&f)&&128==(192&c)&&(l=(15&i)<<18|(63&a)<<12|(63&f)<<6|63&c)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=s}return A(n)}function A(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=$));return r}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=q(t[i]);return o}function C(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function U(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 j(t,e,r,n,o,u){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<u)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 o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function k(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function B(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,o){return o||B(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return o||B(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function Y(t){if(t=G(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function G(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u<n;++u){if((r=t.charCodeAt(u))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function K(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function H(t){return X.toByteArray(Y(t))}function z(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Q(t){return t!==t}/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
var X=r(64),J=r(65),Z=r(66);e.Buffer=i,e.SlowBuffer=d,e.INSPECT_MAX_BYTES=50,i.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=n(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,e,r){return u(null,t,e,r)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,e,r){return a(null,t,e,r)},i.allocUnsafe=function(t){return f(null,t)},i.allocUnsafeSlow=function(t){return f(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,u=Math.min(r,n);o<u;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},i.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}},i.concat=function(t,e){if(!Z(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return i.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=i.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var u=t[r];if(!i.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},i.byteLength=y,i.prototype._isBuffer=!0,i.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},i.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},i.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},i.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):g.apply(this,arguments)},i.prototype.equals=function(t){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===i.compare(this,t)},i.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+">"},i.prototype.compare=function(t,e,r,n,o){if(!i.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===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var u=o-n,s=r-e,a=Math.min(u,s),f=this.slice(n,o),c=t.slice(e,r),l=0;l<a;++l)if(f[l]!==c[l]){u=f[l],s=c[l];break}return u<s?-1:s<u?1:0},i.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},i.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},i.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},i.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 o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return S(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return P(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n;if(i.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=i.prototype;else{var o=e-t;n=new i(o,void 0);for(var u=0;u<o;++u)n[u]=this[u+t]}return n},i.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},i.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},i.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),J.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),J.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),J.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),J.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},i.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);j(this,t,e,r,o-1,-o)}var i=0,u=1,s=0;for(this[e]=255&t;++i<r&&(u*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/u>>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);j(this,t,e,r,o-1,-o)}var i=r-1,u=1,s=0;for(this[e+i]=255&t;--i>=0&&(u*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/u>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},i.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 o,u=n-r;if(this===t&&r<e&&e<n)for(o=u-1;o>=0;--o)t[o+e]=this[o+r];else if(u<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<u;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+u),e);return u},i.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 o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.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;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var u;if("number"==typeof t)for(u=e;u<r;++u)this[u]=t;else{var s=i.isBuffer(t)?t:W(new i(t,n).toString()),a=s.length;for(u=0;u<r-e;++u)this[u+e]=s[u%a]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(38))},function(t,e,r){t.exports={default:r(70),__esModule:!0}},function(t,e,r){"use strict";var n=r(71)(!0);r(41)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(6),o=r(1).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(5),o=r(73),i=r(32),u=r(30)("IE_PROTO"),s=function(){},a=function(){var t,e=r(25)("iframe"),n=i.length;for(e.style.display="none",r(45).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;n--;)delete a.prototype[i[n]];return a()};t.exports=Object.create||function(t,e){var r;return null!==t?(s.prototype=n(t),r=new s,s.prototype=null,r[u]=t):r=a(),void 0===e?r:o(r,e)}},function(t,e,r){var n=r(44),o=r(32);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(23),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(31)("keys"),o=r(18);t.exports=function(t){return n[t]||(n[t]=o(t))}},function(t,e,r){var n=r(1),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(24);t.exports=function(t){return Object(n(t))}},function(t,e,r){"use strict";function n(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=o(e),this.reject=o(r)}var o=r(17);t.exports.f=function(t){return new n(t)}},function(t,e,r){e.f=r(2)},function(t,e,r){var n=r(1),o=r(0),i=r(16),u=r(35),s=r(4).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:u.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";t.exports=r(67)},function(t,e){},function(t,e,r){"use strict";var n=r(16),o=r(3),i=r(43),u=r(8),s=r(9),a=r(14),f=r(72),c=r(19),l=r(46),h=r(2)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,r,d,y,g,m){f(r,e,d);var _,w,b,E=function(t){if(!p&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},S=e+" Iterator",x="values"==y,P=!1,T=t.prototype,R=T[h]||T["@@iterator"]||y&&T[y],O=!p&&R||E(y),A=y?x?E("entries"):O:void 0,L="Array"==e?T.entries||R:R;if(L&&(b=l(L.call(new t)))!==Object.prototype&&b.next&&(c(b,S,!0),n||s(b,h)||u(b,h,v)),x&&R&&"values"!==R.name&&(P=!0,O=function(){return R.call(this)}),n&&!m||!p&&!P&&T[h]||u(T,h,O),a[e]=O,a[S]=v,y)if(_={values:x?O:E("values"),keys:g?O:E("keys"),entries:A},m)for(w in _)w in T||i(T,w,_[w]);else o(o.P+o.F*(p||P),e,_);return _}},function(t,e,r){t.exports=!r(7)&&!r(12)(function(){return 7!=Object.defineProperty(r(25)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){t.exports=r(8)},function(t,e,r){var n=r(9),o=r(11),i=r(75)(!1),u=r(30)("IE_PROTO");t.exports=function(t,e){var r,s=o(t),a=0,f=[];for(r in s)r!=u&&n(s,r)&&f.push(r);for(;e.length>a;)n(s,r=e[a++])&&(~i(f,r)||f.push(r));return f}},function(t,e,r){var n=r(1).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(9),o=r(33),i=r(30)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,r){r(77);for(var n=r(1),o=r(8),i=r(14),u=r(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<s.length;a++){var f=s[a],c=n[f],l=c&&c.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},function(t,e,r){var n=r(15),o=r(2)("toStringTag"),i="Arguments"==n(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(e=Object(t),o))?r:i?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,r){var n=r(5);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},function(t,e,r){var n=r(14),o=r(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},function(t,e,r){var n=r(48),o=r(2)("iterator"),i=r(14);t.exports=r(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[n(t)]}},function(t,e,r){var n=r(5),o=r(17),i=r(2)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||void 0==(r=n(u)[i])?e:o(r)}},function(t,e,r){var n,o,i,u=r(10),s=r(83),a=r(45),f=r(25),c=r(1),l=c.process,h=c.setImmediate,p=c.clearImmediate,v=c.MessageChannel,d=c.Dispatch,y=0,g={},m=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},_=function(t){m.call(t.data)};h&&p||(h=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return g[++y]=function(){s("function"==typeof t?t:Function(t),e)},n(y),y},p=function(t){delete g[t]},"process"==r(15)(l)?n=function(t){l.nextTick(u(m,t,1))}:d&&d.now?n=function(t){d.now(u(m,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=_,n=u(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(t){c.postMessage(t+"","*")},c.addEventListener("message",_,!1)):n="onreadystatechange"in f("script")?function(t){a.appendChild(f("script")).onreadystatechange=function(){a.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:p}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){var n=r(5),o=r(6),i=r(34);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(2)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i=[7],u=i[n]();u.next=function(){return{done:r=!0}},i[n]=function(){return u},t(i)}catch(t){}return r}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(93),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=r(97),i=n(o),u=r(99),s=n(u),a="function"==typeof s.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===a(i.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(44),o=r(32).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(37),o=r(13),i=r(11),u=r(26),s=r(9),a=r(42),f=Object.getOwnPropertyDescriptor;e.f=r(7)?f:function(t,e){if(t=i(t),e=u(e,!0),a)try{return f(t,e)}catch(t){}if(s(t,e))return o(!n.f.call(t,e),t[e])}},function(t,e,r){"use strict";(function(t){function n(t){return o(this,void 0,void 0,function(){return i(this,function(e){return[2,new Promise(function(e,r){var n=new FileReader;n.addEventListener("loadend",function(t){e(n.result)},!1),n.readAsArrayBuffer(t)})]})})}var o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function u(t){try{a(n.next(t))}catch(t){i(t)}}function s(t){try{a(n.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(u,s)}a((n=n.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){function r(t){return function(e){return n([t,e])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(u=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(u=u.call(i,r[1])).done)return u;switch(i=0,u&&(r=[0,u.value]),r[0]){case 0:case 1:u=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(u=a.trys,!(u=u.length>0&&u[u.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!u||r[1]>u[0]&&r[1]<u[3])){a.label=r[1];break}if(6===r[0]&&a.label<u[1]){a.label=u[1],u=r;break}if(u&&a.label<u[2]){a.label=u[2],a.ops.push(r);break}u[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{o=u=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,u,s,a={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var a=u(r(39)),f=s(r(69)),c=function(){function e(t){this.timeoutSeconds=20,t=t.replace("https://","wss://"),t=t.replace("http://","ws://"),this.path=t}return e.prototype.isSupported=function(){return new Promise(function(t,e){"WebSocket"in window&&2===window.WebSocket.CLOSING?a.default.isSupported().then(function(e){return t(e)}):t(!1)})},e.prototype.sendCommand=function(e,r,u){var s=this,a=this.path+"?command="+e+(r?"&"+r:""),c=new WebSocket(a);return u||(u=this.timeoutSeconds),new Promise(function(e,r){f.default.open(u).catch(function(t){return r(t)}).then(function(a){var f=a;f.exchangeTimeout=1e3*u,f.setScrambleKey("BTC"),c.onmessage=function(u){return o(s,void 0,void 0,function(){var o,s,a,l,h,p,v;return i(this,function(i){switch(i.label){case 0:if(!(u.data&&u.data instanceof Blob))return[3,6];o=u.data,i.label=1;case 1:return i.trys.push([1,4,,5]),l=(a=f).exchange,p=(h=t).from,[4,n(o)];case 2:return[4,l.apply(a,[p.apply(h,[i.sent()])])];case 3:return s=i.sent(),c.send(s),[3,5];case 4:return v=i.sent(),c.close(),r(v),[3,5];case 5:return[3,7];case 6:u.data&&"string"==typeof u.data&&(c.close(),e(JSON.parse(u.data))),i.label=7;case 7:return[2]}})})}})})},e}();e.LedgerWebSocketBridge=c}).call(e,r(20).Buffer)},function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,r,o,i,u,s=t.length;i=n(t),u=new l(3*s/4-i),r=i>0?s-4:s;var a=0;for(e=0;e<r;e+=4)o=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],u[a++]=o>>16&255,u[a++]=o>>8&255,u[a++]=255&o;return 2===i?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,u[a++]=255&o):1===i&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,u[a++]=o>>8&255,u[a++]=255&o),u}function u(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function s(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(u(n));return o.join("")}function a(t){for(var e,r=t.length,n=r%3,o="",i=[],u=0,a=r-n;u<a;u+=16383)i.push(s(t,u,u+16383>a?a:u+16383));return 1===n?(e=t[r-1],o+=f[e>>2],o+=f[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=f[e>>10],o+=f[e>>4&63],o+=f[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=a;for(var f=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,v=h.length;p<v;++p)f[p]=h[p],c[h.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,o){var i,u,s=8*o-n-1,a=(1<<s)-1,f=a>>1,c=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+t[e+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[e+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var u,s,a,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,v=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,u=c):(u=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-u))<1&&(u--,a*=2),e+=u+l>=1?h/a:h*Math.pow(2,1-l),e*a>=2&&(u++,a/=2),u+l>=c?(s=0,u=c):u+l>=1?(s=(e*a-1)*Math.pow(2,o),u+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[r+p]=255&s,p+=v,s/=256,o-=8);for(u=u<<o|s,f+=o;f>0;t[r+p]=255&u,p+=v,u/=256,f-=8);t[r+p-v]|=128*d}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e){function n(t){return g||(g=new t(function(t,e){function r(){t({u2f:null,native:!0})}return v?d?r():(void 0!==window.u2f&&"function"==typeof window.u2f.sign&&t({u2f:window.u2f,native:!0}),y?r():"http:"===location.protocol?r():"undefined"==typeof MessageChannel?r():void p.isSupported(function(e){e?t({u2f:p,native:!1}):r()})):r()})),g}function o(t){return{isSupported:s.bind(t),ensureSupport:f.bind(t),register:c.bind(t),sign:l.bind(t),ErrorCodes:o.ErrorCodes,ErrorNames:o.ErrorNames}}function i(t,e){var r=null!=e?e.errorCode:1,n=o.ErrorNames[""+r],i=new Error(t);return i.metaData={type:n,code:r},i}function u(t,e){var r={};return r.promise=new t(function(t,n){r.resolve=t,r.reject=n,e.then(t,n)}),r.promise.cancel=function(e,o){n(t).then(function(t){o&&!t.native&&t.u2f.disconnect(),r.reject(i(e,{errorCode:-1}))})},r}function s(){return n(this).then(function(t){return!!t.u2f})}function a(t){if(!t.u2f){if("http:"===location.protocol)throw new Error("U2F isn't supported over http, only https");throw new Error("U2F not supported")}}function f(){return n(this).then(a)}function c(t,e,r){var o=this;return Array.isArray(t)||(t=[t]),"number"==typeof e&&void 0===r&&(r=e,e=null),e||(e=[]),u(o,n(o).then(function(n){a(n);var u=n.native,s=n.u2f;return new o(function(n,o){function a(t){t.errorCode?o(i("Registration failed",t)):(delete t.errorCode,n(t))}function f(t,e){t?o(t):e.errorCode?o(i("Registration failed",e)):n(e)}if(u){var c=t[0].appId;s.register(c,t,e,a,r)}else s.register(t,e,f,r)})})).promise}function l(t,e){var r=this;return Array.isArray(t)||(t=[t]),u(r,n(r).then(function(n){a(n);var o=n.native,u=n.u2f;return new r(function(r,n){function s(t){t.errorCode?n(i("Sign failed",t)):(delete t.errorCode,r(t))}function a(t,e){t?n(t):e.errorCode?n(i("Sign failed",e)):r(e)}if(o){var f=t[0].appId,c=t[0].challenge;u.sign(f,c,t,s,e)}else u.sign(t,a,e)})})).promise}function h(t){o[t]=function(){if(!e.Promise)throw new Error("The platform doesn't natively support promises");var r=[].slice.call(arguments);return o(e.Promise)[t].apply(null,r)}}t.exports=o;var p=r(68),v="undefined"!=typeof navigator&&!!navigator.userAgent,d=v&&navigator.userAgent.match(/Safari\//)&&!navigator.userAgent.match(/Chrome\//),y=v&&navigator.userAgent.match(/Edge\/1[2345]/),g=null;o.ErrorCodes={CANCELLED:-1,OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},o.ErrorNames={"-1":"CANCELLED",0:"OK",1:"OTHER_ERROR",2:"BAD_REQUEST",3:"CONFIGURATION_UNSUPPORTED",4:"DEVICE_INELIGIBLE",5:"TIMEOUT"},h("isSupported"),h("ensureSupport"),h("register"),h("sign")}).call(e,r(38))},function(t,e,r){"use strict";var n=n||{};t.exports=n,n.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",n.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_RESPONSE:"u2f_sign_response"},n.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},n.Request,n.Response,n.Error,n.SignRequest,n.SignResponse,n.RegisterRequest,n.RegisterResponse,n.disconnect=function(){n.port_&&n.port_.port_&&(n.port_.port_.disconnect(),n.port_=null)},n.getMessagePort=function(t){if("undefined"!=typeof chrome&&chrome.runtime){var e={type:n.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(n.EXTENSION_ID,e,function(){chrome.runtime.lastError?n.getIframePort_(t):n.getChromeRuntimePort_(t)})}else n.getIframePort_(t)},n.getChromeRuntimePort_=function(t){var e=chrome.runtime.connect(n.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout(function(){t(null,new n.WrappedChromeRuntimePort_(e))},0)},n.WrappedChromeRuntimePort_=function(t){this.port_=t},n.WrappedChromeRuntimePort_.prototype.postMessage=function(t){this.port_.postMessage(t)},n.WrappedChromeRuntimePort_.prototype.addEventListener=function(t,e){var r=t.toLowerCase();"message"==r||"onmessage"==r?this.port_.onMessage.addListener(function(t){e({data:t})}):console.error("WrappedChromeRuntimePort only supports onMessage")},n.getIframePort_=function(t){var e="chrome-extension://"+n.EXTENSION_ID,r=document.createElement("iframe");r.src=e+"/u2f-comms.html",r.setAttribute("style","display:none"),document.body.appendChild(r);var o=!1,i=new MessageChannel,u=function(e){"ready"==e.data?(i.port1.removeEventListener("message",u),o||(o=!0,t(null,i.port1))):console.error('First event on iframe port was not "ready"')};i.port1.addEventListener("message",u),i.port1.start(),r.addEventListener("load",function(){r.contentWindow.postMessage("init",e,[i.port2])}),setTimeout(function(){o||(o=!0,t(new Error("IFrame extension not supported")))},200)},n.EXTENSION_TIMEOUT_SEC=30,n.port_=null,n.waitingForPort_=[],n.reqCounter_=0,n.callbackMap_={},n.getPortSingleton_=function(t){n.port_?t(null,n.port_):(0==n.waitingForPort_.length&&n.getMessagePort(function(t,e){for(t||(n.port_=e,n.port_.addEventListener("message",n.responseHandler_));n.waitingForPort_.length;)n.waitingForPort_.shift()(t,e)}),n.waitingForPort_.push(t))},n.responseHandler_=function(t){var e=t.data,r=e.requestId;if(!r||!n.callbackMap_[r])return void console.error("Unknown or missing requestId in response.");var o=n.callbackMap_[r];delete n.callbackMap_[r],o(null,e.responseData)},n.isSupported=function(t){n.getPortSingleton_(function(e,r){t(!e)})},n.sign=function(t,e,r){n.getPortSingleton_(function(o,i){if(o)return e(o);var u=++n.reqCounter_;n.callbackMap_[u]=e;var s={type:n.MessageTypes.U2F_SIGN_REQUEST,signRequests:t,timeoutSeconds:void 0!==r?r:n.EXTENSION_TIMEOUT_SEC,requestId:u};i.postMessage(s)})},n.register=function(t,e,r,o){n.getPortSingleton_(function(i,u){if(i)return r(i);var s=++n.reqCounter_;n.callbackMap_[s]=r;var a={type:n.MessageTypes.U2F_REGISTER_REQUEST,signRequests:e,registerRequests:t,timeoutSeconds:void 0!==o?o:n.EXTENSION_TIMEOUT_SEC,requestId:s};u.postMessage(a)})}},function(t,e,r){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}function o(e,r){for(var n=t.alloc(e.length),o=0;o<e.length;o++)n[o]=e[o]^r[o%r.length];return n}Object.defineProperty(e,"__esModule",{value:!0});var i=r(21),u=n(i),s=r(89),a=n(s),f=r(57),c=n(f),l=r(58),h=n(l),p=r(96),v=n(p),d=r(108),y=n(d),g=r(39),m=r(116),_=n(m),w=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},b=function(t){return t.replace(/-/g,"+").replace(/_/g,"/")+"==".substring(0,3*t.length%4)},E=function(e){function r(){return(0,c.default)(this,r),(0,v.default)(this,(r.__proto__||(0,a.default)(r)).apply(this,arguments))}return(0,y.default)(r,e),(0,h.default)(r,[{key:"exchange",value:function(e){var r=this,n=o(e,this.scrambleKey),i=t.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),u={version:"U2F_V2",keyHandle:w(n.toString("base64")),challenge:w(i.toString("base64")),appId:location.origin};return this.debug&&console.log("=> "+e.toString("hex")),(0,g.sign)(u,this.exchangeTimeout/1e3).then(function(e){var n=e.signatureData;if("string"==typeof n){var o=t.from(b(n),"base64"),i=o.slice(5);return r.debug&&console.log("<= "+i.toString("hex")),i}throw e})}},{key:"setScrambleKey",value:function(e){this.scrambleKey=t.from(e,"ascii")}},{key:"close",value:function(){return u.default.resolve()}}],[{key:"open",value:function(){return u.default.resolve(new r)}}]),r}(_.default);E.isSupported=g.isSupported,E.list=function(){return(0,g.isSupported)().then(function(t){return t?[null]:[]})},E.listen=function(t){var e=!1;return(0,g.isSupported)().then(function(r){!e&&r&&t.next({type:"add",descriptor:null})}),{unsubscribe:function(){e=!0}}},e.default=E}).call(e,r(20).Buffer)},function(t,e,r){r(40),r(22),r(47),r(80),r(87),r(88),t.exports=r(0).Promise},function(t,e,r){var n=r(23),o=r(24);t.exports=function(t){return function(e,r){var i,u,s=String(o(e)),a=n(r),f=s.length;return a<0||a>=f?t?"":void 0:(i=s.charCodeAt(a),i<55296||i>56319||a+1===f||(u=s.charCodeAt(a+1))<56320||u>57343?t?s.charAt(a):i:t?s.slice(a,a+2):u-56320+(i-55296<<10)+65536)}}},function(t,e,r){"use strict";var n=r(27),o=r(13),i=r(19),u={};r(8)(u,r(2)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(u,{next:o(1,r)}),i(t,e+" Iterator")}},function(t,e,r){var n=r(4),o=r(5),i=r(28);t.exports=r(7)?Object.defineProperties:function(t,e){o(t);for(var r,u=i(e),s=u.length,a=0;s>a;)n.f(t,r=u[a++],e[r]);return t}},function(t,e,r){var n=r(15);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){var n=r(11),o=r(29),i=r(76);t.exports=function(t){return function(e,r,u){var s,a=n(e),f=o(a.length),c=i(u,f);if(t&&r!=r){for(;f>c;)if((s=a[c++])!=s)return!0}else for(;f>c;c++)if((t||c in a)&&a[c]===r)return t||c||0;return!t&&-1}}},function(t,e,r){var n=r(23),o=Math.max,i=Math.min;t.exports=function(t,e){return t=n(t),t<0?o(t+e,0):i(t,e)}},function(t,e,r){"use strict";var n=r(78),o=r(79),i=r(14),u=r(11);t.exports=r(41)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,r):"values"==e?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){"use strict";var n,o,i,u,s=r(16),a=r(1),f=r(10),c=r(48),l=r(3),h=r(6),p=r(17),v=r(81),d=r(82),y=r(52),g=r(53).set,m=r(84)(),_=r(34),w=r(54),b=r(55),E=a.TypeError,S=a.process,x=a.Promise,P="process"==c(S),T=function(){},R=o=_.f,O=!!function(){try{var t=x.resolve(1),e=(t.constructor={})[r(2)("species")]=function(t){t(T,T)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e}catch(t){}}(),A=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var r=t._c;m(function(){for(var n=t._v,o=1==t._s,i=0;r.length>i;)!function(e){var r,i,u=o?e.ok:e.fail,s=e.resolve,a=e.reject,f=e.domain;try{u?(o||(2==t._h&&C(t),t._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&f.exit()),r===e.promise?a(E("Promise-chain cycle")):(i=A(r))?i.call(r,s,a):s(r)):a(n)}catch(t){a(t)}}(r[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){g.call(a,function(){var e,r,n,o=t._v,i=I(t);if(i&&(e=w(function(){P?S.emit("unhandledRejection",o,t):(r=a.onunhandledrejection)?r({promise:t,reason:o}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=P||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},C=function(t){g.call(a,function(){var e;P?S.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},U=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},j=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw E("Promise can't be resolved itself");(e=A(t))?m(function(){var n={_w:r,_d:!1};try{e.call(t,f(j,n,1),f(U,n,1))}catch(t){U.call(n,t)}}):(r._v=t,r._s=1,L(r,!1))}catch(t){U.call({_w:r,_d:!1},t)}}};O||(x=function(t){v(this,x,"Promise","_h"),p(t),n.call(this);try{t(f(j,this,1),f(U,this,1))}catch(t){U.call(this,t)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=r(85)(x.prototype,{then:function(t,e){var r=R(y(this,x));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=P?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&L(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n;this.promise=t,this.resolve=f(j,t,1),this.reject=f(U,t,1)},_.f=R=function(t){return t===x||t===u?new i(t):o(t)}),l(l.G+l.W+l.F*!O,{Promise:x}),r(19)(x,"Promise"),r(86)("Promise"),u=r(0).Promise,l(l.S+l.F*!O,"Promise",{reject:function(t){var e=R(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!O),"Promise",{resolve:function(t){return b(s&&this===u?x:this,t)}}),l(l.S+l.F*!(O&&r(56)(function(t){x.all(t).catch(T)})),"Promise",{all:function(t){var e=this,r=R(e),n=r.resolve,o=r.reject,i=w(function(){var r=[],i=0,u=1;d(t,!1,function(t){var s=i++,a=!1;r.push(void 0),u++,e.resolve(t).then(function(t){a||(a=!0,r[s]=t,--u||n(r))},o)}),--u||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=R(e),n=r.reject,o=w(function(){d(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){var n=r(10),o=r(49),i=r(50),u=r(5),s=r(29),a=r(51),f={},c={},e=t.exports=function(t,e,r,l,h){var p,v,d,y,g=h?function(){return t}:a(t),m=n(r,l,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(p=s(t.length);p>_;_++)if((y=e?m(u(v=t[_])[0],v[1]):m(t[_]))===f||y===c)return y}else for(d=g.call(t);!(v=d.next()).done;)if((y=o(d,m,v.value,e))===f||y===c)return y};e.BREAK=f,e.RETURN=c},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(1),o=r(53).set,i=n.MutationObserver||n.WebKitMutationObserver,u=n.process,s=n.Promise,a="process"==r(15)(u);t.exports=function(){var t,e,r,f=function(){var n,o;for(a&&(n=u.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(a)r=function(){u.nextTick(f)};else if(!i||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var c=s.resolve();r=function(){c.then(f)}}else r=function(){o.call(n,f)};else{var l=!0,h=document.createTextNode("");new i(f).observe(h,{characterData:!0}),r=function(){h.data=l=!l}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}},function(t,e,r){var n=r(8);t.exports=function(t,e,r){for(var o in e)r&&t[o]?t[o]=e[o]:n(t,o,e[o]);return t}},function(t,e,r){"use strict";var n=r(1),o=r(0),i=r(4),u=r(7),s=r(2)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];u&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var n=r(3),o=r(0),i=r(1),u=r(52),s=r(55);n(n.P+n.R,"Promise",{finally:function(t){var e=u(this,o.Promise||i.Promise),r="function"==typeof t;return this.then(r?function(r){return s(e,t()).then(function(){return r})}:t,r?function(r){return s(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){"use strict";var n=r(3),o=r(34),i=r(54);n(n.S,"Promise",{try:function(t){var e=o.f(this),r=i(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){t.exports={default:r(90),__esModule:!0}},function(t,e,r){r(91),t.exports=r(0).Object.getPrototypeOf},function(t,e,r){var n=r(33),o=r(46);r(92)("getPrototypeOf",function(){return function(t){return o(n(t))}})},function(t,e,r){var n=r(3),o=r(0),i=r(12);t.exports=function(t,e){var r=(o.Object||{})[t]||Object[t],u={};u[t]=e(r),n(n.S+n.F*i(function(){r(1)}),"Object",u)}},function(t,e,r){t.exports={default:r(94),__esModule:!0}},function(t,e,r){r(95);var n=r(0).Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},function(t,e,r){var n=r(3);n(n.S+n.F*!r(7),"Object",{defineProperty:r(4).f})},function(t,e,r){"use strict";e.__esModule=!0;var n=r(59),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,r){t.exports={default:r(98),__esModule:!0}},function(t,e,r){r(22),r(47),t.exports=r(35).f("iterator")},function(t,e,r){t.exports={default:r(100),__esModule:!0}},function(t,e,r){r(101),r(40),r(106),r(107),t.exports=r(0).Symbol},function(t,e,r){"use strict";var n=r(1),o=r(9),i=r(7),u=r(3),s=r(43),a=r(102).KEY,f=r(12),c=r(31),l=r(19),h=r(18),p=r(2),v=r(35),d=r(36),y=r(103),g=r(104),m=r(5),_=r(6),w=r(11),b=r(26),E=r(13),S=r(27),x=r(105),P=r(62),T=r(4),R=r(28),O=P.f,A=T.f,L=x.f,M=n.Symbol,I=n.JSON,C=I&&I.stringify,U=p("_hidden"),j=p("toPrimitive"),N={}.propertyIsEnumerable,k=c("symbol-registry"),B=c("symbols"),F=c("op-symbols"),D=Object.prototype,Y="function"==typeof M,G=n.QObject,q=!G||!G.prototype||!G.prototype.findChild,W=i&&f(function(){return 7!=S(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=O(D,e);n&&delete D[e],A(t,e,r),n&&t!==D&&A(D,e,n)}:A,V=function(t){var e=B[t]=S(M.prototype);return e._k=t,e},K=Y&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},H=function(t,e,r){return t===D&&H(F,e,r),m(t),e=b(e,!0),m(r),o(B,e)?(r.enumerable?(o(t,U)&&t[U][e]&&(t[U][e]=!1),r=S(r,{enumerable:E(0,!1)})):(o(t,U)||A(t,U,E(1,{})),t[U][e]=!0),W(t,e,r)):A(t,e,r)},z=function(t,e){m(t);for(var r,n=y(e=w(e)),o=0,i=n.length;i>o;)H(t,r=n[o++],e[r]);return t},Q=function(t,e){return void 0===e?S(t):z(S(t),e)},X=function(t){var e=N.call(this,t=b(t,!0));return!(this===D&&o(B,t)&&!o(F,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,U)&&this[U][t])||e)},J=function(t,e){if(t=w(t),e=b(e,!0),t!==D||!o(B,e)||o(F,e)){var r=O(t,e);return!r||!o(B,e)||o(t,U)&&t[U][e]||(r.enumerable=!0),r}},Z=function(t){for(var e,r=L(w(t)),n=[],i=0;r.length>i;)o(B,e=r[i++])||e==U||e==a||n.push(e);return n},$=function(t){for(var e,r=t===D,n=L(r?F:w(t)),i=[],u=0;n.length>u;)!o(B,e=n[u++])||r&&!o(D,e)||i.push(B[e]);return i};Y||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(r){this===D&&e.call(F,r),o(this,U)&&o(this[U],t)&&(this[U][t]=!1),W(this,t,E(1,r))};return i&&q&&W(D,t,{configurable:!0,set:e}),V(t)},s(M.prototype,"toString",function(){return this._k}),P.f=J,T.f=H,r(61).f=x.f=Z,r(37).f=X,r(60).f=$,i&&!r(16)&&s(D,"propertyIsEnumerable",X,!0),v.f=function(t){return V(p(t))}),u(u.G+u.W+u.F*!Y,{Symbol:M});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)p(tt[et++]);for(var rt=R(p.store),nt=0;rt.length>nt;)d(rt[nt++]);u(u.S+u.F*!Y,"Symbol",{for:function(t){return o(k,t+="")?k[t]:k[t]=M(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in k)if(k[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),u(u.S+u.F*!Y,"Object",{create:Q,defineProperty:H,defineProperties:z,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),I&&u(u.S+u.F*(!Y||f(function(){var t=M();return"[null]"!=C([t])||"{}"!=C({a:t})||"{}"!=C(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(_(e)||void 0!==t)&&!K(t))return g(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!K(e))return e}),n[1]=e,C.apply(I,n)}}),M.prototype[j]||r(8)(M.prototype,j,M.prototype.valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},function(t,e,r){var n=r(18)("meta"),o=r(6),i=r(9),u=r(4).f,s=0,a=Object.isExtensible||function(){return!0},f=!r(12)(function(){return a(Object.preventExtensions({}))}),c=function(t){u(t,n,{value:{i:"O"+ ++s,w:{}}})},l=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,n)){if(!a(t))return"F";if(!e)return"E";c(t)}return t[n].i},h=function(t,e){if(!i(t,n)){if(!a(t))return!0;if(!e)return!1;c(t)}return t[n].w},p=function(t){return f&&v.NEED&&a(t)&&!i(t,n)&&c(t),t},v=t.exports={KEY:n,NEED:!1,fastKey:l,getWeak:h,onFreeze:p}},function(t,e,r){var n=r(28),o=r(60),i=r(37);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var u,s=r(t),a=i.f,f=0;s.length>f;)a.call(t,u=s[f++])&&e.push(u);return e}},function(t,e,r){var n=r(15);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(11),o=r(61).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?s(t):o(n(t))}},function(t,e,r){r(36)("asyncIterator")},function(t,e,r){r(36)("observable")},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=r(109),i=n(o),u=r(113),s=n(u),a=r(59),f=n(a);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,f.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,r){t.exports={default:r(110),__esModule:!0}},function(t,e,r){r(111),t.exports=r(0).Object.setPrototypeOf},function(t,e,r){var n=r(3);n(n.S,"Object",{setPrototypeOf:r(112).set})},function(t,e,r){var n=r(6),o=r(5),i=function(t,e){if(o(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{n=r(10)(Function.call,r(62).f(Object.prototype,"__proto__").set,2),n(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return i(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:i}},function(t,e,r){t.exports={default:r(114),__esModule:!0}},function(t,e,r){r(115);var n=r(0).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,r){var n=r(3);n(n.S,"Object",{create:r(27)})},function(t,e,r){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){this.name="TransportError",this.message=t,this.stack=(new Error).stack,this.id=e}function i(t){this.name="TransportStatusError",this.message="Invalid status "+t.toString(16),this.stack=(new Error).stack,this.statusCode=t}Object.defineProperty(e,"__esModule",{value:!0}),e.StatusCodes=void 0;var u=r(21),s=n(u),a=r(117),f=n(a),c=r(122),l=n(c),h=r(125),p=n(h),v=r(57),d=n(v),y=r(58),g=n(y);e.TransportError=o,e.TransportStatusError=i;var m=r(126),_=n(m),w=e.StatusCodes={IncorrectLength:26368,SecurityNotSatisfied:27010,InvalidData:27264,FileNotFound:27266,IncorrectParameter:27392,Success:36864};o.prototype=new Error,i.prototype=new Error;var b=function(){function e(){var r=this;(0,d.default)(this,e),this.debug=!1,this.exchangeTimeout=3e4,this._events=new _.default,this.send=function(){var e=(0,p.default)(l.default.mark(function e(n,u,s,a){var f,c,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.alloc(0),p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[w.Success];return l.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(h.length>=256)){e.next=2;break}throw new o("data.length exceed 256 bytes limit. Got: "+h.length,"DataLengthTooBig");case 2:return e.next=4,r.exchange(t.concat([t.from([n,u,s,a]),t.from([h.length]),h]));case 4:if(f=e.sent,c=f.readUInt16BE(f.length-2),p.some(function(t){return t===c})){e.next=8;break}throw new i(c);case 8:return e.abrupt("return",f);case 9:case"end":return e.stop()}},e,r)}));return function(t,r,n,o){return e.apply(this,arguments)}}()}return(0,g.default)(e,[{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"off",value:function(t,e){this._events.removeListener(t,e)}},{key:"emit",value:function(t){for(var e,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=this._events).emit.apply(e,[t].concat((0,f.default)(n)))}},{key:"setDebugMode",value:function(t){this.debug=t}},{key:"setExchangeTimeout",value:function(t){this.exchangeTimeout=t}}],[{key:"create",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;return arguments.length>1&&console.warn(this.name+".create: second parameter 'debugMode' has been dropped. instead, please use transport.setDebugMode(debug)"),new s.default(function(r,n){var i=!1,u=setTimeout(function(){s.unsubscribe(),n(new o("Transport openTimeout","OpenTimeout"))},e),s=t.listen({next:function(o){i=!0,s.unsubscribe(),clearTimeout(u),t.open(o.descriptor,e).then(r,n)},error:function(t){clearTimeout(u),n(t)},complete:function(){clearTimeout(u),i||n(new o("No device found","NoDeviceFound"))}})})}}]),e}();e.default=b}).call(e,r(20).Buffer)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(118),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return(0,o.default)(t)}},function(t,e,r){t.exports={default:r(119),__esModule:!0}},function(t,e,r){r(22),r(120),t.exports=r(0).Array.from},function(t,e,r){"use strict";var n=r(10),o=r(3),i=r(33),u=r(49),s=r(50),a=r(29),f=r(121),c=r(51);o(o.S+o.F*!r(56)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,o,l,h=i(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,y=void 0!==d,g=0,m=c(h);if(y&&(d=n(d,v>2?arguments[2]:void 0,2)),void 0==m||p==Array&&s(m))for(e=a(h.length),r=new p(e);e>g;g++)f(r,g,y?d(h[g],g):h[g]);else for(l=m.call(h),r=new p;!(o=l.next()).done;g++)f(r,g,y?u(l,d,[o.value,g],!0):o.value);return r.length=g,r}})},function(t,e,r){"use strict";var n=r(4),o=r(13);t.exports=function(t,e,r){e in t?n.f(t,e,o(0,r)):t[e]=r}},function(t,e,r){t.exports=r(123)},function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(124),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function r(t,e,r,n){var i=e&&e.prototype instanceof o?e:o,u=Object.create(i.prototype),s=new p(n||[]);return u._invoke=f(t,r,s),u}function n(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function o(){}function i(){}function u(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function a(t){function e(r,o,i,u){var s=n(t[r],t,o);if("throw"!==s.type){var a=s.arg,f=a.value;return f&&"object"==typeof f&&m.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,i,u)},function(t){e("throw",t,i,u)}):Promise.resolve(f).then(function(t){a.value=t,i(a)},u)}u(s.arg)}function r(t,r){function n(){return new Promise(function(n,o){e(t,r,n,o)})}return o=o?o.then(n,n):n()}var o;this._invoke=r}function f(t,e,r){var o=P;return function(i,u){if(o===R)throw new Error("Generator is already running");if(o===O){if("throw"===i)throw u;return d()}for(r.method=i,r.arg=u;;){var s=r.delegate;if(s){var a=c(s,r);if(a){if(a===A)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===P)throw o=O,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=R;var f=n(t,e,r);if("normal"===f.type){if(o=r.done?O:T,f.arg===A)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(o=O,r.method="throw",r.arg=f.arg)}}}function c(t,e){var r=t.iterator[e.method];if(r===y){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=y,c(t,e),"throw"===e.method))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var o=n(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,A;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=y),e.delegate=null,A):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function l(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function v(t){if(t){var e=t[w];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(m.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=y,e.done=!0,e};return n.next=n}}return{next:d}}function d(){return{value:y,done:!0}}var y,g=Object.prototype,m=g.hasOwnProperty,_="function"==typeof Symbol?Symbol:{},w=_.iterator||"@@iterator",b=_.asyncIterator||"@@asyncIterator",E=_.toStringTag||"@@toStringTag",S="object"==typeof t,x=e.regeneratorRuntime;if(x)return void(S&&(t.exports=x));x=e.regeneratorRuntime=S?t.exports:{},x.wrap=r;var P="suspendedStart",T="suspendedYield",R="executing",O="completed",A={},L={};L[w]=function(){return this};var M=Object.getPrototypeOf,I=M&&M(M(v([])));I&&I!==g&&m.call(I,w)&&(L=I);var C=u.prototype=o.prototype=Object.create(L);i.prototype=C.constructor=u,u.constructor=i,u[E]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},x.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,E in t||(t[E]="GeneratorFunction")),t.prototype=Object.create(C),t},x.awrap=function(t){return{__await:t}},s(a.prototype),a.prototype[b]=function(){return this},x.AsyncIterator=a,x.async=function(t,e,n,o){var i=new a(r(t,e,n,o));return x.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},s(C),C[E]="Generator",C[w]=function(){return this},C.toString=function(){return"[object Generator]"},x.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},x.values=v,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&m.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=y)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=y),!!n}if(this.done)throw t;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var u=m.call(o,"catchLoc"),s=m.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&m.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,A):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),A},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),A}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;h(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:v(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=y),A}}}(function(){return this}()||Function("return this")())},function(t,e,r){"use strict";e.__esModule=!0;var n=r(21),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,r){function n(i,u){try{var s=e[i](u),a=s.value}catch(t){return void r(t)}if(!s.done)return o.default.resolve(a).then(function(t){n("next",t)},function(t){n("throw",t)});t(a)}return n("next")})}}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function u(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(!o(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,o,s,a,f;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 c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(r=this._events[t],u(r))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:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),f=r.slice(),o=f.length,a=0;a<o;a++)f[a].apply(this,s);return!0},r.prototype.addListener=function(t,e){var o;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&&(o=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[t].length>o&&(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){function r(){this.removeListener(t,r),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,o,u,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],u=r.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(s=u;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){o=s;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(r=this._events[t],n(r))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)}}]); |