From bcd0786d6a500618d641acf4d208a88952a22efe Mon Sep 17 00:00:00 2001 From: Xuejie Xiao Date: Wed, 10 Jan 2024 04:52:36 +0000 Subject: [PATCH] feat: Allow manually specifying a different fetch function Reference: https://github.com/node-fetch/node-fetch/issues/1735 --- dist/ckb-js-toolkit.esm.js | 2 +- dist/ckb-js-toolkit.node.js | 2 +- dist/ckb-js-toolkit.node.js.map | 2 +- dist/ckb-js-toolkit.umd.js | 2 +- package-lock.json | 2540 ++++++++++++++++++++----------- src/rpc.js | 9 +- 6 files changed, 1633 insertions(+), 924 deletions(-) diff --git a/dist/ckb-js-toolkit.esm.js b/dist/ckb-js-toolkit.esm.js index 0c0e94f..c85d177 100644 --- a/dist/ckb-js-toolkit.esm.js +++ b/dist/ckb-js-toolkit.esm.js @@ -1 +1 @@ -class t{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class e{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");n.setUint8(t,r)}return new t(r)}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var o=i((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r,n=0;nl.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return(n=h(this,o(l).call(this,t))).sign=r,n}return i(l,r),n(l,[{key:"toDebugString",value:function(){var t=["BigInt["],e=!0,r=!1,n=void 0;try{for(var i,o,a=this[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)o=i.value,t.push((o?(o>>>0).toString(16):o)+", ")}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}return t.push("]"),t.join("")}},{key:"toString",value:function(){var t=0t||36this.length&&(r=this.length);for(var n=65535&t,i=t>>>16,o=0,a=65535&e,s=e>>>16,_=0;_>>16,c=u(f,n),g=u(f,i),d=u(h,n),p=u(h,i),v=a+(65535&c),b=s+o+(v>>>16)+(c>>>16)+(65535&g)+(65535&d);o=(a=(g>>>16)+(d>>>16)+(65535&p)+(b>>>16))>>>16,a&=65535,s=p>>>16,this.__setDigit(_,65535&v|b<<16)}if(0!==o||0!==a||0!==s)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(t,e,r){for(var n,i=0,o=0;o>>16,this.__setHalfDigit(e+o,n);return i}},{key:"__inplaceSub",value:function(t,e,r){var n=0;if(1&e){e>>=1;for(var i=this.__digit(e),o=65535&i,a=0;a>>1;a++){var s=t.__digit(a),u=(i>>>16)-(65535&s)-n;n=1&u>>>16,this.__setDigit(e+a,u<<16|65535&o),n=1&(o=(65535&(i=this.__digit(e+a+1)))-(s>>>16)-n)>>>16}var _=t.__digit(a),l=(i>>>16)-(65535&_)-n;if(n=1&l>>>16,this.__setDigit(e+a,l<<16|65535&o),e+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(n=1&(o=(65535&(i=this.__digit(e+a+1)))-(_>>>16)-n)>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;for(var f=0;f>>16)-(c>>>16)-(n=1&g>>>16);n=1&d>>>16,this.__setDigit(e+f,d<<16|65535&g)}var p=this.__digit(e+f),v=t.__digit(f),b=(65535&p)-(65535&v)-n;n=1&b>>>16;var y=0;0==(1&r)&&(n=1&(y=(p>>>16)-(v>>>16)-n)>>>16),this.__setDigit(e+f,y<<16|65535&b)}return n}},{key:"__inplaceRightShift",value:function(t){if(0!==t){for(var e,r=this.__digit(0)>>>t,n=this.length-1,i=0;i>>t;this.__setDigit(n,r)}}},{key:"__digit",value:function(t){return this[t]}},{key:"__unsignedDigit",value:function(t){return this[t]>>>0}},{key:"__setDigit",value:function(t,e){this[t]=0|e}},{key:"__setDigitGrow",value:function(t,e){this[t]=0|e}},{key:"__halfDigitLength",value:function(){var t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}},{key:"__halfDigit",value:function(t){return 65535&this[t>>>1]>>>((1&t)<<4)}},{key:"__setHalfDigit",value:function(t,e){var r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var r=Math.floor,n=Number.isFinite;if("number"==typeof e){if(0===e)return l.__zero();if((0|e)===e)return 0>e?l.__oneDigit(-e,!0):l.__oneDigit(e,!1);if(!n(e)||r(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return l.__fromDouble(e)}if("string"==typeof e){var i=l.__fromString(e);if(null===i)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return i}if("boolean"==typeof e)return!0===e?l.__oneDigit(1,!1):l.__zero();if("object"===t(e)){if(e.constructor===l)return e;var o=l.__toPrimitive(e);return l.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(t){var e=t.length;if(0===e)return 0;if(1===e){var r=t.__unsignedDigit(0);return t.sign?-r:r}var n=t.__digit(e-1),i=_(n),o=32*e-i;if(1024>>=12;var c=f-12,g=12<=f?0:s<<20+f,d=20+f;0>>32-c,g=s<>>32-d,d-=32);var p=l.__decideRounding(t,d,u,s);if((1===p||0===p&&1==(1&g))&&0==(g=g+1>>>0)&&0!=++h>>>20&&(h=0,1023<++a))return t.sign?-1/0:1/0;var v=t.sign?-2147483648:0;return a=a+1023<<20,l.__kBitConversionInts[1]=v|a|h,l.__kBitConversionInts[0]=g,l.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(t){if(0===t.length)return t;var e=t.__copy();return e.sign=!t.sign,e}},{key:"bitwiseNot",value:function(t){return t.sign?l.__absoluteSubOne(t).__trim():l.__absoluteAddOne(t,!0)}},{key:"exponentiate",value:function(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return l.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return t.sign&&0==(1&e.__digit(0))?l.unaryMinus(t):t;if(1=l.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(r>>>5),i=new l(n,t.sign&&0!=(1&r));i.__initializeDigits();var o=1<<(31&r);return i.__setDigit(n-1,o),i}var a=null,s=t;for(0!=(1&r)&&(a=t),r>>=1;0!==r;r>>=1)s=l.multiply(s,s),0!=(1&r)&&(a=null===a?s:l.multiply(a,s));return a}},{key:"multiply",value:function(t,e){if(0===t.length)return t;if(0===e.length)return e;var r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;var n=new l(r,t.sign!==e.sign);n.__initializeDigits();for(var i=0;il.__absoluteCompare(t,e))return l.__zero();var r,n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&65535>=i){if(1===i)return n===t.sign?t:l.unaryMinus(t);r=l.__absoluteDivSmall(t,i,null)}else r=l.__absoluteDivLarge(t,e,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>l.__absoluteCompare(t,e))return t;var r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return l.__zero();var n=l.__absoluteModSmall(t,r);return 0===n?l.__zero():l.__oneDigit(n,t.sign)}var i=l.__absoluteDivLarge(t,e,!1,!0);return i.sign=t.sign,i.__trim()}},{key:"add",value:function(t,e){var r=t.sign;return r===e.sign?l.__absoluteAdd(t,e,r):0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r)}},{key:"subtract",value:function(t,e){var r=t.sign;return r===e.sign?0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r):l.__absoluteAdd(t,e,r)}},{key:"leftShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__rightShiftByAbsolute(t,e):l.__leftShiftByAbsolute(t,e)}},{key:"signedRightShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__leftShiftByAbsolute(t,e):l.__rightShiftByAbsolute(t,e)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(t,e){return 0>l.__compareToBigInt(t,e)}},{key:"lessThanOrEqual",value:function(t,e){return 0>=l.__compareToBigInt(t,e)}},{key:"greaterThan",value:function(t,e){return 0=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.lengthl.__kMaxLengthBits)throw new RangeError("BigInt too big");return l.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.length>>n)return e}return l.__truncateToNBits(t,e)}},{key:"ADD",value:function(t,e){if(t=l.__toPrimitive(t),e=l.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)&&l.__isBigInt(e))return l.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(t,e){return l.__compare(t,e,0)}},{key:"LE",value:function(t,e){return l.__compare(t,e,1)}},{key:"GT",value:function(t,e){return l.__compare(t,e,2)}},{key:"GE",value:function(t,e){return l.__compare(t,e,3)}},{key:"EQ",value:function(e,r){for(;;){if(l.__isBigInt(e))return l.__isBigInt(r)?l.equal(e,r):l.EQ(r,e);if("number"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("string"==typeof e){if(l.__isBigInt(r))return null!==(e=l.__fromString(e))&&l.equal(e,r);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("boolean"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,+e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("symbol"===t(e)){if(l.__isBigInt(r))return!1;if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else{if("object"!==t(e))return e==r;if("object"===t(r)&&r.constructor!==l)return e==r;e=l.__toPrimitive(e)}}}},{key:"NE",value:function(t,e){return!l.EQ(t,e)}},{key:"__zero",value:function(){return new l(0,!1)}},{key:"__oneDigit",value:function(t,e){var r=new l(1,e);return r.__setDigit(0,t),r}},{key:"__decideRounding",value:function(t,e,r,n){if(0e)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}var o=1<>>20)-1023,n=1+(r>>>5),i=new l(n,0>t),o=1048575&l.__kBitConversionInts[1]|1048576,a=l.__kBitConversionInts[0],s=20,u=31&r,_=0;if(u>>f,o=o<<32-f|a>>>f,a<<=32-f}else if(u===s)_=32,e=o,o=a;else{var h=u-s;_=32-h,e=o<>>32-h,o=a<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}},{key:"__fromString",value:function(t){var e=11073741824/s)return null;var _=new l(31+(s*a+u>>>l.__kBitsPerCharTableShift)>>>5,!1),f=10>e?e:10,h=10>=l.__kBitsPerCharTableShift;var c=[],g=[],d=!1;do{for(var p,v=0,b=0;;){if(p=void 0,o-48>>>0>>0>>0>>0>>l.__kBitsPerCharTableShift+5;_.__inplaceMultiplyAdd(D,k,P)}while(!y)}if(i!==n){if(!l.__isWhitespace(o))return null;for(i++;i>>u-(o-=32))}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),o=e-1,a=t.__digit(r-1),s=0|(32*r-_(a)+i-1)/i;if(t.sign&&s++,268435456>>v,c=32-v;c>=i;)u[f--]=l.__kConversionChars[h&o],h>>>=i,c-=i}var b=(h|a<>>i-c;0!==h;)u[f--]=l.__kConversionChars[h&o],h>>>=i;if(t.sign&&(u[f--]="-"),-1!==f)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(t,e,r){var n=t.length;if(0===n)return"";if(1===n){var i=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(i="-"+i),i}var o,a,s=32*n-_(t.__digit(n-1)),u=l.__kMaxBitsPerChar[e]-1,f=s*l.__kBitsPerCharTableMultiplier,h=1+(f=0|(f+=u-1)/u)>>1,c=l.exponentiate(l.__oneDigit(e,!1),l.__oneDigit(h,!1)),g=c.__unsignedDigit(0);if(1===c.length&&65535>=g){(o=new l(t.length,!1)).__initializeDigits();for(var d,p=0,v=2*t.length-1;0<=v;v--)d=p<<16|t.__halfDigit(v),o.__setHalfDigit(v,0|d/g),p=0|d%g;a=p.toString(e)}else{var b=l.__absoluteDivLarge(t,c,!0,!0);o=b.quotient;var y=b.remainder.__trim();a=l.__toStringGeneric(y,e,!0)}o.__trim();for(var m=l.__toStringGeneric(o,e,!0);a.lengthn?l.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(t,e){if(!0|e){var r=t.sign,n=0>e;if(r!==n)return l.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?l.__absoluteGreater(r):oe)return l.__unequalSign(r);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;l.__kBitConversionDouble[0]=e;var n=2047&l.__kBitConversionInts[1]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var i=n-1023;if(0>i)return l.__absoluteGreater(r);var o=t.length,a=t.__digit(o-1),s=_(a),u=32*o-s,f=i+1;if(uf)return l.__absoluteGreater(r);var h=1048576|1048575&l.__kBitConversionInts[1],c=l.__kBitConversionInts[0],g=20,d=31-s;if(d!==(u-1)%31)throw new Error("implementation bug");var p,v=0;if(d>>b,h=h<<32-b|c>>>b,c<<=32-b}else if(d===g)v=32,p=h,h=c;else{var y=d-g;v=32-y,p=h<>>32-y,h=c<>>=0)>(p>>>=0))return l.__absoluteGreater(r);if(a>>0,h=c,c=0):p=0;var w=t.__unsignedDigit(m);if(w>p)return l.__absoluteGreater(r);if(we&&t.__unsignedDigit(0)===a(e):0===l.__compareToDouble(t,e)}},{key:"__comparisonResultToBool",value:function(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(l.__isBigInt(t)&&"string"==typeof e)return null!==(e=l.__fromString(e))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("string"==typeof t&&l.__isBigInt(e))return null!==(t=l.__fromString(t))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)){if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return l.__comparisonResultToBool(l.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}},{key:"__absoluteAdd",value:function(t,e,r){if(t.length>>16)+(s>>>16)+(_>>>16);o=f>>>16,i.__setDigit(a,65535&_|f<<16)}for(;a>>16)+(c>>>16);o=g>>>16,i.__setDigit(a,65535&c|g<<16)}return a>>16)-(s>>>16)-(i=1&u>>>16);i=1&_>>>16,n.__setDigit(o,65535&u|_<<16)}for(;o>>16)-(i=1&h>>>16);i=1&c>>>16,n.__setDigit(o,65535&h|c<<16)}return n.__trim()}},{key:"__absoluteAddOne",value:function(t,e){var r=2n?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(t,e,r,n){if(0!==e){for(var i=65535&e,o=e>>>16,a=0,s=0,_=0,l=0;l>>16,g=t.__digit(l),d=65535&g,p=g>>>16,v=u(d,i),b=u(d,o),y=u(p,i),m=u(p,o);a=(s=(b>>>16)+(y>>>16)+(65535&m)+(a=(c+=_+a+((h+=s+(65535&v))>>>16)+(v>>>16)+(65535&b)+(65535&y))>>>16))>>>16,s&=65535,_=m>>>16,f=65535&h|c<<16,r.__setDigit(n,f)}for(;0!==a||0!==s||0!==_;n++){var w=r.__digit(n),k=(65535&w)+s,D=(w>>>16)+(k>>>16)+_+a;s=0,_=0,a=D>>>16,w=65535&k|D<<16,r.__setDigit(n,w)}}}},{key:"__internalMultiplyAdd",value:function(t,e,r,n,i){for(var o=r,a=0,s=0;s>>16;var h=u(_>>>16,e),c=(65535&h)+(l>>>16)+o;o=c>>>16,a=h>>>16,i.__setDigit(s,c<<16|65535&f)}if(i.length>n)for(i.__setDigit(n++,o+a);n>>0,a=0|o/e,s=0|(o=((n=0|o%e)<<16|t.__halfDigit(i-1))>>>0)/e;n=0|o%e,r.__setDigit(i>>>1,a<<16|s)}return r}},{key:"__absoluteModSmall",value:function(t,e){for(var r=0,n=2*t.length-1;0<=n;n--)r=0|((r<<16|t.__halfDigit(n))>>>0)%e;return r}},{key:"__absoluteDivLarge",value:function(t,e,r,n){var i=e.__halfDigitLength(),o=e.length,a=t.__halfDigitLength()-i,s=null;r&&(s=new l(a+2>>>1,!1)).__initializeDigits();var _=new l(i+2>>>1,!1);_.__initializeDigits();var f=l.__clz16(e.__halfDigit(i-1));0>>0;p=0|b/c;for(var y=0|b%c,m=e.__halfDigit(i-2),w=h.__halfDigit(d+i-2);u(p,m)>>>0>(y<<16|w)>>>0&&(p--,!(65535<(y+=c))););}l.__internalMultiplyAdd(e,p,0,o,_);var k=h.__inplaceSub(_,d,i+1);0!==k&&(k=h.__inplaceAdd(e,d,i),h.__setHalfDigit(d+i,h.__halfDigit(d+i)+k),p--),r&&(1&d?g=p<<16:s.__setDigit(d>>>1,g|p))}return n?(h.__inplaceRightShift(f),r?{quotient:s,remainder:h}:h):r?s:void 0}},{key:"__clz16",value:function(t){return _(t)-16}},{key:"__specialLeftShift",value:function(t,e,r){var n=t.length,i=new l(n+r,!1);if(0===e){for(var o=0;o>>32-e;return 0r)throw new RangeError("BigInt too big");var n=r>>>5,i=31&r,o=t.length,a=0!==i&&0!=t.__digit(o-1)>>>32-i,s=o+n+(a?1:0),u=new l(s,t.sign);if(0===i){for(var _=0;_>>32-i;if(a)u.__setDigit(o+n,f);else if(0!==f)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(t,e){var r=t.length,n=t.sign,i=l.__toShiftAmount(e);if(0>i)return l.__rightShiftByMaximum(n);var o=i>>>5,a=31&i,s=r-o;if(0>=s)return l.__rightShiftByMaximum(n);var u=!1;if(n)if(0!=(t.__digit(o)&(1<>>a,d=r-o-1,p=0;p>>a;f.__setDigit(d,g)}return u&&(f=l.__absoluteAddOne(f,!0,f)),f.__trim()}},{key:"__rightShiftByMaximum",value:function(t){return t?l.__oneDigit(1,!0):l.__zero()}},{key:"__toShiftAmount",value:function(t){if(1l.__kMaxLengthBits?-1:e}},{key:"__toPrimitive",value:function(e){var r=1>>5,n=new l(r,e.sign),i=r-1,o=0;o>>s}return n.__setDigit(i,a),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(t,e,r){for(var n=Math.min,i=t+31>>>5,o=new l(i,r),a=0,s=i-1,u=0,_=n(s,e.length);a<_;a++){var f=e.__digit(a),h=0-(65535&f)-u,c=0-(f>>>16)-(u=1&h>>>16);u=1&c>>>16,o.__setDigit(a,65535&h|c<<16)}for(;a>>16)-(u=1&v>>>16)<<16}else{var b=32-p,y=1<<32-b,m=(65535&y)-(65535&(d=d<>>b))-u;g=65535&m|(y>>>16)-(d>>>16)-(u=1&m>>>16)<<16,g&=y-1}return o.__setDigit(s,g),o.__trim()}},{key:"__digitPow",value:function(t,e){for(var r=1;0>>=1,t*=t;return r}}]),l}(l(Array));return c.__kMaxLength=33554432,c.__kMaxLengthBits=c.__kMaxLength<<5,c.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],c.__kBitsPerCharTableShift=5,c.__kBitsPerCharTableMultiplier=1<a)throw new Error(s);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(s);if(u.find(t=>!n.includes(t)))throw new Error(s)}function s(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function u(t,e){if(s(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function _(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function l(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(a(r,t,["code_hash","hash_type","args"],[]),u(r+".code_hash",t.code_hash),s(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function f(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){a(r,t,["tx_hash","index"],[]),u(r+".tx_hash",t.tx_hash),_(r+".index",t.index)}function h(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){a(r,t,["since","previous_output"],[]),_(r+".since",t.since),e&&f(t.previous_output,{debugPath:r+".previous_output"})}function c(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){a(r,t,["capacity","lock"],["type"]),_(r+".capacity",t.capacity),e&&(l(t.lock,{debugPath:r+".lock"}),t.type&&l(t.type,{debugPath:r+".type"}))}function g(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(a(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&f(t.out_point,{debugPath:r+".out_point"})}function d(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}}var S=i((function(t,e){var r=function(t){function e(){this.fetch=!1,this.DOMException=t.DOMException}return e.prototype=t,new e}("undefined"!=typeof self?self:n);!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function _(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t,e,r,n=c(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=g(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},v.call(y.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function D(t,r){return new Promise((function(n,o){var a=new y(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}D.polyfill=!0,t.fetch||(t.fetch=D,t.Headers=h,t.Request=y,t.Response=w),e.Headers=h,e.Request=y,e.Response=w,e.fetch=D}({})}(r),delete r.fetch.polyfill,(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}));function x(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const O={get:(t,e,r)=>"send"===e?async()=>{const e=await S(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},C={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},O):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await S(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class I{constructor(t,e={}){return this.uri=t,this.defaultOptions=e,new Proxy(this,C)}static create(t){return new I(t)}}function j(t){return o.BigInt(t)}function R(t){return"0x"+t.toString(16)}function z(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=R(o.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&n.byteLength!==t)throw new Error(`${e} has invalid length ${n.byteLength}, required: ${t}`);return n}}function N(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function L(t,{debugPath:e="script"}={}){return N(e,t,{code_hash:M(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:M(-1)})}function U(t,{debugPath:e="out_point"}={}){return N(e,t,{tx_hash:M(32),index:z(4)})}function q(t){return function(e,r){return t(r,{debugPath:e})}}function V(t,{debugPath:e="cell_input"}={}){return N(e,t,{since:z(8),previous_output:q(U)})}function $(t,{debugPath:e="cell_output"}={}){const r=N(e,t,{capacity:z(8),lock:q(L)});return t.type&&(r.type_=L(t.type,{debugPath:e+".type"})),r}function F(t,{debugPath:e="cell_dep"}={}){return N(e,t,{out_point:q(U),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function G(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function H(t,{debugPath:e="raw_transaction"}={}){return N(e,t,{version:z(4),cell_deps:G(q(F)),header_deps:G(M(32)),inputs:G(q(V)),outputs:G(q($)),outputs_data:G(M(-1))})}function W(t,{debugPath:e="transaction"}={}){const r=H(t,{debugPath:"(raw)"+e}),n=N(e,t,{witnesses:G(M(-1))});return n.raw=r,n}function J(t,{debugPath:e="raw_header"}={}){return N(e,t,{version:z(4),compact_target:z(4),timestamp:z(8),number:z(8),epoch:z(8),parent_hash:M(32),transactions_root:M(32),proposals_hash:M(32),uncles_hash:M(32),dao:M(32)})}function X(t,{debugPath:e="header"}={}){const r=J(t,{debugPath:"(raw)"+e}),n=N(e,t,{nonce:z(16)});return n.raw=r,n}function Q(t,{debugPath:e="uncle_block"}={}){return N(e,t,{header:q(X),proposals:G(M(10))})}var K=Object.freeze({__proto__:null,NormalizeScript:L,NormalizeOutPoint:U,NormalizeCellInput:V,NormalizeCellOutput:$,NormalizeCellDep:F,NormalizeRawTransaction:H,NormalizeTransaction:W,NormalizeRawHeader:J,NormalizeHeader:X,NormalizeUncleBlock:Q,NormalizeBlock:function(t,{debugPath:e="block"}={}){return N(e,t,{header:q(X),uncles:G(q(Q)),transactions:G(q(W)),proposals:G(M(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return N(e,t,{lock:q(L),message:M(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=M(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=M(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=M(-1)(e+".output_type",t.output_type)),r}});function Y(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Z(t,e,r){if(!((e=Y(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function tt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Z(r,t,{code_hash:Y,hash_type:Y,args:Y}),e&&l(t,{debugPath:"(transformed) "+r}),t}function et(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Z(r,t,{tx_hash:Y,index:Y}),e&&f(t,{debugPath:"(transformed) "+r}),t}function rt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function nt(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Z(r,t,{since:Y,previous_output:rt(et)}),e&&h(t,{debugPath:"(transformed) "+r}),t}function it(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Z(r,t,{capacity:Y,lock:rt(tt),type:rt(tt)}),e&&c(t,{debugPath:"(transformed) "+r}),t}function ot(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Z(r,t,{out_point:rt(et),dep_type:Y}),e&&g(t,{debugPath:"(transformed) "+r}),t}function at(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function st(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y),witnesses:at(Y)}),e&&y(t,{debugPath:"(transformed) "+r}),t}function ut(t,{validation:e=!0,debugPath:r="header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y,nonce:Y}),e&&w(t,{debugPath:"(transformed) "+r}),t}function _t(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Z(r,t,{header:rt(ut),proposals:at(Y)}),e&&D(t,{debugPath:"(transformed) "+r}),t}var lt=Object.freeze({__proto__:null,TransformScript:tt,TransformOutPoint:et,TransformCellInput:nt,TransformCellOutput:it,TransformCellDep:ot,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y)}),e&&b(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:st,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y}),e&&m(t,{debugPath:"(transformed) "+r}),t},TransformHeader:ut,TransformUncleBlock:_t,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Z(r,t,{header:rt(ut),uncles:at(rt(_t)),transactions:at(rt(st)),proposals:at(Y)}),e&&B(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Z(r,t,{lock:rt(tt),message:Y}),e&&P(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Z(r,t,{lock:Y,input_type:Y,output_type:Y}),e&&A(t,{debugPath:"(transformed) "+r}),t}});var ft=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:n=!0,loadData:i=!1,loadBlockNumber:o=!0}={}){this.rpc=t,this.lockHash=new r(e).serializeJson(),this.skipCellWithContent=n,this.loadData=i,this.loadBlockNumber=o}async*collect(){const t=j(await this.rpc.get_tip_block_number());let e=o.BigInt(0);for(;o.lessThanOrEqual(e,t);){let r=o.add(e,o.BigInt(100));o.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,R(e),R(r));for(const t of n){if(this.skipCellWithContent&&(t.type||o.greaterThan(j(t.output_data_len),o.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=o.add(r,o.BigInt(1))}}}});const ht="0.10.2";export{R as BigIntToHexString,j as HexStringToBigInt,I as RPC,r as Reader,E as TransactionDumper,ht as VERSION,ft as cell_collectors,K as normalizers,lt as transformers,T as validators}; +class t{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class e{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");n.setUint8(t,r)}return new t(r)}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var o=i((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r,n=0;nl.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return(n=h(this,o(l).call(this,t))).sign=r,n}return i(l,r),n(l,[{key:"toDebugString",value:function(){var t=["BigInt["],e=!0,r=!1,n=void 0;try{for(var i,o,a=this[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)o=i.value,t.push((o?(o>>>0).toString(16):o)+", ")}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}return t.push("]"),t.join("")}},{key:"toString",value:function(){var t=0t||36this.length&&(r=this.length);for(var n=65535&t,i=t>>>16,o=0,a=65535&e,s=e>>>16,_=0;_>>16,c=u(f,n),g=u(f,i),d=u(h,n),p=u(h,i),v=a+(65535&c),b=s+o+(v>>>16)+(c>>>16)+(65535&g)+(65535&d);o=(a=(g>>>16)+(d>>>16)+(65535&p)+(b>>>16))>>>16,a&=65535,s=p>>>16,this.__setDigit(_,65535&v|b<<16)}if(0!==o||0!==a||0!==s)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(t,e,r){for(var n,i=0,o=0;o>>16,this.__setHalfDigit(e+o,n);return i}},{key:"__inplaceSub",value:function(t,e,r){var n=0;if(1&e){e>>=1;for(var i=this.__digit(e),o=65535&i,a=0;a>>1;a++){var s=t.__digit(a),u=(i>>>16)-(65535&s)-n;n=1&u>>>16,this.__setDigit(e+a,u<<16|65535&o),n=1&(o=(65535&(i=this.__digit(e+a+1)))-(s>>>16)-n)>>>16}var _=t.__digit(a),l=(i>>>16)-(65535&_)-n;if(n=1&l>>>16,this.__setDigit(e+a,l<<16|65535&o),e+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(n=1&(o=(65535&(i=this.__digit(e+a+1)))-(_>>>16)-n)>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;for(var f=0;f>>16)-(c>>>16)-(n=1&g>>>16);n=1&d>>>16,this.__setDigit(e+f,d<<16|65535&g)}var p=this.__digit(e+f),v=t.__digit(f),b=(65535&p)-(65535&v)-n;n=1&b>>>16;var y=0;0==(1&r)&&(n=1&(y=(p>>>16)-(v>>>16)-n)>>>16),this.__setDigit(e+f,y<<16|65535&b)}return n}},{key:"__inplaceRightShift",value:function(t){if(0!==t){for(var e,r=this.__digit(0)>>>t,n=this.length-1,i=0;i>>t;this.__setDigit(n,r)}}},{key:"__digit",value:function(t){return this[t]}},{key:"__unsignedDigit",value:function(t){return this[t]>>>0}},{key:"__setDigit",value:function(t,e){this[t]=0|e}},{key:"__setDigitGrow",value:function(t,e){this[t]=0|e}},{key:"__halfDigitLength",value:function(){var t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}},{key:"__halfDigit",value:function(t){return 65535&this[t>>>1]>>>((1&t)<<4)}},{key:"__setHalfDigit",value:function(t,e){var r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var r=Math.floor,n=Number.isFinite;if("number"==typeof e){if(0===e)return l.__zero();if((0|e)===e)return 0>e?l.__oneDigit(-e,!0):l.__oneDigit(e,!1);if(!n(e)||r(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return l.__fromDouble(e)}if("string"==typeof e){var i=l.__fromString(e);if(null===i)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return i}if("boolean"==typeof e)return!0===e?l.__oneDigit(1,!1):l.__zero();if("object"===t(e)){if(e.constructor===l)return e;var o=l.__toPrimitive(e);return l.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(t){var e=t.length;if(0===e)return 0;if(1===e){var r=t.__unsignedDigit(0);return t.sign?-r:r}var n=t.__digit(e-1),i=_(n),o=32*e-i;if(1024>>=12;var c=f-12,g=12<=f?0:s<<20+f,d=20+f;0>>32-c,g=s<>>32-d,d-=32);var p=l.__decideRounding(t,d,u,s);if((1===p||0===p&&1==(1&g))&&0==(g=g+1>>>0)&&0!=++h>>>20&&(h=0,1023<++a))return t.sign?-1/0:1/0;var v=t.sign?-2147483648:0;return a=a+1023<<20,l.__kBitConversionInts[1]=v|a|h,l.__kBitConversionInts[0]=g,l.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(t){if(0===t.length)return t;var e=t.__copy();return e.sign=!t.sign,e}},{key:"bitwiseNot",value:function(t){return t.sign?l.__absoluteSubOne(t).__trim():l.__absoluteAddOne(t,!0)}},{key:"exponentiate",value:function(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return l.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return t.sign&&0==(1&e.__digit(0))?l.unaryMinus(t):t;if(1=l.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(r>>>5),i=new l(n,t.sign&&0!=(1&r));i.__initializeDigits();var o=1<<(31&r);return i.__setDigit(n-1,o),i}var a=null,s=t;for(0!=(1&r)&&(a=t),r>>=1;0!==r;r>>=1)s=l.multiply(s,s),0!=(1&r)&&(a=null===a?s:l.multiply(a,s));return a}},{key:"multiply",value:function(t,e){if(0===t.length)return t;if(0===e.length)return e;var r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;var n=new l(r,t.sign!==e.sign);n.__initializeDigits();for(var i=0;il.__absoluteCompare(t,e))return l.__zero();var r,n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&65535>=i){if(1===i)return n===t.sign?t:l.unaryMinus(t);r=l.__absoluteDivSmall(t,i,null)}else r=l.__absoluteDivLarge(t,e,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>l.__absoluteCompare(t,e))return t;var r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return l.__zero();var n=l.__absoluteModSmall(t,r);return 0===n?l.__zero():l.__oneDigit(n,t.sign)}var i=l.__absoluteDivLarge(t,e,!1,!0);return i.sign=t.sign,i.__trim()}},{key:"add",value:function(t,e){var r=t.sign;return r===e.sign?l.__absoluteAdd(t,e,r):0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r)}},{key:"subtract",value:function(t,e){var r=t.sign;return r===e.sign?0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r):l.__absoluteAdd(t,e,r)}},{key:"leftShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__rightShiftByAbsolute(t,e):l.__leftShiftByAbsolute(t,e)}},{key:"signedRightShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__leftShiftByAbsolute(t,e):l.__rightShiftByAbsolute(t,e)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(t,e){return 0>l.__compareToBigInt(t,e)}},{key:"lessThanOrEqual",value:function(t,e){return 0>=l.__compareToBigInt(t,e)}},{key:"greaterThan",value:function(t,e){return 0=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.lengthl.__kMaxLengthBits)throw new RangeError("BigInt too big");return l.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.length>>n)return e}return l.__truncateToNBits(t,e)}},{key:"ADD",value:function(t,e){if(t=l.__toPrimitive(t),e=l.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)&&l.__isBigInt(e))return l.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(t,e){return l.__compare(t,e,0)}},{key:"LE",value:function(t,e){return l.__compare(t,e,1)}},{key:"GT",value:function(t,e){return l.__compare(t,e,2)}},{key:"GE",value:function(t,e){return l.__compare(t,e,3)}},{key:"EQ",value:function(e,r){for(;;){if(l.__isBigInt(e))return l.__isBigInt(r)?l.equal(e,r):l.EQ(r,e);if("number"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("string"==typeof e){if(l.__isBigInt(r))return null!==(e=l.__fromString(e))&&l.equal(e,r);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("boolean"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,+e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("symbol"===t(e)){if(l.__isBigInt(r))return!1;if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else{if("object"!==t(e))return e==r;if("object"===t(r)&&r.constructor!==l)return e==r;e=l.__toPrimitive(e)}}}},{key:"NE",value:function(t,e){return!l.EQ(t,e)}},{key:"__zero",value:function(){return new l(0,!1)}},{key:"__oneDigit",value:function(t,e){var r=new l(1,e);return r.__setDigit(0,t),r}},{key:"__decideRounding",value:function(t,e,r,n){if(0e)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}var o=1<>>20)-1023,n=1+(r>>>5),i=new l(n,0>t),o=1048575&l.__kBitConversionInts[1]|1048576,a=l.__kBitConversionInts[0],s=20,u=31&r,_=0;if(u>>f,o=o<<32-f|a>>>f,a<<=32-f}else if(u===s)_=32,e=o,o=a;else{var h=u-s;_=32-h,e=o<>>32-h,o=a<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}},{key:"__fromString",value:function(t){var e=11073741824/s)return null;var _=new l(31+(s*a+u>>>l.__kBitsPerCharTableShift)>>>5,!1),f=10>e?e:10,h=10>=l.__kBitsPerCharTableShift;var c=[],g=[],d=!1;do{for(var p,v=0,b=0;;){if(p=void 0,o-48>>>0>>0>>0>>0>>l.__kBitsPerCharTableShift+5;_.__inplaceMultiplyAdd(D,k,P)}while(!y)}if(i!==n){if(!l.__isWhitespace(o))return null;for(i++;i>>u-(o-=32))}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),o=e-1,a=t.__digit(r-1),s=0|(32*r-_(a)+i-1)/i;if(t.sign&&s++,268435456>>v,c=32-v;c>=i;)u[f--]=l.__kConversionChars[h&o],h>>>=i,c-=i}var b=(h|a<>>i-c;0!==h;)u[f--]=l.__kConversionChars[h&o],h>>>=i;if(t.sign&&(u[f--]="-"),-1!==f)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(t,e,r){var n=t.length;if(0===n)return"";if(1===n){var i=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(i="-"+i),i}var o,a,s=32*n-_(t.__digit(n-1)),u=l.__kMaxBitsPerChar[e]-1,f=s*l.__kBitsPerCharTableMultiplier,h=1+(f=0|(f+=u-1)/u)>>1,c=l.exponentiate(l.__oneDigit(e,!1),l.__oneDigit(h,!1)),g=c.__unsignedDigit(0);if(1===c.length&&65535>=g){(o=new l(t.length,!1)).__initializeDigits();for(var d,p=0,v=2*t.length-1;0<=v;v--)d=p<<16|t.__halfDigit(v),o.__setHalfDigit(v,0|d/g),p=0|d%g;a=p.toString(e)}else{var b=l.__absoluteDivLarge(t,c,!0,!0);o=b.quotient;var y=b.remainder.__trim();a=l.__toStringGeneric(y,e,!0)}o.__trim();for(var m=l.__toStringGeneric(o,e,!0);a.lengthn?l.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(t,e){if(!0|e){var r=t.sign,n=0>e;if(r!==n)return l.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?l.__absoluteGreater(r):oe)return l.__unequalSign(r);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;l.__kBitConversionDouble[0]=e;var n=2047&l.__kBitConversionInts[1]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var i=n-1023;if(0>i)return l.__absoluteGreater(r);var o=t.length,a=t.__digit(o-1),s=_(a),u=32*o-s,f=i+1;if(uf)return l.__absoluteGreater(r);var h=1048576|1048575&l.__kBitConversionInts[1],c=l.__kBitConversionInts[0],g=20,d=31-s;if(d!==(u-1)%31)throw new Error("implementation bug");var p,v=0;if(d>>b,h=h<<32-b|c>>>b,c<<=32-b}else if(d===g)v=32,p=h,h=c;else{var y=d-g;v=32-y,p=h<>>32-y,h=c<>>=0)>(p>>>=0))return l.__absoluteGreater(r);if(a>>0,h=c,c=0):p=0;var w=t.__unsignedDigit(m);if(w>p)return l.__absoluteGreater(r);if(we&&t.__unsignedDigit(0)===a(e):0===l.__compareToDouble(t,e)}},{key:"__comparisonResultToBool",value:function(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(l.__isBigInt(t)&&"string"==typeof e)return null!==(e=l.__fromString(e))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("string"==typeof t&&l.__isBigInt(e))return null!==(t=l.__fromString(t))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)){if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return l.__comparisonResultToBool(l.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}},{key:"__absoluteAdd",value:function(t,e,r){if(t.length>>16)+(s>>>16)+(_>>>16);o=f>>>16,i.__setDigit(a,65535&_|f<<16)}for(;a>>16)+(c>>>16);o=g>>>16,i.__setDigit(a,65535&c|g<<16)}return a>>16)-(s>>>16)-(i=1&u>>>16);i=1&_>>>16,n.__setDigit(o,65535&u|_<<16)}for(;o>>16)-(i=1&h>>>16);i=1&c>>>16,n.__setDigit(o,65535&h|c<<16)}return n.__trim()}},{key:"__absoluteAddOne",value:function(t,e){var r=2n?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(t,e,r,n){if(0!==e){for(var i=65535&e,o=e>>>16,a=0,s=0,_=0,l=0;l>>16,g=t.__digit(l),d=65535&g,p=g>>>16,v=u(d,i),b=u(d,o),y=u(p,i),m=u(p,o);a=(s=(b>>>16)+(y>>>16)+(65535&m)+(a=(c+=_+a+((h+=s+(65535&v))>>>16)+(v>>>16)+(65535&b)+(65535&y))>>>16))>>>16,s&=65535,_=m>>>16,f=65535&h|c<<16,r.__setDigit(n,f)}for(;0!==a||0!==s||0!==_;n++){var w=r.__digit(n),k=(65535&w)+s,D=(w>>>16)+(k>>>16)+_+a;s=0,_=0,a=D>>>16,w=65535&k|D<<16,r.__setDigit(n,w)}}}},{key:"__internalMultiplyAdd",value:function(t,e,r,n,i){for(var o=r,a=0,s=0;s>>16;var h=u(_>>>16,e),c=(65535&h)+(l>>>16)+o;o=c>>>16,a=h>>>16,i.__setDigit(s,c<<16|65535&f)}if(i.length>n)for(i.__setDigit(n++,o+a);n>>0,a=0|o/e,s=0|(o=((n=0|o%e)<<16|t.__halfDigit(i-1))>>>0)/e;n=0|o%e,r.__setDigit(i>>>1,a<<16|s)}return r}},{key:"__absoluteModSmall",value:function(t,e){for(var r=0,n=2*t.length-1;0<=n;n--)r=0|((r<<16|t.__halfDigit(n))>>>0)%e;return r}},{key:"__absoluteDivLarge",value:function(t,e,r,n){var i=e.__halfDigitLength(),o=e.length,a=t.__halfDigitLength()-i,s=null;r&&(s=new l(a+2>>>1,!1)).__initializeDigits();var _=new l(i+2>>>1,!1);_.__initializeDigits();var f=l.__clz16(e.__halfDigit(i-1));0>>0;p=0|b/c;for(var y=0|b%c,m=e.__halfDigit(i-2),w=h.__halfDigit(d+i-2);u(p,m)>>>0>(y<<16|w)>>>0&&(p--,!(65535<(y+=c))););}l.__internalMultiplyAdd(e,p,0,o,_);var k=h.__inplaceSub(_,d,i+1);0!==k&&(k=h.__inplaceAdd(e,d,i),h.__setHalfDigit(d+i,h.__halfDigit(d+i)+k),p--),r&&(1&d?g=p<<16:s.__setDigit(d>>>1,g|p))}return n?(h.__inplaceRightShift(f),r?{quotient:s,remainder:h}:h):r?s:void 0}},{key:"__clz16",value:function(t){return _(t)-16}},{key:"__specialLeftShift",value:function(t,e,r){var n=t.length,i=new l(n+r,!1);if(0===e){for(var o=0;o>>32-e;return 0r)throw new RangeError("BigInt too big");var n=r>>>5,i=31&r,o=t.length,a=0!==i&&0!=t.__digit(o-1)>>>32-i,s=o+n+(a?1:0),u=new l(s,t.sign);if(0===i){for(var _=0;_>>32-i;if(a)u.__setDigit(o+n,f);else if(0!==f)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(t,e){var r=t.length,n=t.sign,i=l.__toShiftAmount(e);if(0>i)return l.__rightShiftByMaximum(n);var o=i>>>5,a=31&i,s=r-o;if(0>=s)return l.__rightShiftByMaximum(n);var u=!1;if(n)if(0!=(t.__digit(o)&(1<>>a,d=r-o-1,p=0;p>>a;f.__setDigit(d,g)}return u&&(f=l.__absoluteAddOne(f,!0,f)),f.__trim()}},{key:"__rightShiftByMaximum",value:function(t){return t?l.__oneDigit(1,!0):l.__zero()}},{key:"__toShiftAmount",value:function(t){if(1l.__kMaxLengthBits?-1:e}},{key:"__toPrimitive",value:function(e){var r=1>>5,n=new l(r,e.sign),i=r-1,o=0;o>>s}return n.__setDigit(i,a),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(t,e,r){for(var n=Math.min,i=t+31>>>5,o=new l(i,r),a=0,s=i-1,u=0,_=n(s,e.length);a<_;a++){var f=e.__digit(a),h=0-(65535&f)-u,c=0-(f>>>16)-(u=1&h>>>16);u=1&c>>>16,o.__setDigit(a,65535&h|c<<16)}for(;a>>16)-(u=1&v>>>16)<<16}else{var b=32-p,y=1<<32-b,m=(65535&y)-(65535&(d=d<>>b))-u;g=65535&m|(y>>>16)-(d>>>16)-(u=1&m>>>16)<<16,g&=y-1}return o.__setDigit(s,g),o.__trim()}},{key:"__digitPow",value:function(t,e){for(var r=1;0>>=1,t*=t;return r}}]),l}(l(Array));return c.__kMaxLength=33554432,c.__kMaxLengthBits=c.__kMaxLength<<5,c.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],c.__kBitsPerCharTableShift=5,c.__kBitsPerCharTableMultiplier=1<a)throw new Error(s);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(s);if(u.find(t=>!n.includes(t)))throw new Error(s)}function s(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function u(t,e){if(s(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function _(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function l(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(a(r,t,["code_hash","hash_type","args"],[]),u(r+".code_hash",t.code_hash),s(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function f(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){a(r,t,["tx_hash","index"],[]),u(r+".tx_hash",t.tx_hash),_(r+".index",t.index)}function h(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){a(r,t,["since","previous_output"],[]),_(r+".since",t.since),e&&f(t.previous_output,{debugPath:r+".previous_output"})}function c(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){a(r,t,["capacity","lock"],["type"]),_(r+".capacity",t.capacity),e&&(l(t.lock,{debugPath:r+".lock"}),t.type&&l(t.type,{debugPath:r+".type"}))}function g(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(a(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&f(t.out_point,{debugPath:r+".out_point"})}function d(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}}var S=i((function(t,e){var r=function(t){function e(){this.fetch=!1,this.DOMException=t.DOMException}return e.prototype=t,new e}("undefined"!=typeof self?self:n);!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function _(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t,e,r,n=c(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=g(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},v.call(y.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function D(t,r){return new Promise((function(n,o){var a=new y(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}D.polyfill=!0,t.fetch||(t.fetch=D,t.Headers=h,t.Request=y,t.Response=w),e.Headers=h,e.Request=y,e.Response=w,e.fetch=D}({})}(r),delete r.fetch.polyfill,(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}));function x(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const O={get:(t,e,r)=>"send"===e?async()=>{const e=await t.fetch(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},C={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},O):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await t.fetch(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class I{constructor(t,e={},r=S){return this.uri=t,this.defaultOptions=e,this.fetch=r,new Proxy(this,C)}static create(t){return new I(t)}}function j(t){return o.BigInt(t)}function R(t){return"0x"+t.toString(16)}function z(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=R(o.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&n.byteLength!==t)throw new Error(`${e} has invalid length ${n.byteLength}, required: ${t}`);return n}}function N(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function L(t,{debugPath:e="script"}={}){return N(e,t,{code_hash:M(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:M(-1)})}function U(t,{debugPath:e="out_point"}={}){return N(e,t,{tx_hash:M(32),index:z(4)})}function q(t){return function(e,r){return t(r,{debugPath:e})}}function V(t,{debugPath:e="cell_input"}={}){return N(e,t,{since:z(8),previous_output:q(U)})}function $(t,{debugPath:e="cell_output"}={}){const r=N(e,t,{capacity:z(8),lock:q(L)});return t.type&&(r.type_=L(t.type,{debugPath:e+".type"})),r}function F(t,{debugPath:e="cell_dep"}={}){return N(e,t,{out_point:q(U),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function G(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function H(t,{debugPath:e="raw_transaction"}={}){return N(e,t,{version:z(4),cell_deps:G(q(F)),header_deps:G(M(32)),inputs:G(q(V)),outputs:G(q($)),outputs_data:G(M(-1))})}function W(t,{debugPath:e="transaction"}={}){const r=H(t,{debugPath:"(raw)"+e}),n=N(e,t,{witnesses:G(M(-1))});return n.raw=r,n}function J(t,{debugPath:e="raw_header"}={}){return N(e,t,{version:z(4),compact_target:z(4),timestamp:z(8),number:z(8),epoch:z(8),parent_hash:M(32),transactions_root:M(32),proposals_hash:M(32),uncles_hash:M(32),dao:M(32)})}function X(t,{debugPath:e="header"}={}){const r=J(t,{debugPath:"(raw)"+e}),n=N(e,t,{nonce:z(16)});return n.raw=r,n}function Q(t,{debugPath:e="uncle_block"}={}){return N(e,t,{header:q(X),proposals:G(M(10))})}var K=Object.freeze({__proto__:null,NormalizeScript:L,NormalizeOutPoint:U,NormalizeCellInput:V,NormalizeCellOutput:$,NormalizeCellDep:F,NormalizeRawTransaction:H,NormalizeTransaction:W,NormalizeRawHeader:J,NormalizeHeader:X,NormalizeUncleBlock:Q,NormalizeBlock:function(t,{debugPath:e="block"}={}){return N(e,t,{header:q(X),uncles:G(q(Q)),transactions:G(q(W)),proposals:G(M(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return N(e,t,{lock:q(L),message:M(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=M(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=M(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=M(-1)(e+".output_type",t.output_type)),r}});function Y(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Z(t,e,r){if(!((e=Y(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function tt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Z(r,t,{code_hash:Y,hash_type:Y,args:Y}),e&&l(t,{debugPath:"(transformed) "+r}),t}function et(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Z(r,t,{tx_hash:Y,index:Y}),e&&f(t,{debugPath:"(transformed) "+r}),t}function rt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function nt(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Z(r,t,{since:Y,previous_output:rt(et)}),e&&h(t,{debugPath:"(transformed) "+r}),t}function it(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Z(r,t,{capacity:Y,lock:rt(tt),type:rt(tt)}),e&&c(t,{debugPath:"(transformed) "+r}),t}function ot(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Z(r,t,{out_point:rt(et),dep_type:Y}),e&&g(t,{debugPath:"(transformed) "+r}),t}function at(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function st(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y),witnesses:at(Y)}),e&&y(t,{debugPath:"(transformed) "+r}),t}function ut(t,{validation:e=!0,debugPath:r="header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y,nonce:Y}),e&&w(t,{debugPath:"(transformed) "+r}),t}function _t(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Z(r,t,{header:rt(ut),proposals:at(Y)}),e&&D(t,{debugPath:"(transformed) "+r}),t}var lt=Object.freeze({__proto__:null,TransformScript:tt,TransformOutPoint:et,TransformCellInput:nt,TransformCellOutput:it,TransformCellDep:ot,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y)}),e&&b(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:st,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y}),e&&m(t,{debugPath:"(transformed) "+r}),t},TransformHeader:ut,TransformUncleBlock:_t,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Z(r,t,{header:rt(ut),uncles:at(rt(_t)),transactions:at(rt(st)),proposals:at(Y)}),e&&B(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Z(r,t,{lock:rt(tt),message:Y}),e&&P(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Z(r,t,{lock:Y,input_type:Y,output_type:Y}),e&&A(t,{debugPath:"(transformed) "+r}),t}});var ft=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:n=!0,loadData:i=!1,loadBlockNumber:o=!0}={}){this.rpc=t,this.lockHash=new r(e).serializeJson(),this.skipCellWithContent=n,this.loadData=i,this.loadBlockNumber=o}async*collect(){const t=j(await this.rpc.get_tip_block_number());let e=o.BigInt(0);for(;o.lessThanOrEqual(e,t);){let r=o.add(e,o.BigInt(100));o.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,R(e),R(r));for(const t of n){if(this.skipCellWithContent&&(t.type||o.greaterThan(j(t.output_data_len),o.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=o.add(r,o.BigInt(1))}}}});const ht="0.10.2";export{R as BigIntToHexString,j as HexStringToBigInt,I as RPC,r as Reader,E as TransactionDumper,ht as VERSION,ft as cell_collectors,K as normalizers,lt as transformers,T as validators}; diff --git a/dist/ckb-js-toolkit.node.js b/dist/ckb-js-toolkit.node.js index 19a7d2b..d8d4705 100644 --- a/dist/ckb-js-toolkit.node.js +++ b/dist/ckb-js-toolkit.node.js @@ -1,2 +1,2 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("stream"),e=require("http"),r=require("url"),n=require("https"),i=require("zlib");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(t),a=o(e),u=o(r),l=o(n),c=o(i);class _{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class f{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");r.setUint8(e,n)}return new _(e)}}class g extends Array{constructor(t,e){if(t>g.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");super(t),this.sign=e}static BigInt(t){var e=Math.floor,r=Number.isFinite;if("number"==typeof t){if(0===t)return g.__zero();if((0|t)===t)return 0>t?g.__oneDigit(-t,!0):g.__oneDigit(t,!1);if(!r(t)||e(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return g.__fromDouble(t)}if("string"==typeof t){const e=g.__fromString(t);if(null===e)throw new SyntaxError("Cannot convert "+t+" to a BigInt");return e}if("boolean"==typeof t)return!0===t?g.__oneDigit(1,!1):g.__zero();if("object"==typeof t){if(t.constructor===g)return t;const e=g.__toPrimitive(t);return g.BigInt(e)}throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){const t=["BigInt["];for(const e of this)t.push((e?(e>>>0).toString(16):e)+", ");return t.push("]"),t.join("")}toString(t=10){if(2>t||36>>=12;const _=l-12;let f=12<=l?0:a<<20+l,h=20+l;0<_&&0>>32-_,f=a<<_,h=_),0>>32-h,h-=32);const d=g.__decideRounding(t,h,u,a);if((1===d||0===d&&1==(1&f))&&(f=f+1>>>0,0==f&&(c++,0!=c>>>20&&(c=0,s++,1023=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){const e=1+(r>>>5),n=t.sign&&0!=(1&r),i=new g(e,n);i.__initializeDigits();const o=1<<(31&r);return i.__setDigit(e-1,o),i}let n=null,i=t;for(0!=(1&r)&&(n=t),r>>=1;0!==r;r>>=1)i=g.multiply(i,i),0!=(1&r)&&(n=null===n?i:g.multiply(n,i));return n}static multiply(t,e){if(0===t.length)return t;if(0===e.length)return e;let r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;const n=new g(r,t.sign!==e.sign);n.__initializeDigits();for(let r=0;rg.__absoluteCompare(t,e))return g.__zero();const r=t.sign!==e.sign,n=e.__unsignedDigit(0);let i;if(1===e.length&&65535>=n){if(1===n)return r===t.sign?t:g.unaryMinus(t);i=g.__absoluteDivSmall(t,n,null)}else i=g.__absoluteDivLarge(t,e,!0,!1);return i.sign=r,i.__trim()}static remainder(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(t,e))return t;const r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return g.__zero();const e=g.__absoluteModSmall(t,r);return 0===e?g.__zero():g.__oneDigit(e,t.sign)}const n=g.__absoluteDivLarge(t,e,!1,!0);return n.sign=t.sign,n.__trim()}static add(t,e){const r=t.sign;return r===e.sign?g.__absoluteAdd(t,e,r):0<=g.__absoluteCompare(t,e)?g.__absoluteSub(t,e,r):g.__absoluteSub(e,t,!r)}static subtract(t,e){const r=t.sign;return r===e.sign?0<=g.__absoluteCompare(t,e)?g.__absoluteSub(t,e,r):g.__absoluteSub(e,t,!r):g.__absoluteAdd(t,e,r)}static leftShift(t,e){return 0===e.length||0===t.length?t:e.sign?g.__rightShiftByAbsolute(t,e):g.__leftShiftByAbsolute(t,e)}static signedRightShift(t,e){return 0===e.length||0===t.length?t:e.sign?g.__leftShiftByAbsolute(t,e):g.__rightShiftByAbsolute(t,e)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,e){return 0>g.__compareToBigInt(t,e)}static lessThanOrEqual(t,e){return 0>=g.__compareToBigInt(t,e)}static greaterThan(t,e){return 0=g.__kMaxLengthBits)return e;const r=t+31>>>5;if(e.lengthg.__kMaxLengthBits)throw new RangeError("BigInt too big");return g.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=g.__kMaxLengthBits)return e;const r=t+31>>>5;if(e.length>>n)return e}return g.__truncateToNBits(t,e)}static ADD(t,e){if(t=g.__toPrimitive(t),e=g.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=g.__toNumeric(t),e=g.__toNumeric(e),g.__isBigInt(t)&&g.__isBigInt(e))return g.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,e){return g.__compare(t,e,0)}static LE(t,e){return g.__compare(t,e,1)}static GT(t,e){return g.__compare(t,e,2)}static GE(t,e){return g.__compare(t,e,3)}static EQ(t,e){for(;;){if(g.__isBigInt(t))return g.__isBigInt(e)?g.equal(t,e):g.EQ(e,t);if("number"==typeof t){if(g.__isBigInt(e))return g.__equalToNumber(e,t);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("string"==typeof t){if(g.__isBigInt(e))return null!==(t=g.__fromString(t))&&g.equal(t,e);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("boolean"==typeof t){if(g.__isBigInt(e))return g.__equalToNumber(e,+t);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("symbol"==typeof t){if(g.__isBigInt(e))return!1;if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else{if("object"!=typeof t)return t==e;if("object"==typeof e&&e.constructor!==g)return t==e;t=g.__toPrimitive(t)}}}static NE(t,e){return!g.EQ(t,e)}static __zero(){return new g(0,!1)}static __oneDigit(t,e){const r=new g(1,e);return r.__setDigit(0,t),r}__copy(){const t=new g(this.length,this.sign);for(let e=0;ee)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}let o=1<>>20)-1023,r=1+(e>>>5),n=new g(r,0>t);let i=1048575&g.__kBitConversionInts[1]|1048576,o=g.__kBitConversionInts[0];const s=31&e;let a,u=0;if(s<20){const t=20-s;u=t+32,a=i>>>t,i=i<<32-t|o>>>t,o<<=32-t}else if(20===s)u=32,a=i,i=o;else{const t=s-20;u=32-t,a=i<>>32-t,i=o<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}static __fromString(t,e=0){let r=0;const n=t.length;let i=0;if(i===n)return g.__zero();let o=t.charCodeAt(i);for(;g.__isWhitespace(o);){if(++i===n)return g.__zero();o=t.charCodeAt(i)}if(43===o){if(++i===n)return null;o=t.charCodeAt(i),r=1}else if(45===o){if(++i===n)return null;o=t.charCodeAt(i),r=-1}if(0===e){if(e=10,48===o){if(++i===n)return g.__zero();if(o=t.charCodeAt(i),88===o||120===o){if(e=16,++i===n)return null;o=t.charCodeAt(i)}else if(79===o||111===o){if(e=8,++i===n)return null;o=t.charCodeAt(i)}else if(66===o||98===o){if(e=2,++i===n)return null;o=t.charCodeAt(i)}}}else if(16===e&&48===o){if(++i===n)return g.__zero();if(o=t.charCodeAt(i),88===o||120===o){if(++i===n)return null;o=t.charCodeAt(i)}}for(;48===o;){if(++i===n)return g.__zero();o=t.charCodeAt(i)}const s=n-i;let a=g.__kMaxBitsPerChar[e],u=g.__kBitsPerCharTableMultiplier-1;if(s>1073741824/a)return null;const l=a*s+u>>>g.__kBitsPerCharTableShift,c=new g(l+31>>>5,!1),_=10>e?e:10,f=10>=g.__kBitsPerCharTableShift;const e=[],r=[];let s=!1;do{let u=0,l=0;for(;;){let e;if(o-48>>>0<_)e=o-48;else{if(!((32|o)-97>>>0>>0<_)a=o-48;else{if(!((32|o)-97>>>0>>g.__kBitsPerCharTableShift+5;c.__inplaceMultiplyAdd(h,l,d)}while(!r)}if(i!==n){if(!g.__isWhitespace(o))return null;for(i++;i>>u-o)}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&i),i=(51&i>>>2)+(51&i),i=(15&i>>>4)+(15&i);const o=i,s=e-1,a=t.__digit(n-1);let u=0|(32*n-r(a)+o-1)/o;if(t.sign&&u++,268435456>>i,f=32-i;f>=o;)l[c--]=g.__kConversionChars[_&s],_>>>=o,f-=o}const h=(_|a<>>o-f;0!==_;)l[c--]=g.__kConversionChars[_&s],_>>>=o;if(t.sign&&(l[c--]="-"),-1!=c)throw new Error("implementation bug");return l.join("")}static __toStringGeneric(t,e,r){var n=Math.clz32;const i=t.length;if(0===i)return"";if(1===i){let n=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(n="-"+n),n}const o=32*i-n(t.__digit(i-1)),s=g.__kMaxBitsPerChar[e]-1;let a=o*g.__kBitsPerCharTableMultiplier;a+=s-1,a=0|a/s;const u=a+1>>1,l=g.exponentiate(g.__oneDigit(e,!1),g.__oneDigit(u,!1));let c,_;const f=l.__unsignedDigit(0);if(1===l.length&&65535>=f){c=new g(t.length,!1),c.__initializeDigits();let r=0;for(let e=2*t.length-1;0<=e;e--){const n=r<<16|t.__halfDigit(e);c.__setHalfDigit(e,0|n/f),r=0|n%f}_=r.toString(e)}else{const r=g.__absoluteDivLarge(t,l,!0,!0);c=r.quotient;const n=r.remainder.__trim();_=g.__toStringGeneric(n,e,!0)}c.__trim();let h=g.__toStringGeneric(c,e,!0);for(;_.lengthn?g.__absoluteLess(r):0}static __compareToNumber(t,e){if(!0|e){const r=t.sign,n=0>e;if(r!==n)return g.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?g.__absoluteGreater(r):oe)return g.__unequalSign(n);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;g.__kBitConversionDouble[0]=e;const i=2047&g.__kBitConversionInts[1]>>>20;if(2047==i)throw new Error("implementation bug: handled elsewhere");const o=i-1023;if(0>o)return g.__absoluteGreater(n);const s=t.length;let a=t.__digit(s-1);const u=r(a),l=32*s-u,c=o+1;if(lc)return g.__absoluteGreater(n);let _=1048576|1048575&g.__kBitConversionInts[1],f=g.__kBitConversionInts[0];const h=31-u;if(h!==(l-1)%31)throw new Error("implementation bug");let d,p=0;if(20>h){const t=20-h;p=t+32,d=_>>>t,_=_<<32-t|f>>>t,f<<=32-t}else if(20===h)p=32,d=_,_=f;else{const t=h-20;p=32-t,d=_<>>32-t,_=f<>>=0,d>>>=0,a>d)return g.__absoluteGreater(n);if(a>>0,_=f,f=0):d=0;const r=t.__unsignedDigit(e);if(r>d)return g.__absoluteGreater(n);if(re&&t.__unsignedDigit(0)===r(e):0===g.__compareToDouble(t,e)}static __comparisonResultToBool(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(g.__isBigInt(t)&&"string"==typeof e)return null!==(e=g.__fromString(e))&&g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if("string"==typeof t&&g.__isBigInt(e))return null!==(t=g.__fromString(t))&&g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if(t=g.__toNumeric(t),e=g.__toNumeric(e),g.__isBigInt(t)){if(g.__isBigInt(e))return g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(g.__isBigInt(e))return g.__comparisonResultToBool(g.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}__clzmsd(){return Math.clz32(this[this.length-1])}static __absoluteAdd(t,e,r){if(t.length>>16)+(r>>>16)+(a>>>16);o=u>>>16,i.__setDigit(s,65535&a|u<<16)}for(;s>>16)+(r>>>16);o=n>>>16,i.__setDigit(s,65535&r|n<<16)}return s>>16;const u=(r>>>16)-(s>>>16)-i;i=1&u>>>16,n.__setDigit(o,65535&a|u<<16)}for(;o>>16;const s=(e>>>16)-i;i=1&s>>>16,n.__setDigit(o,65535&r|s<<16)}return n.__trim()}static __absoluteAddOne(t,e,r=null){const n=t.length;null===r?r=new g(n,e):r.sign=e;let i=!0;for(let e,o=0;on?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(t,e,r,n){var i=Math.imul;if(0===e)return;const o=65535&e,s=e>>>16;let a=0,u=0,l=0;for(let e=0;e>>16;const h=t.__digit(e),g=65535&h,d=h>>>16,p=i(g,o),b=i(g,s),m=i(d,o),y=i(d,s);_+=u+(65535&p),f+=l+a+(_>>>16)+(p>>>16)+(65535&b)+(65535&m),a=f>>>16,u=(b>>>16)+(m>>>16)+(65535&y)+a,a=u>>>16,u&=65535,l=y>>>16,c=65535&_|f<<16,r.__setDigit(n,c)}for(;0!=a||0!==u||0!==l;n++){let t=r.__digit(n);const e=(65535&t)+u,i=(t>>>16)+(e>>>16)+l+a;u=0,l=0,a=i>>>16,t=65535&e|i<<16,r.__setDigit(n,t)}}static __internalMultiplyAdd(t,e,r,n,i){var o=Math.imul;let s=r,a=0;for(let r=0;r>>16;const c=o(n>>>16,e),_=(65535&c)+(u>>>16)+s;s=_>>>16,a=c>>>16,i.__setDigit(r,_<<16|65535&l)}if(i.length>n)for(i.__setDigit(n++,s+a);nthis.length&&(r=this.length);const i=65535&t,o=t>>>16;let s=0,a=65535&e,u=e>>>16;for(let t=0;t>>16,c=n(r,i),_=n(r,o),f=n(l,i),h=n(l,o),g=a+(65535&c),d=u+s+(g>>>16)+(c>>>16)+(65535&_)+(65535&f);a=(_>>>16)+(f>>>16)+(65535&h)+(d>>>16),s=a>>>16,a&=65535,u=h>>>16,this.__setDigit(t,65535&g|d<<16)}if(0!=s||0!==a||0!==u)throw new Error("implementation bug")}static __absoluteDivSmall(t,e,r){null===r&&(r=new g(t.length,!1));let n=0;for(let i,o=2*t.length-1;0<=o;o-=2){i=(n<<16|t.__halfDigit(o))>>>0;const s=0|i/e;n=0|i%e,i=(n<<16|t.__halfDigit(o-1))>>>0;const a=0|i/e;n=0|i%e,r.__setDigit(o>>>1,s<<16|a)}return r}static __absoluteModSmall(t,e){let r=0;for(let n=2*t.length-1;0<=n;n--){r=0|((r<<16|t.__halfDigit(n))>>>0)%e}return r}static __absoluteDivLarge(t,e,r,n){var i=Math.imul;const o=e.__halfDigitLength(),s=e.length,a=t.__halfDigitLength()-o;let u=null;r&&(u=new g(a+2>>>1,!1),u.__initializeDigits());const l=new g(o+2>>>1,!1);l.__initializeDigits();const c=g.__clz16(e.__halfDigit(o-1));0>>0;t=0|r/f;let s=0|r%f;const u=e.__halfDigit(o-2),l=_.__halfDigit(n+o-2);for(;i(t,u)>>>0>(s<<16|l)>>>0&&(t--,s+=f,!(65535>>1,h|t))}return n?(_.__inplaceRightShift(c),r?{quotient:u,remainder:_}:_):r?u:void 0}static __clz16(t){return Math.clz32(t)-16}__inplaceAdd(t,e,r){let n=0;for(let i=0;i>>16,this.__setHalfDigit(e+i,r)}return n}__inplaceSub(t,e,r){let n=0;if(1&e){e>>=1;let i=this.__digit(e),o=65535&i,s=0;for(;s>>1;s++){const r=t.__digit(s),a=(i>>>16)-(65535&r)-n;n=1&a>>>16,this.__setDigit(e+s,a<<16|65535&o),i=this.__digit(e+s+1),o=(65535&i)-(r>>>16)-n,n=1&o>>>16}const a=t.__digit(s),u=(i>>>16)-(65535&a)-n;if(n=1&u>>>16,this.__setDigit(e+s,u<<16|65535&o),e+s+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(i=this.__digit(e+s+1),o=(65535&i)-(a>>>16)-n,n=1&o>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;let i=0;for(;i>>16;const a=(r>>>16)-(o>>>16)-n;n=1&a>>>16,this.__setDigit(e+i,a<<16|65535&s)}const o=this.__digit(e+i),s=t.__digit(i),a=(65535&o)-(65535&s)-n;n=1&a>>>16;let u=0;0==(1&r)&&(u=(o>>>16)-(s>>>16)-n,n=1&u>>>16),this.__setDigit(e+i,u<<16|65535&a)}return n}__inplaceRightShift(t){if(0===t)return;let e=this.__digit(0)>>>t;const r=this.length-1;for(let n=0;n>>t}this.__setDigit(r,e)}static __specialLeftShift(t,e,r){const n=t.length,i=new g(n+r,!1);if(0===e){for(let e=0;e>>32-e}return 0r)throw new RangeError("BigInt too big");const n=r>>>5,i=31&r,o=t.length,s=0!==i&&0!=t.__digit(o-1)>>>32-i,a=o+n+(s?1:0),u=new g(a,t.sign);if(0===i){let e=0;for(;e>>32-i}if(s)u.__setDigit(o+n,e);else if(0!=e)throw new Error("implementation bug")}return u.__trim()}static __rightShiftByAbsolute(t,e){const r=t.length,n=t.sign,i=g.__toShiftAmount(e);if(0>i)return g.__rightShiftByMaximum(n);const o=i>>>5,s=31&i;let a=r-o;if(0>=a)return g.__rightShiftByMaximum(n);let u=!1;if(n)if(0!=(t.__digit(o)&(1<>>s;const n=r-o-1;for(let r=0;r>>s}l.__setDigit(n,e)}return u&&(l=g.__absoluteAddOne(l,!0,l)),l.__trim()}static __rightShiftByMaximum(t){return t?g.__oneDigit(1,!0):g.__zero()}static __toShiftAmount(t){if(1g.__kMaxLengthBits?-1:e}static __toPrimitive(t,e="default"){if("object"!=typeof t)return t;if(t.constructor===g)return t;const r=t[Symbol.toPrimitive];if(r){const t=r(e);if("object"!=typeof t)return t;throw new TypeError("Cannot convert object to primitive value")}const n=t.valueOf;if(n){const e=n.call(t);if("object"!=typeof e)return e}const i=t.toString;if(i){const e=i.call(t);if("object"!=typeof e)return e}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return g.__isBigInt(t)?t:+t}static __isBigInt(t){return"object"==typeof t&&t.constructor===g}static __truncateToNBits(t,e){const r=t+31>>>5,n=new g(r,e.sign),i=r-1;for(let t=0;t>>e}return n.__setDigit(i,o),n.__trim()}static __truncateAndSubFromPowerOfTwo(t,e,r){var n=Math.min;const i=t+31>>>5,o=new g(i,r);let s=0;const a=i-1;let u=0;for(const t=n(a,e.length);s>>16;const n=0-(t>>>16)-u;u=1&n>>>16,o.__setDigit(s,65535&r|n<<16)}for(;s>>16;_=65535&t|0-(l>>>16)-u<<16}else{const t=32-c;l=l<>>t;const e=1<<32-t,r=(65535&e)-(65535&l)-u;u=1&r>>>16;_=65535&r|(e>>>16)-(l>>>16)-u<<16,_&=e-1}return o.__setDigit(a,_),o.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,e){this[t]=0|e}__setDigitGrow(t,e){this[t]=0|e}__halfDigitLength(){const t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 65535&this[t>>>1]>>>((1&t)<<4)}__setHalfDigit(t,e){const r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}static __digitPow(t,e){let r=1;for(;0>>=1,t*=t;return r}}function d(t,e,r,n=[]){!function(t,e){if(!(e instanceof Object))throw new Error(t+" is not an object!")}(t,e);const i=Object.keys(e).sort(),o=r.length,s=r.length+n.length,a=`${t} does not have correct keys! Required keys: [${r.sort().join(", ")}], optional keys: [${n.sort().join(", ")}], actual keys: [${i.join(", ")}]`;if(i.lengths)throw new Error(a);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(a);if(u.find(t=>!n.includes(t)))throw new Error(a)}function p(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function b(t,e){if(p(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function m(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function y(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(d(r,t,["code_hash","hash_type","args"],[]),b(r+".code_hash",t.code_hash),p(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function w(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){d(r,t,["tx_hash","index"],[]),b(r+".tx_hash",t.tx_hash),m(r+".index",t.index)}function v(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){d(r,t,["since","previous_output"],[]),m(r+".since",t.since),e&&w(t.previous_output,{debugPath:r+".previous_output"})}function B(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){d(r,t,["capacity","lock"],["type"]),m(r+".capacity",t.capacity),e&&(y(t.lock,{debugPath:r+".lock"}),t.type&&y(t.type,{debugPath:r+".type"}))}function P(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(d(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&w(t.out_point,{debugPath:r+".out_point"})}function D(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=r.size;let i=void 0===n?0:n;var o=r.timeout;let a=void 0===o?0:o;null==t?t=null:W(t)?t=Buffer.from(t.toString()):J(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof s.default||(t=Buffer.from(String(t)))),this[V]={body:t,disturbed:!1,error:null},this.size=i,this.timeout=a,t instanceof s.default&&t.on("error",(function(t){const r="AbortError"===t.name?t:new q(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[V].error=r}))}function G(){var t=this;if(this[V].disturbed)return F.Promise.reject(new TypeError("body used already for: "+this.url));if(this[V].disturbed=!0,this[V].error)return F.Promise.reject(this[V].error);let e=this.body;if(null===e)return F.Promise.resolve(Buffer.alloc(0));if(J(e)&&(e=e.stream()),Buffer.isBuffer(e))return F.Promise.resolve(e);if(!(e instanceof s.default))return F.Promise.resolve(Buffer.alloc(0));let r=[],n=0,i=!1;return new F.Promise((function(o,s){let a;t.timeout&&(a=setTimeout((function(){i=!0,s(new q(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,s(e)):s(new q(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(t.size&&n+e.length>t.size)return i=!0,void s(new q(`content size at ${t.url} over limit: ${t.size}`,"max-size"));n+=e.length,r.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(a);try{o(Buffer.concat(r,n))}catch(e){s(new q(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function W(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function J(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function X(t){let e,r,n=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof s.default&&"function"!=typeof n.getBoundary&&(e=new H,r=new H,n.pipe(e),n.pipe(r),t[V].body=e,n=r),n}function Q(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":W(t)?"application/x-www-form-urlencoded;charset=UTF-8":J(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?"multipart/form-data;boundary="+t.getBoundary():t instanceof s.default?null:"text/plain;charset=UTF-8"}function Z(t){const e=t.body;return null===e?0:J(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}F.prototype={get body(){return this[V].body},get bodyUsed(){return this[V].disturbed},arrayBuffer(){return G.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return G.call(this).then((function(e){return Object.assign(new $([],{type:t.toLowerCase()}),{[M]:e})}))},json(){var t=this;return G.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return F.Promise.reject(new q(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return G.call(this).then((function(t){return t.toString()}))},buffer(){return G.call(this)},textConverted(){var t=this;return G.call(this).then((function(e){return function(t,e){if("function"!=typeof U)throw new Error("The package `encoding` must be installed to use the textConverted() function");const r=e.get("content-type");let n,i,o="utf-8";r&&(n=/charset=([^;]*)/i.exec(r));i=t.slice(0,1024).toString(),!n&&i&&(n=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[nt]=Object.create(null),t instanceof it){const e=t.raw(),r=Object.keys(e);for(const t of r)for(const r of e[t])this.append(t,r)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const r=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");r.push(Array.from(e))}for(const t of r){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const r=t[e];this.append(e,r)}}}}get(t){tt(t=""+t);const e=rt(this[nt],t);return void 0===e?null:this[nt][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=ot(this),n=0;for(;n1&&void 0!==arguments[1]?arguments[1]:"key+value";const r=Object.keys(t[nt]).sort();return r.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[nt][e].join(", ")}:function(e){return[e.toLowerCase(),t[nt][e].join(", ")]})}it.prototype.entries=it.prototype[Symbol.iterator],Object.defineProperty(it.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(it.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const st=Symbol("internal");function at(t,e){const r=Object.create(ut);return r[st]={target:t,kind:e,index:0},r}const ut=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==ut)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[st];const e=t.target,r=t.kind,n=t.index,i=ot(e,r);return n>=i.length?{value:void 0,done:!0}:(this[st].index=n+1,{value:i[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function lt(t){const e=Object.assign({__proto__:null},t[nt]),r=rt(t[nt],"Host");return void 0!==r&&(e[r]=e[r][0]),e}Object.defineProperty(ut,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const ct=Symbol("Response internals"),_t=a.default.STATUS_CODES;class ft{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};F.call(this,t,e);const r=e.status||200,n=new it(e.headers);if(null!=t&&!n.has("Content-Type")){const e=Q(t);e&&n.append("Content-Type",e)}this[ct]={url:e.url,status:r,statusText:e.statusText||_t[r],headers:n,counter:e.counter}}get url(){return this[ct].url||""}get status(){return this[ct].status}get ok(){return this[ct].status>=200&&this[ct].status<300}get redirected(){return this[ct].counter>0}get statusText(){return this[ct].statusText}get headers(){return this[ct].headers}clone(){return new ft(X(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}F.mixIn(ft.prototype),Object.defineProperties(ft.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(ft.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const ht=Symbol("Request internals"),gt=u.default.parse,dt=u.default.format,pt="destroy"in s.default.Readable.prototype;function bt(t){return"object"==typeof t&&"object"==typeof t[ht]}class mt{constructor(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};bt(t)?e=gt(t.url):(e=t&&t.href?gt(t.href):gt(""+t),t={});let n=r.method||t.method||"GET";if(n=n.toUpperCase(),(null!=r.body||bt(t)&&null!==t.body)&&("GET"===n||"HEAD"===n))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=r.body?r.body:bt(t)&&null!==t.body?X(t):null;F.call(this,i,{timeout:r.timeout||t.timeout||0,size:r.size||t.size||0});const o=new it(r.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=Q(i);t&&o.append("Content-Type",t)}let s=bt(t)?t.signal:null;if("signal"in r&&(s=r.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[ht]={method:n,redirect:r.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:s},this.follow=void 0!==r.follow?r.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==r.compress?r.compress:void 0===t.compress||t.compress,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent}get method(){return this[ht].method}get url(){return dt(this[ht].parsedURL)}get headers(){return this[ht].headers}get redirect(){return this[ht].redirect}get signal(){return this[ht].signal}clone(){return new mt(this)}}function yt(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}F.mixIn(mt.prototype),Object.defineProperty(mt.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(mt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),yt.prototype=Object.create(Error.prototype),yt.prototype.constructor=yt,yt.prototype.name="AbortError";const wt=s.default.PassThrough,vt=u.default.resolve;function Bt(t,e){if(!Bt.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return F.Promise=Bt.Promise,new Bt.Promise((function(r,n){const i=new mt(t,e),o=function(t){const e=t[ht].parsedURL,r=new it(t[ht].headers);if(r.has("Accept")||r.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof s.default.Readable&&!pt)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(n="0"),null!=t.body){const e=Z(t);"number"==typeof e&&(n=String(e))}n&&r.set("Content-Length",n),r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let i=t.agent;return"function"==typeof i&&(i=i(e)),r.has("Connection")||i||r.set("Connection","close"),Object.assign({},e,{method:t.method,headers:lt(r),agent:i})}(i),u=("https:"===o.protocol?l.default:a.default).request,_=i.signal;let f=null;const h=function(){let t=new yt("The user aborted a request.");n(t),i.body&&i.body instanceof s.default.Readable&&i.body.destroy(t),f&&f.body&&f.body.emit("error",t)};if(_&&_.aborted)return void h();const g=function(){h(),b()},d=u(o);let p;function b(){d.abort(),_&&_.removeEventListener("abort",g),clearTimeout(p)}_&&_.addEventListener("abort",g),i.timeout&&d.once("socket",(function(t){p=setTimeout((function(){n(new q("network timeout at: "+i.url,"request-timeout")),b()}),i.timeout)})),d.on("error",(function(t){n(new q(`request to ${i.url} failed, reason: ${t.message}`,"system",t)),b()})),d.on("response",(function(t){clearTimeout(p);const e=function(t){const e=new it;for(const r of Object.keys(t))if(!K.test(r))if(Array.isArray(t[r]))for(const n of t[r])Y.test(n)||(void 0===e[nt][r]?e[nt][r]=[n]:e[nt][r].push(n));else Y.test(t[r])||(e[nt][r]=[t[r]]);return e}(t.headers);if(Bt.isRedirect(t.statusCode)){const o=e.get("Location"),s=null===o?null:vt(i.url,o);switch(i.redirect){case"error":return n(new q("uri requested responds with a redirect, redirect mode is set to error: "+i.url,"no-redirect")),void b();case"manual":if(null!==s)try{e.set("Location",s)}catch(t){n(t)}break;case"follow":if(null===s)break;if(i.counter>=i.follow)return n(new q("maximum redirect reached at: "+i.url,"max-redirect")),void b();const o={headers:new it(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};return 303!==t.statusCode&&i.body&&null===Z(i)?(n(new q("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==i.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),r(Bt(new mt(s,o))),void b())}}t.once("end",(function(){_&&_.removeEventListener("abort",g)}));let o=t.pipe(new wt);const s={url:i.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:i.size,timeout:i.timeout,counter:i.counter},a=e.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===a||204===t.statusCode||304===t.statusCode)return f=new ft(o,s),void r(f);const u={flush:c.default.Z_SYNC_FLUSH,finishFlush:c.default.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return o=o.pipe(c.default.createGunzip(u)),f=new ft(o,s),void r(f);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof c.default.createBrotliDecompress)return o=o.pipe(c.default.createBrotliDecompress()),f=new ft(o,s),void r(f);f=new ft(o,s),r(f)}else{t.pipe(new wt).once("data",(function(t){o=8==(15&t[0])?o.pipe(c.default.createInflate()):o.pipe(c.default.createInflateRaw()),f=new ft(o,s),r(f)}))}})),function(t,e){const r=e.body;null===r?t.end():J(r)?r.stream().pipe(t):Buffer.isBuffer(r)?(t.write(r),t.end()):r.pipe(t)}(d,i)}))}Bt.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Bt.Promise=global.Promise;var Pt,Dt,St=Object.freeze({__proto__:null,default:Bt,Headers:it,Request:mt,Response:ft,FetchError:q}),Tt=(function(t,e){var r=St.default||St,n=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),r.call(this,t,e)};t.exports=e=n,e.fetch=n,e.Headers=St.Headers,e.Request=St.Request,e.Response=St.Response,e.default=n}(Dt={path:Pt,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&Dt.path)}},Dt.exports),Dt.exports);function kt(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const xt={get:(t,e,r)=>"send"===e?async()=>{const e=await Tt(t.uri,kt({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},Ct={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},xt):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await Tt(t.uri,kt({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class Et{constructor(t,e={}){return this.uri=t,this.defaultOptions=e,new Proxy(this,Ct)}static create(t){return new Et(t)}}function Ot(t){return g.BigInt(t)}function At(t){return"0x"+t.toString(16)}function jt(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=At(g.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&r.byteLength!==t)throw new Error(`${e} has invalid length ${r.byteLength}, required: ${t}`);return r}}function It(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function Rt(t,{debugPath:e="script"}={}){return It(e,t,{code_hash:zt(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:zt(-1)})}function Lt(t,{debugPath:e="out_point"}={}){return It(e,t,{tx_hash:zt(32),index:jt(4)})}function Mt(t){return function(e,r){return t(r,{debugPath:e})}}function Nt(t,{debugPath:e="cell_input"}={}){return It(e,t,{since:jt(8),previous_output:Mt(Lt)})}function $t(t,{debugPath:e="cell_output"}={}){const r=It(e,t,{capacity:jt(8),lock:Mt(Rt)});return t.type&&(r.type_=Rt(t.type,{debugPath:e+".type"})),r}function qt(t,{debugPath:e="cell_dep"}={}){return It(e,t,{out_point:Mt(Lt),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function Ut(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function Vt(t,{debugPath:e="raw_transaction"}={}){return It(e,t,{version:jt(4),cell_deps:Ut(Mt(qt)),header_deps:Ut(zt(32)),inputs:Ut(Mt(Nt)),outputs:Ut(Mt($t)),outputs_data:Ut(zt(-1))})}function Ht(t,{debugPath:e="transaction"}={}){const r=Vt(t,{debugPath:"(raw)"+e}),n=It(e,t,{witnesses:Ut(zt(-1))});return n.raw=r,n}function Ft(t,{debugPath:e="raw_header"}={}){return It(e,t,{version:jt(4),compact_target:jt(4),timestamp:jt(8),number:jt(8),epoch:jt(8),parent_hash:zt(32),transactions_root:zt(32),proposals_hash:zt(32),uncles_hash:zt(32),dao:zt(32)})}function Gt(t,{debugPath:e="header"}={}){const r=Ft(t,{debugPath:"(raw)"+e}),n=It(e,t,{nonce:jt(16)});return n.raw=r,n}function Wt(t,{debugPath:e="uncle_block"}={}){return It(e,t,{header:Mt(Gt),proposals:Ut(zt(10))})}var Jt=Object.freeze({__proto__:null,NormalizeScript:Rt,NormalizeOutPoint:Lt,NormalizeCellInput:Nt,NormalizeCellOutput:$t,NormalizeCellDep:qt,NormalizeRawTransaction:Vt,NormalizeTransaction:Ht,NormalizeRawHeader:Ft,NormalizeHeader:Gt,NormalizeUncleBlock:Wt,NormalizeBlock:function(t,{debugPath:e="block"}={}){return It(e,t,{header:Mt(Gt),uncles:Ut(Mt(Wt)),transactions:Ut(Mt(Ht)),proposals:Ut(zt(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return It(e,t,{lock:Mt(Rt),message:zt(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=zt(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=zt(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=zt(-1)(e+".output_type",t.output_type)),r}});function Xt(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Qt(t,e,r){if(!((e=Xt(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function Zt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Qt(r,t,{code_hash:Xt,hash_type:Xt,args:Xt}),e&&y(t,{debugPath:"(transformed) "+r}),t}function Kt(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Qt(r,t,{tx_hash:Xt,index:Xt}),e&&w(t,{debugPath:"(transformed) "+r}),t}function Yt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function te(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Qt(r,t,{since:Xt,previous_output:Yt(Kt)}),e&&v(t,{debugPath:"(transformed) "+r}),t}function ee(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Qt(r,t,{capacity:Xt,lock:Yt(Zt),type:Yt(Zt)}),e&&B(t,{debugPath:"(transformed) "+r}),t}function re(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Qt(r,t,{out_point:Yt(Kt),dep_type:Xt}),e&&P(t,{debugPath:"(transformed) "+r}),t}function ne(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function ie(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Qt(r,t,{version:Xt,cell_deps:ne(Yt(re)),header_deps:ne(Xt),inputs:ne(Yt(te)),outputs:ne(Yt(ee)),outputs_data:ne(Xt),witnesses:ne(Xt)}),e&&x(t,{debugPath:"(transformed) "+r}),t}function oe(t,{validation:e=!0,debugPath:r="header"}={}){return t=Qt(r,t,{version:Xt,compact_target:Xt,timestamp:Xt,number:Xt,epoch:Xt,parent_hash:Xt,transactions_root:Xt,proposals_hash:Xt,uncles_hash:Xt,dao:Xt,nonce:Xt}),e&&E(t,{debugPath:"(transformed) "+r}),t}function se(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Qt(r,t,{header:Yt(oe),proposals:ne(Xt)}),e&&A(t,{debugPath:"(transformed) "+r}),t}var ae=Object.freeze({__proto__:null,TransformScript:Zt,TransformOutPoint:Kt,TransformCellInput:te,TransformCellOutput:ee,TransformCellDep:re,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Qt(r,t,{version:Xt,cell_deps:ne(Yt(re)),header_deps:ne(Xt),inputs:ne(Yt(te)),outputs:ne(Yt(ee)),outputs_data:ne(Xt)}),e&&k(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:ie,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Qt(r,t,{version:Xt,compact_target:Xt,timestamp:Xt,number:Xt,epoch:Xt,parent_hash:Xt,transactions_root:Xt,proposals_hash:Xt,uncles_hash:Xt,dao:Xt}),e&&C(t,{debugPath:"(transformed) "+r}),t},TransformHeader:oe,TransformUncleBlock:se,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Qt(r,t,{header:Yt(oe),uncles:ne(Yt(se)),transactions:ne(Yt(ie)),proposals:ne(Xt)}),e&&j(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Qt(r,t,{lock:Yt(Zt),message:Xt}),e&&z(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Qt(r,t,{lock:Xt,input_type:Xt,output_type:Xt}),e&&I(t,{debugPath:"(transformed) "+r}),t}});var ue=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:r=!0,loadData:n=!1,loadBlockNumber:i=!0}={}){this.rpc=t,this.lockHash=new h(e).serializeJson(),this.skipCellWithContent=r,this.loadData=n,this.loadBlockNumber=i}async*collect(){const t=Ot(await this.rpc.get_tip_block_number());let e=g.BigInt(0);for(;g.lessThanOrEqual(e,t);){let r=g.add(e,g.BigInt(100));g.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,At(e),At(r));for(const t of n){if(this.skipCellWithContent&&(t.type||g.greaterThan(Ot(t.output_data_len),g.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=g.add(r,g.BigInt(1))}}}});exports.BigIntToHexString=At,exports.HexStringToBigInt=Ot,exports.RPC=Et,exports.Reader=h,exports.TransactionDumper=class{constructor(t,{validateTransaction:e=!0,depGroupUnpacker:r=null}={}){this.rpc=t,this.validateTransaction=e,this.depGroupUnpacker=r}async dumpByHash(t){const e=(await this.rpc.get_transaction(t)).transaction;return delete e.hash,await this.dump(e)}async dump(t){this.validateTransaction&&x(t);const e=[];for(const r of t.inputs){const{output:t,data:n,header:i}=await this._resolveOutPoint(r.previous_output);e.push({input:r,output:t,data:n,header:i})}const r=[];for(const e of t.cell_deps){const{output:t,data:n,header:i}=await this._resolveOutPoint(e.out_point);if(r.push({cell_dep:e,output:t,data:n,header:i}),"dep_group"===e.dep_type){if(!this.depGroupUnpacker)throw new Error("depGroupUnpacker must be provided when the transaction contains dep_group!");const t=this.depGroupUnpacker(new h(n));for(const e of t){w(e);const{output:t,data:n,header:i}=await this._resolveOutPoint(e);r.push({cell_dep:{out_point:e,dep_type:"code"},output:t,data:n,header:i})}}}const n=[];for(const e of t.header_deps)n.push(await this.rpc.get_header(e));return JSON.stringify({mock_info:{inputs:e,cell_deps:r,header_deps:n},tx:t})}async _resolveOutPoint(t){const e=await this.rpc.get_transaction(t.tx_hash);if(!e||!e.transaction)throw new Error(`Transaction ${t.tx_hash} cannot be found!`);const r=e.transaction,n=g.toNumber(g.BigInt(t.index));if(n>=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}},exports.VERSION="0.10.2",exports.cell_collectors=ue,exports.normalizers=Jt,exports.transformers=ae,exports.validators=R; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("stream"),e=require("http"),r=require("url"),n=require("https"),i=require("zlib");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(t),a=o(e),u=o(r),l=o(n),c=o(i);class _{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class f{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");r.setUint8(e,n)}return new _(e)}}class g extends Array{constructor(t,e){if(t>g.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");super(t),this.sign=e}static BigInt(t){var e=Math.floor,r=Number.isFinite;if("number"==typeof t){if(0===t)return g.__zero();if((0|t)===t)return 0>t?g.__oneDigit(-t,!0):g.__oneDigit(t,!1);if(!r(t)||e(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return g.__fromDouble(t)}if("string"==typeof t){const e=g.__fromString(t);if(null===e)throw new SyntaxError("Cannot convert "+t+" to a BigInt");return e}if("boolean"==typeof t)return!0===t?g.__oneDigit(1,!1):g.__zero();if("object"==typeof t){if(t.constructor===g)return t;const e=g.__toPrimitive(t);return g.BigInt(e)}throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){const t=["BigInt["];for(const e of this)t.push((e?(e>>>0).toString(16):e)+", ");return t.push("]"),t.join("")}toString(t=10){if(2>t||36>>=12;const _=l-12;let f=12<=l?0:a<<20+l,h=20+l;0<_&&0>>32-_,f=a<<_,h=_),0>>32-h,h-=32);const d=g.__decideRounding(t,h,u,a);if((1===d||0===d&&1==(1&f))&&(f=f+1>>>0,0==f&&(c++,0!=c>>>20&&(c=0,s++,1023=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){const e=1+(r>>>5),n=t.sign&&0!=(1&r),i=new g(e,n);i.__initializeDigits();const o=1<<(31&r);return i.__setDigit(e-1,o),i}let n=null,i=t;for(0!=(1&r)&&(n=t),r>>=1;0!==r;r>>=1)i=g.multiply(i,i),0!=(1&r)&&(n=null===n?i:g.multiply(n,i));return n}static multiply(t,e){if(0===t.length)return t;if(0===e.length)return e;let r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;const n=new g(r,t.sign!==e.sign);n.__initializeDigits();for(let r=0;rg.__absoluteCompare(t,e))return g.__zero();const r=t.sign!==e.sign,n=e.__unsignedDigit(0);let i;if(1===e.length&&65535>=n){if(1===n)return r===t.sign?t:g.unaryMinus(t);i=g.__absoluteDivSmall(t,n,null)}else i=g.__absoluteDivLarge(t,e,!0,!1);return i.sign=r,i.__trim()}static remainder(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(t,e))return t;const r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return g.__zero();const e=g.__absoluteModSmall(t,r);return 0===e?g.__zero():g.__oneDigit(e,t.sign)}const n=g.__absoluteDivLarge(t,e,!1,!0);return n.sign=t.sign,n.__trim()}static add(t,e){const r=t.sign;return r===e.sign?g.__absoluteAdd(t,e,r):0<=g.__absoluteCompare(t,e)?g.__absoluteSub(t,e,r):g.__absoluteSub(e,t,!r)}static subtract(t,e){const r=t.sign;return r===e.sign?0<=g.__absoluteCompare(t,e)?g.__absoluteSub(t,e,r):g.__absoluteSub(e,t,!r):g.__absoluteAdd(t,e,r)}static leftShift(t,e){return 0===e.length||0===t.length?t:e.sign?g.__rightShiftByAbsolute(t,e):g.__leftShiftByAbsolute(t,e)}static signedRightShift(t,e){return 0===e.length||0===t.length?t:e.sign?g.__leftShiftByAbsolute(t,e):g.__rightShiftByAbsolute(t,e)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,e){return 0>g.__compareToBigInt(t,e)}static lessThanOrEqual(t,e){return 0>=g.__compareToBigInt(t,e)}static greaterThan(t,e){return 0=g.__kMaxLengthBits)return e;const r=t+31>>>5;if(e.lengthg.__kMaxLengthBits)throw new RangeError("BigInt too big");return g.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=g.__kMaxLengthBits)return e;const r=t+31>>>5;if(e.length>>n)return e}return g.__truncateToNBits(t,e)}static ADD(t,e){if(t=g.__toPrimitive(t),e=g.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=g.__toNumeric(t),e=g.__toNumeric(e),g.__isBigInt(t)&&g.__isBigInt(e))return g.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,e){return g.__compare(t,e,0)}static LE(t,e){return g.__compare(t,e,1)}static GT(t,e){return g.__compare(t,e,2)}static GE(t,e){return g.__compare(t,e,3)}static EQ(t,e){for(;;){if(g.__isBigInt(t))return g.__isBigInt(e)?g.equal(t,e):g.EQ(e,t);if("number"==typeof t){if(g.__isBigInt(e))return g.__equalToNumber(e,t);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("string"==typeof t){if(g.__isBigInt(e))return null!==(t=g.__fromString(t))&&g.equal(t,e);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("boolean"==typeof t){if(g.__isBigInt(e))return g.__equalToNumber(e,+t);if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else if("symbol"==typeof t){if(g.__isBigInt(e))return!1;if("object"!=typeof e)return t==e;e=g.__toPrimitive(e)}else{if("object"!=typeof t)return t==e;if("object"==typeof e&&e.constructor!==g)return t==e;t=g.__toPrimitive(t)}}}static NE(t,e){return!g.EQ(t,e)}static __zero(){return new g(0,!1)}static __oneDigit(t,e){const r=new g(1,e);return r.__setDigit(0,t),r}__copy(){const t=new g(this.length,this.sign);for(let e=0;ee)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}let o=1<>>20)-1023,r=1+(e>>>5),n=new g(r,0>t);let i=1048575&g.__kBitConversionInts[1]|1048576,o=g.__kBitConversionInts[0];const s=31&e;let a,u=0;if(s<20){const t=20-s;u=t+32,a=i>>>t,i=i<<32-t|o>>>t,o<<=32-t}else if(20===s)u=32,a=i,i=o;else{const t=s-20;u=32-t,a=i<>>32-t,i=o<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}static __fromString(t,e=0){let r=0;const n=t.length;let i=0;if(i===n)return g.__zero();let o=t.charCodeAt(i);for(;g.__isWhitespace(o);){if(++i===n)return g.__zero();o=t.charCodeAt(i)}if(43===o){if(++i===n)return null;o=t.charCodeAt(i),r=1}else if(45===o){if(++i===n)return null;o=t.charCodeAt(i),r=-1}if(0===e){if(e=10,48===o){if(++i===n)return g.__zero();if(o=t.charCodeAt(i),88===o||120===o){if(e=16,++i===n)return null;o=t.charCodeAt(i)}else if(79===o||111===o){if(e=8,++i===n)return null;o=t.charCodeAt(i)}else if(66===o||98===o){if(e=2,++i===n)return null;o=t.charCodeAt(i)}}}else if(16===e&&48===o){if(++i===n)return g.__zero();if(o=t.charCodeAt(i),88===o||120===o){if(++i===n)return null;o=t.charCodeAt(i)}}for(;48===o;){if(++i===n)return g.__zero();o=t.charCodeAt(i)}const s=n-i;let a=g.__kMaxBitsPerChar[e],u=g.__kBitsPerCharTableMultiplier-1;if(s>1073741824/a)return null;const l=a*s+u>>>g.__kBitsPerCharTableShift,c=new g(l+31>>>5,!1),_=10>e?e:10,f=10>=g.__kBitsPerCharTableShift;const e=[],r=[];let s=!1;do{let u=0,l=0;for(;;){let e;if(o-48>>>0<_)e=o-48;else{if(!((32|o)-97>>>0>>0<_)a=o-48;else{if(!((32|o)-97>>>0>>g.__kBitsPerCharTableShift+5;c.__inplaceMultiplyAdd(h,l,d)}while(!r)}if(i!==n){if(!g.__isWhitespace(o))return null;for(i++;i>>u-o)}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&i),i=(51&i>>>2)+(51&i),i=(15&i>>>4)+(15&i);const o=i,s=e-1,a=t.__digit(n-1);let u=0|(32*n-r(a)+o-1)/o;if(t.sign&&u++,268435456>>i,f=32-i;f>=o;)l[c--]=g.__kConversionChars[_&s],_>>>=o,f-=o}const h=(_|a<>>o-f;0!==_;)l[c--]=g.__kConversionChars[_&s],_>>>=o;if(t.sign&&(l[c--]="-"),-1!=c)throw new Error("implementation bug");return l.join("")}static __toStringGeneric(t,e,r){var n=Math.clz32;const i=t.length;if(0===i)return"";if(1===i){let n=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(n="-"+n),n}const o=32*i-n(t.__digit(i-1)),s=g.__kMaxBitsPerChar[e]-1;let a=o*g.__kBitsPerCharTableMultiplier;a+=s-1,a=0|a/s;const u=a+1>>1,l=g.exponentiate(g.__oneDigit(e,!1),g.__oneDigit(u,!1));let c,_;const f=l.__unsignedDigit(0);if(1===l.length&&65535>=f){c=new g(t.length,!1),c.__initializeDigits();let r=0;for(let e=2*t.length-1;0<=e;e--){const n=r<<16|t.__halfDigit(e);c.__setHalfDigit(e,0|n/f),r=0|n%f}_=r.toString(e)}else{const r=g.__absoluteDivLarge(t,l,!0,!0);c=r.quotient;const n=r.remainder.__trim();_=g.__toStringGeneric(n,e,!0)}c.__trim();let h=g.__toStringGeneric(c,e,!0);for(;_.lengthn?g.__absoluteLess(r):0}static __compareToNumber(t,e){if(!0|e){const r=t.sign,n=0>e;if(r!==n)return g.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?g.__absoluteGreater(r):oe)return g.__unequalSign(n);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;g.__kBitConversionDouble[0]=e;const i=2047&g.__kBitConversionInts[1]>>>20;if(2047==i)throw new Error("implementation bug: handled elsewhere");const o=i-1023;if(0>o)return g.__absoluteGreater(n);const s=t.length;let a=t.__digit(s-1);const u=r(a),l=32*s-u,c=o+1;if(lc)return g.__absoluteGreater(n);let _=1048576|1048575&g.__kBitConversionInts[1],f=g.__kBitConversionInts[0];const h=31-u;if(h!==(l-1)%31)throw new Error("implementation bug");let d,p=0;if(20>h){const t=20-h;p=t+32,d=_>>>t,_=_<<32-t|f>>>t,f<<=32-t}else if(20===h)p=32,d=_,_=f;else{const t=h-20;p=32-t,d=_<>>32-t,_=f<>>=0,d>>>=0,a>d)return g.__absoluteGreater(n);if(a>>0,_=f,f=0):d=0;const r=t.__unsignedDigit(e);if(r>d)return g.__absoluteGreater(n);if(re&&t.__unsignedDigit(0)===r(e):0===g.__compareToDouble(t,e)}static __comparisonResultToBool(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(g.__isBigInt(t)&&"string"==typeof e)return null!==(e=g.__fromString(e))&&g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if("string"==typeof t&&g.__isBigInt(e))return null!==(t=g.__fromString(t))&&g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if(t=g.__toNumeric(t),e=g.__toNumeric(e),g.__isBigInt(t)){if(g.__isBigInt(e))return g.__comparisonResultToBool(g.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(g.__isBigInt(e))return g.__comparisonResultToBool(g.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}__clzmsd(){return Math.clz32(this[this.length-1])}static __absoluteAdd(t,e,r){if(t.length>>16)+(r>>>16)+(a>>>16);o=u>>>16,i.__setDigit(s,65535&a|u<<16)}for(;s>>16)+(r>>>16);o=n>>>16,i.__setDigit(s,65535&r|n<<16)}return s>>16;const u=(r>>>16)-(s>>>16)-i;i=1&u>>>16,n.__setDigit(o,65535&a|u<<16)}for(;o>>16;const s=(e>>>16)-i;i=1&s>>>16,n.__setDigit(o,65535&r|s<<16)}return n.__trim()}static __absoluteAddOne(t,e,r=null){const n=t.length;null===r?r=new g(n,e):r.sign=e;let i=!0;for(let e,o=0;on?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(t,e,r,n){var i=Math.imul;if(0===e)return;const o=65535&e,s=e>>>16;let a=0,u=0,l=0;for(let e=0;e>>16;const h=t.__digit(e),g=65535&h,d=h>>>16,p=i(g,o),b=i(g,s),m=i(d,o),y=i(d,s);_+=u+(65535&p),f+=l+a+(_>>>16)+(p>>>16)+(65535&b)+(65535&m),a=f>>>16,u=(b>>>16)+(m>>>16)+(65535&y)+a,a=u>>>16,u&=65535,l=y>>>16,c=65535&_|f<<16,r.__setDigit(n,c)}for(;0!=a||0!==u||0!==l;n++){let t=r.__digit(n);const e=(65535&t)+u,i=(t>>>16)+(e>>>16)+l+a;u=0,l=0,a=i>>>16,t=65535&e|i<<16,r.__setDigit(n,t)}}static __internalMultiplyAdd(t,e,r,n,i){var o=Math.imul;let s=r,a=0;for(let r=0;r>>16;const c=o(n>>>16,e),_=(65535&c)+(u>>>16)+s;s=_>>>16,a=c>>>16,i.__setDigit(r,_<<16|65535&l)}if(i.length>n)for(i.__setDigit(n++,s+a);nthis.length&&(r=this.length);const i=65535&t,o=t>>>16;let s=0,a=65535&e,u=e>>>16;for(let t=0;t>>16,c=n(r,i),_=n(r,o),f=n(l,i),h=n(l,o),g=a+(65535&c),d=u+s+(g>>>16)+(c>>>16)+(65535&_)+(65535&f);a=(_>>>16)+(f>>>16)+(65535&h)+(d>>>16),s=a>>>16,a&=65535,u=h>>>16,this.__setDigit(t,65535&g|d<<16)}if(0!=s||0!==a||0!==u)throw new Error("implementation bug")}static __absoluteDivSmall(t,e,r){null===r&&(r=new g(t.length,!1));let n=0;for(let i,o=2*t.length-1;0<=o;o-=2){i=(n<<16|t.__halfDigit(o))>>>0;const s=0|i/e;n=0|i%e,i=(n<<16|t.__halfDigit(o-1))>>>0;const a=0|i/e;n=0|i%e,r.__setDigit(o>>>1,s<<16|a)}return r}static __absoluteModSmall(t,e){let r=0;for(let n=2*t.length-1;0<=n;n--){r=0|((r<<16|t.__halfDigit(n))>>>0)%e}return r}static __absoluteDivLarge(t,e,r,n){var i=Math.imul;const o=e.__halfDigitLength(),s=e.length,a=t.__halfDigitLength()-o;let u=null;r&&(u=new g(a+2>>>1,!1),u.__initializeDigits());const l=new g(o+2>>>1,!1);l.__initializeDigits();const c=g.__clz16(e.__halfDigit(o-1));0>>0;t=0|r/f;let s=0|r%f;const u=e.__halfDigit(o-2),l=_.__halfDigit(n+o-2);for(;i(t,u)>>>0>(s<<16|l)>>>0&&(t--,s+=f,!(65535>>1,h|t))}return n?(_.__inplaceRightShift(c),r?{quotient:u,remainder:_}:_):r?u:void 0}static __clz16(t){return Math.clz32(t)-16}__inplaceAdd(t,e,r){let n=0;for(let i=0;i>>16,this.__setHalfDigit(e+i,r)}return n}__inplaceSub(t,e,r){let n=0;if(1&e){e>>=1;let i=this.__digit(e),o=65535&i,s=0;for(;s>>1;s++){const r=t.__digit(s),a=(i>>>16)-(65535&r)-n;n=1&a>>>16,this.__setDigit(e+s,a<<16|65535&o),i=this.__digit(e+s+1),o=(65535&i)-(r>>>16)-n,n=1&o>>>16}const a=t.__digit(s),u=(i>>>16)-(65535&a)-n;if(n=1&u>>>16,this.__setDigit(e+s,u<<16|65535&o),e+s+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(i=this.__digit(e+s+1),o=(65535&i)-(a>>>16)-n,n=1&o>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;let i=0;for(;i>>16;const a=(r>>>16)-(o>>>16)-n;n=1&a>>>16,this.__setDigit(e+i,a<<16|65535&s)}const o=this.__digit(e+i),s=t.__digit(i),a=(65535&o)-(65535&s)-n;n=1&a>>>16;let u=0;0==(1&r)&&(u=(o>>>16)-(s>>>16)-n,n=1&u>>>16),this.__setDigit(e+i,u<<16|65535&a)}return n}__inplaceRightShift(t){if(0===t)return;let e=this.__digit(0)>>>t;const r=this.length-1;for(let n=0;n>>t}this.__setDigit(r,e)}static __specialLeftShift(t,e,r){const n=t.length,i=new g(n+r,!1);if(0===e){for(let e=0;e>>32-e}return 0r)throw new RangeError("BigInt too big");const n=r>>>5,i=31&r,o=t.length,s=0!==i&&0!=t.__digit(o-1)>>>32-i,a=o+n+(s?1:0),u=new g(a,t.sign);if(0===i){let e=0;for(;e>>32-i}if(s)u.__setDigit(o+n,e);else if(0!=e)throw new Error("implementation bug")}return u.__trim()}static __rightShiftByAbsolute(t,e){const r=t.length,n=t.sign,i=g.__toShiftAmount(e);if(0>i)return g.__rightShiftByMaximum(n);const o=i>>>5,s=31&i;let a=r-o;if(0>=a)return g.__rightShiftByMaximum(n);let u=!1;if(n)if(0!=(t.__digit(o)&(1<>>s;const n=r-o-1;for(let r=0;r>>s}l.__setDigit(n,e)}return u&&(l=g.__absoluteAddOne(l,!0,l)),l.__trim()}static __rightShiftByMaximum(t){return t?g.__oneDigit(1,!0):g.__zero()}static __toShiftAmount(t){if(1g.__kMaxLengthBits?-1:e}static __toPrimitive(t,e="default"){if("object"!=typeof t)return t;if(t.constructor===g)return t;const r=t[Symbol.toPrimitive];if(r){const t=r(e);if("object"!=typeof t)return t;throw new TypeError("Cannot convert object to primitive value")}const n=t.valueOf;if(n){const e=n.call(t);if("object"!=typeof e)return e}const i=t.toString;if(i){const e=i.call(t);if("object"!=typeof e)return e}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return g.__isBigInt(t)?t:+t}static __isBigInt(t){return"object"==typeof t&&t.constructor===g}static __truncateToNBits(t,e){const r=t+31>>>5,n=new g(r,e.sign),i=r-1;for(let t=0;t>>e}return n.__setDigit(i,o),n.__trim()}static __truncateAndSubFromPowerOfTwo(t,e,r){var n=Math.min;const i=t+31>>>5,o=new g(i,r);let s=0;const a=i-1;let u=0;for(const t=n(a,e.length);s>>16;const n=0-(t>>>16)-u;u=1&n>>>16,o.__setDigit(s,65535&r|n<<16)}for(;s>>16;_=65535&t|0-(l>>>16)-u<<16}else{const t=32-c;l=l<>>t;const e=1<<32-t,r=(65535&e)-(65535&l)-u;u=1&r>>>16;_=65535&r|(e>>>16)-(l>>>16)-u<<16,_&=e-1}return o.__setDigit(a,_),o.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,e){this[t]=0|e}__setDigitGrow(t,e){this[t]=0|e}__halfDigitLength(){const t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 65535&this[t>>>1]>>>((1&t)<<4)}__setHalfDigit(t,e){const r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}static __digitPow(t,e){let r=1;for(;0>>=1,t*=t;return r}}function d(t,e,r,n=[]){!function(t,e){if(!(e instanceof Object))throw new Error(t+" is not an object!")}(t,e);const i=Object.keys(e).sort(),o=r.length,s=r.length+n.length,a=`${t} does not have correct keys! Required keys: [${r.sort().join(", ")}], optional keys: [${n.sort().join(", ")}], actual keys: [${i.join(", ")}]`;if(i.lengths)throw new Error(a);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(a);if(u.find(t=>!n.includes(t)))throw new Error(a)}function p(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function b(t,e){if(p(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function m(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function y(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(d(r,t,["code_hash","hash_type","args"],[]),b(r+".code_hash",t.code_hash),p(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function w(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){d(r,t,["tx_hash","index"],[]),b(r+".tx_hash",t.tx_hash),m(r+".index",t.index)}function v(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){d(r,t,["since","previous_output"],[]),m(r+".since",t.since),e&&w(t.previous_output,{debugPath:r+".previous_output"})}function B(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){d(r,t,["capacity","lock"],["type"]),m(r+".capacity",t.capacity),e&&(y(t.lock,{debugPath:r+".lock"}),t.type&&y(t.type,{debugPath:r+".type"}))}function P(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(d(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&w(t.out_point,{debugPath:r+".out_point"})}function D(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=r.size;let i=void 0===n?0:n;var o=r.timeout;let a=void 0===o?0:o;null==t?t=null:W(t)?t=Buffer.from(t.toString()):J(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof s.default||(t=Buffer.from(String(t)))),this[V]={body:t,disturbed:!1,error:null},this.size=i,this.timeout=a,t instanceof s.default&&t.on("error",(function(t){const r="AbortError"===t.name?t:new q(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[V].error=r}))}function G(){var t=this;if(this[V].disturbed)return F.Promise.reject(new TypeError("body used already for: "+this.url));if(this[V].disturbed=!0,this[V].error)return F.Promise.reject(this[V].error);let e=this.body;if(null===e)return F.Promise.resolve(Buffer.alloc(0));if(J(e)&&(e=e.stream()),Buffer.isBuffer(e))return F.Promise.resolve(e);if(!(e instanceof s.default))return F.Promise.resolve(Buffer.alloc(0));let r=[],n=0,i=!1;return new F.Promise((function(o,s){let a;t.timeout&&(a=setTimeout((function(){i=!0,s(new q(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,s(e)):s(new q(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(t.size&&n+e.length>t.size)return i=!0,void s(new q(`content size at ${t.url} over limit: ${t.size}`,"max-size"));n+=e.length,r.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(a);try{o(Buffer.concat(r,n))}catch(e){s(new q(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function W(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function J(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function X(t){let e,r,n=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof s.default&&"function"!=typeof n.getBoundary&&(e=new H,r=new H,n.pipe(e),n.pipe(r),t[V].body=e,n=r),n}function Q(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":W(t)?"application/x-www-form-urlencoded;charset=UTF-8":J(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?"multipart/form-data;boundary="+t.getBoundary():t instanceof s.default?null:"text/plain;charset=UTF-8"}function Z(t){const e=t.body;return null===e?0:J(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}F.prototype={get body(){return this[V].body},get bodyUsed(){return this[V].disturbed},arrayBuffer(){return G.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return G.call(this).then((function(e){return Object.assign(new $([],{type:t.toLowerCase()}),{[M]:e})}))},json(){var t=this;return G.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return F.Promise.reject(new q(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return G.call(this).then((function(t){return t.toString()}))},buffer(){return G.call(this)},textConverted(){var t=this;return G.call(this).then((function(e){return function(t,e){if("function"!=typeof U)throw new Error("The package `encoding` must be installed to use the textConverted() function");const r=e.get("content-type");let n,i,o="utf-8";r&&(n=/charset=([^;]*)/i.exec(r));i=t.slice(0,1024).toString(),!n&&i&&(n=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[nt]=Object.create(null),t instanceof it){const e=t.raw(),r=Object.keys(e);for(const t of r)for(const r of e[t])this.append(t,r)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const r=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");r.push(Array.from(e))}for(const t of r){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const r=t[e];this.append(e,r)}}}}get(t){tt(t=""+t);const e=rt(this[nt],t);return void 0===e?null:this[nt][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=ot(this),n=0;for(;n1&&void 0!==arguments[1]?arguments[1]:"key+value";const r=Object.keys(t[nt]).sort();return r.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[nt][e].join(", ")}:function(e){return[e.toLowerCase(),t[nt][e].join(", ")]})}it.prototype.entries=it.prototype[Symbol.iterator],Object.defineProperty(it.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(it.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const st=Symbol("internal");function at(t,e){const r=Object.create(ut);return r[st]={target:t,kind:e,index:0},r}const ut=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==ut)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[st];const e=t.target,r=t.kind,n=t.index,i=ot(e,r);return n>=i.length?{value:void 0,done:!0}:(this[st].index=n+1,{value:i[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function lt(t){const e=Object.assign({__proto__:null},t[nt]),r=rt(t[nt],"Host");return void 0!==r&&(e[r]=e[r][0]),e}Object.defineProperty(ut,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const ct=Symbol("Response internals"),_t=a.default.STATUS_CODES;class ft{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};F.call(this,t,e);const r=e.status||200,n=new it(e.headers);if(null!=t&&!n.has("Content-Type")){const e=Q(t);e&&n.append("Content-Type",e)}this[ct]={url:e.url,status:r,statusText:e.statusText||_t[r],headers:n,counter:e.counter}}get url(){return this[ct].url||""}get status(){return this[ct].status}get ok(){return this[ct].status>=200&&this[ct].status<300}get redirected(){return this[ct].counter>0}get statusText(){return this[ct].statusText}get headers(){return this[ct].headers}clone(){return new ft(X(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}F.mixIn(ft.prototype),Object.defineProperties(ft.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(ft.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const ht=Symbol("Request internals"),gt=u.default.parse,dt=u.default.format,pt="destroy"in s.default.Readable.prototype;function bt(t){return"object"==typeof t&&"object"==typeof t[ht]}class mt{constructor(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};bt(t)?e=gt(t.url):(e=t&&t.href?gt(t.href):gt(""+t),t={});let n=r.method||t.method||"GET";if(n=n.toUpperCase(),(null!=r.body||bt(t)&&null!==t.body)&&("GET"===n||"HEAD"===n))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=r.body?r.body:bt(t)&&null!==t.body?X(t):null;F.call(this,i,{timeout:r.timeout||t.timeout||0,size:r.size||t.size||0});const o=new it(r.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=Q(i);t&&o.append("Content-Type",t)}let s=bt(t)?t.signal:null;if("signal"in r&&(s=r.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[ht]={method:n,redirect:r.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:s},this.follow=void 0!==r.follow?r.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==r.compress?r.compress:void 0===t.compress||t.compress,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent}get method(){return this[ht].method}get url(){return dt(this[ht].parsedURL)}get headers(){return this[ht].headers}get redirect(){return this[ht].redirect}get signal(){return this[ht].signal}clone(){return new mt(this)}}function yt(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}F.mixIn(mt.prototype),Object.defineProperty(mt.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(mt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),yt.prototype=Object.create(Error.prototype),yt.prototype.constructor=yt,yt.prototype.name="AbortError";const wt=s.default.PassThrough,vt=u.default.resolve;function Bt(t,e){if(!Bt.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return F.Promise=Bt.Promise,new Bt.Promise((function(r,n){const i=new mt(t,e),o=function(t){const e=t[ht].parsedURL,r=new it(t[ht].headers);if(r.has("Accept")||r.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof s.default.Readable&&!pt)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(n="0"),null!=t.body){const e=Z(t);"number"==typeof e&&(n=String(e))}n&&r.set("Content-Length",n),r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let i=t.agent;return"function"==typeof i&&(i=i(e)),r.has("Connection")||i||r.set("Connection","close"),Object.assign({},e,{method:t.method,headers:lt(r),agent:i})}(i),u=("https:"===o.protocol?l.default:a.default).request,_=i.signal;let f=null;const h=function(){let t=new yt("The user aborted a request.");n(t),i.body&&i.body instanceof s.default.Readable&&i.body.destroy(t),f&&f.body&&f.body.emit("error",t)};if(_&&_.aborted)return void h();const g=function(){h(),b()},d=u(o);let p;function b(){d.abort(),_&&_.removeEventListener("abort",g),clearTimeout(p)}_&&_.addEventListener("abort",g),i.timeout&&d.once("socket",(function(t){p=setTimeout((function(){n(new q("network timeout at: "+i.url,"request-timeout")),b()}),i.timeout)})),d.on("error",(function(t){n(new q(`request to ${i.url} failed, reason: ${t.message}`,"system",t)),b()})),d.on("response",(function(t){clearTimeout(p);const e=function(t){const e=new it;for(const r of Object.keys(t))if(!K.test(r))if(Array.isArray(t[r]))for(const n of t[r])Y.test(n)||(void 0===e[nt][r]?e[nt][r]=[n]:e[nt][r].push(n));else Y.test(t[r])||(e[nt][r]=[t[r]]);return e}(t.headers);if(Bt.isRedirect(t.statusCode)){const o=e.get("Location"),s=null===o?null:vt(i.url,o);switch(i.redirect){case"error":return n(new q("uri requested responds with a redirect, redirect mode is set to error: "+i.url,"no-redirect")),void b();case"manual":if(null!==s)try{e.set("Location",s)}catch(t){n(t)}break;case"follow":if(null===s)break;if(i.counter>=i.follow)return n(new q("maximum redirect reached at: "+i.url,"max-redirect")),void b();const o={headers:new it(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};return 303!==t.statusCode&&i.body&&null===Z(i)?(n(new q("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==i.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),r(Bt(new mt(s,o))),void b())}}t.once("end",(function(){_&&_.removeEventListener("abort",g)}));let o=t.pipe(new wt);const s={url:i.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:i.size,timeout:i.timeout,counter:i.counter},a=e.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===a||204===t.statusCode||304===t.statusCode)return f=new ft(o,s),void r(f);const u={flush:c.default.Z_SYNC_FLUSH,finishFlush:c.default.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return o=o.pipe(c.default.createGunzip(u)),f=new ft(o,s),void r(f);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof c.default.createBrotliDecompress)return o=o.pipe(c.default.createBrotliDecompress()),f=new ft(o,s),void r(f);f=new ft(o,s),r(f)}else{t.pipe(new wt).once("data",(function(t){o=8==(15&t[0])?o.pipe(c.default.createInflate()):o.pipe(c.default.createInflateRaw()),f=new ft(o,s),r(f)}))}})),function(t,e){const r=e.body;null===r?t.end():J(r)?r.stream().pipe(t):Buffer.isBuffer(r)?(t.write(r),t.end()):r.pipe(t)}(d,i)}))}Bt.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Bt.Promise=global.Promise;var Pt,Dt,St=Object.freeze({__proto__:null,default:Bt,Headers:it,Request:mt,Response:ft,FetchError:q}),Tt=(function(t,e){var r=St.default||St,n=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),r.call(this,t,e)};t.exports=e=n,e.fetch=n,e.Headers=St.Headers,e.Request=St.Request,e.Response=St.Response,e.default=n}(Dt={path:Pt,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&Dt.path)}},Dt.exports),Dt.exports);function kt(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const xt={get:(t,e,r)=>"send"===e?async()=>{const e=await t.fetch(t.uri,kt({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},Ct={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},xt):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await t.fetch(t.uri,kt({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class Et{constructor(t,e={},r=Tt){return this.uri=t,this.defaultOptions=e,this.fetch=r,new Proxy(this,Ct)}static create(t){return new Et(t)}}function Ot(t){return g.BigInt(t)}function At(t){return"0x"+t.toString(16)}function jt(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=At(g.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&r.byteLength!==t)throw new Error(`${e} has invalid length ${r.byteLength}, required: ${t}`);return r}}function It(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function Rt(t,{debugPath:e="script"}={}){return It(e,t,{code_hash:zt(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:zt(-1)})}function Lt(t,{debugPath:e="out_point"}={}){return It(e,t,{tx_hash:zt(32),index:jt(4)})}function Mt(t){return function(e,r){return t(r,{debugPath:e})}}function Nt(t,{debugPath:e="cell_input"}={}){return It(e,t,{since:jt(8),previous_output:Mt(Lt)})}function $t(t,{debugPath:e="cell_output"}={}){const r=It(e,t,{capacity:jt(8),lock:Mt(Rt)});return t.type&&(r.type_=Rt(t.type,{debugPath:e+".type"})),r}function qt(t,{debugPath:e="cell_dep"}={}){return It(e,t,{out_point:Mt(Lt),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function Ut(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function Vt(t,{debugPath:e="raw_transaction"}={}){return It(e,t,{version:jt(4),cell_deps:Ut(Mt(qt)),header_deps:Ut(zt(32)),inputs:Ut(Mt(Nt)),outputs:Ut(Mt($t)),outputs_data:Ut(zt(-1))})}function Ht(t,{debugPath:e="transaction"}={}){const r=Vt(t,{debugPath:"(raw)"+e}),n=It(e,t,{witnesses:Ut(zt(-1))});return n.raw=r,n}function Ft(t,{debugPath:e="raw_header"}={}){return It(e,t,{version:jt(4),compact_target:jt(4),timestamp:jt(8),number:jt(8),epoch:jt(8),parent_hash:zt(32),transactions_root:zt(32),proposals_hash:zt(32),uncles_hash:zt(32),dao:zt(32)})}function Gt(t,{debugPath:e="header"}={}){const r=Ft(t,{debugPath:"(raw)"+e}),n=It(e,t,{nonce:jt(16)});return n.raw=r,n}function Wt(t,{debugPath:e="uncle_block"}={}){return It(e,t,{header:Mt(Gt),proposals:Ut(zt(10))})}var Jt=Object.freeze({__proto__:null,NormalizeScript:Rt,NormalizeOutPoint:Lt,NormalizeCellInput:Nt,NormalizeCellOutput:$t,NormalizeCellDep:qt,NormalizeRawTransaction:Vt,NormalizeTransaction:Ht,NormalizeRawHeader:Ft,NormalizeHeader:Gt,NormalizeUncleBlock:Wt,NormalizeBlock:function(t,{debugPath:e="block"}={}){return It(e,t,{header:Mt(Gt),uncles:Ut(Mt(Wt)),transactions:Ut(Mt(Ht)),proposals:Ut(zt(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return It(e,t,{lock:Mt(Rt),message:zt(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=zt(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=zt(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=zt(-1)(e+".output_type",t.output_type)),r}});function Xt(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Qt(t,e,r){if(!((e=Xt(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function Zt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Qt(r,t,{code_hash:Xt,hash_type:Xt,args:Xt}),e&&y(t,{debugPath:"(transformed) "+r}),t}function Kt(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Qt(r,t,{tx_hash:Xt,index:Xt}),e&&w(t,{debugPath:"(transformed) "+r}),t}function Yt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function te(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Qt(r,t,{since:Xt,previous_output:Yt(Kt)}),e&&v(t,{debugPath:"(transformed) "+r}),t}function ee(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Qt(r,t,{capacity:Xt,lock:Yt(Zt),type:Yt(Zt)}),e&&B(t,{debugPath:"(transformed) "+r}),t}function re(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Qt(r,t,{out_point:Yt(Kt),dep_type:Xt}),e&&P(t,{debugPath:"(transformed) "+r}),t}function ne(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function ie(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Qt(r,t,{version:Xt,cell_deps:ne(Yt(re)),header_deps:ne(Xt),inputs:ne(Yt(te)),outputs:ne(Yt(ee)),outputs_data:ne(Xt),witnesses:ne(Xt)}),e&&x(t,{debugPath:"(transformed) "+r}),t}function oe(t,{validation:e=!0,debugPath:r="header"}={}){return t=Qt(r,t,{version:Xt,compact_target:Xt,timestamp:Xt,number:Xt,epoch:Xt,parent_hash:Xt,transactions_root:Xt,proposals_hash:Xt,uncles_hash:Xt,dao:Xt,nonce:Xt}),e&&E(t,{debugPath:"(transformed) "+r}),t}function se(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Qt(r,t,{header:Yt(oe),proposals:ne(Xt)}),e&&A(t,{debugPath:"(transformed) "+r}),t}var ae=Object.freeze({__proto__:null,TransformScript:Zt,TransformOutPoint:Kt,TransformCellInput:te,TransformCellOutput:ee,TransformCellDep:re,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Qt(r,t,{version:Xt,cell_deps:ne(Yt(re)),header_deps:ne(Xt),inputs:ne(Yt(te)),outputs:ne(Yt(ee)),outputs_data:ne(Xt)}),e&&k(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:ie,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Qt(r,t,{version:Xt,compact_target:Xt,timestamp:Xt,number:Xt,epoch:Xt,parent_hash:Xt,transactions_root:Xt,proposals_hash:Xt,uncles_hash:Xt,dao:Xt}),e&&C(t,{debugPath:"(transformed) "+r}),t},TransformHeader:oe,TransformUncleBlock:se,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Qt(r,t,{header:Yt(oe),uncles:ne(Yt(se)),transactions:ne(Yt(ie)),proposals:ne(Xt)}),e&&j(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Qt(r,t,{lock:Yt(Zt),message:Xt}),e&&z(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Qt(r,t,{lock:Xt,input_type:Xt,output_type:Xt}),e&&I(t,{debugPath:"(transformed) "+r}),t}});var ue=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:r=!0,loadData:n=!1,loadBlockNumber:i=!0}={}){this.rpc=t,this.lockHash=new h(e).serializeJson(),this.skipCellWithContent=r,this.loadData=n,this.loadBlockNumber=i}async*collect(){const t=Ot(await this.rpc.get_tip_block_number());let e=g.BigInt(0);for(;g.lessThanOrEqual(e,t);){let r=g.add(e,g.BigInt(100));g.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,At(e),At(r));for(const t of n){if(this.skipCellWithContent&&(t.type||g.greaterThan(Ot(t.output_data_len),g.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=g.add(r,g.BigInt(1))}}}});exports.BigIntToHexString=At,exports.HexStringToBigInt=Ot,exports.RPC=Et,exports.Reader=h,exports.TransactionDumper=class{constructor(t,{validateTransaction:e=!0,depGroupUnpacker:r=null}={}){this.rpc=t,this.validateTransaction=e,this.depGroupUnpacker=r}async dumpByHash(t){const e=(await this.rpc.get_transaction(t)).transaction;return delete e.hash,await this.dump(e)}async dump(t){this.validateTransaction&&x(t);const e=[];for(const r of t.inputs){const{output:t,data:n,header:i}=await this._resolveOutPoint(r.previous_output);e.push({input:r,output:t,data:n,header:i})}const r=[];for(const e of t.cell_deps){const{output:t,data:n,header:i}=await this._resolveOutPoint(e.out_point);if(r.push({cell_dep:e,output:t,data:n,header:i}),"dep_group"===e.dep_type){if(!this.depGroupUnpacker)throw new Error("depGroupUnpacker must be provided when the transaction contains dep_group!");const t=this.depGroupUnpacker(new h(n));for(const e of t){w(e);const{output:t,data:n,header:i}=await this._resolveOutPoint(e);r.push({cell_dep:{out_point:e,dep_type:"code"},output:t,data:n,header:i})}}}const n=[];for(const e of t.header_deps)n.push(await this.rpc.get_header(e));return JSON.stringify({mock_info:{inputs:e,cell_deps:r,header_deps:n},tx:t})}async _resolveOutPoint(t){const e=await this.rpc.get_transaction(t.tx_hash);if(!e||!e.transaction)throw new Error(`Transaction ${t.tx_hash} cannot be found!`);const r=e.transaction,n=g.toNumber(g.BigInt(t.index));if(n>=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}},exports.VERSION="0.10.2",exports.cell_collectors=ue,exports.normalizers=Jt,exports.transformers=ae,exports.validators=R; //# sourceMappingURL=ckb-js-toolkit.node.js.map diff --git a/dist/ckb-js-toolkit.node.js.map b/dist/ckb-js-toolkit.node.js.map index 24f0a76..d3a6833 100644 --- a/dist/ckb-js-toolkit.node.js.map +++ b/dist/ckb-js-toolkit.node.js.map @@ -1 +1 @@ -{"version":3,"file":"ckb-js-toolkit.node.js","sources":["../src/reader.js","../node_modules/jsbi/dist/jsbi.mjs","../src/validators.js","../node_modules/node-fetch/lib/index.mjs","../node_modules/cross-fetch/dist/node-ponyfill.js","../src/rpc.js","../src/normalizers.js","../src/transformers.js","../src/cell_collectors/rpc_collector.js","../src/transaction_dumper.js","../src/index.js"],"sourcesContent":["class ArrayBufferReader {\n constructor(buffer) {\n this.view = new DataView(buffer);\n }\n\n length() {\n return this.view.byteLength;\n }\n\n indexAt(i) {\n return this.view.getUint8(i);\n }\n\n toArrayBuffer() {\n return this.view.buffer;\n }\n\n serializeJson() {\n return (\n \"0x\" +\n Array.prototype.map\n .call(new Uint8Array(this.view.buffer), x =>\n (\"00\" + x.toString(16)).slice(-2)\n )\n .join(\"\")\n );\n }\n}\n\nclass HexStringReader {\n constructor(string) {\n this.string = string;\n }\n\n length() {\n return this.string.length / 2 - 1;\n }\n\n indexAt(i) {\n return parseInt(this.string.substr(2 + i * 2, 2), 16);\n }\n\n toArrayBuffer() {\n const buffer = new ArrayBuffer(this.length());\n const view = new DataView(buffer);\n\n for (let i = 0; i < this.length(); i++) {\n view.setUint8(i, this.indexAt(i));\n }\n return buffer;\n }\n\n serializeJson() {\n return this.string;\n }\n}\n\nexport class Reader {\n constructor(input) {\n if (\n input instanceof HexStringReader ||\n input instanceof ArrayBufferReader\n ) {\n return input;\n }\n if (typeof input === \"string\") {\n if (!input.startsWith(\"0x\") || input.length % 2 != 0) {\n throw new Error(\n \"Hex string must start with 0x, and has even numbered length!\"\n );\n }\n return new HexStringReader(input);\n }\n if (input instanceof ArrayBuffer) {\n return new ArrayBufferReader(input);\n }\n throw new Error(\"Reader can only accept hex string or ArrayBuffer!\");\n }\n\n static fromRawString(string) {\n const buffer = new ArrayBuffer(string.length);\n const view = new DataView(buffer);\n\n for (let i = 0; i < string.length; i++) {\n const c = string.charCodeAt(i);\n if (c > 0xff) {\n throw new Error(\"fromRawString can only accept UTF-8 raw string!\");\n }\n view.setUint8(i, c);\n }\n return new ArrayBufferReader(buffer);\n }\n}\n","class JSBI extends Array{constructor(a,b){if(a>JSBI.__kMaxLength)throw new RangeError(\"Maximum BigInt size exceeded\");super(a),this.sign=b}static BigInt(a){var b=Math.floor,c=Number.isFinite;if(\"number\"==typeof a){if(0===a)return JSBI.__zero();if((0|a)===a)return 0>a?JSBI.__oneDigit(-a,!0):JSBI.__oneDigit(a,!1);if(!c(a)||b(a)!==a)throw new RangeError(\"The number \"+a+\" cannot be converted to BigInt because it is not an integer\");return JSBI.__fromDouble(a)}if(\"string\"==typeof a){const b=JSBI.__fromString(a);if(null===b)throw new SyntaxError(\"Cannot convert \"+a+\" to a BigInt\");return b}if(\"boolean\"==typeof a)return!0===a?JSBI.__oneDigit(1,!1):JSBI.__zero();if(\"object\"==typeof a){if(a.constructor===JSBI)return a;const b=JSBI.__toPrimitive(a);return JSBI.BigInt(b)}throw new TypeError(\"Cannot convert \"+a+\" to a BigInt\")}toDebugString(){const a=[\"BigInt[\"];for(const b of this)a.push((b?(b>>>0).toString(16):b)+\", \");return a.push(\"]\"),a.join(\"\")}toString(a=10){if(2>a||36>>=12;const l=j-12;let m=12<=j?0:h<<20+j,n=20+j;0>>32-l,m=h<>>32-n,n-=32);const o=JSBI.__decideRounding(a,n,i,h);if((1===o||0===o&&1==(1&m))&&(m=m+1>>>0,0==m&&(k++,0!=k>>>20&&(k=0,g++,1023=JSBI.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");if(1===a.length&&2===a.__digit(0)){const b=1+(c>>>5),d=a.sign&&0!=(1&c),e=new JSBI(b,d);e.__initializeDigits();const f=1<<(31&c);return e.__setDigit(b-1,f),e}let d=null,e=a;for(0!=(1&c)&&(d=a),c>>=1;0!==c;c>>=1)e=JSBI.multiply(e,e),0!=(1&c)&&(null===d?d=e:d=JSBI.multiply(d,e));return d}static multiply(a,b){if(0===a.length)return a;if(0===b.length)return b;let c=a.length+b.length;32<=a.__clzmsd()+b.__clzmsd()&&c--;const d=new JSBI(c,a.sign!==b.sign);d.__initializeDigits();for(let c=0;cJSBI.__absoluteCompare(a,b))return JSBI.__zero();const c=a.sign!==b.sign,d=b.__unsignedDigit(0);let e;if(1===b.length&&65535>=d){if(1===d)return c===a.sign?a:JSBI.unaryMinus(a);e=JSBI.__absoluteDivSmall(a,d,null)}else e=JSBI.__absoluteDivLarge(a,b,!0,!1);return e.sign=c,e.__trim()}static remainder(a,b){if(0===b.length)throw new RangeError(\"Division by zero\");if(0>JSBI.__absoluteCompare(a,b))return a;const c=b.__unsignedDigit(0);if(1===b.length&&65535>=c){if(1===c)return JSBI.__zero();const b=JSBI.__absoluteModSmall(a,c);return 0===b?JSBI.__zero():JSBI.__oneDigit(b,a.sign)}const d=JSBI.__absoluteDivLarge(a,b,!1,!0);return d.sign=a.sign,d.__trim()}static add(a,b){const c=a.sign;return c===b.sign?JSBI.__absoluteAdd(a,b,c):0<=JSBI.__absoluteCompare(a,b)?JSBI.__absoluteSub(a,b,c):JSBI.__absoluteSub(b,a,!c)}static subtract(a,b){const c=a.sign;return c===b.sign?0<=JSBI.__absoluteCompare(a,b)?JSBI.__absoluteSub(a,b,c):JSBI.__absoluteSub(b,a,!c):JSBI.__absoluteAdd(a,b,c)}static leftShift(a,b){return 0===b.length||0===a.length?a:b.sign?JSBI.__rightShiftByAbsolute(a,b):JSBI.__leftShiftByAbsolute(a,b)}static signedRightShift(a,b){return 0===b.length||0===a.length?a:b.sign?JSBI.__leftShiftByAbsolute(a,b):JSBI.__rightShiftByAbsolute(a,b)}static unsignedRightShift(){throw new TypeError(\"BigInts have no unsigned right shift; use >> instead\")}static lessThan(a,b){return 0>JSBI.__compareToBigInt(a,b)}static lessThanOrEqual(a,b){return 0>=JSBI.__compareToBigInt(a,b)}static greaterThan(a,b){return 0=JSBI.__kMaxLengthBits)return b;const c=a+31>>>5;if(b.lengthJSBI.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");return JSBI.__truncateAndSubFromPowerOfTwo(a,b,!1)}if(a>=JSBI.__kMaxLengthBits)return b;const c=a+31>>>5;if(b.length>>d)return b}return JSBI.__truncateToNBits(a,b)}static ADD(a,b){if(a=JSBI.__toPrimitive(a),b=JSBI.__toPrimitive(b),\"string\"==typeof a)return\"string\"!=typeof b&&(b=b.toString()),a+b;if(\"string\"==typeof b)return a.toString()+b;if(a=JSBI.__toNumeric(a),b=JSBI.__toNumeric(b),JSBI.__isBigInt(a)&&JSBI.__isBigInt(b))return JSBI.add(a,b);if(\"number\"==typeof a&&\"number\"==typeof b)return a+b;throw new TypeError(\"Cannot mix BigInt and other types, use explicit conversions\")}static LT(a,b){return JSBI.__compare(a,b,0)}static LE(a,b){return JSBI.__compare(a,b,1)}static GT(a,b){return JSBI.__compare(a,b,2)}static GE(a,b){return JSBI.__compare(a,b,3)}static EQ(a,b){for(;;){if(JSBI.__isBigInt(a))return JSBI.__isBigInt(b)?JSBI.equal(a,b):JSBI.EQ(b,a);if(\"number\"==typeof a){if(JSBI.__isBigInt(b))return JSBI.__equalToNumber(b,a);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"string\"==typeof a){if(JSBI.__isBigInt(b))return a=JSBI.__fromString(a),null!==a&&JSBI.equal(a,b);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"boolean\"==typeof a){if(JSBI.__isBigInt(b))return JSBI.__equalToNumber(b,+a);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"symbol\"==typeof a){if(JSBI.__isBigInt(b))return!1;if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"object\"==typeof a){if(\"object\"==typeof b&&b.constructor!==JSBI)return a==b;a=JSBI.__toPrimitive(a)}else return a==b}}static NE(a,b){return!JSBI.EQ(a,b)}static __zero(){return new JSBI(0,!1)}static __oneDigit(a,b){const c=new JSBI(1,b);return c.__setDigit(0,a),c}__copy(){const a=new JSBI(this.length,this.sign);for(let b=0;bb)e=-b-1;else{if(0===c)return-1;c--,d=a.__digit(c),e=31}let f=1<>>20,c=b-1023,d=(c>>>5)+1,e=new JSBI(d,0>a);let f=1048575&JSBI.__kBitConversionInts[1]|1048576,g=JSBI.__kBitConversionInts[0];const h=20,i=31&c;let j,k=0;if(i<20){const a=h-i;k=a+32,j=f>>>a,f=f<<32-a|g>>>a,g<<=32-a}else if(i===20)k=32,j=f,f=g;else{const a=i-h;k=32-a,j=f<>>32-a,f=g<=a&&9<=a)||(159>=a?32==a:131071>=a?160==a||5760==a:196607>=a?(a&=131071,10>=a||40==a||41==a||47==a||95==a||4096==a):65279==a)}static __fromString(a,b=0){let c=0;const e=a.length;let f=0;if(f===e)return JSBI.__zero();let g=a.charCodeAt(f);for(;JSBI.__isWhitespace(g);){if(++f===e)return JSBI.__zero();g=a.charCodeAt(f)}if(43===g){if(++f===e)return null;g=a.charCodeAt(f),c=1}else if(45===g){if(++f===e)return null;g=a.charCodeAt(f),c=-1}if(0===b){if(b=10,48===g){if(++f===e)return JSBI.__zero();if(g=a.charCodeAt(f),88===g||120===g){if(b=16,++f===e)return null;g=a.charCodeAt(f)}else if(79===g||111===g){if(b=8,++f===e)return null;g=a.charCodeAt(f)}else if(66===g||98===g){if(b=2,++f===e)return null;g=a.charCodeAt(f)}}}else if(16===b&&48===g){if(++f===e)return JSBI.__zero();if(g=a.charCodeAt(f),88===g||120===g){if(++f===e)return null;g=a.charCodeAt(f)}}for(;48===g;){if(++f===e)return JSBI.__zero();g=a.charCodeAt(f)}const h=e-f;let i=JSBI.__kMaxBitsPerChar[b],j=JSBI.__kBitsPerCharTableMultiplier-1;if(h>1073741824/i)return null;const k=i*h+j>>>JSBI.__kBitsPerCharTableShift,l=new JSBI(k+31>>>5,!1),n=10>b?b:10,o=10>=JSBI.__kBitsPerCharTableShift;const b=[],c=[];let d=!1;do{let h=0,j=0;for(;;){let b;if(g-48>>>0>>0>>0>>0>>JSBI.__kBitsPerCharTableShift+5;l.__inplaceMultiplyAdd(p,k,q)}while(!c)}if(f!==e){if(!JSBI.__isWhitespace(g))return null;for(f++;f>>i-f)}if(0!==e){if(d>=a.length)throw new Error(\"implementation bug\");a.__setDigit(d++,e)}for(;d>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const f=e,g=b-1,h=a.__digit(d-1),i=c(h);let j=0|(32*d-i+f-1)/f;if(a.sign&&j++,268435456>>e,n=32-e;n>=f;)k[l--]=JSBI.__kConversionChars[m&g],m>>>=f,n-=f}const o=(m|h<>>f-n;0!==m;)k[l--]=JSBI.__kConversionChars[m&g],m>>>=f;if(a.sign&&(k[l--]=\"-\"),-1!=l)throw new Error(\"implementation bug\");return k.join(\"\")}static __toStringGeneric(a,b,c){var d=Math.clz32;const e=a.length;if(0===e)return\"\";if(1===e){let d=a.__unsignedDigit(0).toString(b);return!1===c&&a.sign&&(d=\"-\"+d),d}const f=32*e-d(a.__digit(e-1)),g=JSBI.__kMaxBitsPerChar[b],h=g-1;let i=f*JSBI.__kBitsPerCharTableMultiplier;i+=h-1,i=0|i/h;const j=i+1>>1,k=JSBI.exponentiate(JSBI.__oneDigit(b,!1),JSBI.__oneDigit(j,!1));let l,m;const n=k.__unsignedDigit(0);if(1===k.length&&65535>=n){l=new JSBI(a.length,!1),l.__initializeDigits();let c=0;for(let b=2*a.length-1;0<=b;b--){const d=c<<16|a.__halfDigit(b);l.__setHalfDigit(b,0|d/n),c=0|d%n}m=c.toString(b)}else{const c=JSBI.__absoluteDivLarge(a,k,!0,!0);l=c.quotient;const d=c.remainder.__trim();m=JSBI.__toStringGeneric(d,b,!0)}l.__trim();let o=JSBI.__toStringGeneric(l,b,!0);for(;m.lengthd?JSBI.__absoluteLess(c):0}static __compareToNumber(a,b){if(b|!0){const c=a.sign,d=0>b;if(c!==d)return JSBI.__unequalSign(c);if(0===a.length){if(d)throw new Error(\"implementation bug\");return 0===b?0:-1}if(1e?JSBI.__absoluteGreater(c):fb)return JSBI.__unequalSign(d);if(0===b)throw new Error(\"implementation bug: should be handled elsewhere\");if(0===a.length)return-1;JSBI.__kBitConversionDouble[0]=b;const e=2047&JSBI.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error(\"implementation bug: handled elsewhere\");const f=e-1023;if(0>f)return JSBI.__absoluteGreater(d);const g=a.length;let h=a.__digit(g-1);const i=c(h),j=32*g-i,k=f+1;if(jk)return JSBI.__absoluteGreater(d);let l=1048576|1048575&JSBI.__kBitConversionInts[1],m=JSBI.__kBitConversionInts[0];const n=20,o=31-i;if(o!==(j-1)%31)throw new Error(\"implementation bug\");let p,q=0;if(20>o){const a=n-o;q=a+32,p=l>>>a,l=l<<32-a|m>>>a,m<<=32-a}else if(20===o)q=32,p=l,l=m;else{const a=o-n;q=32-a,p=l<>>32-a,l=m<>>=0,p>>>=0,h>p)return JSBI.__absoluteGreater(d);if(h>>0,l=m,m=0):p=0;const b=a.__unsignedDigit(c);if(b>p)return JSBI.__absoluteGreater(d);if(bb&&a.__unsignedDigit(0)===c(b):0===JSBI.__compareToDouble(a,b)}static __comparisonResultToBool(a,b){switch(b){case 0:return 0>a;case 1:return 0>=a;case 2:return 0b;case 3:return a>=b;}if(JSBI.__isBigInt(a)&&\"string\"==typeof b)return b=JSBI.__fromString(b),null!==b&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(\"string\"==typeof a&&JSBI.__isBigInt(b))return a=JSBI.__fromString(a),null!==a&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(a=JSBI.__toNumeric(a),b=JSBI.__toNumeric(b),JSBI.__isBigInt(a)){if(JSBI.__isBigInt(b))return JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(\"number\"!=typeof b)throw new Error(\"implementation bug\");return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(a,b),c)}if(\"number\"!=typeof a)throw new Error(\"implementation bug\");if(JSBI.__isBigInt(b))return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(b,a),2^c);if(\"number\"!=typeof b)throw new Error(\"implementation bug\");return 0===c?ab:3===c?a>=b:void 0}__clzmsd(){return Math.clz32(this[this.length-1])}static __absoluteAdd(a,b,c){if(a.length>>16)+(c>>>16)+(h>>>16);f=i>>>16,e.__setDigit(g,65535&h|i<<16)}for(;g>>16)+(c>>>16);f=d>>>16,e.__setDigit(g,65535&c|d<<16)}return g>>16;const i=(c>>>16)-(g>>>16)-e;e=1&i>>>16,d.__setDigit(f,65535&h|i<<16)}for(;f>>16;const g=(b>>>16)-e;e=1&g>>>16,d.__setDigit(f,65535&c|g<<16)}return d.__trim()}static __absoluteAddOne(a,b,c=null){const d=a.length;null===c?c=new JSBI(d,b):c.sign=b;let e=!0;for(let f,g=0;gd?0:a.__unsignedDigit(d)>b.__unsignedDigit(d)?1:-1}static __multiplyAccumulate(a,b,c,d){var e=Math.imul;if(0===b)return;const f=65535&b,g=b>>>16;let h=0,j=0,k=0;for(let l=0;l>>16;const n=a.__digit(l),o=65535&n,p=n>>>16,q=e(o,f),r=e(o,g),s=e(p,f),t=e(p,g);i+=j+(65535&q),m+=k+h+(i>>>16)+(q>>>16)+(65535&r)+(65535&s),h=m>>>16,j=(r>>>16)+(s>>>16)+(65535&t)+h,h=j>>>16,j&=65535,k=t>>>16,b=65535&i|m<<16,c.__setDigit(d,b)}for(;0!=h||0!==j||0!==k;d++){let a=c.__digit(d);const b=(65535&a)+j,e=(a>>>16)+(b>>>16)+k+h;j=0,k=0,h=e>>>16,a=65535&b|e<<16,c.__setDigit(d,a)}}static __internalMultiplyAdd(a,b,c,d,e){var f=Math.imul;let g=c,h=0;for(let j=0;j>>16;const k=f(c>>>16,b),l=(65535&k)+(d>>>16)+g;g=l>>>16,h=k>>>16,e.__setDigit(j,l<<16|65535&i)}if(e.length>d)for(e.__setDigit(d++,g+h);dthis.length&&(c=this.length);const f=65535&a,g=a>>>16;let h=0,j=65535&b,k=b>>>16;for(let l=0;l>>16,d=e(b,f),i=e(b,g),m=e(c,f),n=e(c,g),o=j+(65535&d),p=k+h+(o>>>16)+(d>>>16)+(65535&i)+(65535&m);j=(i>>>16)+(m>>>16)+(65535&n)+(p>>>16),h=j>>>16,j&=65535,k=n>>>16;this.__setDigit(l,65535&o|p<<16)}if(0!=h||0!==j||0!==k)throw new Error(\"implementation bug\")}static __absoluteDivSmall(a,b,c){null===c&&(c=new JSBI(a.length,!1));let d=0;for(let e,f=2*a.length-1;0<=f;f-=2){e=(d<<16|a.__halfDigit(f))>>>0;const g=0|e/b;d=0|e%b,e=(d<<16|a.__halfDigit(f-1))>>>0;const h=0|e/b;d=0|e%b,c.__setDigit(f>>>1,g<<16|h)}return c}static __absoluteModSmall(a,b){let c=0;for(let d=2*a.length-1;0<=d;d--){const e=(c<<16|a.__halfDigit(d))>>>0;c=0|e%b}return c}static __absoluteDivLarge(a,b,d,e){var f=Math.imul;const g=b.__halfDigitLength(),h=b.length,c=a.__halfDigitLength()-g;let i=null;d&&(i=new JSBI(c+2>>>1,!1),i.__initializeDigits());const k=new JSBI(g+2>>>1,!1);k.__initializeDigits();const l=JSBI.__clz16(b.__halfDigit(g-1));0>>0;l=0|c/n;let d=0|c%n;const e=b.__halfDigit(g-2),h=m.__halfDigit(p+g-2);for(;f(l,e)>>>0>(d<<16|h)>>>0&&(l--,d+=n,!(65535>>1,o|l))}return e?(m.__inplaceRightShift(l),d?{quotient:i,remainder:m}:m):d?i:void 0}static __clz16(a){return Math.clz32(a)-16}__inplaceAdd(a,b,c){let d=0;for(let e=0;e>>16,this.__setHalfDigit(b+e,c)}return d}__inplaceSub(a,b,c){let d=0;if(1&b){b>>=1;let e=this.__digit(b),f=65535&e,g=0;for(;g>>1;g++){const c=a.__digit(g),h=(e>>>16)-(65535&c)-d;d=1&h>>>16,this.__setDigit(b+g,h<<16|65535&f),e=this.__digit(b+g+1),f=(65535&e)-(c>>>16)-d,d=1&f>>>16}const h=a.__digit(g),i=(e>>>16)-(65535&h)-d;d=1&i>>>16,this.__setDigit(b+g,i<<16|65535&f);if(b+g+1>=this.length)throw new RangeError(\"out of bounds\");0==(1&c)&&(e=this.__digit(b+g+1),f=(65535&e)-(h>>>16)-d,d=1&f>>>16,this.__setDigit(b+a.length,4294901760&e|65535&f))}else{b>>=1;let e=0;for(;e>>16;const h=(c>>>16)-(f>>>16)-d;d=1&h>>>16,this.__setDigit(b+e,h<<16|65535&g)}const f=this.__digit(b+e),g=a.__digit(e),h=(65535&f)-(65535&g)-d;d=1&h>>>16;let i=0;0==(1&c)&&(i=(f>>>16)-(g>>>16)-d,d=1&i>>>16),this.__setDigit(b+e,i<<16|65535&h)}return d}__inplaceRightShift(a){if(0===a)return;let b=this.__digit(0)>>>a;const c=this.length-1;for(let e=0;e>>a}this.__setDigit(c,b)}static __specialLeftShift(a,b,c){const d=a.length,e=new JSBI(d+c,!1);if(0===b){for(let b=0;b>>32-b}return 0c)throw new RangeError(\"BigInt too big\");const e=c>>>5,f=31&c,g=a.length,h=0!==f&&0!=a.__digit(g-1)>>>32-f,j=g+e+(h?1:0),k=new JSBI(j,a.sign);if(0===f){let b=0;for(;b>>32-f}if(h)k.__setDigit(g+e,b);else if(0!=b)throw new Error(\"implementation bug\")}return k.__trim()}static __rightShiftByAbsolute(a,b){const c=a.length,d=a.sign,e=JSBI.__toShiftAmount(b);if(0>e)return JSBI.__rightShiftByMaximum(d);const f=e>>>5,g=31&e;let h=c-f;if(0>=h)return JSBI.__rightShiftByMaximum(d);let i=!1;if(d){if(0!=(a.__digit(f)&(1<>>g;const d=c-f-1;for(let c=0;c>>g}j.__setDigit(d,b)}return i&&(j=JSBI.__absoluteAddOne(j,!0,j)),j.__trim()}static __rightShiftByMaximum(a){return a?JSBI.__oneDigit(1,!0):JSBI.__zero()}static __toShiftAmount(a){if(1JSBI.__kMaxLengthBits?-1:b}static __toPrimitive(a,b=\"default\"){if(\"object\"!=typeof a)return a;if(a.constructor===JSBI)return a;const c=a[Symbol.toPrimitive];if(c){const a=c(b);if(\"object\"!=typeof a)return a;throw new TypeError(\"Cannot convert object to primitive value\")}const d=a.valueOf;if(d){const b=d.call(a);if(\"object\"!=typeof b)return b}const e=a.toString;if(e){const b=e.call(a);if(\"object\"!=typeof b)return b}throw new TypeError(\"Cannot convert object to primitive value\")}static __toNumeric(a){return JSBI.__isBigInt(a)?a:+a}static __isBigInt(a){return\"object\"==typeof a&&a.constructor===JSBI}static __truncateToNBits(a,b){const c=a+31>>>5,d=new JSBI(c,b.sign),e=c-1;for(let c=0;c>>b}return d.__setDigit(e,f),d.__trim()}static __truncateAndSubFromPowerOfTwo(a,b,c){var d=Math.min;const e=a+31>>>5,f=new JSBI(e,c);let g=0;const h=e-1;let j=0;for(const e=d(h,b.length);g>>16;const d=0-(a>>>16)-j;j=1&d>>>16,f.__setDigit(g,65535&c|d<<16)}for(;g>>16;const b=0-(k>>>16)-j;m=65535&a|b<<16}else{const a=32-l;k=k<>>a;const b=1<<32-a,c=(65535&b)-(65535&k)-j;j=1&c>>>16;const d=(b>>>16)-(k>>>16)-j;m=65535&c|d<<16,m&=b-1}return f.__setDigit(h,m),f.__trim()}__digit(a){return this[a]}__unsignedDigit(a){return this[a]>>>0}__setDigit(a,b){this[a]=0|b}__setDigitGrow(a,b){this[a]=0|b}__halfDigitLength(){const a=this.length;return 65535>=this.__unsignedDigit(a-1)?2*a-1:2*a}__halfDigit(a){return 65535&this[a>>>1]>>>((1&a)<<4)}__setHalfDigit(a,b){const c=a>>>1,d=this.__digit(c),e=1&a?65535&d|b<<16:4294901760&d|65535&b;this.__setDigit(c,e)}static __digitPow(a,b){let c=1;for(;0>>=1,a*=a;return c}}JSBI.__kMaxLength=33554432,JSBI.__kMaxLengthBits=JSBI.__kMaxLength<<5,JSBI.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],JSBI.__kBitsPerCharTableShift=5,JSBI.__kBitsPerCharTableMultiplier=1< maximalLength\n ) {\n throw new Error(errorMessage);\n }\n let optionalProvidedKeys = providedKeys.filter(\n key => !expectedKeys.includes(key)\n );\n if (providedKeys.length - optionalProvidedKeys.length !== requiredLength) {\n throw new Error(errorMessage);\n }\n if (optionalProvidedKeys.find(key => !optionalKeys.includes(key))) {\n throw new Error(errorMessage);\n }\n}\n\nfunction assertHexString(debugPath, string) {\n if (!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(string)) {\n throw new Error(`${debugPath} must be a hex string!`);\n }\n}\n\nfunction assertHash(debugPath, hash) {\n assertHexString(debugPath, hash);\n if (hash.length != 66) {\n throw new Error(`${debugPath} must be a hex string of 66 bytes long!`);\n }\n}\n\nfunction assertInteger(debugPath, i) {\n if (i === \"0x0\") {\n return;\n }\n if (!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(i)) {\n throw new Error(`${debugPath} must be a hex integer!`);\n }\n}\n\nexport function ValidateScript(\n script,\n { nestedValidation = true, debugPath = \"script\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n script,\n [\"code_hash\", \"hash_type\", \"args\"],\n []\n );\n assertHash(`${debugPath}.code_hash`, script.code_hash);\n assertHexString(`${debugPath}.args`, script.args);\n\n if (script.hash_type !== \"data\" && script.hash_type !== \"type\") {\n throw new Error(`${debugPath}.hash_type must be either data or type!`);\n }\n}\n\nexport function ValidateOutPoint(\n outPoint,\n { nestedValidation = true, debugPath = \"out_point\" } = {}\n) {\n assertObjectWithKeys(debugPath, outPoint, [\"tx_hash\", \"index\"], []);\n assertHash(`${debugPath}.tx_hash`, outPoint.tx_hash);\n assertInteger(`${debugPath}.index`, outPoint.index);\n}\n\nexport function ValidateCellInput(\n cellInput,\n { nestedValidation = true, debugPath = \"cell_input\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellInput, [\"since\", \"previous_output\"], []);\n assertInteger(`${debugPath}.since`, cellInput.since);\n\n if (nestedValidation) {\n ValidateOutPoint(cellInput.previous_output, {\n debugPath: `${debugPath}.previous_output`\n });\n }\n}\n\nexport function ValidateCellOutput(\n cellOutput,\n { nestedValidation = true, debugPath = \"cell_output\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellOutput, [\"capacity\", \"lock\"], [\"type\"]);\n assertInteger(`${debugPath}.capacity`, cellOutput.capacity);\n\n if (nestedValidation) {\n ValidateScript(cellOutput.lock, {\n debugPath: `${debugPath}.lock`\n });\n if (cellOutput.type) {\n ValidateScript(cellOutput.type, {\n debugPath: `${debugPath}.type`\n });\n }\n }\n}\n\nexport function ValidateCellDep(\n cellDep,\n { nestedValidation = true, debugPath = \"cell_dep\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellDep, [\"out_point\", \"dep_type\"], []);\n if (cellDep.dep_type !== \"code\" && cellDep.dep_type !== \"dep_group\") {\n throw new Error(`${debugPath}.dep_type must be either code or dep_group!`);\n }\n\n if (nestedValidation) {\n ValidateOutPoint(cellDep.out_point, {\n debugPath: `${debugPath}.out_point`\n });\n }\n}\n\nfunction assertArray(debugPath, array, validateFunction, nestedValidation) {\n if (!Array.isArray(array)) {\n throw new Error(`${debugPath} is not an array!`);\n }\n if (nestedValidation) {\n for (let i = 0; i < array.length; i++) {\n validateFunction(`${debugPath}[${i}]`, array[i]);\n }\n }\n}\n\nfunction toAssert(validateFunction, nestedValidation) {\n return function(debugPath, value) {\n validateFunction(value, {\n nestedValidation: nestedValidation,\n debugPath: debugPath\n });\n };\n}\n\nfunction assertCommonTransaction(debugPath, rawTransaction, nestedValidation) {\n assertInteger(`${debugPath}.version`, rawTransaction.version);\n assertArray(\n `${debugPath}.cell_deps`,\n rawTransaction.cell_deps,\n toAssert(ValidateCellDep, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.header_deps`,\n rawTransaction.header_deps,\n assertHash,\n nestedValidation\n );\n assertArray(\n `${debugPath}.inputs`,\n rawTransaction.inputs,\n toAssert(ValidateCellInput, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.outputs`,\n rawTransaction.outputs,\n toAssert(ValidateCellOutput, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.outputs_data`,\n rawTransaction.outputs_data,\n assertHexString,\n nestedValidation\n );\n}\n\nexport function ValidateRawTransaction(\n rawTransaction,\n { nestedValidation = true, debugPath = \"raw_transaction\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n rawTransaction,\n [\n \"version\",\n \"cell_deps\",\n \"header_deps\",\n \"inputs\",\n \"outputs\",\n \"outputs_data\"\n ],\n []\n );\n assertCommonTransaction(debugPath, rawTransaction, nestedValidation);\n}\n\nexport function ValidateTransaction(\n transaction,\n { nestedValidation = true, debugPath = \"transaction\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n transaction,\n [\n \"version\",\n \"cell_deps\",\n \"header_deps\",\n \"inputs\",\n \"outputs\",\n \"outputs_data\",\n \"witnesses\"\n ],\n []\n );\n assertCommonTransaction(debugPath, transaction, nestedValidation);\n assertArray(\n `${debugPath}.witnesses`,\n transaction.witnesses,\n assertHexString,\n nestedValidation\n );\n}\n\nfunction assertCommonHeader(debugPath, rawHeader) {\n assertInteger(`${debugPath}.version`, rawHeader.version);\n assertInteger(`${debugPath}.compact_target`, rawHeader.compact_target);\n assertInteger(`${debugPath}.timestamp`, rawHeader.timestamp);\n assertInteger(`${debugPath}.number`, rawHeader.number);\n assertInteger(`${debugPath}.epoch`, rawHeader.epoch);\n assertHash(`${debugPath}.parent_hash`, rawHeader.parent_hash);\n assertHash(`${debugPath}.transactions_root`, rawHeader.transactions_root);\n assertHash(`${debugPath}.proposals_hash`, rawHeader.proposals_hash);\n assertHash(`${debugPath}.uncles_hash`, rawHeader.uncles_hash);\n assertHash(`${debugPath}.dao`, rawHeader.dao);\n}\n\nexport function ValidateRawHeader(\n rawHeader,\n { nestedValidation = true, debugPath = \"raw_header\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n rawHeader,\n [\n \"version\",\n \"compact_target\",\n \"timestamp\",\n \"number\",\n \"epoch\",\n \"parent_hash\",\n \"transactions_root\",\n \"proposals_hash\",\n \"uncles_hash\",\n \"dao\"\n ],\n []\n );\n assertCommonHeader(debugPath, rawHeader);\n}\n\nexport function ValidateHeader(\n header,\n { nestedValidation = true, debugPath = \"header\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n header,\n [\n \"version\",\n \"compact_target\",\n \"timestamp\",\n \"number\",\n \"epoch\",\n \"parent_hash\",\n \"transactions_root\",\n \"proposals_hash\",\n \"uncles_hash\",\n \"dao\",\n \"nonce\"\n ],\n []\n );\n assertHexString(`${debugPath}.nonce`, header.nonce);\n if (header.nonce.length != 34) {\n throw new Error(\n `${debugPath}.nonce must be a hex string of 34 bytes long!`\n );\n }\n}\n\nfunction assertProposalShortId(debugPath, shortId) {\n assertHexString(debugPath, shortId);\n if (shortId.length != 22) {\n throw new Error(`${debugPath} must be a hex string of 22 bytes long!`);\n }\n}\n\nexport function ValidateUncleBlock(\n uncleBlock,\n { nestedValidation = true, debugPath = \"uncle_block\" } = {}\n) {\n assertObjectWithKeys(debugPath, uncleBlock, [\"header\", \"proposals\"], []);\n\n if (nestedValidation) {\n ValidateHeader(uncleBlock.header, {\n debugPath: `${debugPath}.header`\n });\n }\n assertArray(\n `${debugPath}.proposals`,\n uncleBlock.proposals,\n assertProposalShortId,\n nestedValidation\n );\n}\n\nexport function ValidateBlock(\n block,\n { nestedValidation = true, debugPath = \"block\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n block,\n [\"header\", \"uncles\", \"transactions\", \"proposals\"],\n []\n );\n\n if (nestedValidation) {\n ValidateHeader(block.header, {\n debugPath: `${debugPath}.header`\n });\n }\n assertArray(\n `${debugPath}.uncles`,\n block.uncles,\n toAssert(ValidateUncleBlock, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.transactions`,\n block.transactions,\n toAssert(ValidateTransaction, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.proposals`,\n block.proposals,\n assertProposalShortId,\n nestedValidation\n );\n}\n\nexport function ValidateCellbaseWitness(\n cellbaseWitness,\n { nestedValidation = true, debugPath = \"cellbase_witness\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellbaseWitness, [\"lock\", \"message\"], []);\n assertHexString(`${debugPath}.message`, cellbaseWitness.message);\n\n if (nestedValidation) {\n ValidateScript(cellbaseWitness.lock, {\n debugPath: `${debugPath}.lock`\n });\n }\n}\n\nexport function ValidateWitnessArgs(\n witnessArgs,\n { nestedValidation = true, debugPath = \"witness_args\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n witnessArgs,\n [],\n [\"lock\", \"input_type\", \"output_type\"]\n );\n\n if (witnessArgs.lock) {\n assertHexString(`${debugPath}.lock`, witnessArgs.lock);\n }\n if (witnessArgs.input_type) {\n assertHexString(`${debugPath}.input_type`, witnessArgs.input_type);\n }\n if (witnessArgs.output_type) {\n assertHexString(`${debugPath}.output_type`, witnessArgs.output_type);\n }\n}\n","import Stream from 'stream';\nimport http from 'http';\nimport Url from 'url';\nimport https from 'https';\nimport zlib from 'zlib';\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parse_url(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parse_url(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parse_url(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\nconst resolve_url = Url.resolve;\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\t\t\tfinalize();\n\t\t});\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tconst locationURL = location === null ? null : resolve_url(request.url, location);\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nexport default fetch;\nexport { Headers, Request, Response, FetchError };\n","var nodeFetch = require('node-fetch')\nvar realFetch = nodeFetch.default || nodeFetch\n\nvar fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","import fetch from \"cross-fetch\";\nimport JSBI from \"jsbi\";\n\nfunction mergeOptions(overrideOptions, defaultOptions) {\n defaultOptions = defaultOptions || {};\n const headers = Object.assign(\n {},\n defaultOptions.headers || {},\n overrideOptions.headers || {}\n );\n return Object.assign({}, defaultOptions, overrideOptions, {\n headers: headers\n });\n}\n\nconst batchHandler = {\n get: (target, method, receiver) => {\n if (method === \"send\") {\n return async () => {\n const response = await fetch(\n target.uri,\n mergeOptions(\n {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(target.payload)\n },\n target.defaultOptions\n )\n );\n return await response.json();\n };\n }\n return (...params) => {\n const id = target.id;\n target.id = target.id + 1;\n target.payload.push({\n jsonrpc: \"2.0\",\n id: id,\n method: method,\n params: params\n });\n return receiver;\n };\n }\n};\n\nconst handler = {\n get: (target, method) => {\n if (method === \"batch\") {\n return () => {\n return new Proxy(\n {\n id: Math.round(Math.random() * 10000000),\n payload: [],\n uri: target.uri,\n defaultOptions: target.defaultOptions\n },\n batchHandler\n );\n };\n }\n return async (...params) => {\n const id = Math.round(Math.random() * 10000000);\n const response = await fetch(\n target.uri,\n mergeOptions(\n {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: id,\n method: method,\n params: params\n })\n },\n target.defaultOptions\n )\n );\n const data = await response.json();\n if (data.id !== id) {\n throw new Error(\"JSONRPCError: response ID does not match request ID!\");\n }\n if (data.error) {\n throw new Error(\n `JSONRPCError: server error ${JSON.stringify(data.error)}`\n );\n }\n return data.result;\n };\n }\n};\n\nexport class RPC {\n constructor(uri, defaultOptions = {}) {\n this.uri = uri;\n this.defaultOptions = defaultOptions;\n return new Proxy(this, handler);\n }\n\n static create(uri) {\n return new RPC(uri);\n }\n}\n\nexport function HexStringToBigInt(hexString) {\n return JSBI.BigInt(hexString);\n}\n\nexport function BigIntToHexString(bigInt) {\n return \"0x\" + bigInt.toString(16);\n}\n","// This package provides normalizer functions. Even though CKB uses molecule\n// as the serialization layer. There is still CKB specific knowledge that does\n// not belong in molecule. For example, all numbers in CKB protocols are\n// serialized using little endian format. This package tries to encode such\n// knowledge. The goal here, is that you are free to use whatever types that\n// makes most sense to represent the values. As long as you pass your object\n// through the normalizers here, molecule should be able to serialize the values\n// into correct formats required by CKB.\n//\n// Note this is only used when you need to deal with CKB structures in molecule\n// format. If you are using RPCs or GraphQL to interact with CKB, chances are you\n// will not need this package.\nimport JSBI from \"jsbi\";\nimport { Reader } from \"./reader\";\nimport { BigIntToHexString } from \"./rpc\";\n\nfunction normalizeHexNumber(length) {\n return function(debugPath, value) {\n if (!(value instanceof ArrayBuffer)) {\n let intValue = BigIntToHexString(JSBI.BigInt(value)).substr(2);\n if (intValue.length % 2 !== 0) {\n intValue = \"0\" + intValue;\n }\n if (intValue.length / 2 > length) {\n throw new Error(\n `${debugPath} is ${intValue.length /\n 2} bytes long, expected length is ${length}!`\n );\n }\n const view = new DataView(new ArrayBuffer(length));\n for (let i = 0; i < intValue.length / 2; i++) {\n const start = intValue.length - (i + 1) * 2;\n view.setUint8(i, parseInt(intValue.substr(start, 2), 16));\n }\n value = view.buffer;\n }\n if (value.byteLength < length) {\n const array = new Uint8Array(length);\n array.set(new Uint8Array(value), 0);\n value = array.buffer;\n }\n return value;\n };\n}\n\nfunction normalizeRawData(length) {\n return function(debugPath, value) {\n value = new Reader(value).toArrayBuffer();\n if (length > 0 && value.byteLength !== length) {\n throw new Error(\n `${debugPath} has invalid length ${value.byteLength}, required: ${length}`\n );\n }\n return value;\n };\n}\n\nfunction normalizeObject(debugPath, object, keys) {\n const result = {};\n\n for (const [key, f] of Object.entries(keys)) {\n const value = object[key];\n if (!value) {\n throw new Error(`${debugPath} is missing ${key}!`);\n }\n result[key] = f(`${debugPath}.${key}`, value);\n }\n return result;\n}\n\nexport function NormalizeScript(script, { debugPath = \"script\" } = {}) {\n return normalizeObject(debugPath, script, {\n code_hash: normalizeRawData(32),\n hash_type: function(debugPath, value) {\n switch (value) {\n case \"data\":\n return 0;\n case \"type\":\n return 1;\n case 0:\n return value;\n case 1:\n return value;\n default:\n throw new Error(`${debugPath}.hash_type has invalid value: ${value}`);\n }\n },\n args: normalizeRawData(-1)\n });\n}\n\nexport function NormalizeOutPoint(outPoint, { debugPath = \"out_point\" } = {}) {\n return normalizeObject(debugPath, outPoint, {\n tx_hash: normalizeRawData(32),\n index: normalizeHexNumber(4)\n });\n}\n\nfunction toNormalize(normalize) {\n return function(debugPath, value) {\n return normalize(value, {\n debugPath\n });\n };\n}\n\nexport function NormalizeCellInput(\n cellInput,\n { debugPath = \"cell_input\" } = {}\n) {\n return normalizeObject(debugPath, cellInput, {\n since: normalizeHexNumber(8),\n previous_output: toNormalize(NormalizeOutPoint)\n });\n}\n\nexport function NormalizeCellOutput(\n cellOutput,\n { debugPath = \"cell_output\" } = {}\n) {\n const result = normalizeObject(debugPath, cellOutput, {\n capacity: normalizeHexNumber(8),\n lock: toNormalize(NormalizeScript)\n });\n if (cellOutput.type) {\n result.type_ = NormalizeScript(cellOutput.type, {\n debugPath: `${debugPath}.type`\n });\n }\n return result;\n}\n\nexport function NormalizeCellDep(cellDep, { debugPath = \"cell_dep\" } = {}) {\n return normalizeObject(debugPath, cellDep, {\n out_point: toNormalize(NormalizeOutPoint),\n dep_type: function(debugPath, value) {\n switch (value) {\n case \"code\":\n return 0;\n case \"dep_group\":\n return 1;\n case 0:\n return value;\n case 1:\n return value;\n default:\n throw new Error(`${debugPath}.dep_type has invalid value: ${value}`);\n }\n }\n });\n}\n\nfunction toNormalizeArray(normalizeFunction) {\n return function(debugPath, array) {\n return array.map((item, i) => {\n return normalizeFunction(`${debugPath}[${i}]`, item);\n });\n };\n}\n\nexport function NormalizeRawTransaction(\n rawTransaction,\n { debugPath = \"raw_transaction\" } = {}\n) {\n return normalizeObject(debugPath, rawTransaction, {\n version: normalizeHexNumber(4),\n cell_deps: toNormalizeArray(toNormalize(NormalizeCellDep)),\n header_deps: toNormalizeArray(normalizeRawData(32)),\n inputs: toNormalizeArray(toNormalize(NormalizeCellInput)),\n outputs: toNormalizeArray(toNormalize(NormalizeCellOutput)),\n outputs_data: toNormalizeArray(normalizeRawData(-1))\n });\n}\n\nexport function NormalizeTransaction(\n transaction,\n { debugPath = \"transaction\" } = {}\n) {\n const rawTransaction = NormalizeRawTransaction(transaction, {\n debugPath: `(raw)${debugPath}`\n });\n const result = normalizeObject(debugPath, transaction, {\n witnesses: toNormalizeArray(normalizeRawData(-1))\n });\n result.raw = rawTransaction;\n return result;\n}\n\nexport function NormalizeRawHeader(\n rawHeader,\n { debugPath = \"raw_header\" } = {}\n) {\n return normalizeObject(debugPath, rawHeader, {\n version: normalizeHexNumber(4),\n compact_target: normalizeHexNumber(4),\n timestamp: normalizeHexNumber(8),\n number: normalizeHexNumber(8),\n epoch: normalizeHexNumber(8),\n parent_hash: normalizeRawData(32),\n transactions_root: normalizeRawData(32),\n proposals_hash: normalizeRawData(32),\n uncles_hash: normalizeRawData(32),\n dao: normalizeRawData(32)\n });\n}\n\nexport function NormalizeHeader(header, { debugPath = \"header\" } = {}) {\n const rawHeader = NormalizeRawHeader(header, {\n debugPath: `(raw)${debugPath}`\n });\n const result = normalizeObject(debugPath, header, {\n nonce: normalizeHexNumber(16)\n });\n result.raw = rawHeader;\n return result;\n}\n\nexport function NormalizeUncleBlock(\n uncleBlock,\n { debugPath = \"uncle_block\" } = {}\n) {\n return normalizeObject(debugPath, uncleBlock, {\n header: toNormalize(NormalizeHeader),\n proposals: toNormalizeArray(normalizeRawData(10))\n });\n}\n\nexport function NormalizeBlock(block, { debugPath = \"block\" } = {}) {\n return normalizeObject(debugPath, block, {\n header: toNormalize(NormalizeHeader),\n uncles: toNormalizeArray(toNormalize(NormalizeUncleBlock)),\n transactions: toNormalizeArray(toNormalize(NormalizeTransaction)),\n proposals: toNormalizeArray(normalizeRawData(10))\n });\n}\n\nexport function NormalizeCellbaseWitness(\n cellbaseWitness,\n { debugPath = \"cellbase_witness\" } = {}\n) {\n return normalizeObject(debugPath, cellbaseWitness, {\n lock: toNormalize(NormalizeScript),\n message: normalizeRawData(-1)\n });\n}\n\nexport function NormalizeWitnessArgs(\n witnessArgs,\n { debugPath = \"witness_args\" } = {}\n) {\n const result = {};\n if (witnessArgs.lock) {\n result.lock = normalizeRawData(-1)(`${debugPath}.lock`, witnessArgs.lock);\n }\n if (witnessArgs.input_type) {\n result.input_type = normalizeRawData(-1)(\n `${debugPath}.input_type`,\n witnessArgs.input_type\n );\n }\n if (witnessArgs.output_type) {\n result.output_type = normalizeRawData(-1)(\n `${debugPath}.output_type`,\n witnessArgs.output_type\n );\n }\n return result;\n}\n","// This package provides transformer functions that transform JavaScript objects\n// into JSON ready objects that can be passed to RPC. It following the following\n// rules:\n//\n// 1. If the specified object has a serializeJson method, it would invoke this\n// method and use the result to replace current object.\n// 2. It then restricts the keys of the object to keys required by the specified\n// entity(i.e., a Script would only have code_hash, hash_type, args keys),for each\n// sub-field, it then recursively perform the steps here from step 1.\n// 3. It then optionally run validator functions to ensure the resulting object\n// follows specified rules.\n//\n// Note rule 1 here provides the flexibility in defining your own structures: you\n// could define a class containing custom data structures, then provide a\n// serializeJson that transforms the custom one into the rigid data structure\n// required by CKB. You can also leverage the Reader class we provide as much as\n// possible. Since Reader class does provide serializeJson methods, transformers\n// here will transform them to valid hex strings required by CKB.\nimport * as validators from \"./validators\";\n\nfunction invokeSerializeJson(debugPath, value) {\n if (value instanceof Object && value.serializeJson instanceof Function) {\n return value.serializeJson.call(value);\n }\n return value;\n}\n\nfunction transformObject(debugPath, object, keys) {\n object = invokeSerializeJson(debugPath, object);\n if (!(object instanceof Object)) {\n throw new Error(`Transformed ${debugPath} is not an object!`);\n }\n const result = {};\n\n for (const [key, f] of Object.entries(keys)) {\n let value = object[key];\n if (!value) {\n const camelKey = key.replace(/(_[a-z])/g, group =>\n group.toUpperCase().replace(\"_\", \"\")\n );\n value = object[camelKey];\n }\n if (value) {\n result[key] = f(`${debugPath}.${key}`, value);\n }\n }\n return result;\n}\n\nexport function TransformScript(\n script,\n { validation = true, debugPath = \"script\" } = {}\n) {\n script = transformObject(debugPath, script, {\n code_hash: invokeSerializeJson,\n hash_type: invokeSerializeJson,\n args: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateScript(script, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return script;\n}\n\nexport function TransformOutPoint(\n outPoint,\n { validation = true, debugPath = \"out_point\" } = {}\n) {\n outPoint = transformObject(debugPath, outPoint, {\n tx_hash: invokeSerializeJson,\n index: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateOutPoint(outPoint, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return outPoint;\n}\n\nfunction toInvoke(transform) {\n return function(debugPath, value) {\n return transform(value, {\n validation: false,\n debugPath\n });\n };\n}\n\nexport function TransformCellInput(\n cellInput,\n { validation = true, debugPath = \"cell_input\" } = {}\n) {\n cellInput = transformObject(debugPath, cellInput, {\n since: invokeSerializeJson,\n previous_output: toInvoke(TransformOutPoint)\n });\n\n if (validation) {\n validators.ValidateCellInput(cellInput, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellInput;\n}\n\nexport function TransformCellOutput(\n cellOutput,\n { validation = true, debugPath = \"cell_output\" } = {}\n) {\n cellOutput = transformObject(debugPath, cellOutput, {\n capacity: invokeSerializeJson,\n lock: toInvoke(TransformScript),\n type: toInvoke(TransformScript)\n });\n\n if (validation) {\n validators.ValidateCellOutput(cellOutput, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellOutput;\n}\n\nexport function TransformCellDep(\n cellDep,\n { validation = true, debugPath = \"cell_dep\" } = {}\n) {\n cellDep = transformObject(debugPath, cellDep, {\n out_point: toInvoke(TransformOutPoint),\n dep_type: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateCellDep(cellDep, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellDep;\n}\n\nfunction toInvokeArray(invokeFunction) {\n return function(debugPath, array) {\n return array.map((item, i) => {\n return invokeFunction(`${debugPath}[${i}]`, item);\n });\n };\n}\n\nexport function TransformRawTransaction(\n rawTransaction,\n { validation = true, debugPath = \"raw_transaction\" } = {}\n) {\n rawTransaction = transformObject(debugPath, rawTransaction, {\n version: invokeSerializeJson,\n cell_deps: toInvokeArray(toInvoke(TransformCellDep)),\n header_deps: toInvokeArray(invokeSerializeJson),\n inputs: toInvokeArray(toInvoke(TransformCellInput)),\n outputs: toInvokeArray(toInvoke(TransformCellOutput)),\n outputs_data: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateRawTransaction(rawTransaction, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return rawTransaction;\n}\n\nexport function TransformTransaction(\n transaction,\n { validation = true, debugPath = \"transaction\" } = {}\n) {\n transaction = transformObject(debugPath, transaction, {\n version: invokeSerializeJson,\n cell_deps: toInvokeArray(toInvoke(TransformCellDep)),\n header_deps: toInvokeArray(invokeSerializeJson),\n inputs: toInvokeArray(toInvoke(TransformCellInput)),\n outputs: toInvokeArray(toInvoke(TransformCellOutput)),\n outputs_data: toInvokeArray(invokeSerializeJson),\n witnesses: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateTransaction(transaction, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return transaction;\n}\n\nexport function TransformRawHeader(\n rawHeader,\n { validation = true, debugPath = \"raw_header\" } = {}\n) {\n rawHeader = transformObject(debugPath, rawHeader, {\n version: invokeSerializeJson,\n compact_target: invokeSerializeJson,\n timestamp: invokeSerializeJson,\n number: invokeSerializeJson,\n epoch: invokeSerializeJson,\n parent_hash: invokeSerializeJson,\n transactions_root: invokeSerializeJson,\n proposals_hash: invokeSerializeJson,\n uncles_hash: invokeSerializeJson,\n dao: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateRawHeader(rawHeader, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return rawHeader;\n}\n\nexport function TransformHeader(\n header,\n { validation = true, debugPath = \"header\" } = {}\n) {\n header = transformObject(debugPath, header, {\n version: invokeSerializeJson,\n compact_target: invokeSerializeJson,\n timestamp: invokeSerializeJson,\n number: invokeSerializeJson,\n epoch: invokeSerializeJson,\n parent_hash: invokeSerializeJson,\n transactions_root: invokeSerializeJson,\n proposals_hash: invokeSerializeJson,\n uncles_hash: invokeSerializeJson,\n dao: invokeSerializeJson,\n nonce: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateHeader(header, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return header;\n}\n\nexport function TransformUncleBlock(\n uncleBlock,\n { validation = true, debugPath = \"uncle_block\" } = {}\n) {\n uncleBlock = transformObject(debugPath, uncleBlock, {\n header: toInvoke(TransformHeader),\n proposals: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateUncleBlock(uncleBlock, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return uncleBlock;\n}\n\nexport function TransformBlock(\n block,\n { validation = true, debugPath = \"block\" } = {}\n) {\n block = transformObject(debugPath, block, {\n header: toInvoke(TransformHeader),\n uncles: toInvokeArray(toInvoke(TransformUncleBlock)),\n transactions: toInvokeArray(toInvoke(TransformTransaction)),\n proposals: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateBlock(block, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return block;\n}\n\nexport function TransformCellbaseWitness(\n cellbaseWitness,\n { validation = true, debugPath = \"cellbase_witness\" } = {}\n) {\n cellbaseWitness = transformObject(debugPath, cellbaseWitness, {\n lock: toInvoke(TransformScript),\n message: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateCellbaseWitness(cellbaseWitness, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellbaseWitness;\n}\n\nexport function TransformWitnessArgs(\n witnessArgs,\n { validation = true, debugPath = \"witness_args\" } = {}\n) {\n witnessArgs = transformObject(debugPath, witnessArgs, {\n lock: invokeSerializeJson,\n input_type: invokeSerializeJson,\n output_type: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateWitnessArgs(witnessArgs, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return witnessArgs;\n}\n","import JSBI from \"jsbi\";\nimport { Reader } from \"../reader\";\nimport { HexStringToBigInt, BigIntToHexString } from \"../rpc\";\n\nexport class RPCCollector {\n constructor(\n rpc,\n lockHash,\n {\n skipCellWithContent = true,\n loadData = false,\n loadBlockNumber = true\n } = {}\n ) {\n this.rpc = rpc;\n this.lockHash = new Reader(lockHash).serializeJson();\n this.skipCellWithContent = skipCellWithContent;\n this.loadData = loadData;\n this.loadBlockNumber = loadBlockNumber;\n }\n\n async *collect() {\n const to = HexStringToBigInt(await this.rpc.get_tip_block_number());\n let currentFrom = JSBI.BigInt(0);\n while (JSBI.lessThanOrEqual(currentFrom, to)) {\n let currentTo = JSBI.add(currentFrom, JSBI.BigInt(100));\n if (JSBI.greaterThan(currentTo, to)) {\n currentTo = to;\n }\n const cells = await this.rpc.get_cells_by_lock_hash(\n this.lockHash,\n BigIntToHexString(currentFrom),\n BigIntToHexString(currentTo)\n );\n for (const cell of cells) {\n if (this.skipCellWithContent) {\n if (\n cell.type ||\n JSBI.greaterThan(\n HexStringToBigInt(cell.output_data_len),\n JSBI.BigInt(100)\n )\n ) {\n continue;\n }\n }\n let data = null;\n if (this.loadData) {\n const cellWithData = await this.rpc.get_live_cell(\n cell.out_point,\n true\n );\n data = cellWithData.cell.data.content;\n }\n let block_number = null;\n if (this.loadBlockNumber) {\n const header = await this.rpc.get_header(cell.block_hash);\n block_number = header.number;\n }\n yield {\n cellbase: cell.cellbase,\n cell_output: {\n capacity: cell.capacity,\n lock: cell.lock,\n type: cell.type\n },\n out_point: cell.out_point,\n block_hash: cell.block_hash,\n data: data,\n output_data_len: cell.output_data_len,\n block_number\n };\n }\n currentFrom = JSBI.add(currentTo, JSBI.BigInt(1));\n }\n }\n}\n","import JSBI from \"jsbi\";\nimport { Reader } from \"./reader\";\nimport { ValidateTransaction, ValidateOutPoint } from \"./validators\";\n\nexport class TransactionDumper {\n constructor(\n rpc,\n { validateTransaction = true, depGroupUnpacker = null } = {}\n ) {\n this.rpc = rpc;\n this.validateTransaction = validateTransaction;\n this.depGroupUnpacker = depGroupUnpacker;\n }\n\n async dumpByHash(txHash) {\n const tx = (await this.rpc.get_transaction(txHash)).transaction;\n delete tx.hash;\n return await this.dump(tx);\n }\n\n async dump(tx) {\n if (this.validateTransaction) {\n ValidateTransaction(tx);\n }\n const mockInputs = [];\n for (const input of tx.inputs) {\n const { output, data, header } = await this._resolveOutPoint(\n input.previous_output\n );\n mockInputs.push({ input, output, data, header });\n }\n const mockCellDeps = [];\n for (const cellDep of tx.cell_deps) {\n const { output, data, header } = await this._resolveOutPoint(\n cellDep.out_point\n );\n mockCellDeps.push({\n cell_dep: cellDep,\n output,\n data,\n header\n });\n if (cellDep.dep_type === \"dep_group\") {\n if (!this.depGroupUnpacker) {\n throw new Error(\n \"depGroupUnpacker must be provided when the transaction contains dep_group!\"\n );\n }\n const outPoints = this.depGroupUnpacker(new Reader(data));\n for (const outPoint of outPoints) {\n ValidateOutPoint(outPoint);\n const { output, data, header } = await this._resolveOutPoint(\n outPoint\n );\n mockCellDeps.push({\n cell_dep: {\n out_point: outPoint,\n dep_type: \"code\"\n },\n output,\n data,\n header\n });\n }\n }\n }\n const mockHeaderDeps = [];\n for (const headerDep of tx.header_deps) {\n mockHeaderDeps.push(await this.rpc.get_header(headerDep));\n }\n return JSON.stringify({\n mock_info: {\n inputs: mockInputs,\n cell_deps: mockCellDeps,\n header_deps: mockHeaderDeps\n },\n tx\n });\n }\n\n async _resolveOutPoint(out_point) {\n const txStatus = await this.rpc.get_transaction(out_point.tx_hash);\n if (!txStatus || !txStatus.transaction) {\n throw new Error(`Transaction ${out_point.tx_hash} cannot be found!`);\n }\n const tx = txStatus.transaction;\n const index = JSBI.toNumber(JSBI.BigInt(out_point.index));\n if (index >= tx.outputs.length) {\n throw new Error(\n `Transaction ${out_point.tx_hash} does not have output ${index}!`\n );\n }\n const data = {\n output: tx.outputs[index],\n data: tx.outputs_data[index]\n };\n if (txStatus.tx_status.status === \"committed\") {\n data.header = txStatus.tx_status.block_hash;\n }\n return data;\n }\n}\n","export { Reader } from \"./reader.js\";\nexport { TransactionDumper } from \"./transaction_dumper.js\";\nexport { RPC, HexStringToBigInt, BigIntToHexString } from \"./rpc.js\";\nexport * as normalizers from \"./normalizers\";\nexport * as transformers from \"./transformers\";\nexport * as validators from \"./validators\";\nexport * as cell_collectors from \"./cell_collectors\";\nexport const VERSION = \"__development_build__\";\n"],"names":["ArrayBufferReader","[object Object]","buffer","this","view","DataView","byteLength","i","getUint8","Array","prototype","map","call","Uint8Array","x","toString","slice","join","HexStringReader","string","length","parseInt","substr","ArrayBuffer","setUint8","indexAt","Reader","input","startsWith","Error","c","charCodeAt","JSBI","a","b","__kMaxLength","RangeError","super","sign","Math","floor","Number","isFinite","__zero","__oneDigit","__fromDouble","__fromString","SyntaxError","constructor","__toPrimitive","BigInt","TypeError","push","__toStringBasePowerOfTwo","__toStringGeneric","clz32","__unsignedDigit","d","__digit","e","f","Infinity","g","h","j","k","l","m","n","o","__decideRounding","p","__kBitConversionInts","__kBitConversionDouble","__copy","__absoluteSubOne","__trim","__absoluteAddOne","unaryMinus","__kMaxLengthBits","__initializeDigits","__setDigit","multiply","__clzmsd","__multiplyAccumulate","__absoluteCompare","__absoluteDivSmall","__absoluteDivLarge","__absoluteModSmall","__absoluteAdd","__absoluteSub","__rightShiftByAbsolute","__leftShiftByAbsolute","__compareToBigInt","equal","max","__absoluteAnd","__absoluteOr","__absoluteAndNot","__absoluteXor","__truncateToNBits","__truncateAndSubFromPowerOfTwo","__toNumeric","__isBigInt","add","__compare","EQ","__equalToNumber","pop","__isWhitespace","__kMaxBitsPerChar","__kBitsPerCharTableMultiplier","__kBitsPerCharTableShift","__fillFromParts","q","__inplaceMultiplyAdd","__kConversionChars","exponentiate","__halfDigit","__setHalfDigit","quotient","remainder","__unequalSign","__absoluteGreater","__absoluteLess","abs","__compareToDouble","__comparisonResultToBool","__compareToNumber","__setDigitGrow","imul","r","s","t","__halfDigitLength","__clz16","__specialLeftShift","__internalMultiplyAdd","__inplaceSub","__inplaceAdd","__inplaceRightShift","__toShiftAmount","__rightShiftByMaximum","Symbol","toPrimitive","valueOf","min","assertObjectWithKeys","debugPath","object","expectedKeys","optionalKeys","Object","assertObject","providedKeys","keys","sort","requiredLength","maximalLength","errorMessage","optionalProvidedKeys","filter","key","includes","find","assertHexString","test","assertHash","hash","assertInteger","ValidateScript","script","nestedValidation","code_hash","args","hash_type","ValidateOutPoint","outPoint","tx_hash","index","ValidateCellInput","cellInput","since","previous_output","ValidateCellOutput","cellOutput","capacity","lock","type","ValidateCellDep","cellDep","dep_type","out_point","assertArray","array","validateFunction","isArray","toAssert","value","assertCommonTransaction","rawTransaction","version","cell_deps","header_deps","inputs","outputs","outputs_data","ValidateRawTransaction","ValidateTransaction","transaction","witnesses","ValidateRawHeader","rawHeader","compact_target","timestamp","number","epoch","parent_hash","transactions_root","proposals_hash","uncles_hash","dao","assertCommonHeader","ValidateHeader","header","nonce","assertProposalShortId","shortId","ValidateUncleBlock","uncleBlock","proposals","ValidateBlock","block","uncles","transactions","ValidateCellbaseWitness","cellbaseWitness","message","ValidateWitnessArgs","witnessArgs","input_type","output_type","__kBitConversionBuffer","Float64Array","Int32Array","Readable","Stream","BUFFER","TYPE","Blob","blobParts","arguments","options","buffers","size","element","Buffer","isView","from","byteOffset","String","concat","undefined","toLowerCase","Promise","resolve","buf","ab","readable","_read","start","end","relativeStart","relativeEnd","span","slicedBuffer","blob","FetchError","systemError","code","errno","captureStackTrace","convert","defineProperties","enumerable","defineProperty","toStringTag","writable","configurable","create","name","require","INTERNALS","PassThrough","Body","body","_this","_ref","_ref$size","_ref$timeout","timeout","isURLSearchParams","isBlob","isBuffer","disturbed","error","on","err","url","consumeBody","_this4","reject","alloc","stream","accum","accumBytes","abort","resTimeout","setTimeout","chunk","clearTimeout","obj","append","delete","get","getAll","has","set","arrayBuffer","clone","instance","p1","p2","bodyUsed","getBoundary","pipe","extractContentType","getTotalBytes","getLengthSync","_lengthRetrievers","hasKnownLength","then","ct","headers","assign","_this2","JSON","parse","_this3","res","str","charset","exec","convertBody","json","text","mixIn","proto","getOwnPropertyNames","desc","getOwnPropertyDescriptor","global","invalidTokenRegex","invalidHeaderCharRegex","validateName","validateValue","MAP","Headers","init","rawHeaders","raw","headerNames","headerName","method","iterator","pairs","pair","callback","thisArg","getHeaders","_pairs$i","createHeadersIterator","kind","entries","forEach","values","INTERNAL","target","HeadersIteratorPrototype","setPrototypeOf","getPrototypeOf","_INTERNAL","done","exportNodeCompatibleHeaders","__proto__","hostHeaderKey","INTERNALS$1","STATUS_CODES","http","Response","opts","status","contentType","statusText","counter","ok","redirected","INTERNALS$2","parse_url","Url","format_url","format","streamDestructionSupported","isRequest","Request","parsedURL","href","toUpperCase","inputBody","signal","isAbortSignal","redirect","follow","compress","agent","AbortError","PassThrough$1","resolve_url","fetch","request","protocol","hostname","contentLengthValue","totalBytes","getNodeRequestOptions","send","https","response","destroy","emit","aborted","abortAndFinalize","finalize","req","reqTimeout","removeEventListener","addEventListener","once","socket","val","createHeadersLenient","isRedirect","statusCode","location","locationURL","requestOpts","response_options","statusMessage","codings","zlibOptions","flush","zlib","Z_SYNC_FLUSH","finishFlush","createGunzip","createBrotliDecompress","createInflate","createInflateRaw","dest","write","writeToStream","realFetch","nodeFetch","default","module","exports","mergeOptions","overrideOptions","defaultOptions","batchHandler","receiver","async","uri","Content-Type","stringify","payload","params","id","jsonrpc","handler","Proxy","round","random","data","result","RPC","HexStringToBigInt","hexString","BigIntToHexString","bigInt","normalizeHexNumber","intValue","normalizeRawData","toArrayBuffer","normalizeObject","NormalizeScript","NormalizeOutPoint","toNormalize","normalize","NormalizeCellInput","NormalizeCellOutput","type_","NormalizeCellDep","toNormalizeArray","normalizeFunction","item","NormalizeRawTransaction","NormalizeTransaction","NormalizeRawHeader","NormalizeHeader","NormalizeUncleBlock","invokeSerializeJson","serializeJson","Function","transformObject","replace","group","TransformScript","validation","validators.ValidateScript","TransformOutPoint","validators.ValidateOutPoint","toInvoke","transform","TransformCellInput","validators.ValidateCellInput","TransformCellOutput","validators.ValidateCellOutput","TransformCellDep","validators.ValidateCellDep","toInvokeArray","invokeFunction","TransformTransaction","validators.ValidateTransaction","TransformHeader","validators.ValidateHeader","TransformUncleBlock","validators.ValidateUncleBlock","validators.ValidateRawTransaction","validators.ValidateRawHeader","validators.ValidateBlock","validators.ValidateCellbaseWitness","validators.ValidateWitnessArgs","rpc","lockHash","skipCellWithContent","loadData","loadBlockNumber","to","get_tip_block_number","currentFrom","lessThanOrEqual","currentTo","greaterThan","cells","get_cells_by_lock_hash","cell","output_data_len","get_live_cell","content","block_number","get_header","block_hash","cellbase","cell_output","validateTransaction","depGroupUnpacker","txHash","tx","get_transaction","dump","mockInputs","output","_resolveOutPoint","mockCellDeps","cell_dep","outPoints","mockHeaderDeps","headerDep","mock_info","txStatus","toNumber","tx_status"],"mappings":"mRAAA,MAAMA,EACJC,YAAYC,GACVC,KAAKC,KAAO,IAAIC,SAASH,GAG3BD,SACE,OAAOE,KAAKC,KAAKE,WAGnBL,QAAQM,GACN,OAAOJ,KAAKC,KAAKI,SAASD,GAG5BN,gBACE,OAAOE,KAAKC,KAAKF,OAGnBD,gBACE,MACE,KACAQ,MAAMC,UAAUC,IACbC,KAAK,IAAIC,WAAWV,KAAKC,KAAKF,QAASY,IACrC,KAAOA,EAAEC,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X,QAAQzL,OACtB,MAAM,IAAIS,MACR,eAAemK,EAAUd,gCAAgCC,MAG7D,MAAM0T,EAAO,CACXyF,OAAQJ,EAAGrX,QAAQ1B,GACnB0T,KAAMqF,EAAGpX,aAAa3B,IAKxB,MAHkC,cAA9B2Z,EAASE,UAAU/L,SACrB4F,EAAK7Q,OAAS8W,EAASE,UAAUpB,YAE5B/E,oBC5FY"} \ No newline at end of file +{"version":3,"file":"ckb-js-toolkit.node.js","sources":["../src/reader.js","../node_modules/jsbi/dist/jsbi.mjs","../src/validators.js","../node_modules/node-fetch/lib/index.mjs","../node_modules/cross-fetch/dist/node-ponyfill.js","../src/rpc.js","../src/normalizers.js","../src/transformers.js","../src/cell_collectors/rpc_collector.js","../src/transaction_dumper.js","../src/index.js"],"sourcesContent":["class ArrayBufferReader {\n constructor(buffer) {\n this.view = new DataView(buffer);\n }\n\n length() {\n return this.view.byteLength;\n }\n\n indexAt(i) {\n return this.view.getUint8(i);\n }\n\n toArrayBuffer() {\n return this.view.buffer;\n }\n\n serializeJson() {\n return (\n \"0x\" +\n Array.prototype.map\n .call(new Uint8Array(this.view.buffer), x =>\n (\"00\" + x.toString(16)).slice(-2)\n )\n .join(\"\")\n );\n }\n}\n\nclass HexStringReader {\n constructor(string) {\n this.string = string;\n }\n\n length() {\n return this.string.length / 2 - 1;\n }\n\n indexAt(i) {\n return parseInt(this.string.substr(2 + i * 2, 2), 16);\n }\n\n toArrayBuffer() {\n const buffer = new ArrayBuffer(this.length());\n const view = new DataView(buffer);\n\n for (let i = 0; i < this.length(); i++) {\n view.setUint8(i, this.indexAt(i));\n }\n return buffer;\n }\n\n serializeJson() {\n return this.string;\n }\n}\n\nexport class Reader {\n constructor(input) {\n if (\n input instanceof HexStringReader ||\n input instanceof ArrayBufferReader\n ) {\n return input;\n }\n if (typeof input === \"string\") {\n if (!input.startsWith(\"0x\") || input.length % 2 != 0) {\n throw new Error(\n \"Hex string must start with 0x, and has even numbered length!\"\n );\n }\n return new HexStringReader(input);\n }\n if (input instanceof ArrayBuffer) {\n return new ArrayBufferReader(input);\n }\n throw new Error(\"Reader can only accept hex string or ArrayBuffer!\");\n }\n\n static fromRawString(string) {\n const buffer = new ArrayBuffer(string.length);\n const view = new DataView(buffer);\n\n for (let i = 0; i < string.length; i++) {\n const c = string.charCodeAt(i);\n if (c > 0xff) {\n throw new Error(\"fromRawString can only accept UTF-8 raw string!\");\n }\n view.setUint8(i, c);\n }\n return new ArrayBufferReader(buffer);\n }\n}\n","class JSBI extends Array{constructor(a,b){if(a>JSBI.__kMaxLength)throw new RangeError(\"Maximum BigInt size exceeded\");super(a),this.sign=b}static BigInt(a){var b=Math.floor,c=Number.isFinite;if(\"number\"==typeof a){if(0===a)return JSBI.__zero();if((0|a)===a)return 0>a?JSBI.__oneDigit(-a,!0):JSBI.__oneDigit(a,!1);if(!c(a)||b(a)!==a)throw new RangeError(\"The number \"+a+\" cannot be converted to BigInt because it is not an integer\");return JSBI.__fromDouble(a)}if(\"string\"==typeof a){const b=JSBI.__fromString(a);if(null===b)throw new SyntaxError(\"Cannot convert \"+a+\" to a BigInt\");return b}if(\"boolean\"==typeof a)return!0===a?JSBI.__oneDigit(1,!1):JSBI.__zero();if(\"object\"==typeof a){if(a.constructor===JSBI)return a;const b=JSBI.__toPrimitive(a);return JSBI.BigInt(b)}throw new TypeError(\"Cannot convert \"+a+\" to a BigInt\")}toDebugString(){const a=[\"BigInt[\"];for(const b of this)a.push((b?(b>>>0).toString(16):b)+\", \");return a.push(\"]\"),a.join(\"\")}toString(a=10){if(2>a||36>>=12;const l=j-12;let m=12<=j?0:h<<20+j,n=20+j;0>>32-l,m=h<>>32-n,n-=32);const o=JSBI.__decideRounding(a,n,i,h);if((1===o||0===o&&1==(1&m))&&(m=m+1>>>0,0==m&&(k++,0!=k>>>20&&(k=0,g++,1023=JSBI.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");if(1===a.length&&2===a.__digit(0)){const b=1+(c>>>5),d=a.sign&&0!=(1&c),e=new JSBI(b,d);e.__initializeDigits();const f=1<<(31&c);return e.__setDigit(b-1,f),e}let d=null,e=a;for(0!=(1&c)&&(d=a),c>>=1;0!==c;c>>=1)e=JSBI.multiply(e,e),0!=(1&c)&&(null===d?d=e:d=JSBI.multiply(d,e));return d}static multiply(a,b){if(0===a.length)return a;if(0===b.length)return b;let c=a.length+b.length;32<=a.__clzmsd()+b.__clzmsd()&&c--;const d=new JSBI(c,a.sign!==b.sign);d.__initializeDigits();for(let c=0;cJSBI.__absoluteCompare(a,b))return JSBI.__zero();const c=a.sign!==b.sign,d=b.__unsignedDigit(0);let e;if(1===b.length&&65535>=d){if(1===d)return c===a.sign?a:JSBI.unaryMinus(a);e=JSBI.__absoluteDivSmall(a,d,null)}else e=JSBI.__absoluteDivLarge(a,b,!0,!1);return e.sign=c,e.__trim()}static remainder(a,b){if(0===b.length)throw new RangeError(\"Division by zero\");if(0>JSBI.__absoluteCompare(a,b))return a;const c=b.__unsignedDigit(0);if(1===b.length&&65535>=c){if(1===c)return JSBI.__zero();const b=JSBI.__absoluteModSmall(a,c);return 0===b?JSBI.__zero():JSBI.__oneDigit(b,a.sign)}const d=JSBI.__absoluteDivLarge(a,b,!1,!0);return d.sign=a.sign,d.__trim()}static add(a,b){const c=a.sign;return c===b.sign?JSBI.__absoluteAdd(a,b,c):0<=JSBI.__absoluteCompare(a,b)?JSBI.__absoluteSub(a,b,c):JSBI.__absoluteSub(b,a,!c)}static subtract(a,b){const c=a.sign;return c===b.sign?0<=JSBI.__absoluteCompare(a,b)?JSBI.__absoluteSub(a,b,c):JSBI.__absoluteSub(b,a,!c):JSBI.__absoluteAdd(a,b,c)}static leftShift(a,b){return 0===b.length||0===a.length?a:b.sign?JSBI.__rightShiftByAbsolute(a,b):JSBI.__leftShiftByAbsolute(a,b)}static signedRightShift(a,b){return 0===b.length||0===a.length?a:b.sign?JSBI.__leftShiftByAbsolute(a,b):JSBI.__rightShiftByAbsolute(a,b)}static unsignedRightShift(){throw new TypeError(\"BigInts have no unsigned right shift; use >> instead\")}static lessThan(a,b){return 0>JSBI.__compareToBigInt(a,b)}static lessThanOrEqual(a,b){return 0>=JSBI.__compareToBigInt(a,b)}static greaterThan(a,b){return 0=JSBI.__kMaxLengthBits)return b;const c=a+31>>>5;if(b.lengthJSBI.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");return JSBI.__truncateAndSubFromPowerOfTwo(a,b,!1)}if(a>=JSBI.__kMaxLengthBits)return b;const c=a+31>>>5;if(b.length>>d)return b}return JSBI.__truncateToNBits(a,b)}static ADD(a,b){if(a=JSBI.__toPrimitive(a),b=JSBI.__toPrimitive(b),\"string\"==typeof a)return\"string\"!=typeof b&&(b=b.toString()),a+b;if(\"string\"==typeof b)return a.toString()+b;if(a=JSBI.__toNumeric(a),b=JSBI.__toNumeric(b),JSBI.__isBigInt(a)&&JSBI.__isBigInt(b))return JSBI.add(a,b);if(\"number\"==typeof a&&\"number\"==typeof b)return a+b;throw new TypeError(\"Cannot mix BigInt and other types, use explicit conversions\")}static LT(a,b){return JSBI.__compare(a,b,0)}static LE(a,b){return JSBI.__compare(a,b,1)}static GT(a,b){return JSBI.__compare(a,b,2)}static GE(a,b){return JSBI.__compare(a,b,3)}static EQ(a,b){for(;;){if(JSBI.__isBigInt(a))return JSBI.__isBigInt(b)?JSBI.equal(a,b):JSBI.EQ(b,a);if(\"number\"==typeof a){if(JSBI.__isBigInt(b))return JSBI.__equalToNumber(b,a);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"string\"==typeof a){if(JSBI.__isBigInt(b))return a=JSBI.__fromString(a),null!==a&&JSBI.equal(a,b);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"boolean\"==typeof a){if(JSBI.__isBigInt(b))return JSBI.__equalToNumber(b,+a);if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"symbol\"==typeof a){if(JSBI.__isBigInt(b))return!1;if(\"object\"!=typeof b)return a==b;b=JSBI.__toPrimitive(b)}else if(\"object\"==typeof a){if(\"object\"==typeof b&&b.constructor!==JSBI)return a==b;a=JSBI.__toPrimitive(a)}else return a==b}}static NE(a,b){return!JSBI.EQ(a,b)}static __zero(){return new JSBI(0,!1)}static __oneDigit(a,b){const c=new JSBI(1,b);return c.__setDigit(0,a),c}__copy(){const a=new JSBI(this.length,this.sign);for(let b=0;bb)e=-b-1;else{if(0===c)return-1;c--,d=a.__digit(c),e=31}let f=1<>>20,c=b-1023,d=(c>>>5)+1,e=new JSBI(d,0>a);let f=1048575&JSBI.__kBitConversionInts[1]|1048576,g=JSBI.__kBitConversionInts[0];const h=20,i=31&c;let j,k=0;if(i<20){const a=h-i;k=a+32,j=f>>>a,f=f<<32-a|g>>>a,g<<=32-a}else if(i===20)k=32,j=f,f=g;else{const a=i-h;k=32-a,j=f<>>32-a,f=g<=a&&9<=a)||(159>=a?32==a:131071>=a?160==a||5760==a:196607>=a?(a&=131071,10>=a||40==a||41==a||47==a||95==a||4096==a):65279==a)}static __fromString(a,b=0){let c=0;const e=a.length;let f=0;if(f===e)return JSBI.__zero();let g=a.charCodeAt(f);for(;JSBI.__isWhitespace(g);){if(++f===e)return JSBI.__zero();g=a.charCodeAt(f)}if(43===g){if(++f===e)return null;g=a.charCodeAt(f),c=1}else if(45===g){if(++f===e)return null;g=a.charCodeAt(f),c=-1}if(0===b){if(b=10,48===g){if(++f===e)return JSBI.__zero();if(g=a.charCodeAt(f),88===g||120===g){if(b=16,++f===e)return null;g=a.charCodeAt(f)}else if(79===g||111===g){if(b=8,++f===e)return null;g=a.charCodeAt(f)}else if(66===g||98===g){if(b=2,++f===e)return null;g=a.charCodeAt(f)}}}else if(16===b&&48===g){if(++f===e)return JSBI.__zero();if(g=a.charCodeAt(f),88===g||120===g){if(++f===e)return null;g=a.charCodeAt(f)}}for(;48===g;){if(++f===e)return JSBI.__zero();g=a.charCodeAt(f)}const h=e-f;let i=JSBI.__kMaxBitsPerChar[b],j=JSBI.__kBitsPerCharTableMultiplier-1;if(h>1073741824/i)return null;const k=i*h+j>>>JSBI.__kBitsPerCharTableShift,l=new JSBI(k+31>>>5,!1),n=10>b?b:10,o=10>=JSBI.__kBitsPerCharTableShift;const b=[],c=[];let d=!1;do{let h=0,j=0;for(;;){let b;if(g-48>>>0>>0>>0>>0>>JSBI.__kBitsPerCharTableShift+5;l.__inplaceMultiplyAdd(p,k,q)}while(!c)}if(f!==e){if(!JSBI.__isWhitespace(g))return null;for(f++;f>>i-f)}if(0!==e){if(d>=a.length)throw new Error(\"implementation bug\");a.__setDigit(d++,e)}for(;d>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const f=e,g=b-1,h=a.__digit(d-1),i=c(h);let j=0|(32*d-i+f-1)/f;if(a.sign&&j++,268435456>>e,n=32-e;n>=f;)k[l--]=JSBI.__kConversionChars[m&g],m>>>=f,n-=f}const o=(m|h<>>f-n;0!==m;)k[l--]=JSBI.__kConversionChars[m&g],m>>>=f;if(a.sign&&(k[l--]=\"-\"),-1!=l)throw new Error(\"implementation bug\");return k.join(\"\")}static __toStringGeneric(a,b,c){var d=Math.clz32;const e=a.length;if(0===e)return\"\";if(1===e){let d=a.__unsignedDigit(0).toString(b);return!1===c&&a.sign&&(d=\"-\"+d),d}const f=32*e-d(a.__digit(e-1)),g=JSBI.__kMaxBitsPerChar[b],h=g-1;let i=f*JSBI.__kBitsPerCharTableMultiplier;i+=h-1,i=0|i/h;const j=i+1>>1,k=JSBI.exponentiate(JSBI.__oneDigit(b,!1),JSBI.__oneDigit(j,!1));let l,m;const n=k.__unsignedDigit(0);if(1===k.length&&65535>=n){l=new JSBI(a.length,!1),l.__initializeDigits();let c=0;for(let b=2*a.length-1;0<=b;b--){const d=c<<16|a.__halfDigit(b);l.__setHalfDigit(b,0|d/n),c=0|d%n}m=c.toString(b)}else{const c=JSBI.__absoluteDivLarge(a,k,!0,!0);l=c.quotient;const d=c.remainder.__trim();m=JSBI.__toStringGeneric(d,b,!0)}l.__trim();let o=JSBI.__toStringGeneric(l,b,!0);for(;m.lengthd?JSBI.__absoluteLess(c):0}static __compareToNumber(a,b){if(b|!0){const c=a.sign,d=0>b;if(c!==d)return JSBI.__unequalSign(c);if(0===a.length){if(d)throw new Error(\"implementation bug\");return 0===b?0:-1}if(1e?JSBI.__absoluteGreater(c):fb)return JSBI.__unequalSign(d);if(0===b)throw new Error(\"implementation bug: should be handled elsewhere\");if(0===a.length)return-1;JSBI.__kBitConversionDouble[0]=b;const e=2047&JSBI.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error(\"implementation bug: handled elsewhere\");const f=e-1023;if(0>f)return JSBI.__absoluteGreater(d);const g=a.length;let h=a.__digit(g-1);const i=c(h),j=32*g-i,k=f+1;if(jk)return JSBI.__absoluteGreater(d);let l=1048576|1048575&JSBI.__kBitConversionInts[1],m=JSBI.__kBitConversionInts[0];const n=20,o=31-i;if(o!==(j-1)%31)throw new Error(\"implementation bug\");let p,q=0;if(20>o){const a=n-o;q=a+32,p=l>>>a,l=l<<32-a|m>>>a,m<<=32-a}else if(20===o)q=32,p=l,l=m;else{const a=o-n;q=32-a,p=l<>>32-a,l=m<>>=0,p>>>=0,h>p)return JSBI.__absoluteGreater(d);if(h>>0,l=m,m=0):p=0;const b=a.__unsignedDigit(c);if(b>p)return JSBI.__absoluteGreater(d);if(bb&&a.__unsignedDigit(0)===c(b):0===JSBI.__compareToDouble(a,b)}static __comparisonResultToBool(a,b){switch(b){case 0:return 0>a;case 1:return 0>=a;case 2:return 0b;case 3:return a>=b;}if(JSBI.__isBigInt(a)&&\"string\"==typeof b)return b=JSBI.__fromString(b),null!==b&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(\"string\"==typeof a&&JSBI.__isBigInt(b))return a=JSBI.__fromString(a),null!==a&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(a=JSBI.__toNumeric(a),b=JSBI.__toNumeric(b),JSBI.__isBigInt(a)){if(JSBI.__isBigInt(b))return JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(a,b),c);if(\"number\"!=typeof b)throw new Error(\"implementation bug\");return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(a,b),c)}if(\"number\"!=typeof a)throw new Error(\"implementation bug\");if(JSBI.__isBigInt(b))return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(b,a),2^c);if(\"number\"!=typeof b)throw new Error(\"implementation bug\");return 0===c?ab:3===c?a>=b:void 0}__clzmsd(){return Math.clz32(this[this.length-1])}static __absoluteAdd(a,b,c){if(a.length>>16)+(c>>>16)+(h>>>16);f=i>>>16,e.__setDigit(g,65535&h|i<<16)}for(;g>>16)+(c>>>16);f=d>>>16,e.__setDigit(g,65535&c|d<<16)}return g>>16;const i=(c>>>16)-(g>>>16)-e;e=1&i>>>16,d.__setDigit(f,65535&h|i<<16)}for(;f>>16;const g=(b>>>16)-e;e=1&g>>>16,d.__setDigit(f,65535&c|g<<16)}return d.__trim()}static __absoluteAddOne(a,b,c=null){const d=a.length;null===c?c=new JSBI(d,b):c.sign=b;let e=!0;for(let f,g=0;gd?0:a.__unsignedDigit(d)>b.__unsignedDigit(d)?1:-1}static __multiplyAccumulate(a,b,c,d){var e=Math.imul;if(0===b)return;const f=65535&b,g=b>>>16;let h=0,j=0,k=0;for(let l=0;l>>16;const n=a.__digit(l),o=65535&n,p=n>>>16,q=e(o,f),r=e(o,g),s=e(p,f),t=e(p,g);i+=j+(65535&q),m+=k+h+(i>>>16)+(q>>>16)+(65535&r)+(65535&s),h=m>>>16,j=(r>>>16)+(s>>>16)+(65535&t)+h,h=j>>>16,j&=65535,k=t>>>16,b=65535&i|m<<16,c.__setDigit(d,b)}for(;0!=h||0!==j||0!==k;d++){let a=c.__digit(d);const b=(65535&a)+j,e=(a>>>16)+(b>>>16)+k+h;j=0,k=0,h=e>>>16,a=65535&b|e<<16,c.__setDigit(d,a)}}static __internalMultiplyAdd(a,b,c,d,e){var f=Math.imul;let g=c,h=0;for(let j=0;j>>16;const k=f(c>>>16,b),l=(65535&k)+(d>>>16)+g;g=l>>>16,h=k>>>16,e.__setDigit(j,l<<16|65535&i)}if(e.length>d)for(e.__setDigit(d++,g+h);dthis.length&&(c=this.length);const f=65535&a,g=a>>>16;let h=0,j=65535&b,k=b>>>16;for(let l=0;l>>16,d=e(b,f),i=e(b,g),m=e(c,f),n=e(c,g),o=j+(65535&d),p=k+h+(o>>>16)+(d>>>16)+(65535&i)+(65535&m);j=(i>>>16)+(m>>>16)+(65535&n)+(p>>>16),h=j>>>16,j&=65535,k=n>>>16;this.__setDigit(l,65535&o|p<<16)}if(0!=h||0!==j||0!==k)throw new Error(\"implementation bug\")}static __absoluteDivSmall(a,b,c){null===c&&(c=new JSBI(a.length,!1));let d=0;for(let e,f=2*a.length-1;0<=f;f-=2){e=(d<<16|a.__halfDigit(f))>>>0;const g=0|e/b;d=0|e%b,e=(d<<16|a.__halfDigit(f-1))>>>0;const h=0|e/b;d=0|e%b,c.__setDigit(f>>>1,g<<16|h)}return c}static __absoluteModSmall(a,b){let c=0;for(let d=2*a.length-1;0<=d;d--){const e=(c<<16|a.__halfDigit(d))>>>0;c=0|e%b}return c}static __absoluteDivLarge(a,b,d,e){var f=Math.imul;const g=b.__halfDigitLength(),h=b.length,c=a.__halfDigitLength()-g;let i=null;d&&(i=new JSBI(c+2>>>1,!1),i.__initializeDigits());const k=new JSBI(g+2>>>1,!1);k.__initializeDigits();const l=JSBI.__clz16(b.__halfDigit(g-1));0>>0;l=0|c/n;let d=0|c%n;const e=b.__halfDigit(g-2),h=m.__halfDigit(p+g-2);for(;f(l,e)>>>0>(d<<16|h)>>>0&&(l--,d+=n,!(65535>>1,o|l))}return e?(m.__inplaceRightShift(l),d?{quotient:i,remainder:m}:m):d?i:void 0}static __clz16(a){return Math.clz32(a)-16}__inplaceAdd(a,b,c){let d=0;for(let e=0;e>>16,this.__setHalfDigit(b+e,c)}return d}__inplaceSub(a,b,c){let d=0;if(1&b){b>>=1;let e=this.__digit(b),f=65535&e,g=0;for(;g>>1;g++){const c=a.__digit(g),h=(e>>>16)-(65535&c)-d;d=1&h>>>16,this.__setDigit(b+g,h<<16|65535&f),e=this.__digit(b+g+1),f=(65535&e)-(c>>>16)-d,d=1&f>>>16}const h=a.__digit(g),i=(e>>>16)-(65535&h)-d;d=1&i>>>16,this.__setDigit(b+g,i<<16|65535&f);if(b+g+1>=this.length)throw new RangeError(\"out of bounds\");0==(1&c)&&(e=this.__digit(b+g+1),f=(65535&e)-(h>>>16)-d,d=1&f>>>16,this.__setDigit(b+a.length,4294901760&e|65535&f))}else{b>>=1;let e=0;for(;e>>16;const h=(c>>>16)-(f>>>16)-d;d=1&h>>>16,this.__setDigit(b+e,h<<16|65535&g)}const f=this.__digit(b+e),g=a.__digit(e),h=(65535&f)-(65535&g)-d;d=1&h>>>16;let i=0;0==(1&c)&&(i=(f>>>16)-(g>>>16)-d,d=1&i>>>16),this.__setDigit(b+e,i<<16|65535&h)}return d}__inplaceRightShift(a){if(0===a)return;let b=this.__digit(0)>>>a;const c=this.length-1;for(let e=0;e>>a}this.__setDigit(c,b)}static __specialLeftShift(a,b,c){const d=a.length,e=new JSBI(d+c,!1);if(0===b){for(let b=0;b>>32-b}return 0c)throw new RangeError(\"BigInt too big\");const e=c>>>5,f=31&c,g=a.length,h=0!==f&&0!=a.__digit(g-1)>>>32-f,j=g+e+(h?1:0),k=new JSBI(j,a.sign);if(0===f){let b=0;for(;b>>32-f}if(h)k.__setDigit(g+e,b);else if(0!=b)throw new Error(\"implementation bug\")}return k.__trim()}static __rightShiftByAbsolute(a,b){const c=a.length,d=a.sign,e=JSBI.__toShiftAmount(b);if(0>e)return JSBI.__rightShiftByMaximum(d);const f=e>>>5,g=31&e;let h=c-f;if(0>=h)return JSBI.__rightShiftByMaximum(d);let i=!1;if(d){if(0!=(a.__digit(f)&(1<>>g;const d=c-f-1;for(let c=0;c>>g}j.__setDigit(d,b)}return i&&(j=JSBI.__absoluteAddOne(j,!0,j)),j.__trim()}static __rightShiftByMaximum(a){return a?JSBI.__oneDigit(1,!0):JSBI.__zero()}static __toShiftAmount(a){if(1JSBI.__kMaxLengthBits?-1:b}static __toPrimitive(a,b=\"default\"){if(\"object\"!=typeof a)return a;if(a.constructor===JSBI)return a;const c=a[Symbol.toPrimitive];if(c){const a=c(b);if(\"object\"!=typeof a)return a;throw new TypeError(\"Cannot convert object to primitive value\")}const d=a.valueOf;if(d){const b=d.call(a);if(\"object\"!=typeof b)return b}const e=a.toString;if(e){const b=e.call(a);if(\"object\"!=typeof b)return b}throw new TypeError(\"Cannot convert object to primitive value\")}static __toNumeric(a){return JSBI.__isBigInt(a)?a:+a}static __isBigInt(a){return\"object\"==typeof a&&a.constructor===JSBI}static __truncateToNBits(a,b){const c=a+31>>>5,d=new JSBI(c,b.sign),e=c-1;for(let c=0;c>>b}return d.__setDigit(e,f),d.__trim()}static __truncateAndSubFromPowerOfTwo(a,b,c){var d=Math.min;const e=a+31>>>5,f=new JSBI(e,c);let g=0;const h=e-1;let j=0;for(const e=d(h,b.length);g>>16;const d=0-(a>>>16)-j;j=1&d>>>16,f.__setDigit(g,65535&c|d<<16)}for(;g>>16;const b=0-(k>>>16)-j;m=65535&a|b<<16}else{const a=32-l;k=k<>>a;const b=1<<32-a,c=(65535&b)-(65535&k)-j;j=1&c>>>16;const d=(b>>>16)-(k>>>16)-j;m=65535&c|d<<16,m&=b-1}return f.__setDigit(h,m),f.__trim()}__digit(a){return this[a]}__unsignedDigit(a){return this[a]>>>0}__setDigit(a,b){this[a]=0|b}__setDigitGrow(a,b){this[a]=0|b}__halfDigitLength(){const a=this.length;return 65535>=this.__unsignedDigit(a-1)?2*a-1:2*a}__halfDigit(a){return 65535&this[a>>>1]>>>((1&a)<<4)}__setHalfDigit(a,b){const c=a>>>1,d=this.__digit(c),e=1&a?65535&d|b<<16:4294901760&d|65535&b;this.__setDigit(c,e)}static __digitPow(a,b){let c=1;for(;0>>=1,a*=a;return c}}JSBI.__kMaxLength=33554432,JSBI.__kMaxLengthBits=JSBI.__kMaxLength<<5,JSBI.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],JSBI.__kBitsPerCharTableShift=5,JSBI.__kBitsPerCharTableMultiplier=1< maximalLength\n ) {\n throw new Error(errorMessage);\n }\n let optionalProvidedKeys = providedKeys.filter(\n key => !expectedKeys.includes(key)\n );\n if (providedKeys.length - optionalProvidedKeys.length !== requiredLength) {\n throw new Error(errorMessage);\n }\n if (optionalProvidedKeys.find(key => !optionalKeys.includes(key))) {\n throw new Error(errorMessage);\n }\n}\n\nfunction assertHexString(debugPath, string) {\n if (!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(string)) {\n throw new Error(`${debugPath} must be a hex string!`);\n }\n}\n\nfunction assertHash(debugPath, hash) {\n assertHexString(debugPath, hash);\n if (hash.length != 66) {\n throw new Error(`${debugPath} must be a hex string of 66 bytes long!`);\n }\n}\n\nfunction assertInteger(debugPath, i) {\n if (i === \"0x0\") {\n return;\n }\n if (!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(i)) {\n throw new Error(`${debugPath} must be a hex integer!`);\n }\n}\n\nexport function ValidateScript(\n script,\n { nestedValidation = true, debugPath = \"script\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n script,\n [\"code_hash\", \"hash_type\", \"args\"],\n []\n );\n assertHash(`${debugPath}.code_hash`, script.code_hash);\n assertHexString(`${debugPath}.args`, script.args);\n\n if (script.hash_type !== \"data\" && script.hash_type !== \"type\") {\n throw new Error(`${debugPath}.hash_type must be either data or type!`);\n }\n}\n\nexport function ValidateOutPoint(\n outPoint,\n { nestedValidation = true, debugPath = \"out_point\" } = {}\n) {\n assertObjectWithKeys(debugPath, outPoint, [\"tx_hash\", \"index\"], []);\n assertHash(`${debugPath}.tx_hash`, outPoint.tx_hash);\n assertInteger(`${debugPath}.index`, outPoint.index);\n}\n\nexport function ValidateCellInput(\n cellInput,\n { nestedValidation = true, debugPath = \"cell_input\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellInput, [\"since\", \"previous_output\"], []);\n assertInteger(`${debugPath}.since`, cellInput.since);\n\n if (nestedValidation) {\n ValidateOutPoint(cellInput.previous_output, {\n debugPath: `${debugPath}.previous_output`\n });\n }\n}\n\nexport function ValidateCellOutput(\n cellOutput,\n { nestedValidation = true, debugPath = \"cell_output\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellOutput, [\"capacity\", \"lock\"], [\"type\"]);\n assertInteger(`${debugPath}.capacity`, cellOutput.capacity);\n\n if (nestedValidation) {\n ValidateScript(cellOutput.lock, {\n debugPath: `${debugPath}.lock`\n });\n if (cellOutput.type) {\n ValidateScript(cellOutput.type, {\n debugPath: `${debugPath}.type`\n });\n }\n }\n}\n\nexport function ValidateCellDep(\n cellDep,\n { nestedValidation = true, debugPath = \"cell_dep\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellDep, [\"out_point\", \"dep_type\"], []);\n if (cellDep.dep_type !== \"code\" && cellDep.dep_type !== \"dep_group\") {\n throw new Error(`${debugPath}.dep_type must be either code or dep_group!`);\n }\n\n if (nestedValidation) {\n ValidateOutPoint(cellDep.out_point, {\n debugPath: `${debugPath}.out_point`\n });\n }\n}\n\nfunction assertArray(debugPath, array, validateFunction, nestedValidation) {\n if (!Array.isArray(array)) {\n throw new Error(`${debugPath} is not an array!`);\n }\n if (nestedValidation) {\n for (let i = 0; i < array.length; i++) {\n validateFunction(`${debugPath}[${i}]`, array[i]);\n }\n }\n}\n\nfunction toAssert(validateFunction, nestedValidation) {\n return function(debugPath, value) {\n validateFunction(value, {\n nestedValidation: nestedValidation,\n debugPath: debugPath\n });\n };\n}\n\nfunction assertCommonTransaction(debugPath, rawTransaction, nestedValidation) {\n assertInteger(`${debugPath}.version`, rawTransaction.version);\n assertArray(\n `${debugPath}.cell_deps`,\n rawTransaction.cell_deps,\n toAssert(ValidateCellDep, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.header_deps`,\n rawTransaction.header_deps,\n assertHash,\n nestedValidation\n );\n assertArray(\n `${debugPath}.inputs`,\n rawTransaction.inputs,\n toAssert(ValidateCellInput, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.outputs`,\n rawTransaction.outputs,\n toAssert(ValidateCellOutput, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.outputs_data`,\n rawTransaction.outputs_data,\n assertHexString,\n nestedValidation\n );\n}\n\nexport function ValidateRawTransaction(\n rawTransaction,\n { nestedValidation = true, debugPath = \"raw_transaction\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n rawTransaction,\n [\n \"version\",\n \"cell_deps\",\n \"header_deps\",\n \"inputs\",\n \"outputs\",\n \"outputs_data\"\n ],\n []\n );\n assertCommonTransaction(debugPath, rawTransaction, nestedValidation);\n}\n\nexport function ValidateTransaction(\n transaction,\n { nestedValidation = true, debugPath = \"transaction\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n transaction,\n [\n \"version\",\n \"cell_deps\",\n \"header_deps\",\n \"inputs\",\n \"outputs\",\n \"outputs_data\",\n \"witnesses\"\n ],\n []\n );\n assertCommonTransaction(debugPath, transaction, nestedValidation);\n assertArray(\n `${debugPath}.witnesses`,\n transaction.witnesses,\n assertHexString,\n nestedValidation\n );\n}\n\nfunction assertCommonHeader(debugPath, rawHeader) {\n assertInteger(`${debugPath}.version`, rawHeader.version);\n assertInteger(`${debugPath}.compact_target`, rawHeader.compact_target);\n assertInteger(`${debugPath}.timestamp`, rawHeader.timestamp);\n assertInteger(`${debugPath}.number`, rawHeader.number);\n assertInteger(`${debugPath}.epoch`, rawHeader.epoch);\n assertHash(`${debugPath}.parent_hash`, rawHeader.parent_hash);\n assertHash(`${debugPath}.transactions_root`, rawHeader.transactions_root);\n assertHash(`${debugPath}.proposals_hash`, rawHeader.proposals_hash);\n assertHash(`${debugPath}.uncles_hash`, rawHeader.uncles_hash);\n assertHash(`${debugPath}.dao`, rawHeader.dao);\n}\n\nexport function ValidateRawHeader(\n rawHeader,\n { nestedValidation = true, debugPath = \"raw_header\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n rawHeader,\n [\n \"version\",\n \"compact_target\",\n \"timestamp\",\n \"number\",\n \"epoch\",\n \"parent_hash\",\n \"transactions_root\",\n \"proposals_hash\",\n \"uncles_hash\",\n \"dao\"\n ],\n []\n );\n assertCommonHeader(debugPath, rawHeader);\n}\n\nexport function ValidateHeader(\n header,\n { nestedValidation = true, debugPath = \"header\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n header,\n [\n \"version\",\n \"compact_target\",\n \"timestamp\",\n \"number\",\n \"epoch\",\n \"parent_hash\",\n \"transactions_root\",\n \"proposals_hash\",\n \"uncles_hash\",\n \"dao\",\n \"nonce\"\n ],\n []\n );\n assertHexString(`${debugPath}.nonce`, header.nonce);\n if (header.nonce.length != 34) {\n throw new Error(\n `${debugPath}.nonce must be a hex string of 34 bytes long!`\n );\n }\n}\n\nfunction assertProposalShortId(debugPath, shortId) {\n assertHexString(debugPath, shortId);\n if (shortId.length != 22) {\n throw new Error(`${debugPath} must be a hex string of 22 bytes long!`);\n }\n}\n\nexport function ValidateUncleBlock(\n uncleBlock,\n { nestedValidation = true, debugPath = \"uncle_block\" } = {}\n) {\n assertObjectWithKeys(debugPath, uncleBlock, [\"header\", \"proposals\"], []);\n\n if (nestedValidation) {\n ValidateHeader(uncleBlock.header, {\n debugPath: `${debugPath}.header`\n });\n }\n assertArray(\n `${debugPath}.proposals`,\n uncleBlock.proposals,\n assertProposalShortId,\n nestedValidation\n );\n}\n\nexport function ValidateBlock(\n block,\n { nestedValidation = true, debugPath = \"block\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n block,\n [\"header\", \"uncles\", \"transactions\", \"proposals\"],\n []\n );\n\n if (nestedValidation) {\n ValidateHeader(block.header, {\n debugPath: `${debugPath}.header`\n });\n }\n assertArray(\n `${debugPath}.uncles`,\n block.uncles,\n toAssert(ValidateUncleBlock, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.transactions`,\n block.transactions,\n toAssert(ValidateTransaction, nestedValidation),\n nestedValidation\n );\n assertArray(\n `${debugPath}.proposals`,\n block.proposals,\n assertProposalShortId,\n nestedValidation\n );\n}\n\nexport function ValidateCellbaseWitness(\n cellbaseWitness,\n { nestedValidation = true, debugPath = \"cellbase_witness\" } = {}\n) {\n assertObjectWithKeys(debugPath, cellbaseWitness, [\"lock\", \"message\"], []);\n assertHexString(`${debugPath}.message`, cellbaseWitness.message);\n\n if (nestedValidation) {\n ValidateScript(cellbaseWitness.lock, {\n debugPath: `${debugPath}.lock`\n });\n }\n}\n\nexport function ValidateWitnessArgs(\n witnessArgs,\n { nestedValidation = true, debugPath = \"witness_args\" } = {}\n) {\n assertObjectWithKeys(\n debugPath,\n witnessArgs,\n [],\n [\"lock\", \"input_type\", \"output_type\"]\n );\n\n if (witnessArgs.lock) {\n assertHexString(`${debugPath}.lock`, witnessArgs.lock);\n }\n if (witnessArgs.input_type) {\n assertHexString(`${debugPath}.input_type`, witnessArgs.input_type);\n }\n if (witnessArgs.output_type) {\n assertHexString(`${debugPath}.output_type`, witnessArgs.output_type);\n }\n}\n","import Stream from 'stream';\nimport http from 'http';\nimport Url from 'url';\nimport https from 'https';\nimport zlib from 'zlib';\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parse_url(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parse_url(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parse_url(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\nconst resolve_url = Url.resolve;\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\t\t\tfinalize();\n\t\t});\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tconst locationURL = location === null ? null : resolve_url(request.url, location);\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nexport default fetch;\nexport { Headers, Request, Response, FetchError };\n","var nodeFetch = require('node-fetch')\nvar realFetch = nodeFetch.default || nodeFetch\n\nvar fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","import { default as crossFetch } from \"cross-fetch\";\nimport JSBI from \"jsbi\";\n\nfunction mergeOptions(overrideOptions, defaultOptions) {\n defaultOptions = defaultOptions || {};\n const headers = Object.assign(\n {},\n defaultOptions.headers || {},\n overrideOptions.headers || {}\n );\n return Object.assign({}, defaultOptions, overrideOptions, {\n headers: headers\n });\n}\n\nconst batchHandler = {\n get: (target, method, receiver) => {\n if (method === \"send\") {\n return async () => {\n const response = await target.fetch(\n target.uri,\n mergeOptions(\n {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(target.payload)\n },\n target.defaultOptions\n )\n );\n return await response.json();\n };\n }\n return (...params) => {\n const id = target.id;\n target.id = target.id + 1;\n target.payload.push({\n jsonrpc: \"2.0\",\n id: id,\n method: method,\n params: params\n });\n return receiver;\n };\n }\n};\n\nconst handler = {\n get: (target, method) => {\n if (method === \"batch\") {\n return () => {\n return new Proxy(\n {\n id: Math.round(Math.random() * 10000000),\n payload: [],\n uri: target.uri,\n defaultOptions: target.defaultOptions\n },\n batchHandler\n );\n };\n }\n return async (...params) => {\n const id = Math.round(Math.random() * 10000000);\n const response = await target.fetch(\n target.uri,\n mergeOptions(\n {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: id,\n method: method,\n params: params\n })\n },\n target.defaultOptions\n )\n );\n const data = await response.json();\n if (data.id !== id) {\n throw new Error(\"JSONRPCError: response ID does not match request ID!\");\n }\n if (data.error) {\n throw new Error(\n `JSONRPCError: server error ${JSON.stringify(data.error)}`\n );\n }\n return data.result;\n };\n }\n};\n\nexport class RPC {\n constructor(uri, defaultOptions = {}, fetch = crossFetch) {\n this.uri = uri;\n this.defaultOptions = defaultOptions;\n this.fetch = fetch;\n return new Proxy(this, handler);\n }\n\n static create(uri) {\n return new RPC(uri);\n }\n}\n\nexport function HexStringToBigInt(hexString) {\n return JSBI.BigInt(hexString);\n}\n\nexport function BigIntToHexString(bigInt) {\n return \"0x\" + bigInt.toString(16);\n}\n","// This package provides normalizer functions. Even though CKB uses molecule\n// as the serialization layer. There is still CKB specific knowledge that does\n// not belong in molecule. For example, all numbers in CKB protocols are\n// serialized using little endian format. This package tries to encode such\n// knowledge. The goal here, is that you are free to use whatever types that\n// makes most sense to represent the values. As long as you pass your object\n// through the normalizers here, molecule should be able to serialize the values\n// into correct formats required by CKB.\n//\n// Note this is only used when you need to deal with CKB structures in molecule\n// format. If you are using RPCs or GraphQL to interact with CKB, chances are you\n// will not need this package.\nimport JSBI from \"jsbi\";\nimport { Reader } from \"./reader\";\nimport { BigIntToHexString } from \"./rpc\";\n\nfunction normalizeHexNumber(length) {\n return function(debugPath, value) {\n if (!(value instanceof ArrayBuffer)) {\n let intValue = BigIntToHexString(JSBI.BigInt(value)).substr(2);\n if (intValue.length % 2 !== 0) {\n intValue = \"0\" + intValue;\n }\n if (intValue.length / 2 > length) {\n throw new Error(\n `${debugPath} is ${intValue.length /\n 2} bytes long, expected length is ${length}!`\n );\n }\n const view = new DataView(new ArrayBuffer(length));\n for (let i = 0; i < intValue.length / 2; i++) {\n const start = intValue.length - (i + 1) * 2;\n view.setUint8(i, parseInt(intValue.substr(start, 2), 16));\n }\n value = view.buffer;\n }\n if (value.byteLength < length) {\n const array = new Uint8Array(length);\n array.set(new Uint8Array(value), 0);\n value = array.buffer;\n }\n return value;\n };\n}\n\nfunction normalizeRawData(length) {\n return function(debugPath, value) {\n value = new Reader(value).toArrayBuffer();\n if (length > 0 && value.byteLength !== length) {\n throw new Error(\n `${debugPath} has invalid length ${value.byteLength}, required: ${length}`\n );\n }\n return value;\n };\n}\n\nfunction normalizeObject(debugPath, object, keys) {\n const result = {};\n\n for (const [key, f] of Object.entries(keys)) {\n const value = object[key];\n if (!value) {\n throw new Error(`${debugPath} is missing ${key}!`);\n }\n result[key] = f(`${debugPath}.${key}`, value);\n }\n return result;\n}\n\nexport function NormalizeScript(script, { debugPath = \"script\" } = {}) {\n return normalizeObject(debugPath, script, {\n code_hash: normalizeRawData(32),\n hash_type: function(debugPath, value) {\n switch (value) {\n case \"data\":\n return 0;\n case \"type\":\n return 1;\n case 0:\n return value;\n case 1:\n return value;\n default:\n throw new Error(`${debugPath}.hash_type has invalid value: ${value}`);\n }\n },\n args: normalizeRawData(-1)\n });\n}\n\nexport function NormalizeOutPoint(outPoint, { debugPath = \"out_point\" } = {}) {\n return normalizeObject(debugPath, outPoint, {\n tx_hash: normalizeRawData(32),\n index: normalizeHexNumber(4)\n });\n}\n\nfunction toNormalize(normalize) {\n return function(debugPath, value) {\n return normalize(value, {\n debugPath\n });\n };\n}\n\nexport function NormalizeCellInput(\n cellInput,\n { debugPath = \"cell_input\" } = {}\n) {\n return normalizeObject(debugPath, cellInput, {\n since: normalizeHexNumber(8),\n previous_output: toNormalize(NormalizeOutPoint)\n });\n}\n\nexport function NormalizeCellOutput(\n cellOutput,\n { debugPath = \"cell_output\" } = {}\n) {\n const result = normalizeObject(debugPath, cellOutput, {\n capacity: normalizeHexNumber(8),\n lock: toNormalize(NormalizeScript)\n });\n if (cellOutput.type) {\n result.type_ = NormalizeScript(cellOutput.type, {\n debugPath: `${debugPath}.type`\n });\n }\n return result;\n}\n\nexport function NormalizeCellDep(cellDep, { debugPath = \"cell_dep\" } = {}) {\n return normalizeObject(debugPath, cellDep, {\n out_point: toNormalize(NormalizeOutPoint),\n dep_type: function(debugPath, value) {\n switch (value) {\n case \"code\":\n return 0;\n case \"dep_group\":\n return 1;\n case 0:\n return value;\n case 1:\n return value;\n default:\n throw new Error(`${debugPath}.dep_type has invalid value: ${value}`);\n }\n }\n });\n}\n\nfunction toNormalizeArray(normalizeFunction) {\n return function(debugPath, array) {\n return array.map((item, i) => {\n return normalizeFunction(`${debugPath}[${i}]`, item);\n });\n };\n}\n\nexport function NormalizeRawTransaction(\n rawTransaction,\n { debugPath = \"raw_transaction\" } = {}\n) {\n return normalizeObject(debugPath, rawTransaction, {\n version: normalizeHexNumber(4),\n cell_deps: toNormalizeArray(toNormalize(NormalizeCellDep)),\n header_deps: toNormalizeArray(normalizeRawData(32)),\n inputs: toNormalizeArray(toNormalize(NormalizeCellInput)),\n outputs: toNormalizeArray(toNormalize(NormalizeCellOutput)),\n outputs_data: toNormalizeArray(normalizeRawData(-1))\n });\n}\n\nexport function NormalizeTransaction(\n transaction,\n { debugPath = \"transaction\" } = {}\n) {\n const rawTransaction = NormalizeRawTransaction(transaction, {\n debugPath: `(raw)${debugPath}`\n });\n const result = normalizeObject(debugPath, transaction, {\n witnesses: toNormalizeArray(normalizeRawData(-1))\n });\n result.raw = rawTransaction;\n return result;\n}\n\nexport function NormalizeRawHeader(\n rawHeader,\n { debugPath = \"raw_header\" } = {}\n) {\n return normalizeObject(debugPath, rawHeader, {\n version: normalizeHexNumber(4),\n compact_target: normalizeHexNumber(4),\n timestamp: normalizeHexNumber(8),\n number: normalizeHexNumber(8),\n epoch: normalizeHexNumber(8),\n parent_hash: normalizeRawData(32),\n transactions_root: normalizeRawData(32),\n proposals_hash: normalizeRawData(32),\n uncles_hash: normalizeRawData(32),\n dao: normalizeRawData(32)\n });\n}\n\nexport function NormalizeHeader(header, { debugPath = \"header\" } = {}) {\n const rawHeader = NormalizeRawHeader(header, {\n debugPath: `(raw)${debugPath}`\n });\n const result = normalizeObject(debugPath, header, {\n nonce: normalizeHexNumber(16)\n });\n result.raw = rawHeader;\n return result;\n}\n\nexport function NormalizeUncleBlock(\n uncleBlock,\n { debugPath = \"uncle_block\" } = {}\n) {\n return normalizeObject(debugPath, uncleBlock, {\n header: toNormalize(NormalizeHeader),\n proposals: toNormalizeArray(normalizeRawData(10))\n });\n}\n\nexport function NormalizeBlock(block, { debugPath = \"block\" } = {}) {\n return normalizeObject(debugPath, block, {\n header: toNormalize(NormalizeHeader),\n uncles: toNormalizeArray(toNormalize(NormalizeUncleBlock)),\n transactions: toNormalizeArray(toNormalize(NormalizeTransaction)),\n proposals: toNormalizeArray(normalizeRawData(10))\n });\n}\n\nexport function NormalizeCellbaseWitness(\n cellbaseWitness,\n { debugPath = \"cellbase_witness\" } = {}\n) {\n return normalizeObject(debugPath, cellbaseWitness, {\n lock: toNormalize(NormalizeScript),\n message: normalizeRawData(-1)\n });\n}\n\nexport function NormalizeWitnessArgs(\n witnessArgs,\n { debugPath = \"witness_args\" } = {}\n) {\n const result = {};\n if (witnessArgs.lock) {\n result.lock = normalizeRawData(-1)(`${debugPath}.lock`, witnessArgs.lock);\n }\n if (witnessArgs.input_type) {\n result.input_type = normalizeRawData(-1)(\n `${debugPath}.input_type`,\n witnessArgs.input_type\n );\n }\n if (witnessArgs.output_type) {\n result.output_type = normalizeRawData(-1)(\n `${debugPath}.output_type`,\n witnessArgs.output_type\n );\n }\n return result;\n}\n","// This package provides transformer functions that transform JavaScript objects\n// into JSON ready objects that can be passed to RPC. It following the following\n// rules:\n//\n// 1. If the specified object has a serializeJson method, it would invoke this\n// method and use the result to replace current object.\n// 2. It then restricts the keys of the object to keys required by the specified\n// entity(i.e., a Script would only have code_hash, hash_type, args keys),for each\n// sub-field, it then recursively perform the steps here from step 1.\n// 3. It then optionally run validator functions to ensure the resulting object\n// follows specified rules.\n//\n// Note rule 1 here provides the flexibility in defining your own structures: you\n// could define a class containing custom data structures, then provide a\n// serializeJson that transforms the custom one into the rigid data structure\n// required by CKB. You can also leverage the Reader class we provide as much as\n// possible. Since Reader class does provide serializeJson methods, transformers\n// here will transform them to valid hex strings required by CKB.\nimport * as validators from \"./validators\";\n\nfunction invokeSerializeJson(debugPath, value) {\n if (value instanceof Object && value.serializeJson instanceof Function) {\n return value.serializeJson.call(value);\n }\n return value;\n}\n\nfunction transformObject(debugPath, object, keys) {\n object = invokeSerializeJson(debugPath, object);\n if (!(object instanceof Object)) {\n throw new Error(`Transformed ${debugPath} is not an object!`);\n }\n const result = {};\n\n for (const [key, f] of Object.entries(keys)) {\n let value = object[key];\n if (!value) {\n const camelKey = key.replace(/(_[a-z])/g, group =>\n group.toUpperCase().replace(\"_\", \"\")\n );\n value = object[camelKey];\n }\n if (value) {\n result[key] = f(`${debugPath}.${key}`, value);\n }\n }\n return result;\n}\n\nexport function TransformScript(\n script,\n { validation = true, debugPath = \"script\" } = {}\n) {\n script = transformObject(debugPath, script, {\n code_hash: invokeSerializeJson,\n hash_type: invokeSerializeJson,\n args: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateScript(script, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return script;\n}\n\nexport function TransformOutPoint(\n outPoint,\n { validation = true, debugPath = \"out_point\" } = {}\n) {\n outPoint = transformObject(debugPath, outPoint, {\n tx_hash: invokeSerializeJson,\n index: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateOutPoint(outPoint, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return outPoint;\n}\n\nfunction toInvoke(transform) {\n return function(debugPath, value) {\n return transform(value, {\n validation: false,\n debugPath\n });\n };\n}\n\nexport function TransformCellInput(\n cellInput,\n { validation = true, debugPath = \"cell_input\" } = {}\n) {\n cellInput = transformObject(debugPath, cellInput, {\n since: invokeSerializeJson,\n previous_output: toInvoke(TransformOutPoint)\n });\n\n if (validation) {\n validators.ValidateCellInput(cellInput, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellInput;\n}\n\nexport function TransformCellOutput(\n cellOutput,\n { validation = true, debugPath = \"cell_output\" } = {}\n) {\n cellOutput = transformObject(debugPath, cellOutput, {\n capacity: invokeSerializeJson,\n lock: toInvoke(TransformScript),\n type: toInvoke(TransformScript)\n });\n\n if (validation) {\n validators.ValidateCellOutput(cellOutput, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellOutput;\n}\n\nexport function TransformCellDep(\n cellDep,\n { validation = true, debugPath = \"cell_dep\" } = {}\n) {\n cellDep = transformObject(debugPath, cellDep, {\n out_point: toInvoke(TransformOutPoint),\n dep_type: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateCellDep(cellDep, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellDep;\n}\n\nfunction toInvokeArray(invokeFunction) {\n return function(debugPath, array) {\n return array.map((item, i) => {\n return invokeFunction(`${debugPath}[${i}]`, item);\n });\n };\n}\n\nexport function TransformRawTransaction(\n rawTransaction,\n { validation = true, debugPath = \"raw_transaction\" } = {}\n) {\n rawTransaction = transformObject(debugPath, rawTransaction, {\n version: invokeSerializeJson,\n cell_deps: toInvokeArray(toInvoke(TransformCellDep)),\n header_deps: toInvokeArray(invokeSerializeJson),\n inputs: toInvokeArray(toInvoke(TransformCellInput)),\n outputs: toInvokeArray(toInvoke(TransformCellOutput)),\n outputs_data: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateRawTransaction(rawTransaction, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return rawTransaction;\n}\n\nexport function TransformTransaction(\n transaction,\n { validation = true, debugPath = \"transaction\" } = {}\n) {\n transaction = transformObject(debugPath, transaction, {\n version: invokeSerializeJson,\n cell_deps: toInvokeArray(toInvoke(TransformCellDep)),\n header_deps: toInvokeArray(invokeSerializeJson),\n inputs: toInvokeArray(toInvoke(TransformCellInput)),\n outputs: toInvokeArray(toInvoke(TransformCellOutput)),\n outputs_data: toInvokeArray(invokeSerializeJson),\n witnesses: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateTransaction(transaction, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return transaction;\n}\n\nexport function TransformRawHeader(\n rawHeader,\n { validation = true, debugPath = \"raw_header\" } = {}\n) {\n rawHeader = transformObject(debugPath, rawHeader, {\n version: invokeSerializeJson,\n compact_target: invokeSerializeJson,\n timestamp: invokeSerializeJson,\n number: invokeSerializeJson,\n epoch: invokeSerializeJson,\n parent_hash: invokeSerializeJson,\n transactions_root: invokeSerializeJson,\n proposals_hash: invokeSerializeJson,\n uncles_hash: invokeSerializeJson,\n dao: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateRawHeader(rawHeader, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return rawHeader;\n}\n\nexport function TransformHeader(\n header,\n { validation = true, debugPath = \"header\" } = {}\n) {\n header = transformObject(debugPath, header, {\n version: invokeSerializeJson,\n compact_target: invokeSerializeJson,\n timestamp: invokeSerializeJson,\n number: invokeSerializeJson,\n epoch: invokeSerializeJson,\n parent_hash: invokeSerializeJson,\n transactions_root: invokeSerializeJson,\n proposals_hash: invokeSerializeJson,\n uncles_hash: invokeSerializeJson,\n dao: invokeSerializeJson,\n nonce: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateHeader(header, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return header;\n}\n\nexport function TransformUncleBlock(\n uncleBlock,\n { validation = true, debugPath = \"uncle_block\" } = {}\n) {\n uncleBlock = transformObject(debugPath, uncleBlock, {\n header: toInvoke(TransformHeader),\n proposals: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateUncleBlock(uncleBlock, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return uncleBlock;\n}\n\nexport function TransformBlock(\n block,\n { validation = true, debugPath = \"block\" } = {}\n) {\n block = transformObject(debugPath, block, {\n header: toInvoke(TransformHeader),\n uncles: toInvokeArray(toInvoke(TransformUncleBlock)),\n transactions: toInvokeArray(toInvoke(TransformTransaction)),\n proposals: toInvokeArray(invokeSerializeJson)\n });\n\n if (validation) {\n validators.ValidateBlock(block, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return block;\n}\n\nexport function TransformCellbaseWitness(\n cellbaseWitness,\n { validation = true, debugPath = \"cellbase_witness\" } = {}\n) {\n cellbaseWitness = transformObject(debugPath, cellbaseWitness, {\n lock: toInvoke(TransformScript),\n message: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateCellbaseWitness(cellbaseWitness, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return cellbaseWitness;\n}\n\nexport function TransformWitnessArgs(\n witnessArgs,\n { validation = true, debugPath = \"witness_args\" } = {}\n) {\n witnessArgs = transformObject(debugPath, witnessArgs, {\n lock: invokeSerializeJson,\n input_type: invokeSerializeJson,\n output_type: invokeSerializeJson\n });\n\n if (validation) {\n validators.ValidateWitnessArgs(witnessArgs, {\n debugPath: `(transformed) ${debugPath}`\n });\n }\n return witnessArgs;\n}\n","import JSBI from \"jsbi\";\nimport { Reader } from \"../reader\";\nimport { HexStringToBigInt, BigIntToHexString } from \"../rpc\";\n\nexport class RPCCollector {\n constructor(\n rpc,\n lockHash,\n {\n skipCellWithContent = true,\n loadData = false,\n loadBlockNumber = true\n } = {}\n ) {\n this.rpc = rpc;\n this.lockHash = new Reader(lockHash).serializeJson();\n this.skipCellWithContent = skipCellWithContent;\n this.loadData = loadData;\n this.loadBlockNumber = loadBlockNumber;\n }\n\n async *collect() {\n const to = HexStringToBigInt(await this.rpc.get_tip_block_number());\n let currentFrom = JSBI.BigInt(0);\n while (JSBI.lessThanOrEqual(currentFrom, to)) {\n let currentTo = JSBI.add(currentFrom, JSBI.BigInt(100));\n if (JSBI.greaterThan(currentTo, to)) {\n currentTo = to;\n }\n const cells = await this.rpc.get_cells_by_lock_hash(\n this.lockHash,\n BigIntToHexString(currentFrom),\n BigIntToHexString(currentTo)\n );\n for (const cell of cells) {\n if (this.skipCellWithContent) {\n if (\n cell.type ||\n JSBI.greaterThan(\n HexStringToBigInt(cell.output_data_len),\n JSBI.BigInt(100)\n )\n ) {\n continue;\n }\n }\n let data = null;\n if (this.loadData) {\n const cellWithData = await this.rpc.get_live_cell(\n cell.out_point,\n true\n );\n data = cellWithData.cell.data.content;\n }\n let block_number = null;\n if (this.loadBlockNumber) {\n const header = await this.rpc.get_header(cell.block_hash);\n block_number = header.number;\n }\n yield {\n cellbase: cell.cellbase,\n cell_output: {\n capacity: cell.capacity,\n lock: cell.lock,\n type: cell.type\n },\n out_point: cell.out_point,\n block_hash: cell.block_hash,\n data: data,\n output_data_len: cell.output_data_len,\n block_number\n };\n }\n currentFrom = JSBI.add(currentTo, JSBI.BigInt(1));\n }\n }\n}\n","import JSBI from \"jsbi\";\nimport { Reader } from \"./reader\";\nimport { ValidateTransaction, ValidateOutPoint } from \"./validators\";\n\nexport class TransactionDumper {\n constructor(\n rpc,\n { validateTransaction = true, depGroupUnpacker = null } = {}\n ) {\n this.rpc = rpc;\n this.validateTransaction = validateTransaction;\n this.depGroupUnpacker = depGroupUnpacker;\n }\n\n async dumpByHash(txHash) {\n const tx = (await this.rpc.get_transaction(txHash)).transaction;\n delete tx.hash;\n return await this.dump(tx);\n }\n\n async dump(tx) {\n if (this.validateTransaction) {\n ValidateTransaction(tx);\n }\n const mockInputs = [];\n for (const input of tx.inputs) {\n const { output, data, header } = await this._resolveOutPoint(\n input.previous_output\n );\n mockInputs.push({ input, output, data, header });\n }\n const mockCellDeps = [];\n for (const cellDep of tx.cell_deps) {\n const { output, data, header } = await this._resolveOutPoint(\n cellDep.out_point\n );\n mockCellDeps.push({\n cell_dep: cellDep,\n output,\n data,\n header\n });\n if (cellDep.dep_type === \"dep_group\") {\n if (!this.depGroupUnpacker) {\n throw new Error(\n \"depGroupUnpacker must be provided when the transaction contains dep_group!\"\n );\n }\n const outPoints = this.depGroupUnpacker(new Reader(data));\n for (const outPoint of outPoints) {\n ValidateOutPoint(outPoint);\n const { output, data, header } = await this._resolveOutPoint(\n outPoint\n );\n mockCellDeps.push({\n cell_dep: {\n out_point: outPoint,\n dep_type: \"code\"\n },\n output,\n data,\n header\n });\n }\n }\n }\n const mockHeaderDeps = [];\n for (const headerDep of tx.header_deps) {\n mockHeaderDeps.push(await this.rpc.get_header(headerDep));\n }\n return JSON.stringify({\n mock_info: {\n inputs: mockInputs,\n cell_deps: mockCellDeps,\n header_deps: mockHeaderDeps\n },\n tx\n });\n }\n\n async _resolveOutPoint(out_point) {\n const txStatus = await this.rpc.get_transaction(out_point.tx_hash);\n if (!txStatus || !txStatus.transaction) {\n throw new Error(`Transaction ${out_point.tx_hash} cannot be found!`);\n }\n const tx = txStatus.transaction;\n const index = JSBI.toNumber(JSBI.BigInt(out_point.index));\n if (index >= tx.outputs.length) {\n throw new Error(\n `Transaction ${out_point.tx_hash} does not have output ${index}!`\n );\n }\n const data = {\n output: tx.outputs[index],\n data: tx.outputs_data[index]\n };\n if (txStatus.tx_status.status === \"committed\") {\n data.header = txStatus.tx_status.block_hash;\n }\n return data;\n }\n}\n","export { Reader } from \"./reader.js\";\nexport { TransactionDumper } from \"./transaction_dumper.js\";\nexport { RPC, HexStringToBigInt, BigIntToHexString } from \"./rpc.js\";\nexport * as normalizers from \"./normalizers\";\nexport * as transformers from \"./transformers\";\nexport * as validators from \"./validators\";\nexport * as cell_collectors from \"./cell_collectors\";\nexport const VERSION = \"__development_build__\";\n"],"names":["ArrayBufferReader","[object Object]","buffer","this","view","DataView","byteLength","i","getUint8","Array","prototype","map","call","Uint8Array","x","toString","slice","join","HexStringReader","string","length","parseInt","substr","ArrayBuffer","setUint8","indexAt","Reader","input","startsWith","Error","c","charCodeAt","JSBI","a","b","__kMaxLength","RangeError","super","sign","Math","floor","Number","isFinite","__zero","__oneDigit","__fromDouble","__fromString","SyntaxError","constructor","__toPrimitive","BigInt","TypeError","push","__toStringBasePowerOfTwo","__toStringGeneric","clz32","__unsignedDigit","d","__digit","e","f","Infinity","g","h","j","k","l","m","n","o","__decideRounding","p","__kBitConversionInts","__kBitConversionDouble","__copy","__absoluteSubOne","__trim","__absoluteAddOne","unaryMinus","__kMaxLengthBits","__initializeDigits","__setDigit","multiply","__clzmsd","__multiplyAccumulate","__absoluteCompare","__absoluteDivSmall","__absoluteDivLarge","__absoluteModSmall","__absoluteAdd","__absoluteSub","__rightShiftByAbsolute","__leftShiftByAbsolute","__compareToBigInt","equal","max","__absoluteAnd","__absoluteOr","__absoluteAndNot","__absoluteXor","__truncateToNBits","__truncateAndSubFromPowerOfTwo","__toNumeric","__isBigInt","add","__compare","EQ","__equalToNumber","pop","__isWhitespace","__kMaxBitsPerChar","__kBitsPerCharTableMultiplier","__kBitsPerCharTableShift","__fillFromParts","q","__inplaceMultiplyAdd","__kConversionChars","exponentiate","__halfDigit","__setHalfDigit","quotient","remainder","__unequalSign","__absoluteGreater","__absoluteLess","abs","__compareToDouble","__comparisonResultToBool","__compareToNumber","__setDigitGrow","imul","r","s","t","__halfDigitLength","__clz16","__specialLeftShift","__internalMultiplyAdd","__inplaceSub","__inplaceAdd","__inplaceRightShift","__toShiftAmount","__rightShiftByMaximum","Symbol","toPrimitive","valueOf","min","assertObjectWithKeys","debugPath","object","expectedKeys","optionalKeys","Object","assertObject","providedKeys","keys","sort","requiredLength","maximalLength","errorMessage","optionalProvidedKeys","filter","key","includes","find","assertHexString","test","assertHash","hash","assertInteger","ValidateScript","script","nestedValidation","code_hash","args","hash_type","ValidateOutPoint","outPoint","tx_hash","index","ValidateCellInput","cellInput","since","previous_output","ValidateCellOutput","cellOutput","capacity","lock","type","ValidateCellDep","cellDep","dep_type","out_point","assertArray","array","validateFunction","isArray","toAssert","value","assertCommonTransaction","rawTransaction","version","cell_deps","header_deps","inputs","outputs","outputs_data","ValidateRawTransaction","ValidateTransaction","transaction","witnesses","ValidateRawHeader","rawHeader","compact_target","timestamp","number","epoch","parent_hash","transactions_root","proposals_hash","uncles_hash","dao","assertCommonHeader","ValidateHeader","header","nonce","assertProposalShortId","shortId","ValidateUncleBlock","uncleBlock","proposals","ValidateBlock","block","uncles","transactions","ValidateCellbaseWitness","cellbaseWitness","message","ValidateWitnessArgs","witnessArgs","input_type","output_type","__kBitConversionBuffer","Float64Array","Int32Array","Readable","Stream","BUFFER","TYPE","Blob","blobParts","arguments","options","buffers","size","element","Buffer","isView","from","byteOffset","String","concat","undefined","toLowerCase","Promise","resolve","buf","ab","readable","_read","start","end","relativeStart","relativeEnd","span","slicedBuffer","blob","FetchError","systemError","code","errno","captureStackTrace","convert","defineProperties","enumerable","defineProperty","toStringTag","writable","configurable","create","name","require","INTERNALS","PassThrough","Body","body","_this","_ref","_ref$size","_ref$timeout","timeout","isURLSearchParams","isBlob","isBuffer","disturbed","error","on","err","url","consumeBody","_this4","reject","alloc","stream","accum","accumBytes","abort","resTimeout","setTimeout","chunk","clearTimeout","obj","append","delete","get","getAll","has","set","arrayBuffer","clone","instance","p1","p2","bodyUsed","getBoundary","pipe","extractContentType","getTotalBytes","getLengthSync","_lengthRetrievers","hasKnownLength","then","ct","headers","assign","_this2","JSON","parse","_this3","res","str","charset","exec","convertBody","json","text","mixIn","proto","getOwnPropertyNames","desc","getOwnPropertyDescriptor","global","invalidTokenRegex","invalidHeaderCharRegex","validateName","validateValue","MAP","Headers","init","rawHeaders","raw","headerNames","headerName","method","iterator","pairs","pair","callback","thisArg","getHeaders","_pairs$i","createHeadersIterator","kind","entries","forEach","values","INTERNAL","target","HeadersIteratorPrototype","setPrototypeOf","getPrototypeOf","_INTERNAL","done","exportNodeCompatibleHeaders","__proto__","hostHeaderKey","INTERNALS$1","STATUS_CODES","http","Response","opts","status","contentType","statusText","counter","ok","redirected","INTERNALS$2","parse_url","Url","format_url","format","streamDestructionSupported","isRequest","Request","parsedURL","href","toUpperCase","inputBody","signal","isAbortSignal","redirect","follow","compress","agent","AbortError","PassThrough$1","resolve_url","fetch","request","protocol","hostname","contentLengthValue","totalBytes","getNodeRequestOptions","send","https","response","destroy","emit","aborted","abortAndFinalize","finalize","req","reqTimeout","removeEventListener","addEventListener","once","socket","val","createHeadersLenient","isRedirect","statusCode","location","locationURL","requestOpts","response_options","statusMessage","codings","zlibOptions","flush","zlib","Z_SYNC_FLUSH","finishFlush","createGunzip","createBrotliDecompress","createInflate","createInflateRaw","dest","write","writeToStream","realFetch","nodeFetch","default","module","exports","mergeOptions","overrideOptions","defaultOptions","batchHandler","receiver","async","uri","Content-Type","stringify","payload","params","id","jsonrpc","handler","Proxy","round","random","data","result","RPC","crossFetch","HexStringToBigInt","hexString","BigIntToHexString","bigInt","normalizeHexNumber","intValue","normalizeRawData","toArrayBuffer","normalizeObject","NormalizeScript","NormalizeOutPoint","toNormalize","normalize","NormalizeCellInput","NormalizeCellOutput","type_","NormalizeCellDep","toNormalizeArray","normalizeFunction","item","NormalizeRawTransaction","NormalizeTransaction","NormalizeRawHeader","NormalizeHeader","NormalizeUncleBlock","invokeSerializeJson","serializeJson","Function","transformObject","replace","group","TransformScript","validation","validators.ValidateScript","TransformOutPoint","validators.ValidateOutPoint","toInvoke","transform","TransformCellInput","validators.ValidateCellInput","TransformCellOutput","validators.ValidateCellOutput","TransformCellDep","validators.ValidateCellDep","toInvokeArray","invokeFunction","TransformTransaction","validators.ValidateTransaction","TransformHeader","validators.ValidateHeader","TransformUncleBlock","validators.ValidateUncleBlock","validators.ValidateRawTransaction","validators.ValidateRawHeader","validators.ValidateBlock","validators.ValidateCellbaseWitness","validators.ValidateWitnessArgs","rpc","lockHash","skipCellWithContent","loadData","loadBlockNumber","to","get_tip_block_number","currentFrom","lessThanOrEqual","currentTo","greaterThan","cells","get_cells_by_lock_hash","cell","output_data_len","get_live_cell","content","block_number","get_header","block_hash","cellbase","cell_output","validateTransaction","depGroupUnpacker","txHash","tx","get_transaction","dump","mockInputs","output","_resolveOutPoint","mockCellDeps","cell_dep","outPoints","mockHeaderDeps","headerDep","mock_info","txStatus","toNumber","tx_status"],"mappings":"mRAAA,MAAMA,EACJC,YAAYC,GACVC,KAAKC,KAAO,IAAIC,SAASH,GAG3BD,SACE,OAAOE,KAAKC,KAAKE,WAGnBL,QAAQM,GACN,OAAOJ,KAAKC,KAAKI,SAASD,GAG5BN,gBACE,OAAOE,KAAKC,KAAKF,OAGnBD,gBACE,MACE,KACAQ,MAAMC,UAAUC,IACbC,KAAK,IAAIC,WAAWV,KAAKC,KAAKF,QAASY,IACrC,KAAOA,EAAEC,SAAS,KAAKC,OAAO,IAEhCC,KAAK,KAKd,MAAMC,EACJjB,YAAYkB,GACVhB,KAAKgB,OAASA,EAGhBlB,SACE,OAAOE,KAAKgB,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AUd,gCAAgCC,MAG7D,MAAM0T,EAAO,CACX0F,OAAQJ,EAAGtX,QAAQ1B,GACnB0T,KAAMsF,EAAGrX,aAAa3B,IAKxB,MAHkC,cAA9B4Z,EAASE,UAAUhM,SACrB4F,EAAK7Q,OAAS+W,EAASE,UAAUpB,YAE5BhF,oBC5FY"} \ No newline at end of file diff --git a/dist/ckb-js-toolkit.umd.js b/dist/ckb-js-toolkit.umd.js index f2085d4..43cf5f6 100644 --- a/dist/ckb-js-toolkit.umd.js +++ b/dist/ckb-js-toolkit.umd.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).CKBJSToolkit={})}(this,(function(t){"use strict";class e{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class r{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");n.setUint8(e,r)}return new e(r)}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var a=o((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r,n=0;nl.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return(n=h(this,o(l).call(this,t))).sign=r,n}return i(l,r),n(l,[{key:"toDebugString",value:function(){var t=["BigInt["],e=!0,r=!1,n=void 0;try{for(var i,o,a=this[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)o=i.value,t.push((o?(o>>>0).toString(16):o)+", ")}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}return t.push("]"),t.join("")}},{key:"toString",value:function(){var t=0t||36this.length&&(r=this.length);for(var n=65535&t,i=t>>>16,o=0,a=65535&e,s=e>>>16,_=0;_>>16,c=u(f,n),g=u(f,i),d=u(h,n),p=u(h,i),v=a+(65535&c),y=s+o+(v>>>16)+(c>>>16)+(65535&g)+(65535&d);o=(a=(g>>>16)+(d>>>16)+(65535&p)+(y>>>16))>>>16,a&=65535,s=p>>>16,this.__setDigit(_,65535&v|y<<16)}if(0!==o||0!==a||0!==s)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(t,e,r){for(var n,i=0,o=0;o>>16,this.__setHalfDigit(e+o,n);return i}},{key:"__inplaceSub",value:function(t,e,r){var n=0;if(1&e){e>>=1;for(var i=this.__digit(e),o=65535&i,a=0;a>>1;a++){var s=t.__digit(a),u=(i>>>16)-(65535&s)-n;n=1&u>>>16,this.__setDigit(e+a,u<<16|65535&o),n=1&(o=(65535&(i=this.__digit(e+a+1)))-(s>>>16)-n)>>>16}var _=t.__digit(a),l=(i>>>16)-(65535&_)-n;if(n=1&l>>>16,this.__setDigit(e+a,l<<16|65535&o),e+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(n=1&(o=(65535&(i=this.__digit(e+a+1)))-(_>>>16)-n)>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;for(var f=0;f>>16)-(c>>>16)-(n=1&g>>>16);n=1&d>>>16,this.__setDigit(e+f,d<<16|65535&g)}var p=this.__digit(e+f),v=t.__digit(f),y=(65535&p)-(65535&v)-n;n=1&y>>>16;var b=0;0==(1&r)&&(n=1&(b=(p>>>16)-(v>>>16)-n)>>>16),this.__setDigit(e+f,b<<16|65535&y)}return n}},{key:"__inplaceRightShift",value:function(t){if(0!==t){for(var e,r=this.__digit(0)>>>t,n=this.length-1,i=0;i>>t;this.__setDigit(n,r)}}},{key:"__digit",value:function(t){return this[t]}},{key:"__unsignedDigit",value:function(t){return this[t]>>>0}},{key:"__setDigit",value:function(t,e){this[t]=0|e}},{key:"__setDigitGrow",value:function(t,e){this[t]=0|e}},{key:"__halfDigitLength",value:function(){var t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}},{key:"__halfDigit",value:function(t){return 65535&this[t>>>1]>>>((1&t)<<4)}},{key:"__setHalfDigit",value:function(t,e){var r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var r=Math.floor,n=Number.isFinite;if("number"==typeof e){if(0===e)return l.__zero();if((0|e)===e)return 0>e?l.__oneDigit(-e,!0):l.__oneDigit(e,!1);if(!n(e)||r(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return l.__fromDouble(e)}if("string"==typeof e){var i=l.__fromString(e);if(null===i)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return i}if("boolean"==typeof e)return!0===e?l.__oneDigit(1,!1):l.__zero();if("object"===t(e)){if(e.constructor===l)return e;var o=l.__toPrimitive(e);return l.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(t){var e=t.length;if(0===e)return 0;if(1===e){var r=t.__unsignedDigit(0);return t.sign?-r:r}var n=t.__digit(e-1),i=_(n),o=32*e-i;if(1024>>=12;var c=f-12,g=12<=f?0:s<<20+f,d=20+f;0>>32-c,g=s<>>32-d,d-=32);var p=l.__decideRounding(t,d,u,s);if((1===p||0===p&&1==(1&g))&&0==(g=g+1>>>0)&&0!=++h>>>20&&(h=0,1023<++a))return t.sign?-1/0:1/0;var v=t.sign?-2147483648:0;return a=a+1023<<20,l.__kBitConversionInts[1]=v|a|h,l.__kBitConversionInts[0]=g,l.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(t){if(0===t.length)return t;var e=t.__copy();return e.sign=!t.sign,e}},{key:"bitwiseNot",value:function(t){return t.sign?l.__absoluteSubOne(t).__trim():l.__absoluteAddOne(t,!0)}},{key:"exponentiate",value:function(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return l.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return t.sign&&0==(1&e.__digit(0))?l.unaryMinus(t):t;if(1=l.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(r>>>5),i=new l(n,t.sign&&0!=(1&r));i.__initializeDigits();var o=1<<(31&r);return i.__setDigit(n-1,o),i}var a=null,s=t;for(0!=(1&r)&&(a=t),r>>=1;0!==r;r>>=1)s=l.multiply(s,s),0!=(1&r)&&(a=null===a?s:l.multiply(a,s));return a}},{key:"multiply",value:function(t,e){if(0===t.length)return t;if(0===e.length)return e;var r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;var n=new l(r,t.sign!==e.sign);n.__initializeDigits();for(var i=0;il.__absoluteCompare(t,e))return l.__zero();var r,n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&65535>=i){if(1===i)return n===t.sign?t:l.unaryMinus(t);r=l.__absoluteDivSmall(t,i,null)}else r=l.__absoluteDivLarge(t,e,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>l.__absoluteCompare(t,e))return t;var r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return l.__zero();var n=l.__absoluteModSmall(t,r);return 0===n?l.__zero():l.__oneDigit(n,t.sign)}var i=l.__absoluteDivLarge(t,e,!1,!0);return i.sign=t.sign,i.__trim()}},{key:"add",value:function(t,e){var r=t.sign;return r===e.sign?l.__absoluteAdd(t,e,r):0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r)}},{key:"subtract",value:function(t,e){var r=t.sign;return r===e.sign?0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r):l.__absoluteAdd(t,e,r)}},{key:"leftShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__rightShiftByAbsolute(t,e):l.__leftShiftByAbsolute(t,e)}},{key:"signedRightShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__leftShiftByAbsolute(t,e):l.__rightShiftByAbsolute(t,e)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(t,e){return 0>l.__compareToBigInt(t,e)}},{key:"lessThanOrEqual",value:function(t,e){return 0>=l.__compareToBigInt(t,e)}},{key:"greaterThan",value:function(t,e){return 0=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.lengthl.__kMaxLengthBits)throw new RangeError("BigInt too big");return l.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.length>>n)return e}return l.__truncateToNBits(t,e)}},{key:"ADD",value:function(t,e){if(t=l.__toPrimitive(t),e=l.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)&&l.__isBigInt(e))return l.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(t,e){return l.__compare(t,e,0)}},{key:"LE",value:function(t,e){return l.__compare(t,e,1)}},{key:"GT",value:function(t,e){return l.__compare(t,e,2)}},{key:"GE",value:function(t,e){return l.__compare(t,e,3)}},{key:"EQ",value:function(e,r){for(;;){if(l.__isBigInt(e))return l.__isBigInt(r)?l.equal(e,r):l.EQ(r,e);if("number"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("string"==typeof e){if(l.__isBigInt(r))return null!==(e=l.__fromString(e))&&l.equal(e,r);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("boolean"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,+e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("symbol"===t(e)){if(l.__isBigInt(r))return!1;if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else{if("object"!==t(e))return e==r;if("object"===t(r)&&r.constructor!==l)return e==r;e=l.__toPrimitive(e)}}}},{key:"NE",value:function(t,e){return!l.EQ(t,e)}},{key:"__zero",value:function(){return new l(0,!1)}},{key:"__oneDigit",value:function(t,e){var r=new l(1,e);return r.__setDigit(0,t),r}},{key:"__decideRounding",value:function(t,e,r,n){if(0e)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}var o=1<>>20)-1023,n=1+(r>>>5),i=new l(n,0>t),o=1048575&l.__kBitConversionInts[1]|1048576,a=l.__kBitConversionInts[0],s=20,u=31&r,_=0;if(u>>f,o=o<<32-f|a>>>f,a<<=32-f}else if(u===s)_=32,e=o,o=a;else{var h=u-s;_=32-h,e=o<>>32-h,o=a<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}},{key:"__fromString",value:function(t){var e=11073741824/s)return null;var _=new l(31+(s*a+u>>>l.__kBitsPerCharTableShift)>>>5,!1),f=10>e?e:10,h=10>=l.__kBitsPerCharTableShift;var c=[],g=[],d=!1;do{for(var p,v=0,y=0;;){if(p=void 0,o-48>>>0>>0>>0>>0>>l.__kBitsPerCharTableShift+5;_.__inplaceMultiplyAdd(D,k,P)}while(!b)}if(i!==n){if(!l.__isWhitespace(o))return null;for(i++;i>>u-(o-=32))}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),o=e-1,a=t.__digit(r-1),s=0|(32*r-_(a)+i-1)/i;if(t.sign&&s++,268435456>>v,c=32-v;c>=i;)u[f--]=l.__kConversionChars[h&o],h>>>=i,c-=i}var y=(h|a<>>i-c;0!==h;)u[f--]=l.__kConversionChars[h&o],h>>>=i;if(t.sign&&(u[f--]="-"),-1!==f)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(t,e,r){var n=t.length;if(0===n)return"";if(1===n){var i=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(i="-"+i),i}var o,a,s=32*n-_(t.__digit(n-1)),u=l.__kMaxBitsPerChar[e]-1,f=s*l.__kBitsPerCharTableMultiplier,h=1+(f=0|(f+=u-1)/u)>>1,c=l.exponentiate(l.__oneDigit(e,!1),l.__oneDigit(h,!1)),g=c.__unsignedDigit(0);if(1===c.length&&65535>=g){(o=new l(t.length,!1)).__initializeDigits();for(var d,p=0,v=2*t.length-1;0<=v;v--)d=p<<16|t.__halfDigit(v),o.__setHalfDigit(v,0|d/g),p=0|d%g;a=p.toString(e)}else{var y=l.__absoluteDivLarge(t,c,!0,!0);o=y.quotient;var b=y.remainder.__trim();a=l.__toStringGeneric(b,e,!0)}o.__trim();for(var m=l.__toStringGeneric(o,e,!0);a.lengthn?l.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(t,e){if(!0|e){var r=t.sign,n=0>e;if(r!==n)return l.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?l.__absoluteGreater(r):oe)return l.__unequalSign(r);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;l.__kBitConversionDouble[0]=e;var n=2047&l.__kBitConversionInts[1]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var i=n-1023;if(0>i)return l.__absoluteGreater(r);var o=t.length,a=t.__digit(o-1),s=_(a),u=32*o-s,f=i+1;if(uf)return l.__absoluteGreater(r);var h=1048576|1048575&l.__kBitConversionInts[1],c=l.__kBitConversionInts[0],g=20,d=31-s;if(d!==(u-1)%31)throw new Error("implementation bug");var p,v=0;if(d>>y,h=h<<32-y|c>>>y,c<<=32-y}else if(d===g)v=32,p=h,h=c;else{var b=d-g;v=32-b,p=h<>>32-b,h=c<>>=0)>(p>>>=0))return l.__absoluteGreater(r);if(a>>0,h=c,c=0):p=0;var w=t.__unsignedDigit(m);if(w>p)return l.__absoluteGreater(r);if(we&&t.__unsignedDigit(0)===a(e):0===l.__compareToDouble(t,e)}},{key:"__comparisonResultToBool",value:function(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(l.__isBigInt(t)&&"string"==typeof e)return null!==(e=l.__fromString(e))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("string"==typeof t&&l.__isBigInt(e))return null!==(t=l.__fromString(t))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)){if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return l.__comparisonResultToBool(l.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}},{key:"__absoluteAdd",value:function(t,e,r){if(t.length>>16)+(s>>>16)+(_>>>16);o=f>>>16,i.__setDigit(a,65535&_|f<<16)}for(;a>>16)+(c>>>16);o=g>>>16,i.__setDigit(a,65535&c|g<<16)}return a>>16)-(s>>>16)-(i=1&u>>>16);i=1&_>>>16,n.__setDigit(o,65535&u|_<<16)}for(;o>>16)-(i=1&h>>>16);i=1&c>>>16,n.__setDigit(o,65535&h|c<<16)}return n.__trim()}},{key:"__absoluteAddOne",value:function(t,e){var r=2n?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(t,e,r,n){if(0!==e){for(var i=65535&e,o=e>>>16,a=0,s=0,_=0,l=0;l>>16,g=t.__digit(l),d=65535&g,p=g>>>16,v=u(d,i),y=u(d,o),b=u(p,i),m=u(p,o);a=(s=(y>>>16)+(b>>>16)+(65535&m)+(a=(c+=_+a+((h+=s+(65535&v))>>>16)+(v>>>16)+(65535&y)+(65535&b))>>>16))>>>16,s&=65535,_=m>>>16,f=65535&h|c<<16,r.__setDigit(n,f)}for(;0!==a||0!==s||0!==_;n++){var w=r.__digit(n),k=(65535&w)+s,D=(w>>>16)+(k>>>16)+_+a;s=0,_=0,a=D>>>16,w=65535&k|D<<16,r.__setDigit(n,w)}}}},{key:"__internalMultiplyAdd",value:function(t,e,r,n,i){for(var o=r,a=0,s=0;s>>16;var h=u(_>>>16,e),c=(65535&h)+(l>>>16)+o;o=c>>>16,a=h>>>16,i.__setDigit(s,c<<16|65535&f)}if(i.length>n)for(i.__setDigit(n++,o+a);n>>0,a=0|o/e,s=0|(o=((n=0|o%e)<<16|t.__halfDigit(i-1))>>>0)/e;n=0|o%e,r.__setDigit(i>>>1,a<<16|s)}return r}},{key:"__absoluteModSmall",value:function(t,e){for(var r=0,n=2*t.length-1;0<=n;n--)r=0|((r<<16|t.__halfDigit(n))>>>0)%e;return r}},{key:"__absoluteDivLarge",value:function(t,e,r,n){var i=e.__halfDigitLength(),o=e.length,a=t.__halfDigitLength()-i,s=null;r&&(s=new l(a+2>>>1,!1)).__initializeDigits();var _=new l(i+2>>>1,!1);_.__initializeDigits();var f=l.__clz16(e.__halfDigit(i-1));0>>0;p=0|y/c;for(var b=0|y%c,m=e.__halfDigit(i-2),w=h.__halfDigit(d+i-2);u(p,m)>>>0>(b<<16|w)>>>0&&(p--,!(65535<(b+=c))););}l.__internalMultiplyAdd(e,p,0,o,_);var k=h.__inplaceSub(_,d,i+1);0!==k&&(k=h.__inplaceAdd(e,d,i),h.__setHalfDigit(d+i,h.__halfDigit(d+i)+k),p--),r&&(1&d?g=p<<16:s.__setDigit(d>>>1,g|p))}return n?(h.__inplaceRightShift(f),r?{quotient:s,remainder:h}:h):r?s:void 0}},{key:"__clz16",value:function(t){return _(t)-16}},{key:"__specialLeftShift",value:function(t,e,r){var n=t.length,i=new l(n+r,!1);if(0===e){for(var o=0;o>>32-e;return 0r)throw new RangeError("BigInt too big");var n=r>>>5,i=31&r,o=t.length,a=0!==i&&0!=t.__digit(o-1)>>>32-i,s=o+n+(a?1:0),u=new l(s,t.sign);if(0===i){for(var _=0;_>>32-i;if(a)u.__setDigit(o+n,f);else if(0!==f)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(t,e){var r=t.length,n=t.sign,i=l.__toShiftAmount(e);if(0>i)return l.__rightShiftByMaximum(n);var o=i>>>5,a=31&i,s=r-o;if(0>=s)return l.__rightShiftByMaximum(n);var u=!1;if(n)if(0!=(t.__digit(o)&(1<>>a,d=r-o-1,p=0;p>>a;f.__setDigit(d,g)}return u&&(f=l.__absoluteAddOne(f,!0,f)),f.__trim()}},{key:"__rightShiftByMaximum",value:function(t){return t?l.__oneDigit(1,!0):l.__zero()}},{key:"__toShiftAmount",value:function(t){if(1l.__kMaxLengthBits?-1:e}},{key:"__toPrimitive",value:function(e){var r=1>>5,n=new l(r,e.sign),i=r-1,o=0;o>>s}return n.__setDigit(i,a),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(t,e,r){for(var n=Math.min,i=t+31>>>5,o=new l(i,r),a=0,s=i-1,u=0,_=n(s,e.length);a<_;a++){var f=e.__digit(a),h=0-(65535&f)-u,c=0-(f>>>16)-(u=1&h>>>16);u=1&c>>>16,o.__setDigit(a,65535&h|c<<16)}for(;a>>16)-(u=1&v>>>16)<<16}else{var y=32-p,b=1<<32-y,m=(65535&b)-(65535&(d=d<>>y))-u;g=65535&m|(b>>>16)-(d>>>16)-(u=1&m>>>16)<<16,g&=b-1}return o.__setDigit(s,g),o.__trim()}},{key:"__digitPow",value:function(t,e){for(var r=1;0>>=1,t*=t;return r}}]),l}(l(Array));return c.__kMaxLength=33554432,c.__kMaxLengthBits=c.__kMaxLength<<5,c.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],c.__kBitsPerCharTableShift=5,c.__kBitsPerCharTableMultiplier=1<a)throw new Error(s);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(s);if(u.find(t=>!n.includes(t)))throw new Error(s)}function u(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function _(t,e){if(u(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function l(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function f(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(s(r,t,["code_hash","hash_type","args"],[]),_(r+".code_hash",t.code_hash),u(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function h(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){s(r,t,["tx_hash","index"],[]),_(r+".tx_hash",t.tx_hash),l(r+".index",t.index)}function c(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){s(r,t,["since","previous_output"],[]),l(r+".since",t.since),e&&h(t.previous_output,{debugPath:r+".previous_output"})}function g(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){s(r,t,["capacity","lock"],["type"]),l(r+".capacity",t.capacity),e&&(f(t.lock,{debugPath:r+".lock"}),t.type&&f(t.type,{debugPath:r+".type"}))}function d(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(s(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&h(t.out_point,{debugPath:r+".out_point"})}function p(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n-1};function _(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t,e,r,n=c(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=g(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function D(t,r){return new Promise((function(n,o){var a=new b(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}D.polyfill=!0,t.fetch||(t.fetch=D,t.Headers=h,t.Request=b,t.Response=w),e.Headers=h,e.Request=b,e.Response=w,e.fetch=D}({})}(r),delete r.fetch.polyfill,(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}));function x(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const O={get:(t,e,r)=>"send"===e?async()=>{const e=await S(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},C={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},O):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await S(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class I{constructor(t,e={}){return this.uri=t,this.defaultOptions=e,new Proxy(this,C)}static create(t){return new I(t)}}function j(t){return a.BigInt(t)}function R(t){return"0x"+t.toString(16)}function z(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=R(a.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&r.byteLength!==t)throw new Error(`${e} has invalid length ${r.byteLength}, required: ${t}`);return r}}function N(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function L(t,{debugPath:e="script"}={}){return N(e,t,{code_hash:M(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:M(-1)})}function U(t,{debugPath:e="out_point"}={}){return N(e,t,{tx_hash:M(32),index:z(4)})}function V(t){return function(e,r){return t(r,{debugPath:e})}}function q(t,{debugPath:e="cell_input"}={}){return N(e,t,{since:z(8),previous_output:V(U)})}function $(t,{debugPath:e="cell_output"}={}){const r=N(e,t,{capacity:z(8),lock:V(L)});return t.type&&(r.type_=L(t.type,{debugPath:e+".type"})),r}function F(t,{debugPath:e="cell_dep"}={}){return N(e,t,{out_point:V(U),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function H(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function G(t,{debugPath:e="raw_transaction"}={}){return N(e,t,{version:z(4),cell_deps:H(V(F)),header_deps:H(M(32)),inputs:H(V(q)),outputs:H(V($)),outputs_data:H(M(-1))})}function W(t,{debugPath:e="transaction"}={}){const r=G(t,{debugPath:"(raw)"+e}),n=N(e,t,{witnesses:H(M(-1))});return n.raw=r,n}function J(t,{debugPath:e="raw_header"}={}){return N(e,t,{version:z(4),compact_target:z(4),timestamp:z(8),number:z(8),epoch:z(8),parent_hash:M(32),transactions_root:M(32),proposals_hash:M(32),uncles_hash:M(32),dao:M(32)})}function X(t,{debugPath:e="header"}={}){const r=J(t,{debugPath:"(raw)"+e}),n=N(e,t,{nonce:z(16)});return n.raw=r,n}function Q(t,{debugPath:e="uncle_block"}={}){return N(e,t,{header:V(X),proposals:H(M(10))})}var K=Object.freeze({__proto__:null,NormalizeScript:L,NormalizeOutPoint:U,NormalizeCellInput:q,NormalizeCellOutput:$,NormalizeCellDep:F,NormalizeRawTransaction:G,NormalizeTransaction:W,NormalizeRawHeader:J,NormalizeHeader:X,NormalizeUncleBlock:Q,NormalizeBlock:function(t,{debugPath:e="block"}={}){return N(e,t,{header:V(X),uncles:H(V(Q)),transactions:H(V(W)),proposals:H(M(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return N(e,t,{lock:V(L),message:M(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=M(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=M(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=M(-1)(e+".output_type",t.output_type)),r}});function Y(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Z(t,e,r){if(!((e=Y(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function tt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Z(r,t,{code_hash:Y,hash_type:Y,args:Y}),e&&f(t,{debugPath:"(transformed) "+r}),t}function et(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Z(r,t,{tx_hash:Y,index:Y}),e&&h(t,{debugPath:"(transformed) "+r}),t}function rt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function nt(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Z(r,t,{since:Y,previous_output:rt(et)}),e&&c(t,{debugPath:"(transformed) "+r}),t}function it(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Z(r,t,{capacity:Y,lock:rt(tt),type:rt(tt)}),e&&g(t,{debugPath:"(transformed) "+r}),t}function ot(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Z(r,t,{out_point:rt(et),dep_type:Y}),e&&d(t,{debugPath:"(transformed) "+r}),t}function at(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function st(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y),witnesses:at(Y)}),e&&m(t,{debugPath:"(transformed) "+r}),t}function ut(t,{validation:e=!0,debugPath:r="header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y,nonce:Y}),e&&k(t,{debugPath:"(transformed) "+r}),t}function _t(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Z(r,t,{header:rt(ut),proposals:at(Y)}),e&&B(t,{debugPath:"(transformed) "+r}),t}var lt=Object.freeze({__proto__:null,TransformScript:tt,TransformOutPoint:et,TransformCellInput:nt,TransformCellOutput:it,TransformCellDep:ot,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y)}),e&&b(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:st,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y}),e&&w(t,{debugPath:"(transformed) "+r}),t},TransformHeader:ut,TransformUncleBlock:_t,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Z(r,t,{header:rt(ut),uncles:at(rt(_t)),transactions:at(rt(st)),proposals:at(Y)}),e&&P(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Z(r,t,{lock:rt(tt),message:Y}),e&&T(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Z(r,t,{lock:Y,input_type:Y,output_type:Y}),e&&A(t,{debugPath:"(transformed) "+r}),t}});var ft=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:r=!0,loadData:i=!1,loadBlockNumber:o=!0}={}){this.rpc=t,this.lockHash=new n(e).serializeJson(),this.skipCellWithContent=r,this.loadData=i,this.loadBlockNumber=o}async*collect(){const t=j(await this.rpc.get_tip_block_number());let e=a.BigInt(0);for(;a.lessThanOrEqual(e,t);){let r=a.add(e,a.BigInt(100));a.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,R(e),R(r));for(const t of n){if(this.skipCellWithContent&&(t.type||a.greaterThan(j(t.output_data_len),a.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=a.add(r,a.BigInt(1))}}}});t.BigIntToHexString=R,t.HexStringToBigInt=j,t.RPC=I,t.Reader=n,t.TransactionDumper=class{constructor(t,{validateTransaction:e=!0,depGroupUnpacker:r=null}={}){this.rpc=t,this.validateTransaction=e,this.depGroupUnpacker=r}async dumpByHash(t){const e=(await this.rpc.get_transaction(t)).transaction;return delete e.hash,await this.dump(e)}async dump(t){this.validateTransaction&&m(t);const e=[];for(const r of t.inputs){const{output:t,data:n,header:i}=await this._resolveOutPoint(r.previous_output);e.push({input:r,output:t,data:n,header:i})}const r=[];for(const e of t.cell_deps){const{output:t,data:i,header:o}=await this._resolveOutPoint(e.out_point);if(r.push({cell_dep:e,output:t,data:i,header:o}),"dep_group"===e.dep_type){if(!this.depGroupUnpacker)throw new Error("depGroupUnpacker must be provided when the transaction contains dep_group!");const t=this.depGroupUnpacker(new n(i));for(const e of t){h(e);const{output:t,data:n,header:i}=await this._resolveOutPoint(e);r.push({cell_dep:{out_point:e,dep_type:"code"},output:t,data:n,header:i})}}}const i=[];for(const e of t.header_deps)i.push(await this.rpc.get_header(e));return JSON.stringify({mock_info:{inputs:e,cell_deps:r,header_deps:i},tx:t})}async _resolveOutPoint(t){const e=await this.rpc.get_transaction(t.tx_hash);if(!e||!e.transaction)throw new Error(`Transaction ${t.tx_hash} cannot be found!`);const r=e.transaction,n=a.toNumber(a.BigInt(t.index));if(n>=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}},t.VERSION="0.10.2",t.cell_collectors=ft,t.normalizers=K,t.transformers=lt,t.validators=E,Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).CKBJSToolkit={})}(this,(function(t){"use strict";class e{constructor(t){this.view=new DataView(t)}length(){return this.view.byteLength}indexAt(t){return this.view.getUint8(t)}toArrayBuffer(){return this.view.buffer}serializeJson(){return"0x"+Array.prototype.map.call(new Uint8Array(this.view.buffer),t=>("00"+t.toString(16)).slice(-2)).join("")}}class r{constructor(t){this.string=t}length(){return this.string.length/2-1}indexAt(t){return parseInt(this.string.substr(2+2*t,2),16)}toArrayBuffer(){const t=new ArrayBuffer(this.length()),e=new DataView(t);for(let t=0;t255)throw new Error("fromRawString can only accept UTF-8 raw string!");n.setUint8(e,r)}return new e(r)}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var a=o((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r,n=0;nl.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return(n=h(this,o(l).call(this,t))).sign=r,n}return i(l,r),n(l,[{key:"toDebugString",value:function(){var t=["BigInt["],e=!0,r=!1,n=void 0;try{for(var i,o,a=this[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)o=i.value,t.push((o?(o>>>0).toString(16):o)+", ")}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}return t.push("]"),t.join("")}},{key:"toString",value:function(){var t=0t||36this.length&&(r=this.length);for(var n=65535&t,i=t>>>16,o=0,a=65535&e,s=e>>>16,_=0;_>>16,c=u(f,n),g=u(f,i),d=u(h,n),p=u(h,i),v=a+(65535&c),y=s+o+(v>>>16)+(c>>>16)+(65535&g)+(65535&d);o=(a=(g>>>16)+(d>>>16)+(65535&p)+(y>>>16))>>>16,a&=65535,s=p>>>16,this.__setDigit(_,65535&v|y<<16)}if(0!==o||0!==a||0!==s)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(t,e,r){for(var n,i=0,o=0;o>>16,this.__setHalfDigit(e+o,n);return i}},{key:"__inplaceSub",value:function(t,e,r){var n=0;if(1&e){e>>=1;for(var i=this.__digit(e),o=65535&i,a=0;a>>1;a++){var s=t.__digit(a),u=(i>>>16)-(65535&s)-n;n=1&u>>>16,this.__setDigit(e+a,u<<16|65535&o),n=1&(o=(65535&(i=this.__digit(e+a+1)))-(s>>>16)-n)>>>16}var _=t.__digit(a),l=(i>>>16)-(65535&_)-n;if(n=1&l>>>16,this.__setDigit(e+a,l<<16|65535&o),e+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(n=1&(o=(65535&(i=this.__digit(e+a+1)))-(_>>>16)-n)>>>16,this.__setDigit(e+t.length,4294901760&i|65535&o))}else{e>>=1;for(var f=0;f>>16)-(c>>>16)-(n=1&g>>>16);n=1&d>>>16,this.__setDigit(e+f,d<<16|65535&g)}var p=this.__digit(e+f),v=t.__digit(f),y=(65535&p)-(65535&v)-n;n=1&y>>>16;var b=0;0==(1&r)&&(n=1&(b=(p>>>16)-(v>>>16)-n)>>>16),this.__setDigit(e+f,b<<16|65535&y)}return n}},{key:"__inplaceRightShift",value:function(t){if(0!==t){for(var e,r=this.__digit(0)>>>t,n=this.length-1,i=0;i>>t;this.__setDigit(n,r)}}},{key:"__digit",value:function(t){return this[t]}},{key:"__unsignedDigit",value:function(t){return this[t]>>>0}},{key:"__setDigit",value:function(t,e){this[t]=0|e}},{key:"__setDigitGrow",value:function(t,e){this[t]=0|e}},{key:"__halfDigitLength",value:function(){var t=this.length;return 65535>=this.__unsignedDigit(t-1)?2*t-1:2*t}},{key:"__halfDigit",value:function(t){return 65535&this[t>>>1]>>>((1&t)<<4)}},{key:"__setHalfDigit",value:function(t,e){var r=t>>>1,n=this.__digit(r),i=1&t?65535&n|e<<16:4294901760&n|65535&e;this.__setDigit(r,i)}}],[{key:"BigInt",value:function(e){var r=Math.floor,n=Number.isFinite;if("number"==typeof e){if(0===e)return l.__zero();if((0|e)===e)return 0>e?l.__oneDigit(-e,!0):l.__oneDigit(e,!1);if(!n(e)||r(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return l.__fromDouble(e)}if("string"==typeof e){var i=l.__fromString(e);if(null===i)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return i}if("boolean"==typeof e)return!0===e?l.__oneDigit(1,!1):l.__zero();if("object"===t(e)){if(e.constructor===l)return e;var o=l.__toPrimitive(e);return l.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(t){var e=t.length;if(0===e)return 0;if(1===e){var r=t.__unsignedDigit(0);return t.sign?-r:r}var n=t.__digit(e-1),i=_(n),o=32*e-i;if(1024>>=12;var c=f-12,g=12<=f?0:s<<20+f,d=20+f;0>>32-c,g=s<>>32-d,d-=32);var p=l.__decideRounding(t,d,u,s);if((1===p||0===p&&1==(1&g))&&0==(g=g+1>>>0)&&0!=++h>>>20&&(h=0,1023<++a))return t.sign?-1/0:1/0;var v=t.sign?-2147483648:0;return a=a+1023<<20,l.__kBitConversionInts[1]=v|a|h,l.__kBitConversionInts[0]=g,l.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(t){if(0===t.length)return t;var e=t.__copy();return e.sign=!t.sign,e}},{key:"bitwiseNot",value:function(t){return t.sign?l.__absoluteSubOne(t).__trim():l.__absoluteAddOne(t,!0)}},{key:"exponentiate",value:function(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return l.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return t.sign&&0==(1&e.__digit(0))?l.unaryMinus(t):t;if(1=l.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(r>>>5),i=new l(n,t.sign&&0!=(1&r));i.__initializeDigits();var o=1<<(31&r);return i.__setDigit(n-1,o),i}var a=null,s=t;for(0!=(1&r)&&(a=t),r>>=1;0!==r;r>>=1)s=l.multiply(s,s),0!=(1&r)&&(a=null===a?s:l.multiply(a,s));return a}},{key:"multiply",value:function(t,e){if(0===t.length)return t;if(0===e.length)return e;var r=t.length+e.length;32<=t.__clzmsd()+e.__clzmsd()&&r--;var n=new l(r,t.sign!==e.sign);n.__initializeDigits();for(var i=0;il.__absoluteCompare(t,e))return l.__zero();var r,n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&65535>=i){if(1===i)return n===t.sign?t:l.unaryMinus(t);r=l.__absoluteDivSmall(t,i,null)}else r=l.__absoluteDivLarge(t,e,!0,!1);return r.sign=n,r.__trim()}},{key:"remainder",value:function(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>l.__absoluteCompare(t,e))return t;var r=e.__unsignedDigit(0);if(1===e.length&&65535>=r){if(1===r)return l.__zero();var n=l.__absoluteModSmall(t,r);return 0===n?l.__zero():l.__oneDigit(n,t.sign)}var i=l.__absoluteDivLarge(t,e,!1,!0);return i.sign=t.sign,i.__trim()}},{key:"add",value:function(t,e){var r=t.sign;return r===e.sign?l.__absoluteAdd(t,e,r):0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r)}},{key:"subtract",value:function(t,e){var r=t.sign;return r===e.sign?0<=l.__absoluteCompare(t,e)?l.__absoluteSub(t,e,r):l.__absoluteSub(e,t,!r):l.__absoluteAdd(t,e,r)}},{key:"leftShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__rightShiftByAbsolute(t,e):l.__leftShiftByAbsolute(t,e)}},{key:"signedRightShift",value:function(t,e){return 0===e.length||0===t.length?t:e.sign?l.__leftShiftByAbsolute(t,e):l.__rightShiftByAbsolute(t,e)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(t,e){return 0>l.__compareToBigInt(t,e)}},{key:"lessThanOrEqual",value:function(t,e){return 0>=l.__compareToBigInt(t,e)}},{key:"greaterThan",value:function(t,e){return 0=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.lengthl.__kMaxLengthBits)throw new RangeError("BigInt too big");return l.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=l.__kMaxLengthBits)return e;var r=t+31>>>5;if(e.length>>n)return e}return l.__truncateToNBits(t,e)}},{key:"ADD",value:function(t,e){if(t=l.__toPrimitive(t),e=l.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)&&l.__isBigInt(e))return l.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(t,e){return l.__compare(t,e,0)}},{key:"LE",value:function(t,e){return l.__compare(t,e,1)}},{key:"GT",value:function(t,e){return l.__compare(t,e,2)}},{key:"GE",value:function(t,e){return l.__compare(t,e,3)}},{key:"EQ",value:function(e,r){for(;;){if(l.__isBigInt(e))return l.__isBigInt(r)?l.equal(e,r):l.EQ(r,e);if("number"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("string"==typeof e){if(l.__isBigInt(r))return null!==(e=l.__fromString(e))&&l.equal(e,r);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("boolean"==typeof e){if(l.__isBigInt(r))return l.__equalToNumber(r,+e);if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else if("symbol"===t(e)){if(l.__isBigInt(r))return!1;if("object"!==t(r))return e==r;r=l.__toPrimitive(r)}else{if("object"!==t(e))return e==r;if("object"===t(r)&&r.constructor!==l)return e==r;e=l.__toPrimitive(e)}}}},{key:"NE",value:function(t,e){return!l.EQ(t,e)}},{key:"__zero",value:function(){return new l(0,!1)}},{key:"__oneDigit",value:function(t,e){var r=new l(1,e);return r.__setDigit(0,t),r}},{key:"__decideRounding",value:function(t,e,r,n){if(0e)i=-e-1;else{if(0===r)return-1;r--,n=t.__digit(r),i=31}var o=1<>>20)-1023,n=1+(r>>>5),i=new l(n,0>t),o=1048575&l.__kBitConversionInts[1]|1048576,a=l.__kBitConversionInts[0],s=20,u=31&r,_=0;if(u>>f,o=o<<32-f|a>>>f,a<<=32-f}else if(u===s)_=32,e=o,o=a;else{var h=u-s;_=32-h,e=o<>>32-h,o=a<=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}},{key:"__fromString",value:function(t){var e=11073741824/s)return null;var _=new l(31+(s*a+u>>>l.__kBitsPerCharTableShift)>>>5,!1),f=10>e?e:10,h=10>=l.__kBitsPerCharTableShift;var c=[],g=[],d=!1;do{for(var p,v=0,y=0;;){if(p=void 0,o-48>>>0>>0>>0>>0>>l.__kBitsPerCharTableShift+5;_.__inplaceMultiplyAdd(D,k,P)}while(!b)}if(i!==n){if(!l.__isWhitespace(o))return null;for(i++;i>>u-(o-=32))}if(0!==i){if(n>=t.length)throw new Error("implementation bug");t.__setDigit(n++,i)}for(;n>>1)+(85&n))>>>2)+(51&n))>>>4)+(15&n),o=e-1,a=t.__digit(r-1),s=0|(32*r-_(a)+i-1)/i;if(t.sign&&s++,268435456>>v,c=32-v;c>=i;)u[f--]=l.__kConversionChars[h&o],h>>>=i,c-=i}var y=(h|a<>>i-c;0!==h;)u[f--]=l.__kConversionChars[h&o],h>>>=i;if(t.sign&&(u[f--]="-"),-1!==f)throw new Error("implementation bug");return u.join("")}},{key:"__toStringGeneric",value:function(t,e,r){var n=t.length;if(0===n)return"";if(1===n){var i=t.__unsignedDigit(0).toString(e);return!1===r&&t.sign&&(i="-"+i),i}var o,a,s=32*n-_(t.__digit(n-1)),u=l.__kMaxBitsPerChar[e]-1,f=s*l.__kBitsPerCharTableMultiplier,h=1+(f=0|(f+=u-1)/u)>>1,c=l.exponentiate(l.__oneDigit(e,!1),l.__oneDigit(h,!1)),g=c.__unsignedDigit(0);if(1===c.length&&65535>=g){(o=new l(t.length,!1)).__initializeDigits();for(var d,p=0,v=2*t.length-1;0<=v;v--)d=p<<16|t.__halfDigit(v),o.__setHalfDigit(v,0|d/g),p=0|d%g;a=p.toString(e)}else{var y=l.__absoluteDivLarge(t,c,!0,!0);o=y.quotient;var b=y.remainder.__trim();a=l.__toStringGeneric(b,e,!0)}o.__trim();for(var m=l.__toStringGeneric(o,e,!0);a.lengthn?l.__absoluteLess(r):0}},{key:"__compareToNumber",value:function(t,e){if(!0|e){var r=t.sign,n=0>e;if(r!==n)return l.__unequalSign(r);if(0===t.length){if(n)throw new Error("implementation bug");return 0===e?0:-1}if(1i?l.__absoluteGreater(r):oe)return l.__unequalSign(r);if(0===e)throw new Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;l.__kBitConversionDouble[0]=e;var n=2047&l.__kBitConversionInts[1]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");var i=n-1023;if(0>i)return l.__absoluteGreater(r);var o=t.length,a=t.__digit(o-1),s=_(a),u=32*o-s,f=i+1;if(uf)return l.__absoluteGreater(r);var h=1048576|1048575&l.__kBitConversionInts[1],c=l.__kBitConversionInts[0],g=20,d=31-s;if(d!==(u-1)%31)throw new Error("implementation bug");var p,v=0;if(d>>y,h=h<<32-y|c>>>y,c<<=32-y}else if(d===g)v=32,p=h,h=c;else{var b=d-g;v=32-b,p=h<>>32-b,h=c<>>=0)>(p>>>=0))return l.__absoluteGreater(r);if(a>>0,h=c,c=0):p=0;var w=t.__unsignedDigit(m);if(w>p)return l.__absoluteGreater(r);if(we&&t.__unsignedDigit(0)===a(e):0===l.__compareToDouble(t,e)}},{key:"__comparisonResultToBool",value:function(t,e){switch(e){case 0:return 0>t;case 1:return 0>=t;case 2:return 0e;case 3:return t>=e}if(l.__isBigInt(t)&&"string"==typeof e)return null!==(e=l.__fromString(e))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("string"==typeof t&&l.__isBigInt(e))return null!==(t=l.__fromString(t))&&l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if(t=l.__toNumeric(t),e=l.__toNumeric(e),l.__isBigInt(t)){if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToBigInt(t,e),r);if("number"!=typeof e)throw new Error("implementation bug");return l.__comparisonResultToBool(l.__compareToNumber(t,e),r)}if("number"!=typeof t)throw new Error("implementation bug");if(l.__isBigInt(e))return l.__comparisonResultToBool(l.__compareToNumber(e,t),2^r);if("number"!=typeof e)throw new Error("implementation bug");return 0===r?te:3===r?t>=e:void 0}},{key:"__absoluteAdd",value:function(t,e,r){if(t.length>>16)+(s>>>16)+(_>>>16);o=f>>>16,i.__setDigit(a,65535&_|f<<16)}for(;a>>16)+(c>>>16);o=g>>>16,i.__setDigit(a,65535&c|g<<16)}return a>>16)-(s>>>16)-(i=1&u>>>16);i=1&_>>>16,n.__setDigit(o,65535&u|_<<16)}for(;o>>16)-(i=1&h>>>16);i=1&c>>>16,n.__setDigit(o,65535&h|c<<16)}return n.__trim()}},{key:"__absoluteAddOne",value:function(t,e){var r=2n?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(t,e,r,n){if(0!==e){for(var i=65535&e,o=e>>>16,a=0,s=0,_=0,l=0;l>>16,g=t.__digit(l),d=65535&g,p=g>>>16,v=u(d,i),y=u(d,o),b=u(p,i),m=u(p,o);a=(s=(y>>>16)+(b>>>16)+(65535&m)+(a=(c+=_+a+((h+=s+(65535&v))>>>16)+(v>>>16)+(65535&y)+(65535&b))>>>16))>>>16,s&=65535,_=m>>>16,f=65535&h|c<<16,r.__setDigit(n,f)}for(;0!==a||0!==s||0!==_;n++){var w=r.__digit(n),k=(65535&w)+s,D=(w>>>16)+(k>>>16)+_+a;s=0,_=0,a=D>>>16,w=65535&k|D<<16,r.__setDigit(n,w)}}}},{key:"__internalMultiplyAdd",value:function(t,e,r,n,i){for(var o=r,a=0,s=0;s>>16;var h=u(_>>>16,e),c=(65535&h)+(l>>>16)+o;o=c>>>16,a=h>>>16,i.__setDigit(s,c<<16|65535&f)}if(i.length>n)for(i.__setDigit(n++,o+a);n>>0,a=0|o/e,s=0|(o=((n=0|o%e)<<16|t.__halfDigit(i-1))>>>0)/e;n=0|o%e,r.__setDigit(i>>>1,a<<16|s)}return r}},{key:"__absoluteModSmall",value:function(t,e){for(var r=0,n=2*t.length-1;0<=n;n--)r=0|((r<<16|t.__halfDigit(n))>>>0)%e;return r}},{key:"__absoluteDivLarge",value:function(t,e,r,n){var i=e.__halfDigitLength(),o=e.length,a=t.__halfDigitLength()-i,s=null;r&&(s=new l(a+2>>>1,!1)).__initializeDigits();var _=new l(i+2>>>1,!1);_.__initializeDigits();var f=l.__clz16(e.__halfDigit(i-1));0>>0;p=0|y/c;for(var b=0|y%c,m=e.__halfDigit(i-2),w=h.__halfDigit(d+i-2);u(p,m)>>>0>(b<<16|w)>>>0&&(p--,!(65535<(b+=c))););}l.__internalMultiplyAdd(e,p,0,o,_);var k=h.__inplaceSub(_,d,i+1);0!==k&&(k=h.__inplaceAdd(e,d,i),h.__setHalfDigit(d+i,h.__halfDigit(d+i)+k),p--),r&&(1&d?g=p<<16:s.__setDigit(d>>>1,g|p))}return n?(h.__inplaceRightShift(f),r?{quotient:s,remainder:h}:h):r?s:void 0}},{key:"__clz16",value:function(t){return _(t)-16}},{key:"__specialLeftShift",value:function(t,e,r){var n=t.length,i=new l(n+r,!1);if(0===e){for(var o=0;o>>32-e;return 0r)throw new RangeError("BigInt too big");var n=r>>>5,i=31&r,o=t.length,a=0!==i&&0!=t.__digit(o-1)>>>32-i,s=o+n+(a?1:0),u=new l(s,t.sign);if(0===i){for(var _=0;_>>32-i;if(a)u.__setDigit(o+n,f);else if(0!==f)throw new Error("implementation bug")}return u.__trim()}},{key:"__rightShiftByAbsolute",value:function(t,e){var r=t.length,n=t.sign,i=l.__toShiftAmount(e);if(0>i)return l.__rightShiftByMaximum(n);var o=i>>>5,a=31&i,s=r-o;if(0>=s)return l.__rightShiftByMaximum(n);var u=!1;if(n)if(0!=(t.__digit(o)&(1<>>a,d=r-o-1,p=0;p>>a;f.__setDigit(d,g)}return u&&(f=l.__absoluteAddOne(f,!0,f)),f.__trim()}},{key:"__rightShiftByMaximum",value:function(t){return t?l.__oneDigit(1,!0):l.__zero()}},{key:"__toShiftAmount",value:function(t){if(1l.__kMaxLengthBits?-1:e}},{key:"__toPrimitive",value:function(e){var r=1>>5,n=new l(r,e.sign),i=r-1,o=0;o>>s}return n.__setDigit(i,a),n.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(t,e,r){for(var n=Math.min,i=t+31>>>5,o=new l(i,r),a=0,s=i-1,u=0,_=n(s,e.length);a<_;a++){var f=e.__digit(a),h=0-(65535&f)-u,c=0-(f>>>16)-(u=1&h>>>16);u=1&c>>>16,o.__setDigit(a,65535&h|c<<16)}for(;a>>16)-(u=1&v>>>16)<<16}else{var y=32-p,b=1<<32-y,m=(65535&b)-(65535&(d=d<>>y))-u;g=65535&m|(b>>>16)-(d>>>16)-(u=1&m>>>16)<<16,g&=b-1}return o.__setDigit(s,g),o.__trim()}},{key:"__digitPow",value:function(t,e){for(var r=1;0>>=1,t*=t;return r}}]),l}(l(Array));return c.__kMaxLength=33554432,c.__kMaxLengthBits=c.__kMaxLength<<5,c.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],c.__kBitsPerCharTableShift=5,c.__kBitsPerCharTableMultiplier=1<a)throw new Error(s);let u=i.filter(t=>!r.includes(t));if(i.length-u.length!==o)throw new Error(s);if(u.find(t=>!n.includes(t)))throw new Error(s)}function u(t,e){if(!/^0x([0-9a-fA-F][0-9a-fA-F])*$/.test(e))throw new Error(t+" must be a hex string!")}function _(t,e){if(u(t,e),66!=e.length)throw new Error(t+" must be a hex string of 66 bytes long!")}function l(t,e){if("0x0"!==e&&!/^0x[1-9a-fA-F][0-9a-fA-F]*$/.test(e))throw new Error(t+" must be a hex integer!")}function f(t,{nestedValidation:e=!0,debugPath:r="script"}={}){if(s(r,t,["code_hash","hash_type","args"],[]),_(r+".code_hash",t.code_hash),u(r+".args",t.args),"data"!==t.hash_type&&"type"!==t.hash_type)throw new Error(r+".hash_type must be either data or type!")}function h(t,{nestedValidation:e=!0,debugPath:r="out_point"}={}){s(r,t,["tx_hash","index"],[]),_(r+".tx_hash",t.tx_hash),l(r+".index",t.index)}function c(t,{nestedValidation:e=!0,debugPath:r="cell_input"}={}){s(r,t,["since","previous_output"],[]),l(r+".since",t.since),e&&h(t.previous_output,{debugPath:r+".previous_output"})}function g(t,{nestedValidation:e=!0,debugPath:r="cell_output"}={}){s(r,t,["capacity","lock"],["type"]),l(r+".capacity",t.capacity),e&&(f(t.lock,{debugPath:r+".lock"}),t.type&&f(t.type,{debugPath:r+".type"}))}function d(t,{nestedValidation:e=!0,debugPath:r="cell_dep"}={}){if(s(r,t,["out_point","dep_type"],[]),"code"!==t.dep_type&&"dep_group"!==t.dep_type)throw new Error(r+".dep_type must be either code or dep_group!");e&&h(t.out_point,{debugPath:r+".out_point"})}function p(t,e,r,n){if(!Array.isArray(e))throw new Error(t+" is not an array!");if(n)for(let n=0;n-1};function _(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t,e,r,n=c(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=g(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function D(t,r){return new Promise((function(n,o){var a=new b(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}D.polyfill=!0,t.fetch||(t.fetch=D,t.Headers=h,t.Request=b,t.Response=w),e.Headers=h,e.Request=b,e.Response=w,e.fetch=D}({})}(r),delete r.fetch.polyfill,(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}));function x(t,e){e=e||{};const r=Object.assign({},e.headers||{},t.headers||{});return Object.assign({},e,t,{headers:r})}const O={get:(t,e,r)=>"send"===e?async()=>{const e=await t.fetch(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.payload)},t.defaultOptions));return await e.json()}:(...n)=>{const i=t.id;return t.id=t.id+1,t.payload.push({jsonrpc:"2.0",id:i,method:e,params:n}),r}},C={get:(t,e)=>"batch"===e?()=>new Proxy({id:Math.round(1e7*Math.random()),payload:[],uri:t.uri,defaultOptions:t.defaultOptions},O):async(...r)=>{const n=Math.round(1e7*Math.random()),i=await t.fetch(t.uri,x({method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:n,method:e,params:r})},t.defaultOptions)),o=await i.json();if(o.id!==n)throw new Error("JSONRPCError: response ID does not match request ID!");if(o.error)throw new Error("JSONRPCError: server error "+JSON.stringify(o.error));return o.result}};class I{constructor(t,e={},r=S){return this.uri=t,this.defaultOptions=e,this.fetch=r,new Proxy(this,C)}static create(t){return new I(t)}}function j(t){return a.BigInt(t)}function R(t){return"0x"+t.toString(16)}function z(t){return function(e,r){if(!(r instanceof ArrayBuffer)){let n=R(a.BigInt(r)).substr(2);if(n.length%2!=0&&(n="0"+n),n.length/2>t)throw new Error(`${e} is ${n.length/2} bytes long, expected length is ${t}!`);const i=new DataView(new ArrayBuffer(t));for(let t=0;t0&&r.byteLength!==t)throw new Error(`${e} has invalid length ${r.byteLength}, required: ${t}`);return r}}function N(t,e,r){const n={};for(const[i,o]of Object.entries(r)){const r=e[i];if(!r)throw new Error(`${t} is missing ${i}!`);n[i]=o(`${t}.${i}`,r)}return n}function L(t,{debugPath:e="script"}={}){return N(e,t,{code_hash:M(32),hash_type:function(t,e){switch(e){case"data":return 0;case"type":return 1;case 0:case 1:return e;default:throw new Error(`${t}.hash_type has invalid value: ${e}`)}},args:M(-1)})}function U(t,{debugPath:e="out_point"}={}){return N(e,t,{tx_hash:M(32),index:z(4)})}function V(t){return function(e,r){return t(r,{debugPath:e})}}function q(t,{debugPath:e="cell_input"}={}){return N(e,t,{since:z(8),previous_output:V(U)})}function $(t,{debugPath:e="cell_output"}={}){const r=N(e,t,{capacity:z(8),lock:V(L)});return t.type&&(r.type_=L(t.type,{debugPath:e+".type"})),r}function F(t,{debugPath:e="cell_dep"}={}){return N(e,t,{out_point:V(U),dep_type:function(t,e){switch(e){case"code":return 0;case"dep_group":return 1;case 0:case 1:return e;default:throw new Error(`${t}.dep_type has invalid value: ${e}`)}}})}function H(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function G(t,{debugPath:e="raw_transaction"}={}){return N(e,t,{version:z(4),cell_deps:H(V(F)),header_deps:H(M(32)),inputs:H(V(q)),outputs:H(V($)),outputs_data:H(M(-1))})}function W(t,{debugPath:e="transaction"}={}){const r=G(t,{debugPath:"(raw)"+e}),n=N(e,t,{witnesses:H(M(-1))});return n.raw=r,n}function J(t,{debugPath:e="raw_header"}={}){return N(e,t,{version:z(4),compact_target:z(4),timestamp:z(8),number:z(8),epoch:z(8),parent_hash:M(32),transactions_root:M(32),proposals_hash:M(32),uncles_hash:M(32),dao:M(32)})}function X(t,{debugPath:e="header"}={}){const r=J(t,{debugPath:"(raw)"+e}),n=N(e,t,{nonce:z(16)});return n.raw=r,n}function Q(t,{debugPath:e="uncle_block"}={}){return N(e,t,{header:V(X),proposals:H(M(10))})}var K=Object.freeze({__proto__:null,NormalizeScript:L,NormalizeOutPoint:U,NormalizeCellInput:q,NormalizeCellOutput:$,NormalizeCellDep:F,NormalizeRawTransaction:G,NormalizeTransaction:W,NormalizeRawHeader:J,NormalizeHeader:X,NormalizeUncleBlock:Q,NormalizeBlock:function(t,{debugPath:e="block"}={}){return N(e,t,{header:V(X),uncles:H(V(Q)),transactions:H(V(W)),proposals:H(M(10))})},NormalizeCellbaseWitness:function(t,{debugPath:e="cellbase_witness"}={}){return N(e,t,{lock:V(L),message:M(-1)})},NormalizeWitnessArgs:function(t,{debugPath:e="witness_args"}={}){const r={};return t.lock&&(r.lock=M(-1)(e+".lock",t.lock)),t.input_type&&(r.input_type=M(-1)(e+".input_type",t.input_type)),t.output_type&&(r.output_type=M(-1)(e+".output_type",t.output_type)),r}});function Y(t,e){return e instanceof Object&&e.serializeJson instanceof Function?e.serializeJson.call(e):e}function Z(t,e,r){if(!((e=Y(0,e))instanceof Object))throw new Error(`Transformed ${t} is not an object!`);const n={};for(const[i,o]of Object.entries(r)){let r=e[i];if(!r){r=e[i.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))]}r&&(n[i]=o(`${t}.${i}`,r))}return n}function tt(t,{validation:e=!0,debugPath:r="script"}={}){return t=Z(r,t,{code_hash:Y,hash_type:Y,args:Y}),e&&f(t,{debugPath:"(transformed) "+r}),t}function et(t,{validation:e=!0,debugPath:r="out_point"}={}){return t=Z(r,t,{tx_hash:Y,index:Y}),e&&h(t,{debugPath:"(transformed) "+r}),t}function rt(t){return function(e,r){return t(r,{validation:!1,debugPath:e})}}function nt(t,{validation:e=!0,debugPath:r="cell_input"}={}){return t=Z(r,t,{since:Y,previous_output:rt(et)}),e&&c(t,{debugPath:"(transformed) "+r}),t}function it(t,{validation:e=!0,debugPath:r="cell_output"}={}){return t=Z(r,t,{capacity:Y,lock:rt(tt),type:rt(tt)}),e&&g(t,{debugPath:"(transformed) "+r}),t}function ot(t,{validation:e=!0,debugPath:r="cell_dep"}={}){return t=Z(r,t,{out_point:rt(et),dep_type:Y}),e&&d(t,{debugPath:"(transformed) "+r}),t}function at(t){return function(e,r){return r.map((r,n)=>t(`${e}[${n}]`,r))}}function st(t,{validation:e=!0,debugPath:r="transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y),witnesses:at(Y)}),e&&m(t,{debugPath:"(transformed) "+r}),t}function ut(t,{validation:e=!0,debugPath:r="header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y,nonce:Y}),e&&k(t,{debugPath:"(transformed) "+r}),t}function _t(t,{validation:e=!0,debugPath:r="uncle_block"}={}){return t=Z(r,t,{header:rt(ut),proposals:at(Y)}),e&&B(t,{debugPath:"(transformed) "+r}),t}var lt=Object.freeze({__proto__:null,TransformScript:tt,TransformOutPoint:et,TransformCellInput:nt,TransformCellOutput:it,TransformCellDep:ot,TransformRawTransaction:function(t,{validation:e=!0,debugPath:r="raw_transaction"}={}){return t=Z(r,t,{version:Y,cell_deps:at(rt(ot)),header_deps:at(Y),inputs:at(rt(nt)),outputs:at(rt(it)),outputs_data:at(Y)}),e&&b(t,{debugPath:"(transformed) "+r}),t},TransformTransaction:st,TransformRawHeader:function(t,{validation:e=!0,debugPath:r="raw_header"}={}){return t=Z(r,t,{version:Y,compact_target:Y,timestamp:Y,number:Y,epoch:Y,parent_hash:Y,transactions_root:Y,proposals_hash:Y,uncles_hash:Y,dao:Y}),e&&w(t,{debugPath:"(transformed) "+r}),t},TransformHeader:ut,TransformUncleBlock:_t,TransformBlock:function(t,{validation:e=!0,debugPath:r="block"}={}){return t=Z(r,t,{header:rt(ut),uncles:at(rt(_t)),transactions:at(rt(st)),proposals:at(Y)}),e&&P(t,{debugPath:"(transformed) "+r}),t},TransformCellbaseWitness:function(t,{validation:e=!0,debugPath:r="cellbase_witness"}={}){return t=Z(r,t,{lock:rt(tt),message:Y}),e&&T(t,{debugPath:"(transformed) "+r}),t},TransformWitnessArgs:function(t,{validation:e=!0,debugPath:r="witness_args"}={}){return t=Z(r,t,{lock:Y,input_type:Y,output_type:Y}),e&&A(t,{debugPath:"(transformed) "+r}),t}});var ft=Object.freeze({__proto__:null,RPCCollector:class{constructor(t,e,{skipCellWithContent:r=!0,loadData:i=!1,loadBlockNumber:o=!0}={}){this.rpc=t,this.lockHash=new n(e).serializeJson(),this.skipCellWithContent=r,this.loadData=i,this.loadBlockNumber=o}async*collect(){const t=j(await this.rpc.get_tip_block_number());let e=a.BigInt(0);for(;a.lessThanOrEqual(e,t);){let r=a.add(e,a.BigInt(100));a.greaterThan(r,t)&&(r=t);const n=await this.rpc.get_cells_by_lock_hash(this.lockHash,R(e),R(r));for(const t of n){if(this.skipCellWithContent&&(t.type||a.greaterThan(j(t.output_data_len),a.BigInt(100))))continue;let e=null;if(this.loadData){e=(await this.rpc.get_live_cell(t.out_point,!0)).cell.data.content}let r=null;if(this.loadBlockNumber){r=(await this.rpc.get_header(t.block_hash)).number}yield{cellbase:t.cellbase,cell_output:{capacity:t.capacity,lock:t.lock,type:t.type},out_point:t.out_point,block_hash:t.block_hash,data:e,output_data_len:t.output_data_len,block_number:r}}e=a.add(r,a.BigInt(1))}}}});t.BigIntToHexString=R,t.HexStringToBigInt=j,t.RPC=I,t.Reader=n,t.TransactionDumper=class{constructor(t,{validateTransaction:e=!0,depGroupUnpacker:r=null}={}){this.rpc=t,this.validateTransaction=e,this.depGroupUnpacker=r}async dumpByHash(t){const e=(await this.rpc.get_transaction(t)).transaction;return delete e.hash,await this.dump(e)}async dump(t){this.validateTransaction&&m(t);const e=[];for(const r of t.inputs){const{output:t,data:n,header:i}=await this._resolveOutPoint(r.previous_output);e.push({input:r,output:t,data:n,header:i})}const r=[];for(const e of t.cell_deps){const{output:t,data:i,header:o}=await this._resolveOutPoint(e.out_point);if(r.push({cell_dep:e,output:t,data:i,header:o}),"dep_group"===e.dep_type){if(!this.depGroupUnpacker)throw new Error("depGroupUnpacker must be provided when the transaction contains dep_group!");const t=this.depGroupUnpacker(new n(i));for(const e of t){h(e);const{output:t,data:n,header:i}=await this._resolveOutPoint(e);r.push({cell_dep:{out_point:e,dep_type:"code"},output:t,data:n,header:i})}}}const i=[];for(const e of t.header_deps)i.push(await this.rpc.get_header(e));return JSON.stringify({mock_info:{inputs:e,cell_deps:r,header_deps:i},tx:t})}async _resolveOutPoint(t){const e=await this.rpc.get_transaction(t.tx_hash);if(!e||!e.transaction)throw new Error(`Transaction ${t.tx_hash} cannot be found!`);const r=e.transaction,n=a.toNumber(a.BigInt(t.index));if(n>=r.outputs.length)throw new Error(`Transaction ${t.tx_hash} does not have output ${n}!`);const i={output:r.outputs[n],data:r.outputs_data[n]};return"committed"===e.tx_status.status&&(i.header=e.tx_status.block_hash),i}},t.VERSION="0.10.2",t.cell_collectors=ft,t.normalizers=K,t.transformers=lt,t.validators=E,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/package-lock.json b/package-lock.json index ee42d67..d980ea4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,136 +1,177 @@ { "name": "ckb-js-toolkit", "version": "0.10.2", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@babel/code-frame": { + "packages": { + "": { + "name": "ckb-js-toolkit", + "version": "0.10.2", + "license": "MIT", + "dependencies": { + "cross-fetch": "^3.0.6", + "jsbi": "^3.1.2" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^15.0.0", + "@rollup/plugin-node-resolve": "^9.0.0", + "@rollup/plugin-replace": "^2.3.3", + "ava": "^3.5.0", + "prettier": "1.19.1", + "rollup": "^2.22.0", + "rollup-plugin-terser": "^7.0.2" + } + }, + "node_modules/@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, - "requires": { + "dependencies": { "@babel/highlight": "^7.8.3" } }, - "@babel/helper-validator-identifier": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, - "@babel/highlight": { + "node_modules/@babel/highlight": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "dev": true, - "requires": { + "dependencies": { "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@concordance/react": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@concordance/react": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==", "dev": true, - "requires": { + "dependencies": { "arrify": "^1.0.1" }, - "dependencies": { - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - } + "engines": { + "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" + } + }, + "node_modules/@concordance/react/node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "@nodelib/fs.scandir": { + "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", "dev": true, - "requires": { + "dependencies": { "@nodelib/fs.stat": "2.0.3", "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" } }, - "@nodelib/fs.stat": { + "node_modules/@nodelib/fs.stat": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 8" + } }, - "@nodelib/fs.walk": { + "node_modules/@nodelib/fs.walk": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", "dev": true, - "requires": { + "dependencies": { "@nodelib/fs.scandir": "2.1.3", "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, - "@rollup/plugin-commonjs": { + "node_modules/@rollup/plugin-commonjs": { "version": "15.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-15.0.0.tgz", "integrity": "sha512-8uAdikHqVyrT32w1zB9VhW6uGwGjhKgnDNP4pQJsjdnyF4FgCj6/bmv24c7v2CuKhq32CcyCwRzMPEElaKkn0w==", "dev": true, - "requires": { + "dependencies": { "@rollup/pluginutils": "^3.1.0", "commondir": "^1.0.1", "estree-walker": "^2.0.1", @@ -139,24 +180,31 @@ "magic-string": "^0.25.7", "resolve": "^1.17.0" }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^2.22.0" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, "dependencies": { - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@rollup/plugin-node-resolve": { + "node_modules/@rollup/plugin-node-resolve": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", "dev": true, - "requires": { + "dependencies": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", "builtin-modules": "^3.1.0", @@ -164,254 +212,320 @@ "is-module": "^1.0.0", "resolve": "^1.17.0" }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/plugin-node-resolve/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, "dependencies": { - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@rollup/plugin-replace": { + "node_modules/@rollup/plugin-replace": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.3.tgz", "integrity": "sha512-XPmVXZ7IlaoWaJLkSCDaa0Y6uVo5XQYHhiMFzOd5qSv5rE+t/UJToPIOE56flKIxBFQI27ONsxb7dqHnwSsjKQ==", "dev": true, - "requires": { + "dependencies": { "@rollup/pluginutils": "^3.0.8", "magic-string": "^0.25.5" + }, + "peerDependencies": { + "rollup": "^1.20.0 || ^2.0.0" } }, - "@rollup/pluginutils": { + "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, - "requires": { + "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" }, - "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - } + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" } }, - "@sindresorhus/is": { + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "@szmarczak/http-timer": { + "node_modules/@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, - "requires": { + "dependencies": { "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" } }, - "@types/color-name": { + "node_modules/@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, - "@types/estree": { + "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "@types/events": { + "node_modules/@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, - "@types/glob": { + "node_modules/@types/glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", "dev": true, - "requires": { + "dependencies": { "@types/events": "*", "@types/minimatch": "*", "@types/node": "*" } }, - "@types/minimatch": { + "node_modules/@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, - "@types/node": { + "node_modules/@types/node": { "version": "13.7.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.7.tgz", "integrity": "sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg==", "dev": true }, - "@types/normalize-package-data": { + "node_modules/@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, - "@types/resolve": { + "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, - "requires": { + "dependencies": { "@types/node": "*" } }, - "aggregate-error": { + "node_modules/aggregate-error": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", "dev": true, - "requires": { + "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "ansi-align": { + "node_modules/ansi-align": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", "dev": true, - "requires": { + "dependencies": { "string-width": "^3.0.0" + } + }, + "node_modules/ansi-align/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-align/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/ansi-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-align/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "ansi-regex": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, - "requires": { + "dependencies": { "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "anymatch": { + "node_modules/anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, - "requires": { + "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "argparse": { + "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "requires": { + "dependencies": { "sprintf-js": "~1.0.2" } }, - "array-find-index": { + "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "array-union": { + "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "arrgv": { + "node_modules/arrgv": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz", "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.0.0" + } }, - "arrify": { + "node_modules/arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "astral-regex": { + "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "ava": { + "node_modules/ava": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/ava/-/ava-3.5.0.tgz", "integrity": "sha512-o+xq1RgAZrQ7GX5nddTNeYbUDogwlBoa/Hnt+b1ciCLLxSOj5U6ZFblLNBSKwHtP1X/8R06bmzvX47jmlVu9KQ==", "dev": true, - "requires": { + "dependencies": { "@concordance/react": "^2.0.0", "ansi-styles": "^4.2.1", "arrgv": "^1.0.2", @@ -464,32 +578,41 @@ "update-notifier": "^4.1.0", "write-file-atomic": "^3.0.1", "yargs": "^15.1.0" + }, + "bin": { + "ava": "cli.js" + }, + "engines": { + "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0" } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "binary-extensions": { + "node_modules/binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "blueimp-md5": { + "node_modules/blueimp-md5": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.12.0.tgz", "integrity": "sha512-zo+HIdIhzojv6F1siQPqPFROyVy7C50KzHv/k/Iz+BtvtVzSHXiMXOpq2wCfNkeBqdCv+V8XOV96tsEt2W/3rQ==", "dev": true }, - "boxen": { + "node_modules/boxen": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, - "requires": { + "dependencies": { "ansi-align": "^3.0.0", "camelcase": "^5.3.1", "chalk": "^3.0.0", @@ -499,52 +622,65 @@ "type-fest": "^0.8.1", "widest-line": "^3.1.0" }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" } }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "braces": { + "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "requires": { + "dependencies": { "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" } }, - "buffer-from": { + "node_modules/buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "builtin-modules": { + "node_modules/builtin-modules": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "cacheable-request": { + "node_modules/cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, - "requires": { + "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", @@ -553,197 +689,245 @@ "normalize-url": "^4.1.0", "responselike": "^1.0.2" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, "dependencies": { - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "camelcase": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "chalk": { + "node_modules/chalk": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" } }, - "chokidar": { + "node_modules/chokidar": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", "dev": true, - "requires": { + "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.3.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.2" } }, - "chunkd": { + "node_modules/chunkd": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz", "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==", "dev": true }, - "ci-info": { + "node_modules/ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "ci-parallel-vars": { + "node_modules/ci-parallel-vars": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.0.tgz", "integrity": "sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g==", "dev": true }, - "clean-stack": { + "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "clean-yaml-object": { + "node_modules/clean-yaml-object": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "cli-boxes": { + "node_modules/cli-boxes": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "cli-cursor": { + "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, - "requires": { + "dependencies": { "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" } }, - "cli-spinners": { + "node_modules/cli-spinners": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.2.0.tgz", "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "cli-truncate": { + "node_modules/cli-truncate": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, - "requires": { + "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "cliui": { + "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, - "requires": { + "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, - "clone": { + "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8" + } }, - "clone-response": { + "node_modules/clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, - "requires": { + "dependencies": { "mimic-response": "^1.0.0" } }, - "code-excerpt": { + "node_modules/code-excerpt": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, - "requires": { + "dependencies": { "convert-to-spaces": "^1.0.1" + }, + "engines": { + "node": ">=4" } }, - "color-convert": { + "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "requires": { + "dependencies": { "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "commander": { + "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "common-path-prefix": { + "node_modules/common-path-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, - "commondir": { + "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concordance": { + "node_modules/concordance": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/concordance/-/concordance-4.0.0.tgz", "integrity": "sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ==", "dev": true, - "requires": { + "dependencies": { "date-time": "^2.1.0", "esutils": "^2.0.2", "fast-diff": "^1.1.2", @@ -756,136 +940,168 @@ "semver": "^5.5.1", "well-known-symbols": "^2.0.0" }, + "engines": { + "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" + } + }, + "node_modules/concordance/node_modules/md5-hex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", + "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", + "dev": true, "dependencies": { - "md5-hex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", - "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - } + "md5-o-matic": "^0.1.1" + }, + "engines": { + "node": ">=4" } }, - "configstore": { + "node_modules/configstore": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, - "requires": { + "dependencies": { "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", "make-dir": "^3.0.0", "unique-string": "^2.0.0", "write-file-atomic": "^3.0.0", "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "convert-source-map": { + "node_modules/convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "~5.1.1" } }, - "convert-to-spaces": { + "node_modules/convert-to-spaces": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", - "dev": true + "dev": true, + "engines": { + "node": ">= 4" + } }, - "cross-fetch": { + "node_modules/cross-fetch": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz", "integrity": "sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ==", - "requires": { + "dependencies": { "node-fetch": "2.6.1" } }, - "crypto-random-string": { + "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "currently-unhandled": { + "node_modules/currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, - "requires": { + "dependencies": { "array-find-index": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "date-time": { + "node_modules/date-time": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, - "requires": { + "dependencies": { "time-zone": "^1.0.0" + }, + "engines": { + "node": ">=4" } }, - "debug": { + "node_modules/debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", "dev": true, - "requires": { + "dependencies": { "ms": "^2.1.1" } }, - "decamelize": { + "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "decompress-response": { + "node_modules/decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, - "requires": { + "dependencies": { "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" } }, - "deep-extend": { + "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4.0.0" + } }, - "deepmerge": { + "node_modules/deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "defaults": { + "node_modules/defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, - "requires": { + "dependencies": { "clone": "^1.0.2" } }, - "defer-to-connect": { + "node_modules/defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, - "del": { + "node_modules/del": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", "dev": true, - "requires": { + "dependencies": { "globby": "^10.0.1", "graceful-fs": "^4.2.2", "is-glob": "^4.0.1", @@ -895,252 +1111,331 @@ "rimraf": "^3.0.0", "slash": "^3.0.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/del/node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, "dependencies": { - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - } - } - } - }, - "dir-glob": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "requires": { + "dependencies": { "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "dot-prop": { + "node_modules/dot-prop": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "dev": true, - "requires": { + "dependencies": { "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "duplexer3": { + "node_modules/duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, - "emittery": { + "node_modules/emittery": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.5.1.tgz", "integrity": "sha512-sYZXNHH9PhTfs98ROEFVC3bLiR8KSqXQsEHIwZ9J6H0RaQObC3JYq4G8IvDd0b45/LxfGKYBpmaUN4LiKytaNw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "emoji-regex": { + "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "end-of-stream": { + "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "requires": { + "dependencies": { "once": "^1.4.0" } }, - "equal-length": { + "node_modules/equal-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "error-ex": { + "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "requires": { + "dependencies": { "is-arrayish": "^0.2.1" } }, - "escape-goat": { + "node_modules/escape-goat": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "esprima": { + "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } }, - "estree-walker": { + "node_modules/estree-walker": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.1.tgz", "integrity": "sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==", "dev": true }, - "esutils": { + "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "fast-diff": { + "node_modules/fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, - "fast-glob": { + "node_modules/fast-glob": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", "dev": true, - "requires": { + "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", "micromatch": "^4.0.2", "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8" } }, - "fastq": { + "node_modules/fastq": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", "dev": true, - "requires": { + "dependencies": { "reusify": "^1.0.4" } }, - "figures": { + "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, - "requires": { + "dependencies": { "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "fill-range": { + "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "requires": { + "dependencies": { "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "find-up": { + "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "requires": { + "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { + "node_modules/fsevents": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", "dev": true, - "optional": true + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "get-caller-file": { + "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, - "get-stream": { + "node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, - "requires": { + "dependencies": { "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "glob": { + "node_modules/glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, - "requires": { + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "glob-parent": { + "node_modules/glob-parent": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", "dev": true, - "requires": { + "dependencies": { "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "global-dirs": { + "node_modules/global-dirs": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "dev": true, - "requires": { + "dependencies": { "ini": "^1.3.5" + }, + "engines": { + "node": ">=8" } }, - "globby": { + "node_modules/globby": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz", "integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==", "dev": true, - "requires": { + "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.1.1", "ignore": "^5.1.4", "merge2": "^1.3.0", "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "got": { + "node_modules/got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, - "requires": { + "dependencies": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", "cacheable-request": "^6.0.0", @@ -1152,616 +1447,766 @@ "p-cancelable": "^1.0.0", "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" } }, - "graceful-fs": { + "node_modules/graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, - "has-flag": { + "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "has-yarn": { + "node_modules/has-yarn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "hosted-git-info": { + "node_modules/hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, - "http-cache-semantics": { + "node_modules/http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, - "ignore": { + "node_modules/ignore": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true + "dev": true, + "engines": { + "node": ">= 4" + } }, - "ignore-by-default": { + "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, - "import-lazy": { + "node_modules/import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "import-local": { + "node_modules/import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", "dev": true, - "requires": { + "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" } }, - "imurmurhash": { + "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.19" + } }, - "indent-string": { + "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "requires": { + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "ini": { + "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "irregular-plurals": { + "node_modules/irregular-plurals": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz", "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-arrayish": { + "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-binary-path": { + "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "requires": { + "dependencies": { "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "is-ci": { + "node_modules/is-ci": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, - "requires": { + "dependencies": { "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" } }, - "is-error": { + "node_modules/is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==", "dev": true }, - "is-extglob": { + "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-glob": { + "node_modules/is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, - "requires": { + "dependencies": { "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-installed-globally": { + "node_modules/is-installed-globally": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.1.tgz", "integrity": "sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg==", "dev": true, - "requires": { + "dependencies": { "global-dirs": "^2.0.1", "is-path-inside": "^3.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "is-interactive": { + "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-module": { + "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "is-npm": { + "node_modules/is-npm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-number": { + "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.12.0" + } }, - "is-obj": { + "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-path-cwd": { + "node_modules/is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "is-path-inside": { + "node_modules/is-path-inside": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "is-plain-object": { + "node_modules/is-plain-object": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", "dev": true, - "requires": { + "dependencies": { "isobject": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-promise": { + "node_modules/is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-reference": { + "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, - "requires": { + "dependencies": { "@types/estree": "*" } }, - "is-typedarray": { + "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "is-yarn-global": { + "node_modules/is-yarn-global": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, - "isobject": { + "node_modules/isobject": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "jest-worker": { + "node_modules/jest-worker": { "version": "26.3.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", "dev": true, - "requires": { + "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" } }, - "js-string-escape": { + "node_modules/js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.8" + } }, - "js-tokens": { + "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { + "node_modules/js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, - "requires": { + "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "jsbi": { + "node_modules/jsbi": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.1.2.tgz", "integrity": "sha512-5nDXo1X9QVaXK/Cpb5VECV9ss1QPbjUuk1qSruHB1PK/g39Sd414K4nci99ElFDZv0vzxDEnKn3o49/Tn9Yagw==" }, - "json-buffer": { + "node_modules/json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, - "json-parse-better-errors": { + "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "keyv": { + "node_modules/keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, - "requires": { + "dependencies": { "json-buffer": "3.0.0" } }, - "latest-version": { + "node_modules/latest-version": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, - "requires": { + "dependencies": { "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" } }, - "lines-and-columns": { + "node_modules/lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, - "load-json-file": { + "node_modules/load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.15", "parse-json": "^4.0.0", "pify": "^4.0.1", "strip-bom": "^3.0.0", "type-fest": "^0.3.0" + }, + "engines": { + "node": ">=6" } }, - "locate-path": { + "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "requires": { + "dependencies": { "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" } }, - "lodash": { + "node_modules/lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, - "lodash.clonedeep": { + "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.flattendeep": { + "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, - "lodash.islength": { + "node_modules/lodash.islength": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.islength/-/lodash.islength-4.0.1.tgz", "integrity": "sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc=", "dev": true }, - "lodash.merge": { + "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "log-symbols": { + "node_modules/log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, - "requires": { + "dependencies": { "chalk": "^2.4.2" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "lowercase-keys": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "magic-string": { + "node_modules/magic-string": { "version": "0.25.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, - "requires": { + "dependencies": { "sourcemap-codec": "^1.4.4" } }, - "make-dir": { + "node_modules/make-dir": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", "dev": true, - "requires": { + "dependencies": { "semver": "^6.0.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "matcher": { + "node_modules/matcher": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.1.0.tgz", "integrity": "sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==", "dev": true, - "requires": { + "dependencies": { "escape-string-regexp": "^2.0.0" }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "md5-hex": { + "node_modules/matcher/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/md5-hex": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", "dev": true, - "requires": { + "dependencies": { "blueimp-md5": "^2.10.0" + }, + "engines": { + "node": ">=8" } }, - "md5-o-matic": { + "node_modules/md5-o-matic": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", "dev": true }, - "merge-stream": { + "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "merge2": { + "node_modules/merge2": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 6" + } }, - "micromatch": { + "node_modules/micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", "dev": true, - "requires": { + "dependencies": { "braces": "^3.0.1", "picomatch": "^2.0.5" + }, + "engines": { + "node": ">=8" } }, - "mimic-fn": { + "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "mimic-response": { + "node_modules/mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "minimist": { + "node_modules/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "ms": { + "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mute-stream": { + "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "node-fetch": { + "node_modules/node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } }, - "normalize-package-data": { + "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "requires": { + "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, - "normalize-path": { + "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "normalize-url": { + "node_modules/normalize-url": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "requires": { + "dependencies": { "wrappy": "1" } }, - "onetime": { + "node_modules/onetime": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "dev": true, - "requires": { + "dependencies": { "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" } }, - "ora": { + "node_modules/ora": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/ora/-/ora-4.0.3.tgz", "integrity": "sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg==", "dev": true, - "requires": { + "dependencies": { "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-spinners": "^2.2.0", @@ -1770,785 +2215,1023 @@ "mute-stream": "0.0.8", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=8" } }, - "p-cancelable": { + "node_modules/p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "p-limit": { + "node_modules/p-limit": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, - "requires": { + "dependencies": { "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "requires": { + "dependencies": { "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, - "p-map": { + "node_modules/p-map": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, - "requires": { + "dependencies": { "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "p-try": { + "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "package-json": { + "node_modules/package-json": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, - "requires": { + "dependencies": { "got": "^9.6.0", "registry-auth-token": "^4.0.0", "registry-url": "^5.0.0", "semver": "^6.2.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "parse-json": { + "node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, - "requires": { + "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" } }, - "parse-ms": { + "node_modules/parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "path-exists": { + "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-type": { + "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "picomatch": { + "node_modules/picomatch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "pify": { + "node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "pkg-conf": { + "node_modules/pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", "dev": true, - "requires": { + "dependencies": { "find-up": "^3.0.0", "load-json-file": "^5.2.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-conf/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "pkg-dir": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-conf/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-conf/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "requires": { + "dependencies": { "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "plur": { + "node_modules/plur": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", "dev": true, - "requires": { + "dependencies": { "irregular-plurals": "^3.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "prepend-http": { + "node_modules/prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "prettier": { + "node_modules/prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } }, - "pretty-ms": { + "node_modules/pretty-ms": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-6.0.1.tgz", "integrity": "sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==", "dev": true, - "requires": { + "dependencies": { "parse-ms": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "pump": { + "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "requires": { + "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, - "pupa": { + "node_modules/pupa": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", "dev": true, - "requires": { + "dependencies": { "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "randombytes": { + "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.1.0" } }, - "rc": { + "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, - "requires": { + "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" } }, - "read-pkg": { + "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, - "requires": { + "dependencies": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", "parse-json": "^5.0.0", "type-fest": "^0.6.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, "dependencies": { - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "readdirp": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/readdirp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", "dev": true, - "requires": { + "dependencies": { "picomatch": "^2.0.7" + }, + "engines": { + "node": ">=8.10.0" } }, - "registry-auth-token": { + "node_modules/registry-auth-token": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", "dev": true, - "requires": { + "dependencies": { "rc": "^1.2.8" + }, + "engines": { + "node": ">=6.0.0" } }, - "registry-url": { + "node_modules/registry-url": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, - "requires": { + "dependencies": { "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve": { + "node_modules/resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, - "requires": { + "dependencies": { "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "resolve-cwd": { + "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "requires": { + "dependencies": { "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" } }, - "resolve-from": { + "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "responselike": { + "node_modules/responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, - "requires": { + "dependencies": { "lowercase-keys": "^1.0.0" } }, - "restore-cursor": { + "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, - "requires": { + "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" } }, - "reusify": { + "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "rimraf": { + "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "requires": { + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "rollup": { + "node_modules/rollup": { "version": "2.26.11", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.26.11.tgz", "integrity": "sha512-xyfxxhsE6hW57xhfL1I+ixH8l2bdoIMaAecdQiWF3N7IgJEMu99JG+daBiSZQjnBpzFxa0/xZm+3pbCdAQehHw==", "dev": true, - "requires": { + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { "fsevents": "~2.1.2" } }, - "rollup-plugin-terser": { + "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.10.4", "jest-worker": "^26.2.1", "serialize-javascript": "^4.0.0", "terser": "^5.0.0" }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/rollup-plugin-terser/node_modules/@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/rollup-plugin-terser/node_modules/@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/rollup-plugin-terser/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rollup-plugin-terser/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rollup-plugin-terser/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/rollup-plugin-terser/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/rollup-plugin-terser/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rollup-plugin-terser/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "run-parallel": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/run-parallel": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "dev": true }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "semver": { + "node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "dev": true, + "bin": { + "semver": "bin/semver" + } }, - "semver-diff": { + "node_modules/semver-diff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, - "requires": { + "dependencies": { "semver": "^6.3.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "serialize-error": { + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-error": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "serialize-javascript": { + "node_modules/serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, - "requires": { + "dependencies": { "randombytes": "^2.1.0" } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "signal-exit": { + "node_modules/signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "slash": { + "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "slice-ansi": { + "node_modules/slice-ansi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "source-map": { + "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "source-map-support": { + "node_modules/source-map-support": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "dev": true, - "requires": { + "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "sourcemap-codec": { + "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, - "spdx-correct": { + "node_modules/spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, - "requires": { + "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-exceptions": { + "node_modules/spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, - "spdx-expression-parse": { + "node_modules/spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, - "requires": { + "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-license-ids": { + "node_modules/spdx-license-ids": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "stack-utils": { + "node_modules/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.1.tgz", "integrity": "sha512-BvBTnHGm8boe+HiJFqP19ywEsGlfQAKqW78pbfvUuzCbUuxPPUyLrH5dYFY+Xn9IpLY3b5ZmMcl8jAqXB4wddg==", "dev": true, - "requires": { + "dependencies": { "escape-string-regexp": "^2.0.0" }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } + "engines": { + "node": ">=10" } }, - "string-width": { + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, - "requires": { + "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, - "requires": { + "dependencies": { "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "supertap": { + "node_modules/supertap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz", "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, - "requires": { + "dependencies": { "arrify": "^1.0.1", "indent-string": "^3.2.0", "js-yaml": "^3.10.0", "serialize-error": "^2.1.0", "strip-ansi": "^4.0.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supertap/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/supertap/node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supertap/node_modules/indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/supertap/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "supports-color": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, - "requires": { + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "temp-dir": { + "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "term-size": { + "node_modules/term-size": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "terser": { + "node_modules/terser": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.1.tgz", "integrity": "sha512-yD80f4hdwCWTH5mojzxe1q8bN1oJbsK/vfJGLcPZM/fl+/jItIVNKhFIHqqR71OipFWMLgj3Kc+GIp6CeIqfnA==", "dev": true, - "requires": { + "dependencies": { "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" } }, - "time-zone": { + "node_modules/time-zone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "to-readable-stream": { + "node_modules/to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "trim-off-newlines": { + "node_modules/trim-off-newlines": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "type-fest": { + "node_modules/type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "typedarray-to-buffer": { + "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "requires": { + "dependencies": { "is-typedarray": "^1.0.0" } }, - "unique-string": { + "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, - "requires": { + "dependencies": { "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "update-notifier": { + "node_modules/update-notifier": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", "dev": true, - "requires": { + "dependencies": { "boxen": "^4.2.0", "chalk": "^3.0.0", "configstore": "^5.0.1", @@ -2562,104 +3245,125 @@ "pupa": "^2.0.1", "semver-diff": "^3.1.1", "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "url-parse-lax": { + "node_modules/url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, - "requires": { + "dependencies": { "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "validate-npm-package-license": { + "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { + "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, - "wcwidth": { + "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", "dev": true, - "requires": { + "dependencies": { "defaults": "^1.0.3" } }, - "well-known-symbols": { + "node_modules/well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "which-module": { + "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "widest-line": { + "node_modules/widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, - "requires": { + "dependencies": { "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, - "xdg-basedir": { + "node_modules/xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "y18n": { + "node_modules/y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, - "requires": { + "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", @@ -2672,17 +3376,21 @@ "y18n": "^4.0.0", "yargs-parser": "^18.1.2" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, "dependencies": { - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" } } } diff --git a/src/rpc.js b/src/rpc.js index 495f0b0..012d3c6 100644 --- a/src/rpc.js +++ b/src/rpc.js @@ -1,4 +1,4 @@ -import fetch from "cross-fetch"; +import { default as crossFetch } from "cross-fetch"; import JSBI from "jsbi"; function mergeOptions(overrideOptions, defaultOptions) { @@ -17,7 +17,7 @@ const batchHandler = { get: (target, method, receiver) => { if (method === "send") { return async () => { - const response = await fetch( + const response = await target.fetch( target.uri, mergeOptions( { @@ -64,7 +64,7 @@ const handler = { } return async (...params) => { const id = Math.round(Math.random() * 10000000); - const response = await fetch( + const response = await target.fetch( target.uri, mergeOptions( { @@ -97,9 +97,10 @@ const handler = { }; export class RPC { - constructor(uri, defaultOptions = {}) { + constructor(uri, defaultOptions = {}, fetch = crossFetch) { this.uri = uri; this.defaultOptions = defaultOptions; + this.fetch = fetch; return new Proxy(this, handler); }