New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uport-lite

Package Overview
Dependencies
Maintainers
6
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uport-lite - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

74

dist/uport-lite.min.js

@@ -12,31 +12,31 @@ /*

enumerable:!0,get:p})};f.n=function(e){var h=e&&e.__esModule?function(){return e["default"]}:function(){return e};f.d(h,"a",h);return h};f.o=function(e,h){return Object.prototype.hasOwnProperty.call(e,h)};f.p="";return f(f.s=7)}([function(k,f,l){(function(e){k.exports=function(h){function f(m){if(0===m.length)return e.allocUnsafe(0);for(var f=[0],h=0;h<m.length;h++){var n=c[m[h]];if(void 0===n)return;for(var k=0;k<f.length;++k)n+=f[k]*l,f[k]=n&255,n>>=8;for(;0<n;)f.push(n&255),n>>=8}for(h=0;m[h]===
v&&h<m.length-1;++h)f.push(0);return e.from(f.reverse())}for(var c={},l=h.length,v=h.charAt(0),n=0;n<h.length;n++){var k=h.charAt(n);if(void 0!==c[k])throw new TypeError(k+" is ambiguous");c[k]=n}return{encode:function(c){if(0===c.length)return"";for(var e=[0],f=0;f<c.length;++f){for(var n=0,m=c[f];n<e.length;++n)m+=e[n]<<8,e[n]=m%l,m=m/l|0;for(;0<m;)e.push(m%l),m=m/l|0}f="";for(n=0;0===c[n]&&n<c.length-1;++n)f+=h[0];for(c=e.length-1;0<=c;--c)f+=h[e[c]];return f},decodeUnsafe:f,decode:function(c){if(c=
u&&h<m.length-1;++h)f.push(0);return e.from(f.reverse())}for(var c={},l=h.length,u=h.charAt(0),n=0;n<h.length;n++){var k=h.charAt(n);if(void 0!==c[k])throw new TypeError(k+" is ambiguous");c[k]=n}return{encode:function(c){if(0===c.length)return"";for(var e=[0],f=0;f<c.length;++f){for(var n=0,m=c[f];n<e.length;++n)m+=e[n]<<8,e[n]=m%l,m=m/l|0;for(;0<m;)e.push(m%l),m=m/l|0}f="";for(n=0;0===c[n]&&n<c.length-1;++n)f+=h[0];for(c=e.length-1;0<=c;--c)f+=h[e[c]];return f},decodeUnsafe:f,decode:function(c){if(c=
f(c))return c;throw Error("Non-base"+l+" character");}}}}).call(f,l(3).Buffer)},function(k,f){},function(k,f,l){function e(c){var e=c.length;if(0<e%4)throw Error("Invalid string. Length must be a multiple of 4");return"\x3d"===c[e-2]?2:"\x3d"===c[e-1]?1:0}function h(c,e,f){for(var m=[],h=e;h<f;h+=3)e=(c[h]<<16)+(c[h+1]<<8)+c[h+2],m.push(p[e>>18&63]+p[e>>12&63]+p[e>>6&63]+p[e&63]);return m.join("")}f.byteLength=function(c){return 3*c.length/4-e(c)};f.toByteArray=function(f){var h,k,m,l,p;h=f.length;
l=e(f);p=new q(3*h/4-l);k=0<l?h-4:h;var v=0;for(h=0;h<k;h+=4)m=c[f.charCodeAt(h)]<<18|c[f.charCodeAt(h+1)]<<12|c[f.charCodeAt(h+2)]<<6|c[f.charCodeAt(h+3)],p[v++]=m>>16&255,p[v++]=m>>8&255,p[v++]=m&255;2===l?(m=c[f.charCodeAt(h)]<<2|c[f.charCodeAt(h+1)]>>4,p[v++]=m&255):1===l&&(m=c[f.charCodeAt(h)]<<10|c[f.charCodeAt(h+1)]<<4|c[f.charCodeAt(h+2)]>>2,p[v++]=m>>8&255,p[v++]=m&255);return p};f.fromByteArray=function(c){for(var e=c.length,f=e%3,m="",l=[],k=0,q=e-f;k<q;k+=16383)l.push(h(c,k,k+16383>q?
l=e(f);p=new q(3*h/4-l);k=0<l?h-4:h;var u=0;for(h=0;h<k;h+=4)m=c[f.charCodeAt(h)]<<18|c[f.charCodeAt(h+1)]<<12|c[f.charCodeAt(h+2)]<<6|c[f.charCodeAt(h+3)],p[u++]=m>>16&255,p[u++]=m>>8&255,p[u++]=m&255;2===l?(m=c[f.charCodeAt(h)]<<2|c[f.charCodeAt(h+1)]>>4,p[u++]=m&255):1===l&&(m=c[f.charCodeAt(h)]<<10|c[f.charCodeAt(h+1)]<<4|c[f.charCodeAt(h+2)]>>2,p[u++]=m>>8&255,p[u++]=m&255);return p};f.fromByteArray=function(c){for(var e=c.length,f=e%3,m="",l=[],k=0,q=e-f;k<q;k+=16383)l.push(h(c,k,k+16383>q?
q:k+16383));1===f?(c=c[e-1],m+=p[c>>2],m+=p[c<<4&63],m+="\x3d\x3d"):2===f&&(c=(c[e-2]<<8)+c[e-1],m+=p[c>>10],m+=p[c>>4&63],m+=p[c<<2&63],m+="\x3d");l.push(m);return l.join("")};var p=[],c=[],q="undefined"!==typeof Uint8Array?Uint8Array:Array;for(k=0;64>k;++k)p[k]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[k],c["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(k)]=k;c[45]=62;c[95]=63},function(k,f,l){(function(e){function h(){try{var a=new Uint8Array(1);
a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===a.foo()&&"function"===typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(b){return!1}}function k(a,b){if((c.TYPED_ARRAY_SUPPORT?2147483647:1073741823)<b)throw new RangeError("Invalid typed array length");c.TYPED_ARRAY_SUPPORT?(a=new Uint8Array(b),a.__proto__=c.prototype):(null===a&&(a=new c(b)),a.length=b);return a}function c(a,b,d){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(a,b,d);if("number"===
typeof a){if("string"===typeof b)throw Error("If encoding is specified then the first argument must be a string");return n(this,a)}return q(this,a,b,d)}function q(a,b,d,g){if("number"===typeof b)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&b instanceof ArrayBuffer){b.byteLength;if(0>d||b.byteLength<d)throw new RangeError("'offset' is out of bounds");if(b.byteLength<d+(g||0))throw new RangeError("'length' is out of bounds");b=void 0===d&&void 0===
g?new Uint8Array(b):void 0===g?new Uint8Array(b,d):new Uint8Array(b,d,g);c.TYPED_ARRAY_SUPPORT?(a=b,a.__proto__=c.prototype):a=t(a,b);return a}if("string"===typeof b){g=a;a=d;if("string"!==typeof a||""===a)a="utf8";if(!c.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding');d=x(b,a)|0;g=k(g,d);b=g.write(b,a);b!==d&&(g=g.slice(0,b));return g}return m(a,b)}function v(a){if("number"!==typeof a)throw new TypeError('"size" argument must be a number');if(0>a)throw new RangeError('"size" argument must not be negative');
}function n(a,b){v(b);a=k(a,0>b?0:z(b)|0);if(!c.TYPED_ARRAY_SUPPORT)for(var d=0;d<b;++d)a[d]=0;return a}function t(a,b){var d=0>b.length?0:z(b.length)|0;a=k(a,d);for(var g=0;g<d;g+=1)a[g]=b[g]&255;return a}function m(a,b){if(c.isBuffer(b)){var d=z(b.length)|0;a=k(a,d);if(0===a.length)return a;b.copy(a,0,0,d);return a}if(b){if("undefined"!==typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer||"length"in b)return(d="number"!==typeof b.length)||(d=b.length,d=d!==d),d?k(a,0):t(a,b);if("Buffer"===b.type&&
K(b.data))return t(a,b.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}function z(a){if(a>=(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return a|0}function x(a,b){if(c.isBuffer(a))return a.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)||
a instanceof ArrayBuffer))return a.byteLength;"string"!==typeof a&&(a=""+a);var d=a.length;if(0===d)return 0;for(var g=!1;;)switch(b){case "ascii":case "latin1":case "binary":return d;case "utf8":case "utf-8":case void 0:return F(a).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*d;case "hex":return d>>>1;case "base64":return G.toByteArray(L(a)).length;default:if(g)return F(a).length;b=(""+b).toLowerCase();g=!0}}function A(a,b,d){var g=!1;if(void 0===b||0>b)b=0;if(b>this.length)return"";
if(void 0===d||d>this.length)d=this.length;if(0>=d)return"";d>>>=0;b>>>=0;if(d<=b)return"";for(a||(a="utf8");;)switch(a){case "hex":a=b;b=d;d=this.length;if(!a||0>a)a=0;if(!b||0>b||b>d)b=d;g="";for(d=a;d<b;++d)a=g,g=this[d],g=16>g?"0"+g.toString(16):g.toString(16),g=a+g;return g;case "utf8":case "utf-8":return B(this,b,d);case "ascii":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]&127);return a;case "latin1":case "binary":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]);
return a;case "base64":return b=0===b&&d===this.length?G.fromByteArray(this):G.fromByteArray(this.slice(b,d)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,d);d="";for(a=0;a<b.length;a+=2)d+=String.fromCharCode(b[a]+256*b[a+1]);return d;default:if(g)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();g=!0}}function w(a,b,d){var g=a[b];a[b]=a[d];a[d]=g}function D(a,b,d,g,y){if(0===a.length)return-1;"string"===typeof d?(g=d,d=0):2147483647<d?d=2147483647:-2147483648>
d&&(d=-2147483648);d=+d;isNaN(d)&&(d=y?0:a.length-1);0>d&&(d=a.length+d);if(d>=a.length){if(y)return-1;d=a.length-1}else if(0>d)if(y)d=0;else return-1;"string"===typeof b&&(b=c.from(b,g));if(c.isBuffer(b))return 0===b.length?-1:H(a,b,d,g,y);if("number"===typeof b)return b&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?y?Uint8Array.prototype.indexOf.call(a,b,d):Uint8Array.prototype.lastIndexOf.call(a,b,d):H(a,[b],d,g,y);throw new TypeError("val must be string, number or Buffer");
}function H(a,b,d,g,c){function y(a,b){return 1===e?a[b]:a.readUInt16BE(b*e)}var e=1,f=a.length,h=b.length;if(void 0!==g&&(g=String(g).toLowerCase(),"ucs2"===g||"ucs-2"===g||"utf16le"===g||"utf-16le"===g)){if(2>a.length||2>b.length)return-1;e=2;f/=2;h/=2;d/=2}if(c)for(g=-1;d<f;d++)if(y(a,d)===y(b,-1===g?0:d-g)){if(-1===g&&(g=d),d-g+1===h)return g*e}else-1!==g&&(d-=d-g),g=-1;else for(d+h>f&&(d=f-h);0<=d;d--){f=!0;for(g=0;g<h;g++)if(y(a,d+g)!==y(b,g)){f=!1;break}if(f)return d}return-1}function B(a,
g?new Uint8Array(b):void 0===g?new Uint8Array(b,d):new Uint8Array(b,d,g);c.TYPED_ARRAY_SUPPORT?(a=b,a.__proto__=c.prototype):a=t(a,b);return a}if("string"===typeof b){g=a;a=d;if("string"!==typeof a||""===a)a="utf8";if(!c.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding');d=w(b,a)|0;g=k(g,d);b=g.write(b,a);b!==d&&(g=g.slice(0,b));return g}return m(a,b)}function u(a){if("number"!==typeof a)throw new TypeError('"size" argument must be a number');if(0>a)throw new RangeError('"size" argument must not be negative');
}function n(a,b){u(b);a=k(a,0>b?0:z(b)|0);if(!c.TYPED_ARRAY_SUPPORT)for(var d=0;d<b;++d)a[d]=0;return a}function t(a,b){var d=0>b.length?0:z(b.length)|0;a=k(a,d);for(var g=0;g<d;g+=1)a[g]=b[g]&255;return a}function m(a,b){if(c.isBuffer(b)){var d=z(b.length)|0;a=k(a,d);if(0===a.length)return a;b.copy(a,0,0,d);return a}if(b){if("undefined"!==typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer||"length"in b)return(d="number"!==typeof b.length)||(d=b.length,d=d!==d),d?k(a,0):t(a,b);if("Buffer"===b.type&&
J(b.data))return t(a,b.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}function z(a){if(a>=(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return a|0}function w(a,b){if(c.isBuffer(a))return a.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)||
a instanceof ArrayBuffer))return a.byteLength;"string"!==typeof a&&(a=""+a);var d=a.length;if(0===d)return 0;for(var g=!1;;)switch(b){case "ascii":case "latin1":case "binary":return d;case "utf8":case "utf-8":case void 0:return E(a).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*d;case "hex":return d>>>1;case "base64":return F.toByteArray(K(a)).length;default:if(g)return E(a).length;b=(""+b).toLowerCase();g=!0}}function B(a,b,d){var g=!1;if(void 0===b||0>b)b=0;if(b>this.length)return"";
if(void 0===d||d>this.length)d=this.length;if(0>=d)return"";d>>>=0;b>>>=0;if(d<=b)return"";for(a||(a="utf8");;)switch(a){case "hex":a=b;b=d;d=this.length;if(!a||0>a)a=0;if(!b||0>b||b>d)b=d;g="";for(d=a;d<b;++d)a=g,g=this[d],g=16>g?"0"+g.toString(16):g.toString(16),g=a+g;return g;case "utf8":case "utf-8":return L(this,b,d);case "ascii":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]&127);return a;case "latin1":case "binary":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]);
return a;case "base64":return b=0===b&&d===this.length?F.fromByteArray(this):F.fromByteArray(this.slice(b,d)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,d);d="";for(a=0;a<b.length;a+=2)d+=String.fromCharCode(b[a]+256*b[a+1]);return d;default:if(g)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();g=!0}}function x(a,b,d){var g=a[b];a[b]=a[d];a[d]=g}function G(a,b,d,g,y){if(0===a.length)return-1;"string"===typeof d?(g=d,d=0):2147483647<d?d=2147483647:-2147483648>
d&&(d=-2147483648);d=+d;isNaN(d)&&(d=y?0:a.length-1);0>d&&(d=a.length+d);if(d>=a.length){if(y)return-1;d=a.length-1}else if(0>d)if(y)d=0;else return-1;"string"===typeof b&&(b=c.from(b,g));if(c.isBuffer(b))return 0===b.length?-1:A(a,b,d,g,y);if("number"===typeof b)return b&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?y?Uint8Array.prototype.indexOf.call(a,b,d):Uint8Array.prototype.lastIndexOf.call(a,b,d):A(a,[b],d,g,y);throw new TypeError("val must be string, number or Buffer");
}function A(a,b,d,g,c){function y(a,b){return 1===e?a[b]:a.readUInt16BE(b*e)}var e=1,f=a.length,h=b.length;if(void 0!==g&&(g=String(g).toLowerCase(),"ucs2"===g||"ucs-2"===g||"utf16le"===g||"utf-16le"===g)){if(2>a.length||2>b.length)return-1;e=2;f/=2;h/=2;d/=2}if(c)for(g=-1;d<f;d++)if(y(a,d)===y(b,-1===g?0:d-g)){if(-1===g&&(g=d),d-g+1===h)return g*e}else-1!==g&&(d-=d-g),g=-1;else for(d+h>f&&(d=f-h);0<=d;d--){f=!0;for(g=0;g<h;g++)if(y(a,d+g)!==y(b,g)){f=!1;break}if(f)return d}return-1}function L(a,
b,d){d=Math.min(a.length,d);for(var g=[];b<d;){var c=a[b],e=null,f=239<c?4:223<c?3:191<c?2:1;if(b+f<=d){var h,k,m;switch(f){case 1:128>c&&(e=c);break;case 2:h=a[b+1];128===(h&192)&&(c=(c&31)<<6|h&63,127<c&&(e=c));break;case 3:h=a[b+1];k=a[b+2];128===(h&192)&&128===(k&192)&&(c=(c&15)<<12|(h&63)<<6|k&63,2047<c&&(55296>c||57343<c)&&(e=c));break;case 4:h=a[b+1],k=a[b+2],m=a[b+3],128===(h&192)&&128===(k&192)&&128===(m&192)&&(c=(c&15)<<18|(h&63)<<12|(k&63)<<6|m&63,65535<c&&1114112>c&&(e=c))}}null===e?(e=
65533,f=1):65535<e&&(e-=65536,g.push(e>>>10&1023|55296),e=56320|e&1023);g.push(e);b+=f}a=g.length;if(a<=M)g=String.fromCharCode.apply(String,g);else{d="";for(b=0;b<a;)d+=String.fromCharCode.apply(String,g.slice(b,b+=M));g=d}return g}function r(a,b,d){if(0!==a%1||0>a)throw new RangeError("offset is not uint");if(a+b>d)throw new RangeError("Trying to access beyond buffer length");}function u(a,b,d,g,e,f){if(!c.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>e||b<
f)throw new RangeError('"value" argument is out of bounds');if(d+g>a.length)throw new RangeError("Index out of range");}function I(a,b,d,g){0>b&&(b=65535+b+1);for(var c=0,e=Math.min(a.length-d,2);c<e;++c)a[d+c]=(b&255<<8*(g?c:1-c))>>>8*(g?c:1-c)}function J(a,b,d,g){0>b&&(b=4294967295+b+1);for(var c=0,e=Math.min(a.length-d,4);c<e;++c)a[d+c]=b>>>8*(g?c:3-c)&255}function N(a,b,d,c,e,f){if(d+c>a.length)throw new RangeError("Index out of range");if(0>d)throw new RangeError("Index out of range");}function O(a,
b,d,c,e){e||N(a,b,d,4,3.4028234663852886e+38,-3.4028234663852886e+38);C.write(a,b,d,c,23,4);return d+4}function P(a,b,d,c,e){e||N(a,b,d,8,1.7976931348623157e+308,-1.7976931348623157e+308);C.write(a,b,d,c,52,8);return d+8}function L(a){a=a.trim?a.trim():a.replace(/^\s+|\s+$/g,"");a=a.replace(R,"");if(2>a.length)return"";for(;0!==a.length%4;)a+="\x3d";return a}function F(a,b){b=b||Infinity;for(var d,c=a.length,e=null,f=[],h=0;h<c;++h){d=a.charCodeAt(h);if(55295<d&&57344>d){if(!e){if(56319<d){-1<(b-=
65533,f=1):65535<e&&(e-=65536,g.push(e>>>10&1023|55296),e=56320|e&1023);g.push(e);b+=f}a=g.length;if(a<=M)g=String.fromCharCode.apply(String,g);else{d="";for(b=0;b<a;)d+=String.fromCharCode.apply(String,g.slice(b,b+=M));g=d}return g}function r(a,b,d){if(0!==a%1||0>a)throw new RangeError("offset is not uint");if(a+b>d)throw new RangeError("Trying to access beyond buffer length");}function v(a,b,d,g,e,f){if(!c.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>e||b<
f)throw new RangeError('"value" argument is out of bounds');if(d+g>a.length)throw new RangeError("Index out of range");}function H(a,b,d,g){0>b&&(b=65535+b+1);for(var c=0,e=Math.min(a.length-d,2);c<e;++c)a[d+c]=(b&255<<8*(g?c:1-c))>>>8*(g?c:1-c)}function I(a,b,d,g){0>b&&(b=4294967295+b+1);for(var c=0,e=Math.min(a.length-d,4);c<e;++c)a[d+c]=b>>>8*(g?c:3-c)&255}function N(a,b,d,c,e,f){if(d+c>a.length)throw new RangeError("Index out of range");if(0>d)throw new RangeError("Index out of range");}function O(a,
b,d,c,e){e||N(a,b,d,4,3.4028234663852886e+38,-3.4028234663852886e+38);C.write(a,b,d,c,23,4);return d+4}function P(a,b,d,c,e){e||N(a,b,d,8,1.7976931348623157e+308,-1.7976931348623157e+308);C.write(a,b,d,c,52,8);return d+8}function K(a){a=a.trim?a.trim():a.replace(/^\s+|\s+$/g,"");a=a.replace(R,"");if(2>a.length)return"";for(;0!==a.length%4;)a+="\x3d";return a}function E(a,b){b=b||Infinity;for(var d,c=a.length,e=null,f=[],h=0;h<c;++h){d=a.charCodeAt(h);if(55295<d&&57344>d){if(!e){if(56319<d){-1<(b-=
3)&&f.push(239,191,189);continue}else if(h+1===c){-1<(b-=3)&&f.push(239,191,189);continue}e=d;continue}if(56320>d){-1<(b-=3)&&f.push(239,191,189);e=d;continue}d=(e-55296<<10|d-56320)+65536}else e&&-1<(b-=3)&&f.push(239,191,189);e=null;if(128>d){if(0>--b)break;f.push(d)}else if(2048>d){if(0>(b-=2))break;f.push(d>>6|192,d&63|128)}else if(65536>d){if(0>(b-=3))break;f.push(d>>12|224,d>>6&63|128,d&63|128)}else if(1114112>d){if(0>(b-=4))break;f.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw Error("Invalid code point");
}return f}function Q(a){for(var b=[],d=0;d<a.length;++d)b.push(a.charCodeAt(d)&255);return b}function E(a,b,d,c){for(var g=0;g<c&&!(g+d>=b.length||g>=a.length);++g)b[g+d]=a[g];return g}var G=l(2),C=l(4),K=l(5);f.Buffer=c;f.SlowBuffer=function(a){+a!=a&&(a=0);return c.alloc(+a)};f.INSPECT_MAX_BYTES=50;c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:h();f.kMaxLength=c.TYPED_ARRAY_SUPPORT?2147483647:1073741823;c.poolSize=8192;c._augment=function(a){a.__proto__=c.prototype;
return a};c.from=function(a,b,d){return q(null,a,b,d)};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(a,b,d){v(a);a=0>=a?k(null,a):void 0!==b?"string"===typeof d?k(null,a).fill(b,d):k(null,a).fill(b):k(null,a);return a};c.allocUnsafe=function(a){return n(null,a)};c.allocUnsafeSlow=function(a){return n(null,
}return f}function Q(a){for(var b=[],d=0;d<a.length;++d)b.push(a.charCodeAt(d)&255);return b}function D(a,b,d,c){for(var g=0;g<c&&!(g+d>=b.length||g>=a.length);++g)b[g+d]=a[g];return g}var F=l(2),C=l(4),J=l(5);f.Buffer=c;f.SlowBuffer=function(a){+a!=a&&(a=0);return c.alloc(+a)};f.INSPECT_MAX_BYTES=50;c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:h();f.kMaxLength=c.TYPED_ARRAY_SUPPORT?2147483647:1073741823;c.poolSize=8192;c._augment=function(a){a.__proto__=c.prototype;
return a};c.from=function(a,b,d){return q(null,a,b,d)};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(a,b,d){u(a);a=0>=a?k(null,a):void 0!==b?"string"===typeof d?k(null,a).fill(b,d):k(null,a).fill(b):k(null,a);return a};c.allocUnsafe=function(a){return n(null,a)};c.allocUnsafeSlow=function(a){return n(null,
a)};c.isBuffer=function(a){return!(null==a||!a._isBuffer)};c.compare=function(a,b){if(!c.isBuffer(a)||!c.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var d=a.length,g=b.length,e=0,f=Math.min(d,g);e<f;++e)if(a[e]!==b[e]){d=a[e];g=b[e];break}return d<g?-1:g<d?1:0};c.isEncoding=function(a){switch(String(a).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(a,b){if(!K(a))throw new TypeError('"list" argument must be an Array of Buffers');if(0===a.length)return c.alloc(0);var d;if(void 0===b)for(d=b=0;d<a.length;++d)b+=a[d].length;b=c.allocUnsafe(b);var g=0;for(d=0;d<a.length;++d){var e=a[d];if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(b,g);g+=e.length}return b};c.byteLength=x;c.prototype._isBuffer=!0;c.prototype.swap16=function(){var a=this.length;if(0!==a%2)throw new RangeError("Buffer size must be a multiple of 16-bits");
for(var b=0;b<a;b+=2)w(this,b,b+1);return this};c.prototype.swap32=function(){var a=this.length;if(0!==a%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<a;b+=4)w(this,b,b+3),w(this,b+1,b+2);return this};c.prototype.swap64=function(){var a=this.length;if(0!==a%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<a;b+=8)w(this,b,b+7),w(this,b+1,b+6),w(this,b+2,b+5),w(this,b+3,b+4);return this};c.prototype.toString=function(){var a=this.length|
0;return 0===a?"":0===arguments.length?B(this,0,a):A.apply(this,arguments)};c.prototype.equals=function(a){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===c.compare(this,a)};c.prototype.inspect=function(){var a="",b=f.INSPECT_MAX_BYTES;0<this.length&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... "));return"\x3cBuffer "+a+"\x3e"};c.prototype.compare=function(a,b,d,g,e){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer");
default:return!1}};c.concat=function(a,b){if(!J(a))throw new TypeError('"list" argument must be an Array of Buffers');if(0===a.length)return c.alloc(0);var d;if(void 0===b)for(d=b=0;d<a.length;++d)b+=a[d].length;b=c.allocUnsafe(b);var g=0;for(d=0;d<a.length;++d){var e=a[d];if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(b,g);g+=e.length}return b};c.byteLength=w;c.prototype._isBuffer=!0;c.prototype.swap16=function(){var a=this.length;if(0!==a%2)throw new RangeError("Buffer size must be a multiple of 16-bits");
for(var b=0;b<a;b+=2)x(this,b,b+1);return this};c.prototype.swap32=function(){var a=this.length;if(0!==a%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<a;b+=4)x(this,b,b+3),x(this,b+1,b+2);return this};c.prototype.swap64=function(){var a=this.length;if(0!==a%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<a;b+=8)x(this,b,b+7),x(this,b+1,b+6),x(this,b+2,b+5),x(this,b+3,b+4);return this};c.prototype.toString=function(){var a=this.length|
0;return 0===a?"":0===arguments.length?L(this,0,a):B.apply(this,arguments)};c.prototype.equals=function(a){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===c.compare(this,a)};c.prototype.inspect=function(){var a="",b=f.INSPECT_MAX_BYTES;0<this.length&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... "));return"\x3cBuffer "+a+"\x3e"};c.prototype.compare=function(a,b,d,g,e){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer");
void 0===b&&(b=0);void 0===d&&(d=a?a.length:0);void 0===g&&(g=0);void 0===e&&(e=this.length);if(0>b||d>a.length||0>g||e>this.length)throw new RangeError("out of range index");if(g>=e&&b>=d)return 0;if(g>=e)return-1;if(b>=d)return 1;b>>>=0;d>>>=0;g>>>=0;e>>>=0;if(this===a)return 0;var f=e-g,h=d-b,k=Math.min(f,h);g=this.slice(g,e);a=a.slice(b,d);for(b=0;b<k;++b)if(g[b]!==a[b]){f=g[b];h=a[b];break}return f<h?-1:h<f?1:0};c.prototype.includes=function(a,b,d){return-1!==this.indexOf(a,b,d)};c.prototype.indexOf=
function(a,b,d){return D(this,a,b,d,!0)};c.prototype.lastIndexOf=function(a,b,d){return D(this,a,b,d,!1)};c.prototype.write=function(a,b,d,c){if(void 0===b)c="utf8",d=this.length,b=0;else if(void 0===d&&"string"===typeof b)c=b,d=this.length,b=0;else if(isFinite(b))b|=0,isFinite(d)?(d|=0,void 0===c&&(c="utf8")):(c=d,d=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var g=this.length-b;if(void 0===d||d>g)d=g;if(0<a.length&&(0>d||0>b)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");
c||(c="utf8");for(g=!1;;)switch(c){case "hex":a:{b=Number(b)||0;c=this.length-b;d?(d=Number(d),d>c&&(d=c)):d=c;c=a.length;if(0!==c%2)throw new TypeError("Invalid hex string");d>c/2&&(d=c/2);for(c=0;c<d;++c){g=parseInt(a.substr(2*c,2),16);if(isNaN(g)){a=c;break a}this[b+c]=g}a=c}return a;case "utf8":case "utf-8":return E(F(a,this.length-b),this,b,d);case "ascii":return E(Q(a),this,b,d);case "latin1":case "binary":return E(Q(a),this,b,d);case "base64":return E(G.toByteArray(L(a)),this,b,d);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":var e;
c=a;for(var g=this.length-b,f=[],h=0;h<c.length&&!(0>(g-=2));++h)e=c.charCodeAt(h),a=e>>8,e%=256,f.push(e),f.push(a);return E(f,this,b,d);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase();g=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;c.prototype.slice=function(a,b){var d=this.length;a=~~a;b=void 0===b?d:~~b;0>a?(a+=d,0>a&&(a=0)):a>d&&(a=d);0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d);b<a&&(b=a);if(c.TYPED_ARRAY_SUPPORT)b=
function(a,b,d){return G(this,a,b,d,!0)};c.prototype.lastIndexOf=function(a,b,d){return G(this,a,b,d,!1)};c.prototype.write=function(a,b,d,c){if(void 0===b)c="utf8",d=this.length,b=0;else if(void 0===d&&"string"===typeof b)c=b,d=this.length,b=0;else if(isFinite(b))b|=0,isFinite(d)?(d|=0,void 0===c&&(c="utf8")):(c=d,d=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var g=this.length-b;if(void 0===d||d>g)d=g;if(0<a.length&&(0>d||0>b)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");
c||(c="utf8");for(g=!1;;)switch(c){case "hex":a:{b=Number(b)||0;c=this.length-b;d?(d=Number(d),d>c&&(d=c)):d=c;c=a.length;if(0!==c%2)throw new TypeError("Invalid hex string");d>c/2&&(d=c/2);for(c=0;c<d;++c){g=parseInt(a.substr(2*c,2),16);if(isNaN(g)){a=c;break a}this[b+c]=g}a=c}return a;case "utf8":case "utf-8":return D(E(a,this.length-b),this,b,d);case "ascii":return D(Q(a),this,b,d);case "latin1":case "binary":return D(Q(a),this,b,d);case "base64":return D(F.toByteArray(K(a)),this,b,d);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":var e;
c=a;for(var g=this.length-b,f=[],h=0;h<c.length&&!(0>(g-=2));++h)e=c.charCodeAt(h),a=e>>8,e%=256,f.push(e),f.push(a);return D(f,this,b,d);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase();g=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;c.prototype.slice=function(a,b){var d=this.length;a=~~a;b=void 0===b?d:~~b;0>a?(a+=d,0>a&&(a=0)):a>d&&(a=d);0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d);b<a&&(b=a);if(c.TYPED_ARRAY_SUPPORT)b=
this.subarray(a,b),b.__proto__=c.prototype;else{d=b-a;b=new c(d,void 0);for(var g=0;g<d;++g)b[g]=this[g+a]}return b};c.prototype.readUIntLE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a];for(var c=1,e=0;++e<b&&(c*=256);)d+=this[a+e]*c;return d};c.prototype.readUIntBE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a+--b];for(var c=1;0<b&&(c*=256);)d+=this[a+--b]*c;return d};c.prototype.readUInt8=function(a,b){b||r(a,1,this.length);return this[a]};c.prototype.readUInt16LE=function(a,

@@ -46,19 +46,19 @@ b){b||r(a,2,this.length);return this[a]|this[a+1]<<8};c.prototype.readUInt16BE=function(a,b){b||r(a,2,this.length);return this[a]<<8|this[a+1]};c.prototype.readUInt32LE=function(a,b){b||r(a,4,this.length);return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]};c.prototype.readUInt32BE=function(a,b){b||r(a,4,this.length);return 16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])};c.prototype.readIntLE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a];for(var c=1,e=0;++e<b&&(c*=256);)d+=

a=this[a+1]|this[a]<<8;return a&32768?a|4294901760:a};c.prototype.readInt32LE=function(a,b){b||r(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};c.prototype.readInt32BE=function(a,b){b||r(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};c.prototype.readFloatLE=function(a,b){b||r(a,4,this.length);return C.read(this,a,!0,23,4)};c.prototype.readFloatBE=function(a,b){b||r(a,4,this.length);return C.read(this,a,!1,23,4)};c.prototype.readDoubleLE=function(a,
b){b||r(a,8,this.length);return C.read(this,a,!0,52,8)};c.prototype.readDoubleBE=function(a,b){b||r(a,8,this.length);return C.read(this,a,!1,52,8)};c.prototype.writeUIntLE=function(a,b,d,c){a=+a;b|=0;d|=0;c||u(this,a,b,d,Math.pow(2,8*d)-1,0);c=1;var g=0;for(this[b]=a&255;++g<d&&(c*=256);)this[b+g]=a/c&255;return b+d};c.prototype.writeUIntBE=function(a,b,d,c){a=+a;b|=0;d|=0;c||u(this,a,b,d,Math.pow(2,8*d)-1,0);c=d-1;var g=1;for(this[b+c]=a&255;0<=--c&&(g*=256);)this[b+c]=a/g&255;return b+d};c.prototype.writeUInt8=
function(a,b,d){a=+a;b|=0;d||u(this,a,b,1,255,0);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a&255;return b+1};c.prototype.writeUInt16LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8):I(this,a,b,!0);return b+2};c.prototype.writeUInt16BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):I(this,a,b,!1);return b+2};c.prototype.writeUInt32LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,4294967295,
0);c.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a&255):J(this,a,b,!0);return b+4};c.prototype.writeUInt32BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,4294967295,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):J(this,a,b,!1);return b+4};c.prototype.writeIntLE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),u(this,a,b,d,c-1,-c));c=0;var g=1,e=0;for(this[b]=a&255;++c<d&&(g*=256);)0>a&&0===e&&0!==this[b+c-1]&&(e=1),this[b+
c]=(a/g>>0)-e&255;return b+d};c.prototype.writeIntBE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),u(this,a,b,d,c-1,-c));c=d-1;var e=1,g=0;for(this[b+c]=a&255;0<=--c&&(e*=256);)0>a&&0===g&&0!==this[b+c+1]&&(g=1),this[b+c]=(a/e>>0)-g&255;return b+d};c.prototype.writeInt8=function(a,b,d){a=+a;b|=0;d||u(this,a,b,1,127,-128);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a&255;return b+1};c.prototype.writeInt16LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT?
(this[b]=a&255,this[b+1]=a>>>8):I(this,a,b,!0);return b+2};c.prototype.writeInt16BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):I(this,a,b,!1);return b+2};c.prototype.writeInt32LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,2147483647,-2147483648);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):J(this,a,b,!0);return b+4};c.prototype.writeInt32BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,2147483647,
-2147483648);0>a&&(a=4294967295+a+1);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):J(this,a,b,!1);return b+4};c.prototype.writeFloatLE=function(a,b,d){return O(this,a,b,!0,d)};c.prototype.writeFloatBE=function(a,b,d){return O(this,a,b,!1,d)};c.prototype.writeDoubleLE=function(a,b,d){return P(this,a,b,!0,d)};c.prototype.writeDoubleBE=function(a,b,d){return P(this,a,b,!1,d)};c.prototype.copy=function(a,b,d,e){d||(d=0);e||0===e||(e=this.length);b>=a.length&&
b){b||r(a,8,this.length);return C.read(this,a,!0,52,8)};c.prototype.readDoubleBE=function(a,b){b||r(a,8,this.length);return C.read(this,a,!1,52,8)};c.prototype.writeUIntLE=function(a,b,d,c){a=+a;b|=0;d|=0;c||v(this,a,b,d,Math.pow(2,8*d)-1,0);c=1;var g=0;for(this[b]=a&255;++g<d&&(c*=256);)this[b+g]=a/c&255;return b+d};c.prototype.writeUIntBE=function(a,b,d,c){a=+a;b|=0;d|=0;c||v(this,a,b,d,Math.pow(2,8*d)-1,0);c=d-1;var g=1;for(this[b+c]=a&255;0<=--c&&(g*=256);)this[b+c]=a/g&255;return b+d};c.prototype.writeUInt8=
function(a,b,d){a=+a;b|=0;d||v(this,a,b,1,255,0);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a&255;return b+1};c.prototype.writeUInt16LE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8):H(this,a,b,!0);return b+2};c.prototype.writeUInt16BE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):H(this,a,b,!1);return b+2};c.prototype.writeUInt32LE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,4,4294967295,
0);c.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a&255):I(this,a,b,!0);return b+4};c.prototype.writeUInt32BE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,4,4294967295,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):I(this,a,b,!1);return b+4};c.prototype.writeIntLE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),v(this,a,b,d,c-1,-c));c=0;var g=1,e=0;for(this[b]=a&255;++c<d&&(g*=256);)0>a&&0===e&&0!==this[b+c-1]&&(e=1),this[b+
c]=(a/g>>0)-e&255;return b+d};c.prototype.writeIntBE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),v(this,a,b,d,c-1,-c));c=d-1;var e=1,g=0;for(this[b+c]=a&255;0<=--c&&(e*=256);)0>a&&0===g&&0!==this[b+c+1]&&(g=1),this[b+c]=(a/e>>0)-g&255;return b+d};c.prototype.writeInt8=function(a,b,d){a=+a;b|=0;d||v(this,a,b,1,127,-128);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a&255;return b+1};c.prototype.writeInt16LE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT?
(this[b]=a&255,this[b+1]=a>>>8):H(this,a,b,!0);return b+2};c.prototype.writeInt16BE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):H(this,a,b,!1);return b+2};c.prototype.writeInt32LE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,4,2147483647,-2147483648);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):I(this,a,b,!0);return b+4};c.prototype.writeInt32BE=function(a,b,d){a=+a;b|=0;d||v(this,a,b,4,2147483647,
-2147483648);0>a&&(a=4294967295+a+1);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):I(this,a,b,!1);return b+4};c.prototype.writeFloatLE=function(a,b,d){return O(this,a,b,!0,d)};c.prototype.writeFloatBE=function(a,b,d){return O(this,a,b,!1,d)};c.prototype.writeDoubleLE=function(a,b,d){return P(this,a,b,!0,d)};c.prototype.writeDoubleBE=function(a,b,d){return P(this,a,b,!1,d)};c.prototype.copy=function(a,b,d,e){d||(d=0);e||0===e||(e=this.length);b>=a.length&&
(b=a.length);b||(b=0);0<e&&e<d&&(e=d);if(e===d||0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length);a.length-b<e-d&&(e=a.length-b+d);var g=e-d;if(this===a&&d<b&&b<e)for(e=g-1;0<=e;--e)a[e+b]=this[e+d];else if(1E3>g||!c.TYPED_ARRAY_SUPPORT)for(e=0;e<g;++e)a[e+b]=this[e+d];else Uint8Array.prototype.set.call(a,
this.subarray(d,d+g),b);return g};c.prototype.fill=function(a,b,d,e){if("string"===typeof a){"string"===typeof b?(e=b,b=0,d=this.length):"string"===typeof d&&(e=d,d=this.length);if(1===a.length){var g=a.charCodeAt(0);256>g&&(a=g)}if(void 0!==e&&"string"!==typeof e)throw new TypeError("encoding must be a string");if("string"===typeof e&&!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);}else"number"===typeof a&&(a&=255);if(0>b||this.length<b||this.length<d)throw new RangeError("Out of range index");
if(d<=b)return this;b>>>=0;d=void 0===d?this.length:d>>>0;a||(a=0);if("number"===typeof a)for(e=b;e<d;++e)this[e]=a;else for(a=c.isBuffer(a)?a:F((new c(a,e)).toString()),g=a.length,e=0;e<d-b;++e)this[e+b]=a[e%g];return this};var R=/[^+\/0-9A-Za-z-_]/g}).call(f,l(6))},function(k,f){f.read=function(f,e,h,k,c){var l;l=8*c-k-1;var p=(1<<l)-1,n=p>>1,t=-7;c=h?c-1:0;var m=h?-1:1,z=f[e+c];c+=m;h=z&(1<<-t)-1;z>>=-t;for(t+=l;0<t;h=256*h+f[e+c],c+=m,t-=8);l=h&(1<<-t)-1;h>>=-t;for(t+=k;0<t;l=256*l+f[e+c],c+=
m,t-=8);if(0===h)h=1-n;else{if(h===p)return l?NaN:Infinity*(z?-1:1);l+=Math.pow(2,k);h-=n}return(z?-1:1)*l*Math.pow(2,h-k)};f.write=function(f,e,h,k,c,q){var l,n=8*q-c-1,t=(1<<n)-1,m=t>>1,p=23===c?Math.pow(2,-24)-Math.pow(2,-77):0;q=k?0:q-1;var x=k?1:-1,A=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,k=t):(k=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-k))&&(k--,l*=2),e=1<=k+m?e+p/l:e+p*Math.pow(2,1-m),2<=e*l&&(k++,l/=2),k+m>=t?(e=0,k=t):1<=k+m?(e=(e*l-1)*Math.pow(2,
c),k+=m):(e=e*Math.pow(2,m-1)*Math.pow(2,c),k=0));for(;8<=c;f[h+q]=e&255,q+=x,e/=256,c-=8);k=k<<c|e;for(n+=c;0<n;f[h+q]=k&255,q+=x,k/=256,n-=8);f[h+q-x]|=128*A}},function(k,f){var l={}.toString;k.exports=Array.isArray||function(e){return"[object Array]"==l.call(e)}},function(k,f){f=function(){return this}();try{f=f||Function("return this")()||(0,eval)("this")}catch(l){"object"===typeof window&&(f=window)}k.exports=f},function(k,f,l){function e(c,e){var f=new q,h=c||{};f.onreadystatechange=function(){if(4===
f.readyState&&1!==f.timeout)if(200!==f.status)e(Error("[uport-lite] status "+f.status+": "+f.responseText));else try{e(null,JSON.parse(f.responseText))}catch(x){e(Error("[uport-lite] while parsing data: '"+String(f.responseText)+"', error: "+String(x)))}};h.data?f.open("POST",c.uri):f.open("GET",c.uri);h.accept&&f.setRequestHeader("accept",h.accept);h.data?(f.setRequestHeader("Content-Type","application/json"),f.send(JSON.stringify(h.data))):f.send()}function h(e){var f=p.decode(e),h=f.length-24;
e=f.slice(1,h);f=f.slice(h,20+h);return{network:"0x"+c.encode(e),address:"0x"+c.encode(f)}}var p=l(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),c=l(0)("0123456789abcdef"),q="undefined"!==typeof window?window.XMLHttpRequest:l(1).XMLHttpRequest,v={"0x1":{registry:"0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6",rpcUrl:"https://mainnet.infura.io/v3"},"0x3":{registry:"0x41566e3a081f5032bdcad470adb797635ddfe1f0",rpcUrl:"https://ropsten.infura.io/v3"},"0x2a":{registry:"0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758",
rpcUrl:"https://kovan.infura.io/v3"},"0x4":{registry:"0x2cc31912b2b0f3075a87b3640923d45a26cef3ee",rpcUrl:"https://rinkeby.infura.io/v3"}};k.exports=function(){function f(c,e){return c.split("").map(function(c){return("0"+c.charCodeAt(0).toString(16)).slice(-2)}).join(e||"")}function k(c,e,f){return"undefined"===typeof e?c:f?(c+e).slice(-c.length):(e+c).substring(0,c.length)}function l(c,e,h,l){c+=k("0000000000000000000000000000000000000000000000000000000000000000",f(e));c+=k("0000000000000000000000000000000000000000000000000000000000000000",
h.slice(2),!0);return c+=k("0000000000000000000000000000000000000000000000000000000000000000",l.slice(2),!0)}function q(f,h){var k="https://ropsten.infura.io/v3/"+D;return f?e({uri:k,accept:"application/json",data:{method:"eth_call",params:[{to:"0xb9C1598e24650437a3055F7f66AC1820c419a679",data:"0x446d5aa4000000000000000000000000"+f.slice(2)},"latest"],id:1,jsonrpc:"2.0"}},function(e,f){if(e)return h(e);if(f.error)return h(f.error);e=f.result.slice(130).slice(0,68);return h(null,p.encode(c.decode(e)))}):
h(null)}function x(f,k,m,n){k=h(k);var r=h(m);if(k.network!==r.network)n(Error("Issuer and subject must be on the same network"));else{if(B[k.network]){m=B[k.network].rpcUrl;var u=B[k.network].registry;f=l("0x447885f0",f,k.address,r.address);return e({uri:m+"/"+D,accept:"application/json",data:{method:"eth_call",params:[{to:u,data:f},"latest"],id:1,jsonrpc:"2.0"}},function(e,f){return e?n(e):f.error?n(f.error):0==f.result?n(e):n(null,p.encode(c.decode("1220"+f.result.slice(2))))})}n(Error("Network id "+
k.network+" is not configured"))}}function A(c,f){return c&&"0x"!==c?e({uri:""+H+c},f):f()}var w=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},D=w.infuraKey||"e72b472993ff46d3b5b88faa47214d7f",H=w.ipfsGw||"https://ipfs.infura.io/ipfs/",B=w.networks?Object.assign({},v,w.networks):v;return function(c,e,f){var h=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"uPortProfileIPFS1220";if(!c)return e(null);var k=f||c;return c.match(/0x[0-9a-fA-F]{40}/)?q(c,function(c,f){if(c)return e(c);
A(f,e)}):x(h,c,k,function(c,f){if(c)return e(c);A(f,e)})}}}])});
if(d<=b)return this;b>>>=0;d=void 0===d?this.length:d>>>0;a||(a=0);if("number"===typeof a)for(e=b;e<d;++e)this[e]=a;else for(a=c.isBuffer(a)?a:E((new c(a,e)).toString()),g=a.length,e=0;e<d-b;++e)this[e+b]=a[e%g];return this};var R=/[^+\/0-9A-Za-z-_]/g}).call(f,l(6))},function(k,f){f.read=function(f,e,h,k,c){var l;l=8*c-k-1;var p=(1<<l)-1,n=p>>1,t=-7;c=h?c-1:0;var m=h?-1:1,z=f[e+c];c+=m;h=z&(1<<-t)-1;z>>=-t;for(t+=l;0<t;h=256*h+f[e+c],c+=m,t-=8);l=h&(1<<-t)-1;h>>=-t;for(t+=k;0<t;l=256*l+f[e+c],c+=
m,t-=8);if(0===h)h=1-n;else{if(h===p)return l?NaN:Infinity*(z?-1:1);l+=Math.pow(2,k);h-=n}return(z?-1:1)*l*Math.pow(2,h-k)};f.write=function(f,e,h,k,c,q){var l,n=8*q-c-1,t=(1<<n)-1,m=t>>1,p=23===c?Math.pow(2,-24)-Math.pow(2,-77):0;q=k?0:q-1;var w=k?1:-1,B=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,k=t):(k=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-k))&&(k--,l*=2),e=1<=k+m?e+p/l:e+p*Math.pow(2,1-m),2<=e*l&&(k++,l/=2),k+m>=t?(e=0,k=t):1<=k+m?(e=(e*l-1)*Math.pow(2,
c),k+=m):(e=e*Math.pow(2,m-1)*Math.pow(2,c),k=0));for(;8<=c;f[h+q]=e&255,q+=w,e/=256,c-=8);k=k<<c|e;for(n+=c;0<n;f[h+q]=k&255,q+=w,k/=256,n-=8);f[h+q-w]|=128*B}},function(k,f){var l={}.toString;k.exports=Array.isArray||function(e){return"[object Array]"==l.call(e)}},function(k,f){f=function(){return this}();try{f=f||Function("return this")()||(0,eval)("this")}catch(l){"object"===typeof window&&(f=window)}k.exports=f},function(k,f,l){function e(c,e){var f=new q,h=c||{};f.onreadystatechange=function(){if(4===
f.readyState&&1!==f.timeout)if(200!==f.status)e(Error("[uport-lite] status "+f.status+": "+f.responseText));else try{e(null,JSON.parse(f.responseText))}catch(w){e(Error("[uport-lite] while parsing data: '"+String(f.responseText)+"', error: "+String(w)))}};h.data?f.open("POST",c.uri):f.open("GET",c.uri);h.accept&&f.setRequestHeader("accept",h.accept);h.data?(f.setRequestHeader("Content-Type","application/json"),f.send(JSON.stringify(h.data))):f.send()}function h(e){var f=p.decode(e),h=f.length-24;
e=f.slice(1,h);f=f.slice(h,20+h);return{network:"0x"+c.encode(e),address:"0x"+c.encode(f)}}var p=l(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),c=l(0)("0123456789abcdef"),q="undefined"!==typeof window?window.XMLHttpRequest:l(1).XMLHttpRequest,u={"0x1":{registry:"0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6",rpcUrl:"https://mainnet.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f"},"0x3":{registry:"0x41566e3a081f5032bdcad470adb797635ddfe1f0",rpcUrl:"https://ropsten.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f"},
"0x2a":{registry:"0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758",rpcUrl:"https://kovan.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f"},"0x4":{registry:"0x2cc31912b2b0f3075a87b3640923d45a26cef3ee",rpcUrl:"https://rinkeby.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f"}};k.exports=function(){function f(c,e){return c.split("").map(function(c){return("0"+c.charCodeAt(0).toString(16)).slice(-2)}).join(e||"")}function k(c,e,f){return"undefined"===typeof e?c:f?(c+e).slice(-c.length):(e+c).substring(0,c.length)}
function l(c,e,h,l){c+=k("0000000000000000000000000000000000000000000000000000000000000000",f(e));c+=k("0000000000000000000000000000000000000000000000000000000000000000",h.slice(2),!0);return c+=k("0000000000000000000000000000000000000000000000000000000000000000",l.slice(2),!0)}function q(f,h){var k=A["0x3"].rpcUrl;return f?e({uri:k,accept:"application/json",data:{method:"eth_call",params:[{to:"0xb9C1598e24650437a3055F7f66AC1820c419a679",data:"0x446d5aa4000000000000000000000000"+f.slice(2)},"latest"],
id:1,jsonrpc:"2.0"}},function(e,f){if(e)return h(e);if(f.error)return h(f.error);e=f.result.slice(130).slice(0,68);return h(null,p.encode(c.decode(e)))}):h(null)}function w(f,k,m,n){k=h(k);var r=h(m);if(k.network!==r.network)n(Error("Issuer and subject must be on the same network"));else{if(A[k.network]){m=A[k.network].rpcUrl;var q=A[k.network].registry;f=l("0x447885f0",f,k.address,r.address);return e({uri:""+m,accept:"application/json",data:{method:"eth_call",params:[{to:q,data:f},"latest"],id:1,
jsonrpc:"2.0"}},function(e,f){return e?n(e):f.error?n(f.error):0==f.result?n(e):n(null,p.encode(c.decode("1220"+f.result.slice(2))))})}n(Error("Network id "+k.network+" is not configured"))}}function B(c,f){return c&&"0x"!==c?e({uri:""+G+c},f):f()}var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},G=x.ipfsGw||"https://ipfs.infura.io/ipfs/",A=x.networks?Object.assign({},u,x.networks):u;return function(c,e,f){var h=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"uPortProfileIPFS1220";
if(!c)return e(null);var k=f||c;return c.match(/0x[0-9a-fA-F]{40}/)?q(c,function(c,f){if(c)return e(c);B(f,e)}):w(h,c,k,function(c,f){if(c)return e(c);B(f,e)})}}}])});

@@ -68,15 +68,15 @@ 'use strict';

registry: '0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6',
rpcUrl: 'https://mainnet.infura.io/v3'
rpcUrl: 'https://mainnet.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x3': {
registry: '0x41566e3a081f5032bdcad470adb797635ddfe1f0',
rpcUrl: 'https://ropsten.infura.io/v3'
rpcUrl: 'https://ropsten.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x2a': {
registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',
rpcUrl: 'https://kovan.infura.io/v3'
rpcUrl: 'https://kovan.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x4': {
registry: '0x2cc31912b2b0f3075a87b3640923d45a26cef3ee',
rpcUrl: 'https://rinkeby.infura.io/v3'
rpcUrl: 'https://rinkeby.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
}

@@ -92,3 +92,2 @@ };

var infuraKey = opts.infuraKey || 'e72b472993ff46d3b5b88faa47214d7f';
var ipfsGw = opts.ipfsGw || 'https://ipfs.infura.io/ipfs/';

@@ -124,6 +123,6 @@ var networks = opts.networks ? Object.assign({}, defaultNetworks, opts.networks) : defaultNetworks;

function callLegacyRegistry(address, callback) {
var rpcUrl = 'https://ropsten.infura.io/v3/' + infuraKey;
var ropstenRpcUrl = networks['0x3'].rpcUrl;
if (!address) return callback(null);
return http({
uri: rpcUrl,
uri: ropstenRpcUrl,
accept: 'application/json',

@@ -159,3 +158,3 @@ data: {

return http({
uri: rpcUrl + '/' + infuraKey,
uri: '' + rpcUrl,
accept: 'application/json',

@@ -162,0 +161,0 @@ data: {

{
"name": "uport-lite",
"version": "1.0.4",
"version": "1.0.5",
"description": "Lightweight library for looking up public profiles on uport-registry",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -66,15 +66,15 @@ var BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

registry: '0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6',
rpcUrl: 'https://mainnet.infura.io/v3'
rpcUrl: 'https://mainnet.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x3': {
registry: '0x41566e3a081f5032bdcad470adb797635ddfe1f0',
rpcUrl: 'https://ropsten.infura.io/v3'
rpcUrl: 'https://ropsten.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x2a': {
registry: '0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758',
rpcUrl: 'https://kovan.infura.io/v3'
rpcUrl: 'https://kovan.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
},
'0x4': {
registry: '0x2cc31912b2b0f3075a87b3640923d45a26cef3ee',
rpcUrl: 'https://rinkeby.infura.io/v3'
rpcUrl: 'https://rinkeby.infura.io/v3/e72b472993ff46d3b5b88faa47214d7f'
}

@@ -88,3 +88,2 @@ }

function UportLite (opts = {}) {
const infuraKey = opts.infuraKey || 'e72b472993ff46d3b5b88faa47214d7f'
const ipfsGw = opts.ipfsGw || 'https://ipfs.infura.io/ipfs/'

@@ -120,6 +119,6 @@ const networks = opts.networks ? Object.assign({}, defaultNetworks, opts.networks) : defaultNetworks

function callLegacyRegistry (address, callback) {
const rpcUrl = `https://ropsten.infura.io/v3/${infuraKey}`
const ropstenRpcUrl = networks['0x3'].rpcUrl
if (!address) return callback(null)
return http({
uri: rpcUrl,
uri: ropstenRpcUrl,
accept: 'application/json',

@@ -158,3 +157,3 @@ data: {

return http({
uri: `${rpcUrl}/${infuraKey}`,
uri: `${rpcUrl}`,
accept: 'application/json',

@@ -161,0 +160,0 @@ data: {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc