forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInjectedJSBundle.js
More file actions
2 lines (2 loc) Β· 506 KB
/
InjectedJSBundle.js
File metadata and controls
2 lines (2 loc) Β· 506 KB
1
2
/*! For license information please see InjectedJSBundle.js.LICENSE.txt */
(()=>{var e={6289:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const o=r(e[i]);t.push(o),n+=o.length}return f(o(n,192),...t)}const t=m(e);return 1===t.length&&t[0]<128?t:f(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(h(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(m(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,o,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):n(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=n(e,r,t+r),{data:o,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,s=n(e,1,t);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(r=l-246,t=i(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const o=r+t;if(o>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,o);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function h(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function f(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function d(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function g(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function m(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?h((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?`0${t}`:t):d(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?h(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:f,hexToBytes:h,utf8ToBytes:d},t.RLP={encode:r,decode:s}},6284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const n=r(6289),i=r(2019),o=r(6513),s=r(2672),a=r(7312),c=r(9838),u=r(5546),l=r(9498),h=BigInt(0);class f{constructor(e=h,t=h,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new f(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==r?(0,a.bufferToBigInt)((0,a.toBuffer)(r)):void 0,void 0!==n?(0,a.toBuffer)(n):void 0,void 0!==i?(0,a.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(n.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,i]=e;return new f((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<h)throw new Error("nonce must be greater than zero");if(this.balance<h)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,a.bigIntToUnpaddedBuffer)(this.nonce),(0,a.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return Buffer.from(n.RLP.encode((0,a.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(c.KECCAK256_NULL)}}function d(e){const[t,r,n,i]=e;return[t,r,0===(0,a.arrToBufArr)(n).length?c.KECCAK256_RLP:n,0===(0,a.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}t.Account=f,t.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const r=(0,l.stripHexPrefix)(e).toLowerCase();let n="";void 0!==t&&(n=(0,a.bufferToBigInt)((0,a.toBuffer)(t)).toString()+"0x");const o=Buffer.from(n+r,"utf8"),c=(0,s.bytesToHex)((0,i.keccak256)(o));let h="0x";for(let e=0;e<r.length;e++)parseInt(c[e],16)>=8?h+=r[e].toUpperCase():h+=r[e];return h},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,a.bufferToBigInt)(t)===BigInt(0)?Buffer.from((0,i.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):Buffer.from((0,i.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const n=(0,i.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,i.keccak256)(r)]));return(0,a.toBuffer)(n).slice(-20)},t.isValidPrivate=function(e){return o.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return o.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from(o.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return Buffer.from((0,i.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from(o.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=d;const p=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,i]=e;return[t,r,(0,a.arrToBufArr)(n).equals(c.KECCAK256_RLP)?p:n,(0,a.arrToBufArr)(i).equals(c.KECCAK256_NULL)?p:i]},t.accountBodyToRLP=function(e,t=!0){const r=t?d(e):e;return(0,a.arrToBufArr)(n.RLP.encode(r))}},6727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const n=r(6284),i=r(7312);class o{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new o((0,i.zeros)(20))}static fromString(e){if(!(0,n.isValidAddress)(e))throw new Error("Invalid address");return new o((0,i.toBuffer)(e))}static fromPublicKey(e){if(!Buffer.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,n.pubToAddress)(e);return new o(t)}static fromPrivateKey(e){if(!Buffer.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,n.privateToAddress)(e);return new o(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new o((0,n.generateAddress)(e.buf,(0,i.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!Buffer.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!Buffer.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new o((0,n.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(o.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}t.Address=o},8421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(7007);class i extends n.EventEmitter{emit(e,...t){let[r,n]=t;const i=this;let o=i._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(e,t,r){let n;for await(const i of t)try{i.length<2?i.call(e,r):await new Promise(((t,n)=>{i.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(i,o){r.removeListener(e,n),t(i,o)}:function(i){r.removeListener(e,n),t(i,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let i,o,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===t){o=i+a;break}return s.splice(o,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=i},7312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const n=r(5546),i=r(9498);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return Buffer.from((0,i.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const o=function(e,r,n){const i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,n.assertIsBuffer)(e),o(e,t,!1)},t.setLengthRight=function(e,t){return(0,n.assertIsBuffer)(e),o(e,t,!0)};const s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function a(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,n.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,n.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,n.assertIsHexString)(e),e=(0,i.stripHexPrefix)(e),"0x"+s(e)},t.toBuffer=function(e){if(null==e)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(e))return Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return Buffer.from(e);if("string"==typeof e){if(!(0,i.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return Buffer.from((0,i.padToEven)((0,i.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),Buffer.from(t,"hex")}if(e.toArray)return Buffer.from(e.toArray());if(e.toBuffer)return Buffer.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=a,t.bigIntToBuffer=c,t.bufferToInt=function(e){const t=Number(a(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,a(e))},t.toUnsigned=function(e){return c(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,i.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=Buffer.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"β¦"},t.toUtf8=function(e){if((e=(0,i.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(Buffer.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},9838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8287),i=r(6513);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},5062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1&~e.length||(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){const n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},5546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const n=r(9498);t.assertIsHexString=function(e){if(!(0,n.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!Buffer.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},8683:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(9838),t),i(r(2652),t),i(r(6284),t),i(r(6727),t),i(r(7380),t),i(r(2133),t),i(r(7312),t),i(r(2666),t),i(r(5062),t),i(r(8421),t);var o=r(9498);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(1708),t),i(r(1862),t)},9498:(e,t)=>{"use strict";function r(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function n(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=r,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return r(e)?e.slice(2):e},t.padToEven=n,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return Buffer.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${n(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received "+typeof o)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},1708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},1862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(6215);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const n=r(2019),i=r(6513),o=r(7312),s=r(9838),a=r(5546);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const n=i.secp256k1.sign(e,t),o=n.toCompactRawBytes();return{r:Buffer.from(o.slice(0,32)),s:Buffer.from(o.slice(32,64)),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,n,s){const a=Buffer.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(n,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");const h=i.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e);return Buffer.from(h.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(Buffer.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(r,32),(0,o.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");let i=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(i=Buffer.from(r),i[0]|=128),(0,o.bufferToHex)(Buffer.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(i,32)]))},t.fromRpcSig=function(e){const t=(0,o.toBuffer)(e);let r,n,i;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),i=(0,o.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),i=BigInt((0,o.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length)return!1;if(!u(c(e,i)))return!1;const a=(0,o.bufferToBigInt)(t),l=(0,o.bufferToBigInt)(r);return!(a===BigInt(0)||a>=s.SECP256K1_ORDER||l===BigInt(0)||l>=s.SECP256K1_ORDER||n&&l>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return Buffer.from((0,n.keccak256)(Buffer.concat([t,e])))}},2666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(7312),i=r(9498);var o;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},2652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},7380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const n=r(6727),i=r(7312),o=r(2666);class s{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:i,amount:a}=e,c=(0,o.toType)(t,o.TypeOutput.BigInt),u=(0,o.toType)(r,o.TypeOutput.BigInt),l=new n.Address((0,o.toType)(i,o.TypeOutput.Buffer)),h=(0,o.toType)(a,o.TypeOutput.BigInt);return new s(c,u,l,h)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,i]=e;return s.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){const{index:t,validatorIndex:r,address:i,amount:s}=e,a=(0,o.toType)(t,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(t,o.TypeOutput.Buffer),c=(0,o.toType)(r,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(r,o.TypeOutput.Buffer);let u;return u=i instanceof n.Address?i.buf:(0,o.toType)(i,o.TypeOutput.Buffer),[a,c,u,(0,o.toType)(s,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(s,o.TypeOutput.Buffer)]}raw(){return s.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}t.Withdrawal=s},2046:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8287).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c<a;c++){var u=e.charCodeAt(c)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(e,l,l+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(e,l,e.length,t),l=0;l<s;l++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){l(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var l=c>>>26,h=67108863&c,f=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=f;d++){var p=u-d|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[u]=0|h,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?g+r:f[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,c=r.words,u=0,l=0|s[0],h=8191&l,f=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,m=0|s[2],y=8191&m,b=m>>>13,w=0|s[3],v=8191&w,E=w>>>13,_=0|s[4],S=8191&_,x=_>>>13,I=0|s[5],A=8191&I,R=I>>>13,B=0|s[6],M=8191&B,T=B>>>13,P=0|s[7],C=8191&P,k=P>>>13,O=0|s[8],N=8191&O,L=O>>>13,j=0|s[9],U=8191&j,$=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],G=8191&H,Z=H>>>13,V=0|a[2],J=8191&V,W=V>>>13,q=0|a[3],Y=8191&q,K=q>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],he=8191&le,fe=le>>>13,de=0|a[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(h,D))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(f,D)|0))<<13)|0;u=((o=Math.imul(f,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(g,D)|0,o=Math.imul(g,z);var ye=(u+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,G)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(b,D)|0,o=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0;var be=(u+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,J)|0))<<13)|0;u=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(v,D),i=(i=Math.imul(v,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,W)|0;var we=(u+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,D),i=(i=Math.imul(S,z))+Math.imul(x,D)|0,o=Math.imul(x,z),n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,K)|0;var ve=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(R,D)|0,o=Math.imul(R,z),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var Ee=(u+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,D),i=(i=Math.imul(M,z))+Math.imul(T,D)|0,o=Math.imul(T,z),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,z))+Math.imul(k,D)|0,o=Math.imul(k,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var Se=(u+(n=n+Math.imul(h,ce)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,D),i=(i=Math.imul(N,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var xe=(u+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,z))+Math.imul($,D)|0,o=Math.imul($,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,ue)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,he)|0,o=o+Math.imul(g,fe)|0;var Ie=(u+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,Z))+Math.imul($,G)|0,o=Math.imul($,Z),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,fe)|0;var Ae=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,W))+Math.imul($,J)|0,o=Math.imul($,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,ue)|0,n=n+Math.imul(v,he)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(E,he)|0,o=o+Math.imul(E,fe)|0;var Re=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,K))+Math.imul($,Y)|0,o=Math.imul($,K),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,fe)|0;var Be=(u+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(E,pe)|0))<<13)|0;u=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul($,Q)|0,o=Math.imul($,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,ue)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,fe)|0;var Me=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul($,re)|0,o=Math.imul($,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(C,ce)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,ue)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(T,he)|0,o=o+Math.imul(T,fe)|0;var Te=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul($,oe)|0,o=Math.imul($,se),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,ue)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(k,he)|0,o=o+Math.imul(k,fe)|0;var Pe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(T,pe)|0))<<13)|0;u=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul($,ce)|0,o=Math.imul($,ue),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(L,he)|0,o=o+Math.imul(L,fe)|0;var Ce=(u+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(k,pe)|0))<<13)|0;u=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,he),i=(i=Math.imul(U,fe))+Math.imul($,he)|0,o=Math.imul($,fe);var ke=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(L,pe)|0))<<13)|0;u=((o=o+Math.imul(L,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Oe=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul($,pe)|0))<<13)|0;return u=((o=Math.imul($,ge))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,c[0]=me,c[1]=ye,c[2]=be,c[3]=we,c[4]=ve,c[5]=Ee,c[6]=_e,c[7]=Se,c[8]=xe,c[9]=Ie,c[10]=Ae,c[11]=Re,c[12]=Be,c[13]=Me,c[14]=Te,c[15]=Pe,c[16]=Ce,c[17]=ke,c[18]=Oe,0!==u&&(c[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var l=o-u,h=(0|e.words[l])*(0|t.words[u]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):b(this,e,t)},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},w.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},w.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=c,f=u,d=0;d<s;d++){var p=r[l+d],g=n[l+d],m=r[l+d+s],y=n[l+d+s],b=h*m-f*y;y=h*y+f*m,m=b,r[l+d]=p+m,n[l+d]=g+y,r[l+d+s]=p-m,n[l+d+s]=g-y,d!==a&&(b=c*h-u*f,f=c*f+u*h,h=b)}},w.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},w.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},w.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},w.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},w.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},w.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),u=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,u,n),this.transform(s,o,a,c,n,i),this.transform(u,o,l,h,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-c[d]*h[d];c[d]=a[d]*h[d]+c[d]*l[d],a[d]=p}return this.conjugate(a,c,n),this.transform(a,c,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<r;this.words[t]=c|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var h=0|this.words[u];this.words[u]=l<<26-o|h>>>o,l=h&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var l=n.clone()._ishlnsubmul(i,1,c);0===l.negative&&(n=l,a&&(a.words[c]=1));for(var h=c-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;!(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(h)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var h=0,f=1;!(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function E(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function R(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}E.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},E.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(e,t){e.iushrn(this.n,0,t)},E.prototype.imulK=function(e){return e.imul(this.k)},i(_,E),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(S,E),i(x,E),i(I,E),I.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return v[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var h=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var g=d,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m<p);var y=this.pow(h,new o(1).iushln(p-m-1));f=f.redMul(y),h=y.redSqr(),d=d.redMul(h),p=m}return f},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var h=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new R(e)},i(R,A),R.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},R.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},R.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSingle=t.decode=t.encodePacked=t.encodeSingle=t.encode=void 0;const n=r(2495),i=r(5961),o=r(7700);t.encode=(e,t,r,n)=>{try{return(0,o.pack)({types:e,values:t,packed:r,tight:n})}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to encode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.encodeSingle=(e,r)=>(0,t.encode)([e],[r]),t.encodePacked=(e,r,n)=>(0,t.encode)(e,r,!0,n),t.decode=(e,t)=>{const r=(0,n.createBytes)(t);try{return(0,o.unpack)(e,r)}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to decode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.decodeSingle=(e,r)=>{const o=(0,t.decode)([e],r);return(0,n.assert)(1===o.length,new i.ParserError("Decoded value array has unexpected length.")),o[0]}},5961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserError=t.getErrorStack=t.getErrorMessage=void 0;const n=r(2495);t.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.",t.getErrorStack=e=>{if(e instanceof Error)return e.stack};class i extends Error{constructor(e,r){super(e),this.name="ParserError";const n=(0,t.getErrorStack)(r);n&&(this.stack=n)}}t.ParserError=i},3256:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6498),t),i(r(5961),t),i(r(1126),t)},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterate=void 0;const n=r(2495);t.iterate=function*(e,t=32){for(let r=0;r<e.length;r+=t){const i=e=>{(0,n.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},o=e.subarray(r);yield{skip:i,value:o}}return{skip:()=>{},value:new Uint8Array}}},7700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=t.isDynamicParser=t.getParser=void 0;const n=r(2495),i=r(5961),o=r(7924),s=r(6207),a=r(8746);t.getParser=e=>{const t={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=t[e];if(r)return r;const n=Object.values(t).find((t=>t.isType(e)));if(n)return n;throw new i.ParserError(`The type "${e}" is not supported.`)},t.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r},t.pack=({types:e,values:r,packed:o=!1,tight:s=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,n.assert)(e.length===r.length,new i.ParserError(`The number of types (${e.length}) does not match the number of values (${r.length}).`));const{staticBuffer:l,dynamicBuffer:h,pointers:f}=e.reduce((({staticBuffer:e,dynamicBuffer:i,pointers:a},u,l)=>{const h=(0,t.getParser)(u),f=r[l];return o||c||!(0,t.isDynamicParser)(h,u)?{staticBuffer:h.encode({buffer:e,value:f,type:u,packed:o,tight:s}),dynamicBuffer:i,pointers:a}:{staticBuffer:(0,n.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:h.encode({buffer:i,value:f,type:u,packed:o,tight:s}),pointers:[...a,{position:e.length,pointer:i.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!o&&!c||0===h.length,new i.ParserError("Invalid pack state."));const d=l.length,p=f.reduce(((e,{pointer:t,position:r})=>{const i=(0,a.padStart)((0,n.numberToBytes)(d+t));return(0,a.set)(e,i,r)}),l);return(0,n.concatBytes)([u,p,h])},t.unpack=(e,r)=>{const s=(0,o.iterate)(r);return e.map((e=>{const{value:{value:o,skip:a},done:c}=s.next();(0,n.assert)(!c,new i.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const u=(0,t.getParser)(e);if((0,t.isDynamicParser)(u,e)){const t=(0,n.bytesToNumber)(o.subarray(0,32)),i=r.subarray(t);return u.decode({type:e,value:i,skip:a})}return u.decode({type:e,value:o,skip:a})}))}},1563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.address=t.getAddress=void 0;const n=r(2495),i=r(5961),o=r(8746);t.getAddress=e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(t.length<=20,new i.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,o.padStart)(t,20)},t.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:i}){const s=(0,t.getAddress)(r);if(i)return(0,n.concatBytes)([e,s]);const a=(0,o.padStart)(s);return(0,n.concatBytes)([e,a])},decode:({value:e})=>(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}},186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;const n=r(2495),i=r(5961),o=r(7700),s=r(8746),a=r(3415),c=r(717),u=/^(?<type>.*)\[(?<length>\d*?)\]$/u;t.isArrayType=e=>u.test(e),t.getArrayType=e=>{const t=e.match(u);return(0,n.assert)(t?.groups?.type,new i.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,t.array={isDynamic(e){const[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new i.ParserError(`Expected an array type, but received "${e}".`));const[r,s]=(0,t.getArrayType)(e);return(0,o.isDynamicParser)(this,e)||void 0===s?32:c.tuple.getByteLength((0,t.getTupleType)(r,s))},encode({type:e,buffer:r,value:u,packed:l,tight:h}){const[f,d]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(f),new i.ParserError("Cannot pack nested arrays.")),l&&(0,o.isDynamicParser)((0,o.getParser)(f),f))return(0,o.pack)({types:new Array(u.length).fill(f),values:u,byteArray:r,packed:l,arrayPacked:!0,tight:h});if(d)return(0,n.assert)(d===u.length,new i.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${u.length}.`)),c.tuple.encode({type:(0,t.getTupleType)(f,d),buffer:r,value:u,packed:a.fixedBytes.isType(f)&&h,tight:h});if(l)return(0,o.pack)({types:new Array(u.length).fill(f),values:u,byteArray:r,packed:a.fixedBytes.isType(f)&&h,arrayPacked:!0,tight:h});const p=(0,s.padStart)((0,n.numberToBytes)(u.length));return(0,o.pack)({types:new Array(u.length).fill(f),values:u,byteArray:(0,n.concatBytes)([r,p]),packed:l,tight:h})},decode({type:e,value:r,...s}){const[a,u]=(0,t.getArrayType)(e);if(u){const e=c.tuple.decode({type:(0,t.getTupleType)(a,u),value:r,...s});return(0,n.assert)(e.length===u,new i.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}const l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,o.unpack)(new Array(l).fill(a),r.subarray(32))}}},7435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bool=t.getBooleanValue=void 0;const n=r(5620),i=r(2495),o=r(5961),s=r(6150),a=(0,n.coerce)((0,n.boolean)(),(0,n.union)([(0,n.literal)("true"),(0,n.literal)("false")]),(e=>"true"===e));t.getBooleanValue=e=>{try{return(0,n.create)(e,a)?BigInt(1):BigInt(0)}catch{throw new o.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},t.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:o}){const a=(0,t.getBooleanValue)(r);return n?(0,i.concatBytes)([e,(0,i.bigIntToBytes)(a)]):s.number.encode({type:"uint256",buffer:e,value:a,packed:n,tight:o})},decode:e=>s.number.decode({...e,type:"uint256"})===BigInt(1)}},9356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=void 0;const n=r(2495),i=r(8746);t.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const o=(0,n.createBytes)(t);if(r)return(0,n.concatBytes)([e,o]);const s=32*Math.ceil(o.byteLength/32);return(0,n.concatBytes)([e,(0,i.padStart)((0,n.numberToBytes)(o.byteLength)),(0,i.padEnd)(o,s)])},decode({value:e}){const t=e.subarray(0,32),r=(0,n.bytesToNumber)(t);return e.slice(32,32+r)}}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedBytes=t.getByteLength=void 0;const n=r(2495),i=r(5961),o=r(8746),s=/^bytes([0-9]{1,2})$/u;t.getByteLength=e=>{const t=e.match(s)?.[1];(0,n.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,n.assert)(r>0&&r<=32,new i.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},t.fixedBytes={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:s,packed:a}){const c=(0,t.getByteLength)(e),u=(0,n.createBytes)(s);return(0,n.assert)(u.length<=c,new i.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),a?(0,n.concatBytes)([r,(0,o.padEnd)(u,c)]):(0,n.concatBytes)([r,(0,o.padEnd)(u)])},decode({type:e,value:r}){const n=(0,t.getByteLength)(e);return r.slice(0,n)}}},7827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fn=t.getFunction=void 0;const n=r(5620),i=r(2495),o=r(5961),s=r(3415),a=(0,n.coerce)((0,n.object)({address:i.StrictHexStruct,selector:i.StrictHexStruct}),(0,n.union)([i.StrictHexStruct,(0,n.instance)(Uint8Array)]),(e=>{const t=(0,i.createBytes)(e);return(0,i.assert)(24===t.length,new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,i.bytesToHex)(t.subarray(0,20)),selector:(0,i.bytesToHex)(t.subarray(20,24))}}));t.getFunction=e=>{const t=(0,n.create)(e,a);return(0,i.concatBytes)([(0,i.hexToBytes)(t.address),(0,i.hexToBytes)(t.selector)])},t.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:i}){const o=(0,t.getFunction)(r);return s.fixedBytes.encode({type:"bytes24",buffer:e,value:o,packed:n,tight:i})},decode:({value:e})=>({address:(0,i.bytesToHex)(e.slice(0,20)),selector:(0,i.bytesToHex)(e.slice(20,24))})}},6207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1563),t),i(r(186),t),i(r(7435),t),i(r(9356),t),i(r(3415),t),i(r(7827),t),i(r(6150),t),i(r(8160),t),i(r(8446),t),i(r(717),t)},6150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.getBigInt=t.assertNumberLength=t.getLength=t.isSigned=void 0;const n=r(2495),i=r(5961),o=r(8746),s=/^u?int(?<length>[0-9]*)?$/u;t.isSigned=e=>!e.startsWith("u"),t.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(s);(0,n.assert)(t?.groups?.length,new i.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new i.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,n.assert)(r%8==0,new i.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r},t.assertNumberLength=(e,r)=>{const o=(0,t.getLength)(r),s=BigInt(2)**BigInt(o-((0,t.isSigned)(r)?1:0))-BigInt(1);(0,t.isSigned)(r)?(0,n.assert)(e>=-(s+BigInt(1))&&e<=s,new i.ParserError(`Number "${e}" is out of range for type "${r}".`)):(0,n.assert)(e<=s,new i.ParserError(`Number "${e}" is out of range for type "${r}".`))},t.getBigInt=e=>{try{return(0,n.createBigInt)(e)}catch{throw new i.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},t.number={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:i,packed:s}){const a=(0,t.getBigInt)(i);if((0,t.assertNumberLength)(a,e),(0,t.isSigned)(e)){if(s){const i=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const i=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a),i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a))])},decode({type:e,value:r}){const i=r.subarray(0,32);if((0,t.isSigned)(e)){const r=(0,n.bytesToSignedBigInt)(i);return(0,t.assertNumberLength)(r,e),r}const o=(0,n.bytesToBigInt)(i);return(0,t.assertNumberLength)(o,e),o}}},8160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.string=void 0;const n=r(2495),i=r(9356);t.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:o})=>i.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(t),packed:r,tight:o}),decode:e=>(0,n.bytesToString)(i.bytes.decode(e))}},717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;const n=r(2495),i=r(5961),o=r(7700),s=/^\((.+)\)$/u;t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new i.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",o=0;for(let n=1;n<e.length-1;n++){const i=e[n];","===i&&0===o?(t.push(r.trim()),r=""):(r+=i,"("===i?o+=1:")"===i&&(o-=1))}return r.trim()&&t.push(r.trim()),t},t.tuple={isDynamic:e=>(0,t.getTupleElements)(e).some((e=>{const t=(0,o.getParser)(e);return(0,o.isDynamicParser)(t,e)})),isType:e=>(e=>s.test(e))(e),getByteLength(e){return(0,o.isDynamicParser)(this,e)?32:(0,t.getTupleElements)(e).reduce(((e,t)=>e+(0,o.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:r,value:n,packed:i,tight:s}){const a=(0,t.getTupleElements)(e);return(0,o.pack)({types:a,values:n,byteArray:r,packed:i,tight:s})},decode({type:e,value:r,skip:n}){const i=(0,t.getTupleElements)(e);return n(this.getByteLength(e)-32),(0,o.unpack)(i,r)}}},5744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1126:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5744),t)},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=t.padStart=t.set=void 0;const n=r(2495);t.set=(e,t,r)=>(0,n.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]),t.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([r,e])},t.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([e,r])}},8746:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9194),t)},7557:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=r,t.bool=n,t.isBytes=i,t.bytes=o,t.hash=s,t.exists=a,t.output=c;const u={number:r,bool:n,bytes:o,hash:s,exists:a,output:c};t.default=u},7202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=t.Maj=t.Chi=void 0;const n=r(7557),i=r(9175);t.Chi=(e,t,r)=>e&t^~e&r,t.Maj=(e,t,r)=>e&t^e&r^t&r;class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,h[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.HashMD=o},2318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const h=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=h;const f=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=f;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const m=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=m;const y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;const b=(e,t,r)=>e<<r-32|t>>>64-r;function w(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=b,t.add=w;const v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=v;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;const S=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=S;const x=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=x;const I=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=I;const A={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:h,rotrBL:f,rotr32H:d,rotr32L:p,rotlSH:g,rotlSL:m,rotlBH:y,rotlBL:b,add:w,add3L:v,add3H:E,add4L:_,add4H:S,add5H:I,add5L:x};t.default=A},5145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},2623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(7202),i=r(9175),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],r=a[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[e]=o+a[e-7]+n+a[e-16]|0}let{A:r,B:s,C:c,D:u,E:l,F:h,G:f,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,n.Chi)(l,h,f)+o[e]+a[e]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,c)|0;d=f,f=h,h=l,l=u+t|0,u=c,c=s,s=r,r=t+p|0}r=r+this.A|0,s=s+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,h=h+this.F|0,f=f+this.G|0,d=d+this.H|0,this.set(r,s,c,u,l,h,f,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class u extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new u))},2955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),i=r(2318),o=r(9175),s=[],a=[],c=[],u=BigInt(0),l=BigInt(1),h=BigInt(2),f=BigInt(7),d=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>f)*p)%d,t&h&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,m]=(0,i.split)(c,!0),y=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],c=b(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=y(t,i,n),c=b(t,i,n),u=s[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=m[n]}r.fill(0)}t.keccakP=w;class v extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),w(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new v(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=v;const E=(e,t,r)=>(0,o.wrapConstructor)((()=>new v(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const _=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=_(31,168,16),t.shake256=_(31,136,32)},9175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=r(5145),i=r(7557);t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.rotl=(e,t)=>e<<t|e>>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e),t.byteSwap32=function(e){for(let r=0;r<e.length;r++)e[r]=(0,t.byteSwap)(e[r])};const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){(0,i.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t};const s=48,a=57,c=65,u=70,l=97,h=102;function f(e){return e>=s&&e<=a?e-s:e>=c&&e<=u?e-(c-10):e>=l&&e<=h?e-(l-10):void 0}function d(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"==typeof e&&(e=d(e)),(0,i.bytes)(e),e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=d,t.toBytes=p,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];(0,i.bytes)(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}};const g={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==g.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(p(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},7588:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;const s=o(r(8947)),a=o(r(6386)),c=r(3884);function u({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t)throw new Error("Message data must be given as a string");const r=s.box.keyPair();let n;try{n=a.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const i=a.decodeUTF8(t),o=s.randomBytes(s.box.nonceLength),c=s.box(i,o,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:a.encodeBase64(o),ephemPublicKey:a.encodeBase64(r.publicKey),ciphertext:a.encodeBase64(c)}}throw new Error("Encryption type/version not supported")}function l({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const r=h(t),n=s.box.keyPair.fromSecretKey(r).secretKey,i=a.decodeBase64(e.nonce),o=a.decodeBase64(e.ciphertext),c=a.decodeBase64(e.ephemPublicKey),u=s.box.open(o,i,c,n);try{if(!u)throw new Error;const e=a.encodeUTF8(u);if(!e)throw new Error;return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw new Error(`Decryption failed: ${e.message}`);throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}function h(e){const t=Buffer.from(e,"hex").toString("base64");return a.decodeBase64(t)}t.encrypt=u,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("object"==typeof t&&t&&"toJSON"in t)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const n={data:t,padding:""},i=Buffer.byteLength(JSON.stringify(n),"utf-8")%2048;let o=0;return i>0&&(o=2048-i-16),n.padding="0".repeat(o),u({publicKey:e,data:JSON.stringify(n),version:r})},t.decrypt=l,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){const t=h(e),r=s.box.keyPair.fromSecretKey(t).publicKey;return a.encodeBase64(r)}},1553:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,i(r(1859),t),i(r(5482),t),i(r(7588),t);var o=r(3884);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return o.normalize}})},1859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(8683),i=r(3884);function o(e,t){const r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(e));return(0,i.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,i.isNullish)(t))throw new Error("Missing data parameter");if((0,i.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,i.legacyToBuffer)(t),o=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(o,e);return(0,i.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");const r=o(e,t),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},t.extractPublicKey=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");return`0x${o(e,t).toString("hex")}`}},5482:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const n=r(8683),i=r(3256),o=r(6207),s=r(8746),a=r(2367),c=r(2019),u=r(3884);var l;function h(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function f(e,t){(0,a.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),n=(0,o.getLength)(e),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-i&&r<=i,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function d(e){let t=BigInt(0);for(let r=0;r<e.length;r++){const n=BigInt(e.charCodeAt(r)-48);t*=BigInt(10),t+=n>=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(t),20)}function p(e,t,r,o,u){if(h(u,[l.V3,l.V4]),void 0!==e[r])return["bytes32",u===l.V4&&null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,c.keccak256)(g(r,o,e,u)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===o)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof o)return["address",(0,s.padStart)((0,a.numberToBytes)(o),20)];if((0,a.isStrictHexString)(o))return["address",(0,a.add0x)(o)];if("string"==typeof o)return["address",d(o).subarray(0,20)]}if("bool"===r)return["bool",Boolean(o)];if("bytes"===r)return"number"==typeof o?o=(0,a.numberToBytes)(o):(0,a.isStrictHexString)(o)||"0x"===o?o=(0,a.hexToBytes)(o):"string"==typeof o&&(o=(0,a.stringToBytes)(o)),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(o))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof o?o<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,a.bigIntToBytes)(BigInt(o))]:(0,a.isStrictHexString)(o)?["bytes32",(0,a.hexToBytes)(o)]:["bytes32",o];if(r.startsWith("int")&&!r.includes("[")){const e=f(r,o);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return o="number"==typeof o?(0,a.numberToBytes)(o):(0,a.stringToBytes)(null!=o?o:""),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(o))];if(r.endsWith("]")){if(u===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const s=r.slice(0,r.lastIndexOf("[")),a=o.map((r=>p(e,t,s,r,u)));return["bytes32",(0,n.arrToBufArr)((0,c.keccak256)((0,i.encode)(a.map((([e])=>e)),a.map((([,e])=>e)))))]}return[r,o]}function g(e,t,r,o){h(o,[l.V3,l.V4]);const s=["bytes32"],a=[w(e,r)];for(const n of r[e]){if(o===l.V3&&void 0===t[n.name])continue;const[e,i]=p(r,n.name,n.type,t[n.name],o);s.push(e),a.push(i)}return(0,n.arrToBufArr)((0,i.encode)(s,a))}function m(e,t){let r="";const n=y(e,t);n.delete(e);const i=[e,...Array.from(n).sort()];for(const e of i){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function y(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])y(n.type,t,r);return r}function b(e,t,r,i){h(i,[l.V3,l.V4]);const o=g(e,t,r,i),s=(0,c.keccak256)(o);return(0,n.arrToBufArr)(s)}function w(e,t){const r=(0,a.stringToBytes)(m(e,t));return(0,n.arrToBufArr)((0,c.keccak256)(r))}function v(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function E(e,t){h(t,[l.V3,l.V4]);const r=v(e),{domain:n}=r;return b("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},t)}function _(e,t){if((0,o.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,o.getArrayType)(e);return t.map((e=>_(r,e)))}if("address"===e){if("number"==typeof t)return(0,s.padStart)((0,a.numberToBytes)(t),20);if((0,a.isStrictHexString)(t))return(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,s.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,o.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,a.numberToBytes)(t).subarray(0,r);if((0,a.isStrictHexString)(t))return(0,a.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,o.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function S(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=f(e,t);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,o.getLength)(e),i=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(i,32)}return t}))}function x(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(n=r,n.map((e=>"number"==typeof e?(0,s.padStart)((0,a.numberToBytes)(e),32):(0,a.isStrictHexString)(e)?(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,s.padStart)(e.subarray(0,32),32):e)))};var n;if(t.startsWith("int")&&(0,o.isArrayType)(t)){const[n,i]=(0,o.getArrayType)(t);return{name:e,type:`bytes32[${null!=i?i:""}]`,value:S(n,r)}}return{name:e,type:t,value:_(t,r)}})),l=r.map((e=>"bytes"!==e.type?e.value:(0,u.legacyToBuffer)(e.value))),h=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),f=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,n.arrToBufArr)((0,c.keccak256)((0,i.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,i.encodePacked)(["string[]"],[f],!0)),(0,c.keccak256)((0,i.encodePacked)(h,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:g,encodeType:m,findTypeDependencies:y,hashStruct:b,hashType:w,sanitizeData:v,eip712Hash:function(e,t){h(t,[l.V3,l.V4]);const r=v(e),i=[(0,a.hexToBytes)("1901")];return i.push(E(e,t)),"EIP712Domain"!==r.primaryType&&i.push(b(r.primaryType,r.message,r.types,t)),(0,n.arrToBufArr)((0,c.keccak256)((0,a.concatBytes)(i)))},eip712DomainHash:E},t.typedSignatureHash=function(e){const t=x(e);return(0,a.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:i}){if(h(i),(0,u.isNullish)(r))throw new Error("Missing data parameter");if((0,u.isNullish)(e))throw new Error("Missing private key parameter");const o=i===l.V1?x(r):t.TypedDataUtils.eip712Hash(r,i),s=(0,n.ecsign)(o,e);return(0,u.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:i}){if(h(i),(0,u.isNullish)(e))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing signature parameter");const o=i===l.V1?x(e):t.TypedDataUtils.eip712Hash(e,i),s=(0,u.recoverPublicKey)(o,r),c=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(c)}},3884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;const n=r(8683),i=r(2367);function o(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function s(e){return null==e}t.padWithZeroes=o,t.isNullish=s,t.legacyToBuffer=function(e){return"string"!=typeof e||(0,n.isHexString)(e)?(0,n.toBuffer)(e):Buffer.from(e)},t.concatSig=function(e,t,r){const s=(0,n.fromSigned)(t),a=(0,n.fromSigned)(r),c=(0,n.bufferToInt)(e),u=o((0,n.toUnsigned)(s).toString("hex"),64),l=o((0,n.toUnsigned)(a).toString("hex"),64),h=(0,i.remove0x)((0,i.numberToHex)(c));return(0,i.add0x)(u.concat(l,h))},t.recoverPublicKey=function(e,t){const r=(0,n.fromRpcSig)(t);return(0,n.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(!s(e)){if("number"==typeof e){if(e<0)return"0x";const t=(0,i.numberToBytes)(e);e=(0,i.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,i.add0x)(e.toLowerCase())}}},3203:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function i(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map((e=>e.encode)).reduceRight(r,t),decode:e.map((e=>e.decode)).reduce(r,t)}}function o(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function s(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function c(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const o=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let o=i;o<s.length;o++){const a=s[o],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(s[o]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?r=!1:i=o)}if(o.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.createBase58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64nopad=t.base64=t.base32crockford=t.base32hexnopad=t.base32hex=t.base32nopad=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const l=(e,t)=>t?l(t,e%t):e,h=(e,t)=>e+(t-l(e,t));function f(e,t,n,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(h(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${h(t,n)}`);let o=0,s=0;const a=2**n-1,c=[];for(const i of e){if(r(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(o=o<<t|i,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((o>>s-n&a)>>>0);o&=2**s-1}if(o=o<<n-s&a,!i&&s>=t)throw new Error("Excess padding");if(!i&&o)throw new Error(`Non-zero padding: ${o}`);return i&&s>0&&c.push(o>>>0),c}function d(e){return r(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(u(t,e,256))}}}function p(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(h(8,e)>32||h(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(f(r,e,8,t))}}}function g(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function m(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const i=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const i=r.slice(0,-e),o=t(i).slice(0,e),s=r.slice(-e);for(let t=0;t<e;t++)if(o[t]!==s[t])throw new Error("Invalid checksum");return i}}}t.utils={alphabet:o,chain:i,checksum:m,convertRadix:u,convertRadix2:f,radix:d,radix2:p,join:s,padding:a},t.base16=i(p(4),o("0123456789ABCDEF"),s("")),t.base32=i(p(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),s("")),t.base32nopad=i(p(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),s("")),t.base32hex=i(p(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),s("")),t.base32hexnopad=i(p(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),s("")),t.base32crockford=i(p(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),s(""),c((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),t.base64nopad=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),s("")),t.base64url=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s("")),t.base64urlnopad=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(""));const y=e=>i(d(58),o(e),s(""));t.base58=y("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=y("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=y("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const b=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const i=e.subarray(n,n+8);r+=t.base58.encode(i).padStart(b[i.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const i=e.slice(n,n+11),o=b.indexOf(i.length),s=t.base58.decode(i);for(let e=0;e<s.length-o;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(r)}},t.createBase58check=e=>i(m(4,(t=>e(e(t)))),t.base58),t.base58check=t.createBase58check;const w=i(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),v=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function _(e,t,r=1){const n=e.length;let i=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);i=E(i)^r>>5}i=E(i);for(let t=0;t<n;t++)i=E(i)^31&e.charCodeAt(t);for(let e of t)i=E(i)^e;for(let e=0;e<6;e++)i=E(i);return i^=r,w.encode(f([i%2**30],30,5,!1))}function S(e){const t="bech32"===e?1:734539939,r=p(5),n=r.decode,i=r.encode,o=g(n);function s(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=n.lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const o=n.slice(0,i),s=n.slice(i+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=w.decode(s).slice(0,-6),c=_(o,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:o,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);if(0===e.length)throw new TypeError(`Invalid prefix length ${e.length}`);const i=e.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);const o=e.toLowerCase(),s=_(o,r,t);return`${o}1${w.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:g(s),fromWords:n,fromWordsUnsafe:o,toWords:i}}t.bech32=S("bech32"),t.bech32m=S("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=i(p(4),o("0123456789abcdef"),s(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const x={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!x.hasOwnProperty(e))throw new TypeError(I);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return x[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!x.hasOwnProperty(e))throw new TypeError(I);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return x[e].decode(t)},t.bytes=t.stringToBytes},7524:(e,t,r)=>{var n=e.exports,i=(r(7007).EventEmitter,r(5693)),o=r(8835);n.request=function(e,t){if("string"==typeof e&&(e=o.parse(e)),e||(e={}),e.host||e.port||(e.port=80),!e.host&&e.hostname&&(e.host=e.hostname),e.protocol||(e.scheme?e.protocol=e.scheme+":":e.protocol="http:"),!e.host)throw new Error("missing host");/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https:"==e.protocol?443:80);var r=new i(new XMLHttpRequest,e);return t&&r.on("response",t),r},n.get=function(e,t){e.method="GET";var r=n.request(e,t);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},5693:(e,t,r)=>{var n=r(8310),i=r(2569),o=r(3887),s=r(6698),a=e.exports=function(e,t){var r=this;r.writable=!0,r.xhr=e,r.body=[],r.uri=(t.protocol||"http:")+"//"+t.host+(t.port?":"+t.port:"")+(t.path||"/"),void 0===t.withCredentials&&(t.withCredentials=!0);try{e.withCredentials=t.withCredentials}catch(e){}if(t.responseType)try{e.responseType=t.responseType}catch(e){}if(e.open(t.method||"GET",r.uri,!0),e.onerror=function(e){r.emit("error",new Error("Network error"))},r._headers={},t.headers)for(var n=c(t.headers),s=0;s<n.length;s++){var a=n[s];if(r.isSafeRequestHeader(a)){var u=t.headers[a];r.setHeader(a,u)}}t.auth&&this.setHeader("Authorization","Basic "+o.btoa(t.auth));var l=new i;l.on("close",(function(){r.emit("close")})),l.on("ready",(function(){r.emit("response",l)})),l.on("error",(function(e){r.emit("error",e)})),e.onreadystatechange=function(){e.__aborted||l.handle(e)}};s(a,n),a.prototype.setHeader=function(e,t){this._headers[e.toLowerCase()]=t},a.prototype.getHeader=function(e){return this._headers[e.toLowerCase()]},a.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},a.prototype.write=function(e){this.body.push(e)},a.prototype.destroy=function(e){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(e){void 0!==e&&this.body.push(e);for(var t=c(this._headers),r=0;r<t.length;r++){var n=t[r],i=this._headers[n];if(u(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(u(this.body[0])){var s=[];for(r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){var a=0;for(r=0;r<this.body.length;r++)a+=this.body[r].length;s=new this.body[0].constructor(a);var l=0;for(r=0;r<this.body.length;r++){var f=this.body[r];for(o=0;o<f.length;o++)s[l++]=f[o]}this.xhr.send(s)}else if(h(this.body[0]))this.xhr.send(this.body[0]);else{for(s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(e){return!!e&&-1===l(a.unsafeHeaders,e.toLowerCase())};var c=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},h=function(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof FormData&&e instanceof FormData||void 0}},2569:(e,t,r)=>{var n=r(8310),i=r(537),o=e.exports=function(e){this.offset=0,this.readable=!0};i.inherits(o,n);var s={streaming:!0,status2:!0};function a(e){for(var t=e.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<t.length;n++){var i=t[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?c(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}o.prototype.getResponse=function(e){var t=String(e.responseType).toLowerCase();return"blob"===t?e.responseBlob||e.response:"arraybuffer"===t?e.response:e.responseText},o.prototype.getHeader=function(e){return this.headers[e.toLowerCase()]},o.prototype.handle=function(e){if(2===e.readyState&&s.status2){try{this.statusCode=e.status,this.headers=a(e)}catch(e){s.status2=!1}s.status2&&this.emit("ready")}else if(s.streaming&&3===e.readyState){try{this.statusCode||(this.statusCode=e.status,this.headers=a(e),this.emit("ready"))}catch(e){}try{this._emitData(e)}catch(e){s.streaming=!1}}else 4===e.readyState&&(this.statusCode||(this.statusCode=e.status,this.emit("ready")),this._emitData(e),e.error?this.emit("error",this.getResponse(e)):this.emit("end"),this.emit("close"))},o.prototype._emitData=function(e){var t=this.getResponse(e);t.length>this.offset&&(this.emit("data",new Buffer(t.slice(this.offset))),this.offset=t.length)};var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},3887:(e,t)=>{!function(){var e=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(e){this.message=e}n.prototype=new Error,n.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,i,o=0,s=r,a="";e.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&t>>8-o%1*8)){if((i=e.charCodeAt(o+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|i}return a}),e.atob||(e.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,o=0,s=0,a="";i=e.charAt(s++);~i&&(t=o%4?64*t+i:i,o++%4)?a+=String.fromCharCode(255&t>>(-2*o&6)):0)i=r.indexOf(i);return a})}()},4529:(e,t,r)=>{"use strict";var n=r(5228);function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function o(e){return r.g.Buffer&&"function"==typeof r.g.Buffer.isBuffer?r.g.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=r(4591),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function l(e){return Object.prototype.toString.call(e)}function h(e){return!o(e)&&"function"==typeof r.g.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var f=e.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(s.isFunction(e)){if(u)return e.name;var t=e.toString().match(d);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(u||!s.isFunction(e))return s.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,r,n,i){throw new f.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function b(e,t){e||y(e,!0,t,"==",f.ok)}function w(e,t,r,n){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(h(e)&&h(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==a&&a===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),o=v(t);if(i&&!o||!i&&o)return!1;if(i)return w(e=c.call(e),t=c.call(t),r);var a,u,l=S(e),h=S(t);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),u=l.length-1;u>=0;u--)if(l[u]!==h[u])return!1;for(u=l.length-1;u>=0;u--)if(!w(e[a=l[u]],t[a],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&y(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&E(i,r)||a)&&y(i,r,"Got unwanted exception"+n),e&&i&&r&&!E(i,r)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(f.AssertionError,Error),f.fail=y,f.ok=b,f.equal=function(e,t,r){e!=t&&y(e,t,r,"==",f.equal)},f.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",f.notEqual)},f.deepEqual=function(e,t,r){w(e,t,!1)||y(e,t,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,r){w(e,t,!0)||y(e,t,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,r){w(e,t,!1)&&y(e,t,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",f.strictEqual)},f.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",f.notStrictEqual)},f.throws=function(e,t,r){_(!0,e,t,r)},f.doesNotThrow=function(e,t,r){_(!1,e,t,r)},f.ifError=function(e){if(e)throw e},f.strict=n((function e(t,r){t||y(t,!0,r,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var S=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}},6100:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},3845:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},4591:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,o=i.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),c=i[r];r<o;c=i[++r])p(c)||!w(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(e,n){if(y(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),i=!0}return e.apply(this,arguments)}};var i,o={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=u(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(_(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var w,S="",x=!1,I=["{","}"];return f(r)&&(x=!0,I=["[","]"]),_(r)&&(S=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(S=" "+RegExp.prototype.toString.call(r)),v(r)&&(S=" "+Date.prototype.toUTCString.call(r)),E(r)&&(S=" "+l(r)),0!==s.length||x&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),w=x?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)A(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return h(e,r,n,a,t,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(w,S,I)):I[0]+S+I[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),A(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=p(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===S(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===S(e)}function E(e){return w(e)&&("[object Error]"===S(e)||e instanceof Error)}function _(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=b,t.isObject=w,t.isDate=v,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(3845);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6100),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),l=0,h=c>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},6067:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},i={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,n)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},7499:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},6051:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4989:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^r[a])];return~e}},7825:(e,t,r)=>{"use strict";var n,i=r(6067),o=r(9963),s=r(7499),a=r(4989),c=r(912),u=0,l=0,h=-2,f=2,d=8,p=286,g=30,m=19,y=2*p+1,b=15,w=3,v=258,E=v+w+1,_=42,S=103,x=113,I=666;function A(e,t){return e.msg=c[t],t}function R(e){return(e<<1)-(e>4?9:0)}function B(e){for(var t=e.length;--t>=0;)e[t]=0}function M(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function T(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,M(e.strm)}function P(e,t){e.pending_buf[e.pending++]=t}function C(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-E?e.strstart-(e.w_size-E):0,u=e.window,l=e.w_mask,h=e.prev,f=e.strstart+v,d=u[o+s-1],p=u[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+s]===p&&u[r+s-1]===d&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<f);if(n=v-(f-o),o=f-v,n>s){if(e.match_start=t,s=n,n>=a)break;d=u[o+s-1],p=u[o+s]}}}while((t=h[t&l])>c&&0!=--i);return s<=e.lookahead?s:e.lookahead}function O(e){var t,r,n,o,c,u,l,h,f,d,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-E)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--r);t=r=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--r);o+=p}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,h=e.strstart+e.lookahead,f=o,d=void 0,(d=u.avail_in)>f&&(d=f),r=0===d?0:(u.avail_in-=d,i.arraySet(l,u.input,u.next_in,d,h),1===u.state.wrap?u.adler=s(u.adler,l,d,h):2===u.state.wrap&&(u.adler=a(u.adler,l,d,h)),u.next_in+=d,u.total_in+=d,d),e.lookahead+=r,e.lookahead+e.insert>=w)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+w-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<w)););}while(e.lookahead<E&&0!==e.strm.avail_in)}function N(e,t){for(var r,n;;){if(e.lookahead<E){if(O(e),e.lookahead<E&&t===u)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-E&&(e.match_length=k(e,r)),e.match_length>=w)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-w),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=w){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(T(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<w-1?e.strstart:w-1,4===t?(T(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?1:2}function L(e,t){for(var r,n,i;;){if(e.lookahead<E){if(O(e),e.lookahead<E&&t===u)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=w-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-E&&(e.match_length=k(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===w&&e.strstart-e.match_start>4096)&&(e.match_length=w-1)),e.prev_length>=w&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-w,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-w),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=w-1,e.strstart++,n&&(T(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&T(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<w-1?e.strstart:w-1,4===t?(T(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?1:2}function j(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function U(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=d,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*y),this.dyn_dtree=new i.Buf16(2*(2*g+1)),this.bl_tree=new i.Buf16(2*(2*m+1)),B(this.dyn_ltree),B(this.dyn_dtree),B(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(b+1),this.heap=new i.Buf16(2*p+1),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*p+1),B(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function $(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?_:x,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),l):A(e,h)}function F(e){var t,r=$(e);return r===l&&((t=e.state).window_size=2*t.w_size,B(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=w-1,t.match_available=0,t.ins_h=0),r}function D(e,t,r,n,o,s){if(!e)return h;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==d||n<8||n>15||t<0||t>9||s<0||s>4)return A(e,h);8===n&&(n=9);var c=new U;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+w-1)/w),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=s,c.method=r,F(e)}n=[new j(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(O(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,T(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-E&&(T(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(T(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(T(e,!1),e.strm.avail_out),1)})),new j(4,4,8,4,N),new j(4,5,16,8,N),new j(4,6,32,32,N),new j(4,4,16,16,L),new j(8,16,32,32,L),new j(8,16,128,128,L),new j(8,32,128,256,L),new j(32,128,258,1024,L),new j(32,258,258,4096,L)],t.deflateInit=function(e,t){return D(e,t,d,15,8,0)},t.deflateInit2=D,t.deflateReset=F,t.deflateResetKeep=$,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,l):h},t.deflate=function(e,t){var r,i,s,c;if(!e||!e.state||t>5||t<0)return e?A(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===I&&4!==t)return A(e,0===e.avail_out?-5:h);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===_)if(2===i.wrap)e.adler=0,P(i,31),P(i,139),P(i,8),i.gzhead?(P(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),P(i,255&i.gzhead.time),P(i,i.gzhead.time>>8&255),P(i,i.gzhead.time>>16&255),P(i,i.gzhead.time>>24&255),P(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),P(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(P(i,255&i.gzhead.extra.length),P(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(P(i,0),P(i,0),P(i,0),P(i,0),P(i,0),P(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),P(i,3),i.status=x);else{var f=d+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=x,C(i,f),0!==i.strstart&&(C(i,e.adler>>>16),C(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),M(e),s=i.pending,i.pending!==i.pending_buf_size));)P(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),M(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,P(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),M(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,P(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(i.status=S)}else i.status=S;if(i.status===S&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&M(e),i.pending+2<=i.pending_buf_size&&(P(i,255&e.adler),P(i,e.adler>>8&255),e.adler=0,i.status=x)):i.status=x),0!==i.pending){if(M(e),0===e.avail_out)return i.last_flush=-1,l}else if(0===e.avail_in&&R(t)<=R(r)&&4!==t)return A(e,-5);if(i.status===I&&0!==e.avail_in)return A(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==I){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(O(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(T(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(T(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=v){if(O(e),e.lookahead<=v&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=w&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+v;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=v-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=w?(r=o._tr_tally(e,1,e.match_length-w),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(T(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(T(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==p&&4!==p||(i.status=I),1===p||3===p)return 0===e.avail_out&&(i.last_flush=-1),l;if(2===p&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(B(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),M(e),0===e.avail_out))return i.last_flush=-1,l}return 4!==t?l:i.wrap<=0?1:(2===i.wrap?(P(i,255&e.adler),P(i,e.adler>>8&255),P(i,e.adler>>16&255),P(i,e.adler>>24&255),P(i,255&e.total_in),P(i,e.total_in>>8&255),P(i,e.total_in>>16&255),P(i,e.total_in>>24&255)):(C(i,e.adler>>>16),C(i,65535&e.adler)),M(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==_&&69!==t&&73!==t&&91!==t&&t!==S&&t!==x&&t!==I?A(e,h):(e.state=null,t===x?A(e,-3):l):h},t.deflateSetDictionary=function(e,t){var r,n,o,a,c,u,f,d,p=t.length;if(!e||!e.state)return h;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==_||r.lookahead)return h;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(B(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=p,e.next_in=0,e.input=t,O(r);r.lookahead>=w;){n=r.strstart,o=r.lookahead-(w-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+w-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=w-1,O(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=w-1,r.match_available=0,e.next_in=u,e.input=f,e.avail_in=c,r.wrap=a,l},t.deflateInfo="pako deflate (from Nodeca project)"},3279:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,c,u,l,h,f,d,p,g,m,y,b,w,v,E,_,S,x,I,A;r=e.state,n=e.next_in,I=e.input,i=n+(e.avail_in-5),o=e.next_out,A=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,g=r.lencode,m=r.distcode,y=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=I[n++]<<p,p+=8,d+=I[n++]<<p,p+=8),w=g[d&y];t:for(;;){if(d>>>=v=w>>>24,p-=v,0==(v=w>>>16&255))A[o++]=65535&w;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=g[(65535&w)+(d&(1<<v)-1)];continue t}for(E=65535&w,(v&=15)&&(p<v&&(d+=I[n++]<<p,p+=8),E+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=I[n++]<<p,p+=8,d+=I[n++]<<p,p+=8),w=m[d&b];;){if(d>>>=v=w>>>24,p-=v,16&(v=w>>>16&255)){if(_=65535&w,p<(v&=15)&&(d+=I[n++]<<p,(p+=8)<v&&(d+=I[n++]<<p,p+=8)),(_+=d&(1<<v)-1)>c){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=v,p-=v,_>(v=o-s)){if((v=_-v)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=0,x=f,0===h){if(S+=u-v,v<E){E-=v;do{A[o++]=f[S++]}while(--v);S=o-_,x=A}}else if(h<v){if(S+=u+h-v,(v-=h)<E){E-=v;do{A[o++]=f[S++]}while(--v);if(S=0,h<E){E-=v=h;do{A[o++]=f[S++]}while(--v);S=o-_,x=A}}}else if(S+=h-v,v<E){E-=v;do{A[o++]=f[S++]}while(--v);S=o-_,x=A}for(;E>2;)A[o++]=x[S++],A[o++]=x[S++],A[o++]=x[S++],E-=3;E&&(A[o++]=x[S++],E>1&&(A[o++]=x[S++]))}else{S=o-_;do{A[o++]=A[S++],A[o++]=A[S++],A[o++]=A[S++],E-=3}while(E>2);E&&(A[o++]=A[S++],E>1&&(A[o++]=A[S++]))}break}if(64&v){e.msg="invalid distance code",r.mode=30;break e}w=m[(65535&w)+(d&(1<<v)-1)]}}break}}while(n<i&&o<a);n-=E=p>>3,d&=(1<<(p-=E<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},777:(e,t,r)=>{"use strict";var n=r(6067),i=r(7499),o=r(4989),s=r(3279),a=r(9292),c=0,u=-2,l=1,h=12,f=30,d=852,p=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=l,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(d),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,c):u}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):u}function w(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,b(e))):u}function v(e,t){var r,n;return e?(n=new m,e.state=n,n.window=null,(r=w(e,t))!==c&&(e.state=null),r):u}var E,_,S=!0;function x(e){if(S){var t;for(E=new n.Buf32(512),_=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,E,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,_,0,e.work,{bits:5}),S=!1}e.lencode=E,e.lenbits=9,e.distcode=_,e.distbits=5}function I(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}t.inflateReset=b,t.inflateReset2=w,t.inflateResetKeep=y,t.inflateInit=function(e){return v(e,15)},t.inflateInit2=v,t.inflate=function(e,t){var r,d,p,m,y,b,w,v,E,_,S,A,R,B,M,T,P,C,k,O,N,L,j,U,$=0,F=new n.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(r=e.state).mode===h&&(r.mode=13),y=e.next_out,p=e.output,w=e.avail_out,m=e.next_in,d=e.input,b=e.avail_in,v=r.hold,E=r.bits,_=b,S=w,L=c;e:for(;;)switch(r.mode){case l:if(0===r.wrap){r.mode=13;break}for(;E<16;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(2&r.wrap&&35615===v){r.check=0,F[0]=255&v,F[1]=v>>>8&255,r.check=o(r.check,F,2,0),v=0,E=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){e.msg="incorrect header check",r.mode=f;break}if(8!=(15&v)){e.msg="unknown compression method",r.mode=f;break}if(E-=4,N=8+(15&(v>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=f;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=512&v?10:h,v=0,E=0;break;case 2:for(;E<16;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(r.flags=v,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=f;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=f;break}r.head&&(r.head.text=v>>8&1),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=o(r.check,F,2,0)),v=0,E=0,r.mode=3;case 3:for(;E<32;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.head&&(r.head.time=v),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,F[2]=v>>>16&255,F[3]=v>>>24&255,r.check=o(r.check,F,4,0)),v=0,E=0,r.mode=4;case 4:for(;E<16;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.head&&(r.head.xflags=255&v,r.head.os=v>>8),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=o(r.check,F,2,0)),v=0,E=0,r.mode=5;case 5:if(1024&r.flags){for(;E<16;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.length=v,r.head&&(r.head.extra_len=v),512&r.flags&&(F[0]=255&v,F[1]=v>>>8&255,r.check=o(r.check,F,2,0)),v=0,E=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((A=r.length)>b&&(A=b),A&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,m,A,N)),512&r.flags&&(r.check=o(r.check,d,A,m)),b-=A,m+=A,r.length-=A),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break e;A=0;do{N=d[m+A++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&A<b);if(512&r.flags&&(r.check=o(r.check,d,A,m)),b-=A,m+=A,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===b)break e;A=0;do{N=d[m+A++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N))}while(N&&A<b);if(512&r.flags&&(r.check=o(r.check,d,A,m)),b-=A,m+=A,N)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;E<16;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(v!==(65535&r.check)){e.msg="header crc mismatch",r.mode=f;break}v=0,E=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=h;break;case 10:for(;E<32;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}e.adler=r.check=g(v),v=0,E=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=y,e.avail_out=w,e.next_in=m,e.avail_in=b,r.hold=v,r.bits=E,2;e.adler=r.check=1,r.mode=h;case h:if(5===t||6===t)break e;case 13:if(r.last){v>>>=7&E,E-=7&E,r.mode=27;break}for(;E<3;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}switch(r.last=1&v,E-=1,3&(v>>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6===t){v>>>=2,E-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=f}v>>>=2,E-=2;break;case 14:for(v>>>=7&E,E-=7&E;E<32;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if((65535&v)!=(v>>>16^65535)){e.msg="invalid stored block lengths",r.mode=f;break}if(r.length=65535&v,v=0,E=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(A=r.length){if(A>b&&(A=b),A>w&&(A=w),0===A)break e;n.arraySet(p,d,m,A,y),b-=A,m+=A,w-=A,y+=A,r.length-=A;break}r.mode=h;break;case 17:for(;E<14;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(r.nlen=257+(31&v),v>>>=5,E-=5,r.ndist=1+(31&v),v>>>=5,E-=5,r.ncode=4+(15&v),v>>>=4,E-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=f;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;E<3;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.lens[D[r.have++]]=7&v,v>>>=3,E-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},L=a(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,L){e.msg="invalid code lengths set",r.mode=f;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;T=($=r.lencode[v&(1<<r.lenbits)-1])>>>16&255,P=65535&$,!((M=$>>>24)<=E);){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(P<16)v>>>=M,E-=M,r.lens[r.have++]=P;else{if(16===P){for(U=M+2;E<U;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(v>>>=M,E-=M,0===r.have){e.msg="invalid bit length repeat",r.mode=f;break}N=r.lens[r.have-1],A=3+(3&v),v>>>=2,E-=2}else if(17===P){for(U=M+3;E<U;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}E-=M,N=0,A=3+(7&(v>>>=M)),v>>>=3,E-=3}else{for(U=M+7;E<U;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}E-=M,N=0,A=11+(127&(v>>>=M)),v>>>=7,E-=7}if(r.have+A>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=f;break}for(;A--;)r.lens[r.have++]=N}}if(r.mode===f)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=f;break}if(r.lenbits=9,j={bits:r.lenbits},L=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,L){e.msg="invalid literal/lengths set",r.mode=f;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},L=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,L){e.msg="invalid distances set",r.mode=f;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(b>=6&&w>=258){e.next_out=y,e.avail_out=w,e.next_in=m,e.avail_in=b,r.hold=v,r.bits=E,s(e,S),y=e.next_out,p=e.output,w=e.avail_out,m=e.next_in,d=e.input,b=e.avail_in,v=r.hold,E=r.bits,r.mode===h&&(r.back=-1);break}for(r.back=0;T=($=r.lencode[v&(1<<r.lenbits)-1])>>>16&255,P=65535&$,!((M=$>>>24)<=E);){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(T&&!(240&T)){for(C=M,k=T,O=P;T=($=r.lencode[O+((v&(1<<C+k)-1)>>C)])>>>16&255,P=65535&$,!(C+(M=$>>>24)<=E);){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}v>>>=C,E-=C,r.back+=C}if(v>>>=M,E-=M,r.back+=M,r.length=P,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=h;break}if(64&T){e.msg="invalid literal/length code",r.mode=f;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;E<U;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.length+=v&(1<<r.extra)-1,v>>>=r.extra,E-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=($=r.distcode[v&(1<<r.distbits)-1])>>>16&255,P=65535&$,!((M=$>>>24)<=E);){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(!(240&T)){for(C=M,k=T,O=P;T=($=r.distcode[O+((v&(1<<C+k)-1)>>C)])>>>16&255,P=65535&$,!(C+(M=$>>>24)<=E);){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}v>>>=C,E-=C,r.back+=C}if(v>>>=M,E-=M,r.back+=M,64&T){e.msg="invalid distance code",r.mode=f;break}r.offset=P,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;E<U;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}r.offset+=v&(1<<r.extra)-1,v>>>=r.extra,E-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=f;break}r.mode=25;case 25:if(0===w)break e;if(A=S-w,r.offset>A){if((A=r.offset-A)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=f;break}A>r.wnext?(A-=r.wnext,R=r.wsize-A):R=r.wnext-A,A>r.length&&(A=r.length),B=r.window}else B=p,R=y-r.offset,A=r.length;A>w&&(A=w),w-=A,r.length-=A;do{p[y++]=B[R++]}while(--A);0===r.length&&(r.mode=21);break;case 26:if(0===w)break e;p[y++]=r.length,w--,r.mode=21;break;case 27:if(r.wrap){for(;E<32;){if(0===b)break e;b--,v|=d[m++]<<E,E+=8}if(S-=w,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?o(r.check,p,S,y-S):i(r.check,p,S,y-S)),S=w,(r.flags?v:g(v))!==r.check){e.msg="incorrect data check",r.mode=f;break}v=0,E=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;E<32;){if(0===b)break e;b--,v+=d[m++]<<E,E+=8}if(v!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=f;break}v=0,E=0}r.mode=29;case 29:L=1;break e;case f:L=-3;break e;case 31:return-4;default:return u}return e.next_out=y,e.avail_out=w,e.next_in=m,e.avail_in=b,r.hold=v,r.bits=E,(r.wsize||S!==e.avail_out&&r.mode<f&&(r.mode<27||4!==t))&&I(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(_-=e.avail_in,S-=e.avail_out,e.total_in+=_,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?o(r.check,p,S,e.next_out-S):i(r.check,p,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(r.mode===h?128:0)+(20===r.mode||15===r.mode?256:0),(0===_&&0===S||4===t)&&L===c&&(L=-5),L)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,c):u},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:I(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,c):u},t.inflateInfo="pako inflate (from Nodeca project)"},9292:(e,t,r)=>{"use strict";var n=r(6067),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,c,u,l,h,f){var d,p,g,m,y,b,w,v,E,_=f.bits,S=0,x=0,I=0,A=0,R=0,B=0,M=0,T=0,P=0,C=0,k=null,O=0,N=new n.Buf16(16),L=new n.Buf16(16),j=null,U=0;for(S=0;S<=15;S++)N[S]=0;for(x=0;x<c;x++)N[t[r+x]]++;for(R=_,A=15;A>=1&&0===N[A];A--);if(R>A&&(R=A),0===A)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(I=1;I<A&&0===N[I];I++);for(R<I&&(R=I),T=1,S=1;S<=15;S++)if(T<<=1,(T-=N[S])<0)return-1;if(T>0&&(0===e||1!==A))return-1;for(L[1]=0,S=1;S<15;S++)L[S+1]=L[S]+N[S];for(x=0;x<c;x++)0!==t[r+x]&&(h[L[t[r+x]]++]=x);if(0===e?(k=j=h,b=19):1===e?(k=i,O-=257,j=o,U-=257,b=256):(k=s,j=a,b=-1),C=0,x=0,S=I,y=l,B=R,M=0,g=-1,m=(P=1<<R)-1,1===e&&P>852||2===e&&P>592)return 1;for(;;){w=S-M,h[x]<b?(v=0,E=h[x]):h[x]>b?(v=j[U+h[x]],E=k[O+h[x]]):(v=96,E=0),d=1<<S-M,I=p=1<<B;do{u[y+(C>>M)+(p-=d)]=w<<24|v<<16|E}while(0!==p);for(d=1<<S-1;C&d;)d>>=1;if(0!==d?(C&=d-1,C+=d):C=0,x++,0==--N[S]){if(S===A)break;S=t[r+h[x]]}if(S>R&&(C&m)!==g){for(0===M&&(M=R),y+=I,T=1<<(B=S-M);B+M<A&&!((T-=N[B+M])<=0);)B++,T<<=1;if(P+=1<<B,1===e&&P>852||2===e&&P>592)return 1;u[g=C&m]=R<<24|B<<16|y-l}}return 0!==C&&(u[y+C]=S-M<<24|64<<16),f.bits=R,0}},912:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},9963:(e,t,r)=>{"use strict";var n=r(6067);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,s=286,a=30,c=15,u=16,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var g=new Array(60);i(g);var m=new Array(512);i(m);var y=new Array(256);i(y);var b=new Array(29);i(b);var w,v,E,_=new Array(a);function S(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function x(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function I(e){return e<256?m[e]:m[256+(e>>>7)]}function A(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,r){e.bi_valid>u-r?(e.bi_buf|=t<<e.bi_valid&65535,A(e,e.bi_buf),e.bi_buf=t>>u-e.bi_valid,e.bi_valid+=r-u):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function B(e,t,r){R(e,r[2*t],r[2*t+1])}function M(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function T(e,t,r){var n,i,o=new Array(c+1),s=0;for(n=1;n<=c;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=M(o[a]++,a))}}function P(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function C(e){e.bi_valid>8?A(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function k(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function O(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&k(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function N(e,t,r){var n,i,s,a,c=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===n?B(e,i,t):(B(e,(s=y[i])+o+1,t),0!==(a=l[s])&&R(e,i-=b[s],a),B(e,s=I(--n),r),0!==(a=h[s])&&R(e,n-=_[s],a))}while(c<e.last_lit);B(e,256,t)}function L(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;r>=1;r--)O(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,O(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,u=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(o=0;o<=c;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,m++),u[2*n+1]=o,n>l||(e.bl_count[o]++,s=0,n>=p&&(s=d[n-p]),a=u[2*n],e.opt_len+=a*(o+s),f&&(e.static_len+=a*(h[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,m-=2}while(m>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),T(o,l,e.bl_count)}function j(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<c&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,o=i,0===s?(c=138,u=3):i===s?(c=6,u=3):(c=7,u=4))}function U(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<c&&i===s)){if(a<u)do{B(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(B(e,i,e.bl_tree),a--),B(e,16,e.bl_tree),R(e,a-3,2)):a<=10?(B(e,17,e.bl_tree),R(e,a-3,3)):(B(e,18,e.bl_tree),R(e,a-11,7));a=0,o=i,0===s?(c=138,u=3):i===s?(c=6,u=3):(c=7,u=4)}}i(_);var $=!1;function F(e,t,r,i){R(e,0+(i?1:0),3),function(e,t,r){C(e),A(e,r),A(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){$||(function(){var e,t,r,n,i,o=new Array(c+1);for(r=0,n=0;n<28;n++)for(b[n]=r,e=0;e<1<<l[n];e++)y[r++]=n;for(y[r-1]=n,i=0,n=0;n<16;n++)for(_[n]=i,e=0;e<1<<h[n];e++)m[i++]=n;for(i>>=7;n<a;n++)for(_[n]=i<<7,e=0;e<1<<h[n]-7;e++)m[256+i++]=n;for(t=0;t<=c;t++)o[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,o[8]++;for(;e<=255;)p[2*e+1]=9,e++,o[9]++;for(;e<=279;)p[2*e+1]=7,e++,o[7]++;for(;e<=287;)p[2*e+1]=8,e++,o[8]++;for(T(p,287,o),e=0;e<a;e++)g[2*e+1]=5,g[2*e]=M(e,5);w=new S(p,l,257,s,c),v=new S(g,h,0,a,c),E=new S(new Array(0),f,0,19,7)}(),$=!0),e.l_desc=new x(e.dyn_ltree,w),e.d_desc=new x(e.dyn_dtree,v),e.bl_desc=new x(e.bl_tree,E),e.bi_buf=0,e.bi_valid=0,P(e)},t._tr_stored_block=F,t._tr_flush_block=function(e,t,r,n){var i,s,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),a=function(e){var t;for(j(e,e.dyn_ltree,e.l_desc.max_code),j(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?F(e,t,r,n):4===e.strategy||s===i?(R(e,2+(n?1:0),3),N(e,p,g)):(R(e,4+(n?1:0),3),function(e,t,r,n){var i;for(R(e,t-257,5),R(e,r-1,5),R(e,n-4,4),i=0;i<n;i++)R(e,e.bl_tree[2*d[i]+1],3);U(e,e.dyn_ltree,t-1),U(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),N(e,e.dyn_ltree,e.dyn_dtree)),P(e),n&&C(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(y[r]+o+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){R(e,2,3),B(e,256,p),function(e){16===e.bi_valid?(A(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},5848:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},8487:(e,t,r)=>{var n=r(912),i=r(5848),o=r(7825),s=r(777),a=r(6051);for(var c in a)t[c]=a[c];function u(e){if(e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function l(e,t){for(var r=0;r<e.length;r++)this[t+r]=e[r]}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,u.prototype.init=function(e,r,n,a,c){switch(this.windowBits=e,this.level=r,this.memLevel=n,this.strategy=a,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-this.windowBits),this.strm=new i,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:var u=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:u=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}u===t.Z_OK?(this.write_in_progress=!1,this.init_done=!0):this._error(u)},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===t.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},u.prototype.write=function(e,t,r,n,i,o,s){this._writeCheck(),this.write_in_progress=!0;var a=this;return process.nextTick((function(){a.write_in_progress=!1;var c=a._write(e,t,r,n,i,o,s);a.callback(c[0],c[1]),a.pending_close&&a.close()})),this},u.prototype.writeSync=function(e,t,r,n,i,o,s){return this._writeCheck(),this._write(e,t,r,n,i,o,s)},u.prototype._write=function(e,r,n,i,a,c,u){if(this.write_in_progress=!0,e!==t.Z_NO_FLUSH&&e!==t.Z_PARTIAL_FLUSH&&e!==t.Z_SYNC_FLUSH&&e!==t.Z_FULL_FLUSH&&e!==t.Z_FINISH&&e!==t.Z_BLOCK)throw new Error("Invalid flush value");null==r&&(r=new Buffer(0),i=0,n=0),a._set?a.set=a._set:a.set=l;var h=this.strm;switch(h.avail_in=i,h.input=r,h.next_in=n,h.avail_out=u,h.output=a,h.next_out=c,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:var f=o.deflate(h,e);break;case t.UNZIP:case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:f=s.inflate(h,e);break;default:throw new Error("Unknown mode "+this.mode)}return f!==t.Z_STREAM_END&&f!==t.Z_OK&&this._error(f),this.write_in_progress=!1,[h.avail_in,h.avail_out]},u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):s.inflateEnd(this.strm),this.mode=t.NONE)},u.prototype.reset=function(){switch(this.mode){case t.DEFLATE:case t.DEFLATERAW:var e=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:e=s.inflateReset(this.strm)}e!==t.Z_OK&&this._error(e)},u.prototype._error=function(e){this.onerror(n[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()},t.Zlib=u},3590:(e,t,r)=>{var n=r(7040),i=r(8487),o=r(537),s=r(4529).ok;function a(e,t,r){var n=[],i=0;function o(){for(var t;null!==(t=e.read());)n.push(t),i+=t.length;e.once("readable",o)}function s(){var t=Buffer.concat(n,i);n=[],r(null,t),e.close()}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)})),e.on("end",s),e.end(t),o()}function c(e,t){if("string"==typeof t&&(t=new Buffer(t)),!Buffer.isBuffer(t))throw new TypeError("Not a string or buffer");var r=i.Z_FINISH;return e._processChunk(t,r)}function u(e){if(!(this instanceof u))return new u(e);m.call(this,e,i.DEFLATE)}function l(e){if(!(this instanceof l))return new l(e);m.call(this,e,i.INFLATE)}function h(e){if(!(this instanceof h))return new h(e);m.call(this,e,i.GZIP)}function f(e){if(!(this instanceof f))return new f(e);m.call(this,e,i.GUNZIP)}function d(e){if(!(this instanceof d))return new d(e);m.call(this,e,i.DEFLATERAW)}function p(e){if(!(this instanceof p))return new p(e);m.call(this,e,i.INFLATERAW)}function g(e){if(!(this instanceof g))return new g(e);m.call(this,e,i.UNZIP)}function m(e,r){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&e.flush!==i.Z_NO_FLUSH&&e.flush!==i.Z_PARTIAL_FLUSH&&e.flush!==i.Z_SYNC_FLUSH&&e.flush!==i.Z_FULL_FLUSH&&e.flush!==i.Z_FINISH&&e.flush!==i.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||i.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Buffer.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new i.Zlib(r);var o=this;this._hadError=!1,this._binding.onerror=function(e,r){o._binding=null,o._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],o.emit("error",n)};var s=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(s=e.level);var a=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(a=e.strategy),this._binding.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,s,e.memLevel||t.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=new Buffer(this._chunkSize),this._offset=0,this._closed=!1,this._level=s,this._strategy=a,this.once("end",this.close)}i.Z_MIN_WINDOWBITS=8,i.Z_MAX_WINDOWBITS=15,i.Z_DEFAULT_WINDOWBITS=15,i.Z_MIN_CHUNK=64,i.Z_MAX_CHUNK=1/0,i.Z_DEFAULT_CHUNK=16384,i.Z_MIN_MEMLEVEL=1,i.Z_MAX_MEMLEVEL=9,i.Z_DEFAULT_MEMLEVEL=8,i.Z_MIN_LEVEL=-1,i.Z_MAX_LEVEL=9,i.Z_DEFAULT_LEVEL=i.Z_DEFAULT_COMPRESSION,Object.keys(i).forEach((function(e){e.match(/^Z/)&&(t[e]=i[e])})),t.codes={Z_OK:i.Z_OK,Z_STREAM_END:i.Z_STREAM_END,Z_NEED_DICT:i.Z_NEED_DICT,Z_ERRNO:i.Z_ERRNO,Z_STREAM_ERROR:i.Z_STREAM_ERROR,Z_DATA_ERROR:i.Z_DATA_ERROR,Z_MEM_ERROR:i.Z_MEM_ERROR,Z_BUF_ERROR:i.Z_BUF_ERROR,Z_VERSION_ERROR:i.Z_VERSION_ERROR},Object.keys(t.codes).forEach((function(e){t.codes[t.codes[e]]=e})),t.Deflate=u,t.Inflate=l,t.Gzip=h,t.Gunzip=f,t.DeflateRaw=d,t.InflateRaw=p,t.Unzip=g,t.createDeflate=function(e){return new u(e)},t.createInflate=function(e){return new l(e)},t.createDeflateRaw=function(e){return new d(e)},t.createInflateRaw=function(e){return new p(e)},t.createGzip=function(e){return new h(e)},t.createGunzip=function(e){return new f(e)},t.createUnzip=function(e){return new g(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new u(t),e,r)},t.deflateSync=function(e,t){return c(new u(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new h(t),e,r)},t.gzipSync=function(e,t){return c(new h(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new d(t),e,r)},t.deflateRawSync=function(e,t){return c(new d(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new g(t),e,r)},t.unzipSync=function(e,t){return c(new g(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new l(t),e,r)},t.inflateSync=function(e,t){return c(new l(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new f(t),e,r)},t.gunzipSync=function(e,t){return c(new f(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new p(t),e,r)},t.inflateRawSync=function(e,t){return c(new p(t),e)},o.inherits(m,n),m.prototype.params=function(e,r,n){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(i.Z_SYNC_FLUSH,(function(){o._binding.params(e,r),o._hadError||(o._level=e,o._strategy=r,n&&n())}))}else process.nextTick(n)},m.prototype.reset=function(){return this._binding.reset()},m.prototype._flush=function(e){this._transform(new Buffer(0),"",e)},m.prototype.flush=function(e,t){var r=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=i.Z_FULL_FLUSH),r.ended)t&&process.nextTick(t);else if(r.ending)t&&this.once("end",t);else if(r.needDrain){var n=this;this.once("drain",(function(){n.flush(t)}))}else this._flushFlag=e,this.write(new Buffer(0),"",t)},m.prototype.close=function(e){if(e&&process.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;process.nextTick((function(){t.emit("close")}))}},m.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);if(null===!e&&!Buffer.isBuffer(e))return r(new Error("invalid input"));s?n=i.Z_FINISH:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||i.Z_NO_FLUSH)),this._processChunk(e,n,r)},m.prototype._processChunk=function(e,t,r){var n=e&&e.length,i=this._chunkSize-this._offset,o=0,a=this,c="function"==typeof r;if(!c){var u,l=[],h=0;this.on("error",(function(e){u=e}));do{var f=this._binding.writeSync(t,e,o,n,this._buffer,this._offset,i)}while(!this._hadError&&g(f[0],f[1]));if(this._hadError)throw u;var d=Buffer.concat(l,h);return this.close(),d}var p=this._binding.write(t,e,o,n,this._buffer,this._offset,i);function g(u,f){if(!a._hadError){var d=i-f;if(s(d>=0,"have should not go down"),d>0){var p=a._buffer.slice(a._offset,a._offset+d);a._offset+=d,c?a.push(p):(l.push(p),h+=p.length)}if((0===f||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new Buffer(a._chunkSize)),0===f){if(o+=n-u,n=u,!c)return!0;var m=a._binding.write(t,e,o,n,a._buffer,a._offset,a._chunkSize);return m.callback=g,void(m.buffer=e)}if(!c)return!1;r()}}p.buffer=e,p.callback=g},o.inherits(u,m),o.inherits(l,m),o.inherits(h,m),o.inherits(f,m),o.inherits(d,m),o.inherits(p,m),o.inherits(g,m)},8287:(e,t,r)=>{"use strict";var n=r(7526),i=r(251),o=r(4634);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=f(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=a(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(c.isBuffer(t)){var r=0|d(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(l(t),e=a(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|d(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var h=!0,f=0;f<c;f++)if(u(e,o+f)!==u(t,f)){h=!1;break}if(h)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return z(F(t,e.length-r),e,r,n)}function E(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return E(e,t,r,n)}function S(e,t,r,n){return z(D(t),e,r,n)}function x(e,t,r,n){return z(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,c,u=e[i],l=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return u(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,n,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),h=0;h<a;++h)if(u[h]!==l[h]){o=u[h],s=l[h];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function M(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){var n,i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var o="",s=t;s<r;++s)o+=(n=e[s])<16?"0"+n.toString(16):n.toString(16);return o}function P(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function O(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||k(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||k(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);k(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);k(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=c.isBuffer(e)?e:F(new c(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var $=/[^+\/0-9A-Za-z-_]/g;function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},5622:(e,t,r)=>{function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(8287).Buffer.isBuffer},8e3:e=>{var t=1e3,r=60*t,n=60*r,i=24*n,o=7*i;function s(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,a){a=a||{};var c,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===l&&isFinite(e))return a.long?(c=e,(u=Math.abs(c))>=i?s(c,u,i,"day"):u>=n?s(c,u,n,"hour"):u>=r?s(c,u,r,"minute"):u>=t?s(c,u,t,"second"):c+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(8e3),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},2019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),i=r(2672);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})};const n=r(9615),i=r(9175),o=r(489);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}},9206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:c}=n(t);let u=e.ZERO,l=e.BASE;const h=BigInt(2**t-1),f=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let n=Number(o&h);o>>=d,n>c&&(n-=f,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,m=n<0;0===n?l=l.add(r(g,i[a])):u=u.add(r(m,i[p]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};const n=r(9015),i=r(9372),o=BigInt(0),s=BigInt(1)},1761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=u,t.expand_message_xof=l,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s},mapToCurve(r){if(!Array.isArray(r))throw new Error("mapToCurve: expected array of bigints");for(const e of r)if("bigint"!=typeof e)throw new Error(`mapToCurve: expected array of bigints, got ${e} in array`);const n=e.fromAffine(t(r)).clearCofactor();return n.assertValidity(),n}}};const n=r(9015),i=r(9372),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e,t,r,n){(0,i.abytes)(e),(0,i.abytes)(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:u}=n,l=Math.ceil(r/o);if(l>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),f=s(0,u),d=s(r,2),p=new Array(l),g=n((0,i.concatBytes)(f,e,d,s(0,1),h));p[0]=n((0,i.concatBytes)(g,s(1,1),h));for(let e=1;e<=l;e++){const t=[a(g,p[e-1]),s(e+1,1),h];p[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...p).slice(0,r)}function l(e,t,r,n,o){if((0,i.abytes)(e),(0,i.abytes)(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:f,expand:d,DST:p}=r;(0,i.abytes)(e),c(t);const g="string"==typeof p?(0,i.utf8ToBytes)(p):p,m=s.toString(2).length,y=Math.ceil((m+a)/8),b=t*h*y;let w;if("xmd"===d)w=u(e,g,b,f);else if("xof"===d)w=l(e,g,b,a,f);else{if("_internal_pass"!==d)throw new Error('expand must be "xmd" or "xof"');w=e}const v=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=y*(r+e*h),a=w.subarray(i,i+y);t[r]=(0,n.mod)(o(a),s)}v[e]=t}return v}},9015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=h,t.pow=f,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=g,t.validateField=function(e){const t=m.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=y,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=w(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>h(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>h(-t,e),eql:(e,t)=>e===t,sqr:t=>h(t*t,e),add:(t,r)=>h(t+r,e),sub:(t,r)=>h(t-r,e),mul:(t,r)=>h(t*r,e),pow:(e,t)=>y(l,e,t),div:(t,r)=>h(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=w(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return h(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=v,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=v(t),a=E(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const c=h(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)};const n=r(9372),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function h(e,t){const r=e%t;return r>=i?r:t+r}function f(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=h(e,t),n=t,s=i,a=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=s-c*e,o=a-u*e;n=r,r=t,s=c,a=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return h(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&f(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const u=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,c=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,u),h=e.pow(i,r);for(;!e.eql(h,e.ONE);){if(e.eql(h,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(h);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(r),l=e.mul(l,r),h=e.mul(h,c),s=t}return l}}function g(e){if(e%c===a){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===u){const t=(e-u)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),r))throw new Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.isNegativeLE=(e,t)=>(h(e,t)&o)===o;const m=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function w(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function v(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=v(e);return t+Math.ceil(t/2)}},9372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bitMask=void 0,t.isBytes=o,t.abytes=s,t.bytesToHex=c,t.numberToHexUnpadded=u,t.hexToNumber=l,t.hexToBytes=d,t.bytesToNumberBE=function(e){return l(c(e))},t.bytesToNumberLE=function(e){return s(e),l(c(Uint8Array.from(e).reverse()))},t.numberToBytesBE=p,t.numberToBytesLE=function(e,t){return p(e,t).reverse()},t.numberToVarBytesBE=function(e){return d(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=d(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=g,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,i){return e|(i?n:r)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=m(e),i=m(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=m())=>{i=a(y([0]),e),n=a(),0!==e.length&&(i=a(y([1]),e),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return g(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=b[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e};const r=BigInt(0),n=BigInt(1),i=BigInt(2);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function s(e){if(!o(e))throw new Error("Uint8Array expected")}const a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){s(e);let t="";for(let r=0;r<e.length;r++)t+=a[e[r]];return t}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const h={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function f(e){return e>=h._0&&e<=h._9?e-h._0:e>=h._A&&e<=h._F?e-(h._A-10):e>=h._a&&e<=h._f?e-(h._a-10):void 0}function d(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function p(e,t){return d(e.toString(16).padStart(2*t,"0"))}function g(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];s(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}t.bitMask=e=>(i<<BigInt(e-1))-n;const m=e=>new Uint8Array(e),y=e=>Uint8Array.from(e),b={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)}},489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=void 0,t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,n.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,h=a.BYTES+1,f=2*a.BYTES+1;function d(e){return i.mod(e,c)}function g(e){return i.invert(e,c)}const{ProjectivePoint:m,normPrivateKeyToScalar:y,weierstrassEquation:b,isWithinCurveOrder:w}=p({...r,toBytes(e,t,r){const n=t.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==h||2!==r&&3!==r){if(t===f&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${h} compressed bytes or ${f} uncompressed bytes`)}{const e=o.bytesToNumberBE(n);if(!(u<(i=e)&&i<a.ORDER))throw new Error("Point is not on curve");const t=b(e);let s;try{s=a.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var i}}),v=e=>o.bytesToHex(o.numberToBytesBE(e,r.nByteLength));function E(e){return e>c>>l}const _=(e,t,r)=>o.bytesToNumberBE(e.slice(t,r));class S{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,s.ensureBytes)("compactSignature",e,2*t),new S(_(e,0,t),_(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,s.ensureBytes)("DER",e));return new S(r,n)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new S(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,o=R((0,s.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=m.fromHex(u+v(c)),h=g(c),f=d(-o*h),p=d(n*h),y=m.BASE.multiplyAndAddUnsafe(l,f,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const x={isValidPrivateKey(e){try{return y(e),!0}catch(e){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const e=i.getMinHashLength(r.n);return i.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function I(e){const t=o.isBytes(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===h||n===f:r?n===2*h||n===2*f:e instanceof m}const A=r.bits2int||function(e){const t=o.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},R=r.bits2int_modN||function(e){return d(A(e))},B=o.bitMask(r.nBitLength);function M(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&e<B))throw new Error(`bigint expected < 2^${r.nBitLength}`);return o.numberToBytesBE(e,r.nByteLength)}const T={lowS:r.lowS,prehash:!1},P={lowS:r.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(I(e))throw new Error("first arg must be private key");if(!I(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(y(e)).toRawBytes(r)},sign:function(e,t,n=T){const{seed:i,k2sig:c}=function(e,t,n=T){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:c}=r;let{lowS:h,prehash:f,extraEntropy:p}=n;null==h&&(h=!0),e=(0,s.ensureBytes)("msgHash",e),f&&(e=(0,s.ensureBytes)("prehashed msgHash",i(e)));const b=R(e),v=y(t),_=[M(v),M(b)];if(null!=p&&!1!==p){const e=!0===p?c(a.BYTES):p;_.push((0,s.ensureBytes)("extraEntropy",e))}const x=o.concatBytes(..._),I=b;return{seed:x,k2sig:function(e){const t=A(e);if(!w(t))return;const r=g(t),n=m.BASE.multiply(t).toAffine(),i=d(n.x);if(i===u)return;const o=d(r*d(I+i*v));if(o===u)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return h&&E(o)&&(a=function(e){return E(e)?d(-e):e}(o),s^=1),new S(i,a,s)}}}(e,t,n),h=r;return o.createHmacDrbg(h.hash.outputLen,h.nByteLength,h.hmac)(i,c)},verify:function(e,n,i,a=P){const c=e;if(n=(0,s.ensureBytes)("msgHash",n),i=(0,s.ensureBytes)("publicKey",i),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=a;let h,f;try{if("string"==typeof c||o.isBytes(c))try{h=S.fromDER(c)}catch(e){if(!(e instanceof t.DER.Err))throw e;h=S.fromCompact(c)}else{if("object"!=typeof c||"bigint"!=typeof c.r||"bigint"!=typeof c.s)throw new Error("PARSE");{const{r:e,s:t}=c;h=new S(e,t)}}f=m.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&h.hasHighS())return!1;l&&(n=r.hash(n));const{r:p,s:y}=h,b=R(n),w=g(y),v=d(b*w),E=d(p*w),_=m.BASE.multiplyAndAddUnsafe(f,v,E)?.toAffine();return!!_&&d(_.x)===p},ProjectivePoint:m,Signature:S,utils:x}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(i.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,c,u,l,h;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,s),u=e.mul(u,a),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,s);const{isValid:f,value:d}=r(o,u);h=e.mul(i,n),h=e.mul(h,d),l=e.cmov(l,s,f),h=e.cmov(h,d,f);const p=e.isOdd(n)===e.isOdd(h);return h=e.cmov(e.neg(h),h,p),l=e.div(l,a),{x:l,y:h}}};const n=r(9206),i=r(9015),o=r(9372),s=r(9372),{bytesToNumberBE:a,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;o.abytes(n);let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:s,l:a}=t.DER._parseInt(n.subarray(2)),{d:u,l}=t.DER._parseInt(a);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:s,s:u}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),h=BigInt(2),f=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,n.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:i,a:s}=t;if(r){if(!i.eql(s,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function h(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),h(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&u<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:a,n:c}=t;if(r&&"bigint"!=typeof e){if(o.isBytes(e)&&(e=o.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*n,"0")}let u;try{u="bigint"==typeof e?e:o.bytesToNumberBE((0,s.ensureBytes)("private key",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=i.mod(u,c)),p(u),u}const m=new Map;function y(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}class b{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(c((0,s.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,m.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=h(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){y(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,f),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,h=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(d,u),u=r.add(d,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(h,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(h,h),h=r.add(l,h),h=r.add(h,p),h=r.mul(h,g),u=r.add(u,h),p=r.mul(s,a),p=r.add(p,p),h=r.mul(p,g),c=r.sub(c,h),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new b(c,u,l)}add(e){y(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,h=r.ZERO;const d=t.a,p=r.mul(t.b,f);let g=r.mul(n,s),m=r.mul(i,a),w=r.mul(o,c),v=r.add(n,i),E=r.add(s,a);v=r.mul(v,E),E=r.add(g,m),v=r.sub(v,E),E=r.add(n,o);let _=r.add(s,c);return E=r.mul(E,_),_=r.add(g,w),E=r.sub(E,_),_=r.add(i,o),u=r.add(a,c),_=r.mul(_,u),u=r.add(m,w),_=r.sub(_,u),h=r.mul(d,E),u=r.mul(p,w),h=r.add(u,h),u=r.sub(m,h),h=r.add(m,h),l=r.mul(u,h),m=r.add(g,g),m=r.add(m,g),w=r.mul(d,w),E=r.mul(p,E),m=r.add(m,w),w=r.sub(g,w),w=r.mul(d,w),E=r.add(E,w),g=r.mul(m,E),l=r.add(l,g),g=r.mul(_,E),u=r.mul(v,u),u=r.sub(u,g),g=r.mul(v,m),h=r.mul(_,h),h=r.add(h,g),new b(u,l,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return v.wNAFCached(this,m,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===u)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return v.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:c}=i.splitScalar(e),h=n,f=n,d=this;for(;s>u||c>u;)s&l&&(h=h.add(d)),c&l&&(f=f.add(d)),d=d.double(),s>>=l,c>>=l;return o&&(h=h.negate()),a&&(f=f.negate()),f=new b(r.mul(f.px,i.beta),f.py,f.pz),h.add(f)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f:l}=this.wNAF(t),{p:h,f}=this.wNAF(c);u=v.constTimeNegate(e,u),h=v.constTimeNegate(a,h),h=new b(r.mul(h.px,s.beta),h.py,h.pz),n=u.add(h),i=l.add(f)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const w=t.nBitLength,v=(0,n.wNAF)(b,t.endo?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:h,isWithinCurveOrder:d}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%h===u;e/=h)n+=l;const i=n,o=h<<i-l-l,s=o*h,a=(r-l)/s,c=(a-l)/h,p=s-l,g=o,m=e.pow(t,a),y=e.pow(t,(a+l)/h);let b=(t,r)=>{let n=m,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,o);a=e.pow(u,g);let f=e.eql(a,e.ONE);o=e.mul(s,y),a=e.mul(u,n),s=e.cmov(o,s,f),u=e.cmov(a,u,f);for(let t=i;t>l;t--){let r=t-h;r=h<<r-l;let i=e.pow(u,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(u,n),s=e.cmov(o,s,a),u=e.cmov(i,u,a)}return{isValid:f,value:s}};if(e.ORDER%d===f){const r=(e.ORDER-f)/d,n=e.sqrt(e.neg(t));b=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}},7694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),i=r(9175),o=r(714),s=r(1761),a=r(9015),c=r(9372),u=r(489),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),h=e*e*e%t,f=h*h*e%t,p=(0,a.pow2)(f,r,t)*f%t,g=(0,a.pow2)(p,r,t)*f%t,y=(0,a.pow2)(g,d,t)*h%t,b=(0,a.pow2)(y,i,t)*y%t,w=(0,a.pow2)(b,o,t)*b%t,v=(0,a.pow2)(w,c,t)*w%t,E=(0,a.pow2)(v,u,t)*v%t,_=(0,a.pow2)(E,c,t)*w%t,S=(0,a.pow2)(_,r,t)*f%t,x=(0,a.pow2)(S,s,t)*b%t,I=(0,a.pow2)(x,n,t)*h%t,A=(0,a.pow2)(I,d,t);if(!m.eql(m.sqr(A),e))throw new Error("Cannot find square root");return A}const m=(0,a.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),c=p(o*e,t),u=p(-n*e,t);let l=(0,a.mod)(e-c*r-u*i,t),d=(0,a.mod)(-c*n-u*o,t);const g=l>s,m=d>s;if(g&&(l=t-l),m&&(d=t-d),l>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:m,k2:d}}}},n.sha256);const y=BigInt(0),b=e=>"bigint"==typeof e&&y<e&&e<l,w=e=>"bigint"==typeof e&&y<e&&e<h,v={};function E(e,...t){let r=v[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,c.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,c.concatBytes)(r,...t))}const _=e=>e.toRawBytes(!0).slice(1),S=e=>(0,c.numberToBytesBE)(e,32),x=e=>(0,a.mod)(e,l),I=e=>(0,a.mod)(e,h),A=t.secp256k1.ProjectivePoint,R=(e,t,r)=>A.BASE.multiplyAndAddUnsafe(e,t,r);function B(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=A.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:I(-r),bytes:_(n)}}function M(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=x(e*e);let r=g(x(t*e+BigInt(7)));r%d!==y&&(r=x(-r));const n=new A(e,r,f);return n.assertValidity(),n}function T(...e){return I((0,c.bytesToNumberBE)(E("BIP0340/challenge",...e)))}function P(e,t,r){const n=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),o=(0,c.ensureBytes)("publicKey",r,32);try{const e=M((0,c.bytesToNumberBE)(o)),t=(0,c.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;const r=(0,c.bytesToNumberBE)(n.subarray(32,64));if(!w(r))return!1;const s=T(S(t),_(e),i),a=R(e,r,I(-s));return!(!a||!a.hasEvenY()||a.toAffine().x!==t)}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return B(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,c.ensureBytes)("message",e),{bytes:o,scalar:s}=B(t),a=(0,c.ensureBytes)("auxRand",r,32),u=S(s^(0,c.bytesToNumberBE)(E("BIP0340/aux",a))),l=E("BIP0340/nonce",u,o,n),h=I((0,c.bytesToNumberBE)(l));if(h===y)throw new Error("sign failed: k is zero");const{bytes:f,scalar:d}=B(h),p=T(f,o,n),g=new Uint8Array(64);if(g.set(f,0),g.set(S(I(d+p*s)),32),!P(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:P,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:M,pointToBytes:_,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:E,mod:a.mod}};const C=(()=>(0,s.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),k=(()=>(0,u.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}))(),O=(()=>(0,s.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=k(m.create(e[0]));return C(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=O.hashToCurve,t.encodeToCurve=O.encodeToCurve},6513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(7694);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},2672:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0,t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))};const i=n(r(7557)),o=r(9175),s=i.default.bool;t.assertBool=s;const a=i.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,s),!0}for(u=1,c=new Array(h-1);u<h;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),h){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,i);break;default:if(!c)for(f=1,c=new Array(h-1);f<h;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},1083:(e,t,r)=>{var n=r(7524),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",n.request.call(this,e,t)}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+h],h+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*g}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const n=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class i extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=i;class o extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function s(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=o;let a={};function c(e,t){let u={...n,...t};const l=r(7524),h=r(1083),f=r(3590),{promisify:d}=r(537),{resolve:p}=r(8835),g=!!/^https/.test(e);let m={method:u.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const y=e=>e.replace(/:| /g,"").toLowerCase();if(u.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&u.sslPinnedCertificates?.map((e=>y(e))).sort()].join();m.agent=a[t]||(a[t]=new(g?h:l).Agent(e))}return"json"===u.type&&(m.headers["Content-Type"]="application/json"),u.data&&(u.method||(m.method="POST"),m.body="json"===u.type?JSON.stringify(u.data):u.data),m.headers={...m.headers,...u.headers},u.sslAllowSelfSigned&&(m.rejectUnauthorized=!1),new Promise(((t,r)=>{const n=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await c(e,{...u,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new i(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},a=(g?h:l).request(e,m,(i=>{i.on("error",n),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(u.redirect&&300<=r&&r<400&&t.headers.location){if(10==u._redirectCount)throw new Error("Request failed. Too much redirects.");return u._redirectCount+=1,await c(p(e,t.headers.location),u)}if(u.expectStatusCode&&r!==u.expectStatusCode)throw t.resume(),new o(r);let n=[];for await(const e of t)n.push(e);let i=Buffer.concat(n);const a=t.headers["content-encoding"];"br"===a&&(i=await d(f.brotliDecompress)(i)),"gzip"!==a&&"deflate"!==a||(i=await d(f.unzip)(i));const l=s(i,u.type);return u.full?{headers:t.headers,status:r,body:l}:l})(i))}catch(e){r(e)}})()}));a.on("error",n);const b=u.sslPinnedCertificates?.map((e=>y(e))),w=e=>{const t=y(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!b.includes(t))return a.emit("error",new i(`Invalid SSL certificate: ${t} Expected: ${b}`,t)),a.abort()};u.sslPinnedCertificates&&a.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",w.bind(null,e))})),u.keepAlive&&a.setNoDelay(!0),m.body&&a.write(m.body),a.end()}))}const u=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),l=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function h(e,t){let r={...n,...t};const i=new Headers;"json"===r.type&&i.set("Content-Type","application/json");let a=new URL(e);if(a.username){const e=btoa(`${a.username}:${a.password}`);i.set("Authorization",`Basic ${e}`),a.username="",a.password=""}e=""+a;for(let e in r.headers){const t=e.toLowerCase();(u.has(t)||r.cors&&!l.has(t))&&i.set(e,r.headers[e])}let c={headers:i,redirect:r.redirect?"follow":"manual"};r.referrer||(c.referrerPolicy="no-referrer"),r.cors&&(c.mode="cors"),r.data&&(r.method||(c.method="POST"),c.body="json"===r.type?JSON.stringify(r.data):r.data);const h=await fetch(e,c);if(r.expectStatusCode&&h.status!==r.expectStatusCode)throw new o(h.status);const f=s(new Uint8Array(await h.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(h.headers.entries()),status:h.status,body:f}:f}const f=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);t.default=function(e,t){return(f?c:h)(e,t)}},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,s,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in o=Object(arguments[c]))r.call(o,u)&&(a[u]=o[u]);if(t){s=t(o);for(var l=0;l<s.length;l++)n.call(o,s[l])&&(a[s[l]]=o[s[l]])}}return a}},1843:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(5832),{findCauseByReference:i,getErrorCause:o,messageWithCauses:s,stackWithCauses:a}=r(4306);e.exports={ErrorWithCause:n,findCauseByReference:i,getErrorCause:o,stackWithCauses:a,messageWithCauses:s}},5832:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},4306:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const i=e.stack||"";if(n.has(e))return i+"\ncauses have become circular...";const o=t(e);return o?(n.add(e),i+"\ncaused by: "+r(o,n)):i},n=(e,r,i)=>{if(!(e instanceof Error))return"";const o=i?"":e.message||"";if(r.has(e))return o+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return o+(t?"":": ")+n(s,r,t)}return o};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof r)return i;i=t(i)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},4930:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(n);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var h,f,d,p,g=e[l].replace(a,"%20"),m=g.indexOf(i);m>=0?(h=g.substr(0,m),f=g.substr(m+1)):(h=g,f=""),d=decodeURIComponent(h),p=decodeURIComponent(f),t(s,d)?r(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},1590:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,s,a){return o=o||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?n(i(e),(function(i){var a=encodeURIComponent(t(i))+s;return r(e[i])?n(e[i],(function(e){return a+encodeURIComponent(t(e))})).join(o):a+encodeURIComponent(t(e[i]))})).join(o):a?encodeURIComponent(t(a))+s+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},2894:(e,t,r)=>{"use strict";t.decode=t.parse=r(4930),t.encode=t.stringify=r(1590)},7264:(e,t,r)=>{e.exports=r(5382)},5382:(e,t,r)=>{e.exports=a;var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},i=r(5622);i.inherits=r(6698);var o=r(5412),s=r(6708);function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}i.inherits(a,o),function(e){for(var t=0,r=e.length;t<r;t++)n=e[t],a.prototype[n]||(a.prototype[n]=s.prototype[n]);var n}(n(s.prototype))},3600:(e,t,r)=>{e.exports=o;var n=r(4610),i=r(5622);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(6698),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},5412:(e,t,r)=>{e.exports=h;var n=r(7225),i=r(8287).Buffer;h.ReadableState=l;var o=r(7007).EventEmitter;o.listenerCount||(o.listenerCount=function(e,t){return e.listeners(t).length});var s,a=r(8310),c=r(5622);c.inherits=r(6698);var u=r(537);function l(e,t){var n=r(5382),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=r(9579).I),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function h(e){if(r(5382),!(this instanceof h))return new h(e);this._readableState=new l(e,this),this.readable=!0,a.call(this)}function f(e,t,r,n,i){var o=function(e,t){var r=null;return c.isBuffer(t)||c.isString(t)||c.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(t,r);if(o)e.emit("error",o);else if(c.isNullOrUndefined(r))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,g(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else t.endEmitted&&i?(s=new Error("stream.unshift() after end event"),e.emit("error",s)):(!t.decoder||i||n||(r=t.decoder.write(r)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&g(e)),function(e,t){t.readingMore||(t.readingMore=!0,process.nextTick((function(){!function(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(u("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t));else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}u=u&&u.debuglog?u.debuglog("stream"):function(){},c.inherits(h,a),h.prototype.push=function(e,t){var r=this._readableState;return c.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding)!==r.encoding&&(e=new i(e,t),t=""),f(this,r,e,t,!1)},h.prototype.unshift=function(e){return f(this,this._readableState,e,"",!0)},h.prototype.setEncoding=function(e){return s||(s=r(9579).I),this._readableState.decoder=new s(e),this._readableState.encoding=e,this};var d=8388608;function p(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||c.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=d)e=d;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function g(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick((function(){m(e)})):m(e))}function m(e){u("emit readable"),e.emit("readable"),y(e)}function y(e){var t=e._readableState;if(u("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function b(e,t){var r,n=t.buffer,o=t.length,s=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(a)r=n.shift();else if(!e||e>=o)r=s?n.join(""):i.concat(n,o),n.length=0;else if(e<n[0].length)r=(h=n[0]).slice(0,e),n[0]=h.slice(e);else if(e===n[0].length)r=n.shift();else{r=s?"":new i(e);for(var c=0,u=0,l=n.length;u<l&&c<e;u++){var h=n[0],f=Math.min(e-c,h.length);s?r+=h.slice(0,f):h.copy(r,c,0,f),f<h.length?n[0]=h.slice(f):n.shift(),c+=f}}return r}function w(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}h.prototype.read=function(e){u("read",e);var t=this._readableState,r=e;if((!c.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?w(this):g(this),null;if(0===(e=p(e,t))&&t.ended)return 0===t.length&&w(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),(t.ended||t.reading)&&u("reading or ended",i=!1),i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=p(r,t)),n=e>0?b(e,t):null,c.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&w(this),c.isNull(n)||this.emit("data",n),n},h.prototype._read=function(e){this.emit("error",new Error("not implemented"))},h.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?h:c;function a(e){u("onunpipe"),e===r&&h()}function c(){u("onend"),e.end()}i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,y(e))}}(r);function h(){u("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",h),r.removeListener("data",f),!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function f(t){u("ondata"),!1===e.write(t)&&(u("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,r.pause())}function d(t){u("onerror",t),m(),e.removeListener("error",d),0===o.listenerCount(e,"error")&&e.emit("error",t)}function p(){e.removeListener("finish",g),m()}function g(){u("onfinish"),e.removeListener("close",p),m()}function m(){u("unpipe"),r.unpipe(e)}return e.on("drain",l),r.on("data",f),e._events&&e._events.error?n(e._events.error)?e._events.error.unshift(d):e._events.error=[d,e._events.error]:e.on("error",d),e.once("close",p),e.once("finish",g),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},h.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}return-1===(i=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e))||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},h.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&g(this);else{var i=this;process.nextTick((function(){u("readable nexttick read 0"),i.read(0)}))}}return r},h.prototype.addListener=h.prototype.on,h.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!0,e.reading||(u("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},h.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},h.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(u("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){u("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)&&(n.push(i)||(r=!0,e.pause()))})),e)c.isFunction(e[i])&&c.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(t){for(var r=0,i=t.length;r<i;r++)o=t[r],e.on(o,n.emit.bind(n,o));var o}(["error","close","destroy","pause","resume"]),n._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},n},h._fromList=b},4610:(e,t,r)=>{e.exports=s;var n=r(5382),i=r(5622);function o(e,t){this.afterTransform=function(e,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,i.isNullOrUndefined(r)||e.push(r),o&&o(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState=new o(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){i.isFunction(this._flush)?this._flush((function(e){a(t,e)})):a(t)}))}function a(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=r(6698),i.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;i.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},6708:(e,t,r)=>{e.exports=c;var n=r(8287).Buffer;c.WritableState=a;var i=r(5622);i.inherits=r(6698);var o=r(8310);function s(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function a(e,t){var n=r(5382),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){r?process.nextTick((function(){t.pendingcb--,i(n)})):(t.pendingcb--,i(n)),e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,i);else{var o=f(0,r);o||r.corked||r.bufferProcessing||!r.buffer.length||h(e,r),n?process.nextTick((function(){l(e,r,o,i)})):l(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function c(e){var t=r(5382);if(!(this instanceof c||this instanceof t))return new c(e);this._writableState=new a(e,this),this.writable=!0,o.call(this)}function u(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function l(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),p(e,t)}function h(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,u(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var i=t.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=t.objectMode?1:o.length;if(u(e,t,!1,c,o,s,a),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function f(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function d(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function p(e,t){var r=f(0,t);return r&&(0===t.pendingcb?(d(e,t),t.finished=!0,e.emit("finish")):d(e,t)),r}i.inherits(c,o),c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},c.prototype.write=function(e,t,r){var o=this._writableState,a=!1;return i.isFunction(t)&&(r=t,t=null),i.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),i.isFunction(r)||(r=function(){}),o.ended?function(e,t,r){var n=new Error("write after end");e.emit("error",n),process.nextTick((function(){r(n)}))}(this,0,r):function(e,t,r,n){var o=!0;if(!(i.isBuffer(r)||i.isString(r)||i.isNullOrUndefined(r)||t.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),process.nextTick((function(){n(s)})),o=!1}return o}(this,o,e,r)&&(o.pendingcb++,a=function(e,t,r,o,a){r=function(e,t,r){return!e.objectMode&&!1!==e.decodeStrings&&i.isString(t)&&(t=new n(t,r)),t}(t,r,o),i.isBuffer(r)&&(o="buffer");var c=t.objectMode?1:r.length;t.length+=c;var l=t.length<t.highWaterMark;return l||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new s(r,o,a)):u(e,t,!1,c,r,o,a),l}(this,o,e,t,r)),a},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||h(this,e))},c.prototype._write=function(e,t,r){r(new Error("not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,r){var n=this._writableState;i.isFunction(e)?(r=e,e=null,t=null):i.isFunction(t)&&(r=t,t=null),i.isNullOrUndefined(e)||this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,p(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0}(this,n,r)}},7225:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2546:(e,t,r)=>{e.exports=r(3600)},4198:(e,t,r)=>{(t=e.exports=r(5412)).Stream=r(8310),t.Readable=t,t.Writable=r(6708),t.Duplex=r(5382),t.Transform=r(4610),t.PassThrough=r(3600),process.browser||"disable"!==process.env.READABLE_STREAM||(e.exports=r(8310))},7040:(e,t,r)=>{e.exports=r(4610)},1818:(e,t,r)=>{e.exports=r(6708)},3904:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new h(e.value,t).test(this.value):""===e.operator?""===e.value||new h(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const o=r(8587),{safeRe:s,t:a}=r(9718),c=r(2111),u=r(7272),l=r(3908),h=r(8311)},8311:(e,t,r)=>{const n=/\s+/g;class i{constructor(e,t){if(t=s(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&g)|(this.options.loose&&m))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?l[h.HYPHENRANGELOOSE]:l[h.HYPHENRANGE];e=e.replace(i,T(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(l[h.COMPARATORTRIM],f),c("comparator trim",e),e=e.replace(l[h.TILDETRIM],d),c("tilde trim",e),e=e.replace(l[h.CARETTRIM],p),c("caret trim",e);let s=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options)));n&&(s=s.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(l[h.COMPARATORLOOSE]))))),c("range list",s);const u=new Map,b=s.map((e=>new a(e,this.options)));for(const e of b){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const w=[...u.values()];return o.set(t,w),w}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=i;const o=new(r(8794)),s=r(8587),a=r(3904),c=r(7272),u=r(3908),{safeRe:l,t:h,comparatorTrimReplace:f,tildeTrimReplace:d,caretTrimReplace:p}=r(9718),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:m}=r(6874),y=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},v=(e,t)=>(c("comp",e,t),e=x(e,t),c("caret",e),e=_(e,t),c("tildes",e),e=A(e,t),c("xrange",e),e=B(e,t),c("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?l[h.TILDELOOSE]:l[h.TILDE];return e.replace(r,((t,r,n,i,o)=>{let s;return c("tilde",e,t,r,n,i,o),E(r)?s="":E(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:E(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(c("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,c("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>I(e,t))).join(" "),I=(e,t)=>{c("caret",e,t);const r=t.loose?l[h.CARETLOOSE]:l[h.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,o,s)=>{let a;return c("caret",e,t,r,i,o,s),E(r)?a="":E(i)?a=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(o)?a="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(c("replaceCaret pr",s),a="0"===r?"0"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(c("no pr"),a="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),c("caret return",a),a}))},A=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>{e=e.trim();const r=t.loose?l[h.XRANGELOOSE]:l[h.XRANGE];return e.replace(r,((r,n,i,o,s,a)=>{c("xRange",e,r,n,i,o,s,a);const u=E(i),l=u||E(o),h=l||E(s),f=h;return"="===n&&f&&(n=""),a=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),"<"===n&&(a="-0"),r=`${n+i}.${o}.${s}${a}`):l?r=`>=${i}.0.0${a} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${o}.0${a} <${i}.${+o+1}.0-0`),c("xRange return",r),r}))},B=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[h.STAR],"")),M=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?h.GTE0PRE:h.GTE0],"")),T=e=>(t,r,n,i,o,s,a,c,u,l,h,f)=>`${r=E(n)?"":E(i)?`>=${n}.0.0${e?"-0":""}`:E(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=E(u)?"":E(l)?`<${+u+1}.0.0-0`:E(h)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${h}-${f}`:e?`<${u}.${l}.${+h+1}-0`:`<=${c}`}`.trim(),P=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==a.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908:(e,t,r)=>{const n=r(7272),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(6874),{safeRe:s,t:a}=r(9718),c=r(8587),{compareIdentifiers:u}=r(1123);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return u(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return u(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},7414:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111:(e,t,r)=>{const n=r(4641),i=r(3999),o=r(5580),s=r(4089),a=r(7059),c=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return i(e,r,u);case">":return o(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},6170:(e,t,r)=>{const n=r(3908),i=r(144),{safeRe:o,t:s}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?o[s.COERCERTLFULL]:o[s.COERCERTL];let i;for(;(i=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?o[s.COERCEFULL]:o[s.COERCE]);if(null===r)return null;const a=r[2],c=r[3]||"0",u=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",h=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${a}.${c}.${u}${l}${h}`,t)}},909:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>{const i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},1763:(e,t,r)=>{const n=r(560);e.exports=(e,t)=>n(e,t,!0)},560:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,c=s?i:r,u=!!a.prerelease.length;if(c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}},4641:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},7059:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<0},5200:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<=0},2938:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7638:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},6953:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},9589:(e,t,r)=>{const n=r(9718),i=r(6874),o=r(3908),s=r(1123),a=r(144),c=r(6953),u=r(7414),l=r(3007),h=r(1832),f=r(2938),d=r(6254),p=r(4493),g=r(1729),m=r(560),y=r(9970),b=r(1763),w=r(909),v=r(3927),E=r(4277),_=r(5580),S=r(7059),x=r(4641),I=r(3999),A=r(4089),R=r(5200),B=r(2111),M=r(6170),T=r(3904),P=r(8311),C=r(7638),k=r(7631),O=r(9628),N=r(270),L=r(1261),j=r(3874),U=r(7075),$=r(5571),F=r(5342),D=r(6780),z=r(2525),H=r(5032);e.exports={parse:a,valid:c,clean:u,inc:l,diff:h,major:f,minor:d,patch:p,prerelease:g,compare:m,rcompare:y,compareLoose:b,compareBuild:w,sort:v,rsort:E,gt:_,lt:S,eq:x,neq:I,gte:A,lte:R,cmp:B,coerce:M,Comparator:T,Range:P,satisfies:C,toComparators:k,maxSatisfying:O,minSatisfying:N,minVersion:L,validRange:j,outside:U,gtr:$,ltr:F,intersects:D,simplifyRange:z,subset:H,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},6874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8794:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},8587:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(6874),s=r(7272),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={};let h=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",o],[f,i]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=h++;s(e,i,t),l[e]=i,u[i]=t,a[i]=new RegExp(t,r?"g":void 0),c[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),p("FULL",`^${u[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),p("LOOSE",`^${u[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),p("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",u[l.COERCE],!0),p("COERCERTLFULL",u[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5571:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628:(e,t,r)=>{const n=r(3908),i=r(8311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},270:(e,t,r)=>{const n=r(3908),i=r(8311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},1261:(e,t,r)=>{const n=r(3908),i=r(8311),o=r(5580);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},7075:(e,t,r)=>{const n=r(3908),i=r(3904),{ANY:o}=i,s=r(8311),a=r(7638),c=r(5580),u=r(7059),l=r(5200),h=r(4089);e.exports=(e,t,r,f)=>{let d,p,g,m,y;switch(e=new n(e,f),t=new s(t,f),r){case">":d=c,p=l,g=u,m=">",y=">=";break;case"<":d=u,p=h,g=c,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,f)?s=e:g(e.semver,a.semver,f)&&(a=e)})),s.operator===m||s.operator===y)return!1;if((!a.operator||a.operator===m)&&p(e,a.semver))return!1;if(a.operator===y&&g(e,a.semver))return!1}return!0}},2525:(e,t,r)=>{const n=r(7638),i=r(560);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,r)));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t}},5032:(e,t,r)=>{const n=r(8311),i=r(3904),{ANY:o}=i,s=r(7638),a=r(560),c=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=u}const n=new Set;let i,l,d,p,g,m,y;for(const t of e)">"===t.operator||">="===t.operator?i=h(i,t,r):"<"===t.operator||"<="===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&l){if(d=a(i.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of n){if(i&&!s(e,String(i),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,i)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(p=h(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(g=f(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==d)return!1}return!(i&&m&&!l&&0!==d||l&&y&&!i&&0!==d||w||b)},h=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},7631:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3874:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},8310:(e,t,r)=>{e.exports=i;var n=r(7007).EventEmitter;function i(){n.call(this)}r(6698)(i,n),i.Readable=r(4198),i.Writable=r(1818),i.Duplex=r(7264),i.Transform=r(7040),i.PassThrough=r(2546),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",c));var s=!1;function a(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},9579:(e,t,r)=>{var n=r(8287).Buffer,i=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},o=t.I=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=c;break;default:return void(this.write=s)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function s(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function c(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(n=t.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},6386:function(e){!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n},e.encodeUTF8=function(e){var t,r=[];for(t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,r=[],n=e.length;for(t=0;t<n;t++)r.push(String.fromCharCode(e[t]));return btoa(r.join(""))},e.decodeBase64=function(e){t(e);var r,n=atob(e),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}),e}))},8947:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=t(),a=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=e[t+o]^r[n+o];return(1&s-1>>>8)-1}function m(e,t,r,n){return g(e,t,r,n,16)}function y(e,t,r,n){return g(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=o,_=s,S=a,x=c,I=u,A=l,R=h,B=f,M=d,T=p,P=g,C=m,k=y,O=b,N=w,L=v,j=0;j<20;j+=2)E^=(i=(k^=(i=(M^=(i=(I^=(i=E+k|0)<<7|i>>>25)+E|0)<<9|i>>>23)+I|0)<<13|i>>>19)+M|0)<<18|i>>>14,A^=(i=(_^=(i=(O^=(i=(T^=(i=A+_|0)<<7|i>>>25)+A|0)<<9|i>>>23)+T|0)<<13|i>>>19)+O|0)<<18|i>>>14,P^=(i=(R^=(i=(S^=(i=(N^=(i=P+R|0)<<7|i>>>25)+P|0)<<9|i>>>23)+N|0)<<13|i>>>19)+S|0)<<18|i>>>14,L^=(i=(C^=(i=(B^=(i=(x^=(i=L+C|0)<<7|i>>>25)+L|0)<<9|i>>>23)+x|0)<<13|i>>>19)+B|0)<<18|i>>>14,E^=(i=(x^=(i=(S^=(i=(_^=(i=E+x|0)<<7|i>>>25)+E|0)<<9|i>>>23)+_|0)<<13|i>>>19)+S|0)<<18|i>>>14,A^=(i=(I^=(i=(B^=(i=(R^=(i=A+I|0)<<7|i>>>25)+A|0)<<9|i>>>23)+R|0)<<13|i>>>19)+B|0)<<18|i>>>14,P^=(i=(T^=(i=(M^=(i=(C^=(i=P+T|0)<<7|i>>>25)+P|0)<<9|i>>>23)+C|0)<<13|i>>>19)+M|0)<<18|i>>>14,L^=(i=(N^=(i=(O^=(i=(k^=(i=L+N|0)<<7|i>>>25)+L|0)<<9|i>>>23)+k|0)<<13|i>>>19)+O|0)<<18|i>>>14;E=E+o|0,_=_+s|0,S=S+a|0,x=x+c|0,I=I+u|0,A=A+l|0,R=R+h|0,B=B+f|0,M=M+d|0,T=T+p|0,P=P+g|0,C=C+m|0,k=k+y|0,O=O+b|0,N=N+w|0,L=L+v|0,e[0]=E>>>0&255,e[1]=E>>>8&255,e[2]=E>>>16&255,e[3]=E>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=x>>>0&255,e[13]=x>>>8&255,e[14]=x>>>16&255,e[15]=x>>>24&255,e[16]=I>>>0&255,e[17]=I>>>8&255,e[18]=I>>>16&255,e[19]=I>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=R>>>0&255,e[25]=R>>>8&255,e[26]=R>>>16&255,e[27]=R>>>24&255,e[28]=B>>>0&255,e[29]=B>>>8&255,e[30]=B>>>16&255,e[31]=B>>>24&255,e[32]=M>>>0&255,e[33]=M>>>8&255,e[34]=M>>>16&255,e[35]=M>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=P>>>0&255,e[41]=P>>>8&255,e[42]=P>>>16&255,e[43]=P>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=k>>>0&255,e[49]=k>>>8&255,e[50]=k>>>16&255,e[51]=k>>>24&255,e[52]=O>>>0&255,e[53]=O>>>8&255,e[54]=O>>>16&255,e[55]=O>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=0;E<20;E+=2)o^=(i=(y^=(i=(d^=(i=(u^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+d|0)<<18|i>>>14,l^=(i=(s^=(i=(b^=(i=(p^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,g^=(i=(h^=(i=(a^=(i=(w^=(i=g+h|0)<<7|i>>>25)+g|0)<<9|i>>>23)+w|0)<<13|i>>>19)+a|0)<<18|i>>>14,v^=(i=(m^=(i=(f^=(i=(c^=(i=v+m|0)<<7|i>>>25)+v|0)<<9|i>>>23)+c|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(c^=(i=(a^=(i=(s^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,l^=(i=(u^=(i=(f^=(i=(h^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+f|0)<<18|i>>>14,g^=(i=(p^=(i=(d^=(i=(m^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+d|0)<<18|i>>>14,v^=(i=(w^=(i=(b^=(i=(y^=(i=v+w|0)<<7|i>>>25)+v|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=f>>>0&255,e[21]=f>>>8&255,e[22]=f>>>16&255,e[23]=f>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,i,o,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(b(l,u,s,v),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(l,u,s,v),c=0;c<i;c++)e[t+c]=r[n+c]^l[c];return 0}function _(e,t,r,n,i){var o,s,a=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(b(c,a,i,v),s=0;s<64;s++)e[t+s]=c[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(b(c,a,i,v),s=0;s<r;s++)e[t+s]=c[s];return 0}function S(e,t,r,n,i){var o=new Uint8Array(32);w(o,n,i,v);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return _(e,t,r,s,o)}function x(e,t,r,n,i,o,s){var a=new Uint8Array(32);w(a,o,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return E(e,t,r,n,i,c,a)}var I=function(e){var t,r,n,i,o,s,a,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function A(e,t,r,n,i,o){var s=new I(o);return s.update(r,n,i),s.finish(e,t),0}function R(e,t,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),m(e,t,s,0)}function B(e,t,r,n,i){var o;if(r<32)return-1;for(x(e,0,t,0,r,n,i),A(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function M(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(S(s,0,32,n,i),0!==R(t,16,t,32,r-32,s))return-1;for(x(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function T(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function P(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function C(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function k(e,r){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,C(a,s,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function O(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return k(r,e),k(n,t),y(r,0,n,0)}function N(e){var t=new Uint8Array(32);return k(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function $(e,t,r){var n,i,o=0,s=0,a=0,c=0,u=0,l=0,h=0,f=0,d=0,p=0,g=0,m=0,y=0,b=0,w=0,v=0,E=0,_=0,S=0,x=0,I=0,A=0,R=0,B=0,M=0,T=0,P=0,C=0,k=0,O=0,N=0,L=r[0],j=r[1],U=r[2],$=r[3],F=r[4],D=r[5],z=r[6],H=r[7],G=r[8],Z=r[9],V=r[10],J=r[11],W=r[12],q=r[13],Y=r[14],K=r[15];o+=(n=t[0])*L,s+=n*j,a+=n*U,c+=n*$,u+=n*F,l+=n*D,h+=n*z,f+=n*H,d+=n*G,p+=n*Z,g+=n*V,m+=n*J,y+=n*W,b+=n*q,w+=n*Y,v+=n*K,s+=(n=t[1])*L,a+=n*j,c+=n*U,u+=n*$,l+=n*F,h+=n*D,f+=n*z,d+=n*H,p+=n*G,g+=n*Z,m+=n*V,y+=n*J,b+=n*W,w+=n*q,v+=n*Y,E+=n*K,a+=(n=t[2])*L,c+=n*j,u+=n*U,l+=n*$,h+=n*F,f+=n*D,d+=n*z,p+=n*H,g+=n*G,m+=n*Z,y+=n*V,b+=n*J,w+=n*W,v+=n*q,E+=n*Y,_+=n*K,c+=(n=t[3])*L,u+=n*j,l+=n*U,h+=n*$,f+=n*F,d+=n*D,p+=n*z,g+=n*H,m+=n*G,y+=n*Z,b+=n*V,w+=n*J,v+=n*W,E+=n*q,_+=n*Y,S+=n*K,u+=(n=t[4])*L,l+=n*j,h+=n*U,f+=n*$,d+=n*F,p+=n*D,g+=n*z,m+=n*H,y+=n*G,b+=n*Z,w+=n*V,v+=n*J,E+=n*W,_+=n*q,S+=n*Y,x+=n*K,l+=(n=t[5])*L,h+=n*j,f+=n*U,d+=n*$,p+=n*F,g+=n*D,m+=n*z,y+=n*H,b+=n*G,w+=n*Z,v+=n*V,E+=n*J,_+=n*W,S+=n*q,x+=n*Y,I+=n*K,h+=(n=t[6])*L,f+=n*j,d+=n*U,p+=n*$,g+=n*F,m+=n*D,y+=n*z,b+=n*H,w+=n*G,v+=n*Z,E+=n*V,_+=n*J,S+=n*W,x+=n*q,I+=n*Y,A+=n*K,f+=(n=t[7])*L,d+=n*j,p+=n*U,g+=n*$,m+=n*F,y+=n*D,b+=n*z,w+=n*H,v+=n*G,E+=n*Z,_+=n*V,S+=n*J,x+=n*W,I+=n*q,A+=n*Y,R+=n*K,d+=(n=t[8])*L,p+=n*j,g+=n*U,m+=n*$,y+=n*F,b+=n*D,w+=n*z,v+=n*H,E+=n*G,_+=n*Z,S+=n*V,x+=n*J,I+=n*W,A+=n*q,R+=n*Y,B+=n*K,p+=(n=t[9])*L,g+=n*j,m+=n*U,y+=n*$,b+=n*F,w+=n*D,v+=n*z,E+=n*H,_+=n*G,S+=n*Z,x+=n*V,I+=n*J,A+=n*W,R+=n*q,B+=n*Y,M+=n*K,g+=(n=t[10])*L,m+=n*j,y+=n*U,b+=n*$,w+=n*F,v+=n*D,E+=n*z,_+=n*H,S+=n*G,x+=n*Z,I+=n*V,A+=n*J,R+=n*W,B+=n*q,M+=n*Y,T+=n*K,m+=(n=t[11])*L,y+=n*j,b+=n*U,w+=n*$,v+=n*F,E+=n*D,_+=n*z,S+=n*H,x+=n*G,I+=n*Z,A+=n*V,R+=n*J,B+=n*W,M+=n*q,T+=n*Y,P+=n*K,y+=(n=t[12])*L,b+=n*j,w+=n*U,v+=n*$,E+=n*F,_+=n*D,S+=n*z,x+=n*H,I+=n*G,A+=n*Z,R+=n*V,B+=n*J,M+=n*W,T+=n*q,P+=n*Y,C+=n*K,b+=(n=t[13])*L,w+=n*j,v+=n*U,E+=n*$,_+=n*F,S+=n*D,x+=n*z,I+=n*H,A+=n*G,R+=n*Z,B+=n*V,M+=n*J,T+=n*W,P+=n*q,C+=n*Y,k+=n*K,w+=(n=t[14])*L,v+=n*j,E+=n*U,_+=n*$,S+=n*F,x+=n*D,I+=n*z,A+=n*H,R+=n*G,B+=n*Z,M+=n*V,T+=n*J,P+=n*W,C+=n*q,k+=n*Y,O+=n*K,v+=(n=t[15])*L,s+=38*(_+=n*U),a+=38*(S+=n*$),c+=38*(x+=n*F),u+=38*(I+=n*D),l+=38*(A+=n*z),h+=38*(R+=n*H),f+=38*(B+=n*G),d+=38*(M+=n*Z),p+=38*(T+=n*V),g+=38*(P+=n*J),m+=38*(C+=n*W),y+=38*(k+=n*q),b+=38*(O+=n*Y),w+=38*(N+=n*K),o=(n=(o+=38*(E+=n*j))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=h,e[7]=f,e[8]=d,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=b,e[14]=w,e[15]=v}function F(e,t){$(e,t,t)}function D(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&$(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&$(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=t(),l=t(),h=t(),f=t(),d=t(),p=t();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,L(a,n),o=0;o<16;o++)l[o]=a[o],f[o]=u[o]=h[o]=0;for(u[0]=f[0]=1,o=254;o>=0;--o)C(u,l,i=s[o>>>3]>>>(7&o)&1),C(h,f,i),j(d,u,h),U(u,u,h),j(h,l,f),U(l,l,f),F(f,d),F(p,u),$(u,h,u),$(h,l,d),j(d,u,h),U(u,u,h),F(l,u),U(h,f,p),$(u,h,c),j(u,u,f),$(h,h,u),$(u,f,p),$(f,l,a),F(l,d),C(u,l,i),C(h,f,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=h[o],a[o+48]=l[o],a[o+64]=f[o];var g=a.subarray(32),m=a.subarray(16);return D(g,g),$(m,m,g),k(e,m),0}function G(e,t){return H(e,t,o)}function Z(e,t){return n(t,32),G(e,t)}function V(e,t,r){var n=new Uint8Array(32);return H(n,r,t),w(e,i,n,v)}I.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,c,u,l,h,f,d,p,g,m,y,b,w,v,E,_=this.fin?0:2048,S=this.h[0],x=this.h[1],I=this.h[2],A=this.h[3],R=this.h[4],B=this.h[5],M=this.h[6],T=this.h[7],P=this.h[8],C=this.h[9],k=this.r[0],O=this.r[1],N=this.r[2],L=this.r[3],j=this.r[4],U=this.r[5],$=this.r[6],F=this.r[7],D=this.r[8],z=this.r[9];r>=16;)f=h=0,f+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*k,f+=(x+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*z),f+=(I+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*D),f+=(A+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),h=(f+=(R+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,f&=8191,f+=(B+=a>>>1&8191)*(5*U),f+=(M+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),f+=(T+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),f+=(P+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),d=h+=(f+=(C+=l>>>5|_)*(5*O))>>>13,d+=S*O,d+=x*k,d+=I*(5*z),d+=A*(5*D),h=(d+=R*(5*F))>>>13,d&=8191,d+=B*(5*$),d+=M*(5*U),d+=T*(5*j),d+=P*(5*L),h+=(d+=C*(5*N))>>>13,d&=8191,p=h,p+=S*N,p+=x*O,p+=I*k,p+=A*(5*z),h=(p+=R*(5*D))>>>13,p&=8191,p+=B*(5*F),p+=M*(5*$),p+=T*(5*U),p+=P*(5*j),g=h+=(p+=C*(5*L))>>>13,g+=S*L,g+=x*N,g+=I*O,g+=A*k,h=(g+=R*(5*z))>>>13,g&=8191,g+=B*(5*D),g+=M*(5*F),g+=T*(5*$),g+=P*(5*U),m=h+=(g+=C*(5*j))>>>13,m+=S*j,m+=x*L,m+=I*N,m+=A*O,h=(m+=R*k)>>>13,m&=8191,m+=B*(5*z),m+=M*(5*D),m+=T*(5*F),m+=P*(5*$),y=h+=(m+=C*(5*U))>>>13,y+=S*U,y+=x*j,y+=I*L,y+=A*N,h=(y+=R*O)>>>13,y&=8191,y+=B*k,y+=M*(5*z),y+=T*(5*D),y+=P*(5*F),b=h+=(y+=C*(5*$))>>>13,b+=S*$,b+=x*U,b+=I*j,b+=A*L,h=(b+=R*N)>>>13,b&=8191,b+=B*O,b+=M*k,b+=T*(5*z),b+=P*(5*D),w=h+=(b+=C*(5*F))>>>13,w+=S*F,w+=x*$,w+=I*U,w+=A*j,h=(w+=R*L)>>>13,w&=8191,w+=B*N,w+=M*O,w+=T*k,w+=P*(5*z),v=h+=(w+=C*(5*D))>>>13,v+=S*D,v+=x*F,v+=I*$,v+=A*U,h=(v+=R*j)>>>13,v&=8191,v+=B*L,v+=M*N,v+=T*O,v+=P*k,E=h+=(v+=C*(5*z))>>>13,E+=S*z,E+=x*D,E+=I*F,E+=A*$,h=(E+=R*U)>>>13,E&=8191,E+=B*j,E+=M*L,E+=T*N,E+=P*O,S=f=8191&(h=(h=((h+=(E+=C*k)>>>13)<<2)+h|0)+(f&=8191)|0),x=d+=h>>>=13,I=p&=8191,A=g&=8191,R=m&=8191,B=y&=8191,M=b&=8191,T=w&=8191,P=v&=8191,C=E&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=x,this.h[2]=I,this.h[3]=A,this.h[4]=R,this.h[5]=B,this.h[6]=M,this.h[7]=T,this.h[8]=P,this.h[9]=C},I.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},I.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var J=B,W=M,q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,r,n){for(var i,o,s,a,c,u,l,h,f,d,p,g,m,y,b,w,v,E,_,S,x,I,A,R,B,M,T=new Int32Array(16),P=new Int32Array(16),C=e[0],k=e[1],O=e[2],N=e[3],L=e[4],j=e[5],U=e[6],$=e[7],F=t[0],D=t[1],z=t[2],H=t[3],G=t[4],Z=t[5],V=t[6],J=t[7],W=0;n>=128;){for(_=0;_<16;_++)S=8*_+W,T[_]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],P[_]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(_=0;_<80;_++)if(i=C,o=k,s=O,a=N,c=L,u=j,l=U,f=F,d=D,p=z,g=H,m=G,y=Z,b=V,A=65535&(I=J),R=I>>>16,B=65535&(x=$),M=x>>>16,A+=65535&(I=(G>>>14|L<<18)^(G>>>18|L<<14)^(L>>>9|G<<23)),R+=I>>>16,B+=65535&(x=(L>>>14|G<<18)^(L>>>18|G<<14)^(G>>>9|L<<23)),M+=x>>>16,A+=65535&(I=G&Z^~G&V),R+=I>>>16,B+=65535&(x=L&j^~L&U),M+=x>>>16,x=q[2*_],A+=65535&(I=q[2*_+1]),R+=I>>>16,B+=65535&x,M+=x>>>16,x=T[_%16],R+=(I=P[_%16])>>>16,B+=65535&x,M+=x>>>16,B+=(R+=(A+=65535&I)>>>16)>>>16,A=65535&(I=E=65535&A|R<<16),R=I>>>16,B=65535&(x=v=65535&B|(M+=B>>>16)<<16),M=x>>>16,A+=65535&(I=(F>>>28|C<<4)^(C>>>2|F<<30)^(C>>>7|F<<25)),R+=I>>>16,B+=65535&(x=(C>>>28|F<<4)^(F>>>2|C<<30)^(F>>>7|C<<25)),M+=x>>>16,R+=(I=F&D^F&z^D&z)>>>16,B+=65535&(x=C&k^C&O^k&O),M+=x>>>16,h=65535&(B+=(R+=(A+=65535&I)>>>16)>>>16)|(M+=B>>>16)<<16,w=65535&A|R<<16,A=65535&(I=g),R=I>>>16,B=65535&(x=a),M=x>>>16,R+=(I=E)>>>16,B+=65535&(x=v),M+=x>>>16,k=i,O=o,N=s,L=a=65535&(B+=(R+=(A+=65535&I)>>>16)>>>16)|(M+=B>>>16)<<16,j=c,U=u,$=l,C=h,D=f,z=d,H=p,G=g=65535&A|R<<16,Z=m,V=y,J=b,F=w,_%16==15)for(S=0;S<16;S++)x=T[S],A=65535&(I=P[S]),R=I>>>16,B=65535&x,M=x>>>16,x=T[(S+9)%16],A+=65535&(I=P[(S+9)%16]),R+=I>>>16,B+=65535&x,M+=x>>>16,v=T[(S+1)%16],A+=65535&(I=((E=P[(S+1)%16])>>>1|v<<31)^(E>>>8|v<<24)^(E>>>7|v<<25)),R+=I>>>16,B+=65535&(x=(v>>>1|E<<31)^(v>>>8|E<<24)^v>>>7),M+=x>>>16,v=T[(S+14)%16],R+=(I=((E=P[(S+14)%16])>>>19|v<<13)^(v>>>29|E<<3)^(E>>>6|v<<26))>>>16,B+=65535&(x=(v>>>19|E<<13)^(E>>>29|v<<3)^v>>>6),M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,T[S]=65535&B|M<<16,P[S]=65535&A|R<<16;A=65535&(I=F),R=I>>>16,B=65535&(x=C),M=x>>>16,x=e[0],R+=(I=t[0])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[0]=C=65535&B|M<<16,t[0]=F=65535&A|R<<16,A=65535&(I=D),R=I>>>16,B=65535&(x=k),M=x>>>16,x=e[1],R+=(I=t[1])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[1]=k=65535&B|M<<16,t[1]=D=65535&A|R<<16,A=65535&(I=z),R=I>>>16,B=65535&(x=O),M=x>>>16,x=e[2],R+=(I=t[2])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[2]=O=65535&B|M<<16,t[2]=z=65535&A|R<<16,A=65535&(I=H),R=I>>>16,B=65535&(x=N),M=x>>>16,x=e[3],R+=(I=t[3])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[3]=N=65535&B|M<<16,t[3]=H=65535&A|R<<16,A=65535&(I=G),R=I>>>16,B=65535&(x=L),M=x>>>16,x=e[4],R+=(I=t[4])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[4]=L=65535&B|M<<16,t[4]=G=65535&A|R<<16,A=65535&(I=Z),R=I>>>16,B=65535&(x=j),M=x>>>16,x=e[5],R+=(I=t[5])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[5]=j=65535&B|M<<16,t[5]=Z=65535&A|R<<16,A=65535&(I=V),R=I>>>16,B=65535&(x=U),M=x>>>16,x=e[6],R+=(I=t[6])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[6]=U=65535&B|M<<16,t[6]=V=65535&A|R<<16,A=65535&(I=J),R=I>>>16,B=65535&(x=$),M=x>>>16,x=e[7],R+=(I=t[7])>>>16,B+=65535&x,M+=x>>>16,M+=(B+=(R+=(A+=65535&I)>>>16)>>>16)>>>16,e[7]=$=65535&B|M<<16,t[7]=J=65535&A|R<<16,W+=128,n-=128}return n}function K(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,p(s,r-8,a/536870912|0,a<<3),Y(i,o,s,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function X(e,r){var n=t(),i=t(),o=t(),s=t(),a=t(),c=t(),u=t(),h=t(),f=t();U(n,e[1],e[0]),U(f,r[1],r[0]),$(n,n,f),j(i,e[0],e[1]),j(f,r[0],r[1]),$(i,i,f),$(o,e[3],r[3]),$(o,o,l),$(s,e[2],r[2]),j(s,s,s),U(a,i,n),U(c,s,o),j(u,s,o),j(h,i,n),$(e[0],a,c),$(e[1],h,u),$(e[2],u,c),$(e[3],a,h)}function Q(e,t,r){var n;for(n=0;n<4;n++)C(e[n],t[n],r)}function ee(e,r){var n=t(),i=t(),o=t();D(o,r[2]),$(n,r[0],o),$(i,r[1],o),k(e,i),e[31]^=N(n)<<7}function te(e,t,r){var n,i;for(T(e[0],s),T(e[1],a),T(e[2],a),T(e[3],s),i=255;i>=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];T(n[0],h),T(n[1],f),T(n[2],a),$(n[3],h,f),te(e,n,r)}function ne(e,r,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),K(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ae(e,r,n,i){var o,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),h=[t(),t(),t(),t()];K(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var f=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=a[32+o];for(K(u,e.subarray(32),n+32),se(u),re(h,u),ee(e,h),o=32;o<64;o++)e[o]=i[o];for(K(c,e,n+64),se(c),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=u[o];for(o=0;o<32;o++)for(s=0;s<32;s++)l[o+s]+=c[o]*a[s];return oe(e.subarray(32),l),f}function ce(e,r,n,i){var o,c=new Uint8Array(32),l=new Uint8Array(64),h=[t(),t(),t(),t()],f=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),i=t(),o=t(),c=t(),l=t(),h=t(),f=t();return T(e[2],a),L(e[1],r),F(o,e[1]),$(c,o,u),U(o,o,e[2]),j(c,e[2],c),F(l,c),F(h,l),$(f,h,l),$(n,f,o),$(n,n,c),z(n,n),$(n,n,o),$(n,n,c),$(n,n,c),$(e[0],n,c),F(i,e[0]),$(i,i,c),O(i,o)&&$(e[0],e[0],d),F(i,e[0]),$(i,i,c),O(i,o)?-1:(N(e[0])===r[31]>>7&&U(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(f,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(K(l,e,n),se(l),te(h,f,l),re(f,r.subarray(32)),X(h,f),ee(c,h),n-=64,y(r,0,c,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}var ue=64,le=32,he=64;function fe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:x,crypto_stream:S,crypto_stream_salsa20_xor:E,crypto_stream_salsa20:_,crypto_onetimeauth:A,crypto_onetimeauth_verify:R,crypto_verify_16:m,crypto_verify_32:y,crypto_secretbox:B,crypto_secretbox_open:M,crypto_scalarmult:H,crypto_scalarmult_base:G,crypto_box_beforenm:V,crypto_box_afternm:J,crypto_box:function(e,t,r,n,i,o){var s=new Uint8Array(32);return V(s,i,o),J(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,i,o){var s=new Uint8Array(32);return V(s,i,o),W(e,t,r,n,s)},crypto_box_keypair:Z,crypto_hash:K,crypto_sign:ae,crypto_sign_keypair:ne,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:he,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:k,unpack25519:L,M:$,A:j,S:F,Z:U,pow2523:z,add:X,set25519:T,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){de(e,t,r),fe(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return B(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){de(e,t,r),fe(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==M(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return H(r,e,t),r},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return G(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return V(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return Z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return G(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),t.length!==he)throw new Error("bad secret key size");var r=new Uint8Array(ue+e.length);return ae(r,e,e.length,t),r},e.sign.open=function(e,t){if(de(e,t),t.length!==le)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ce(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(ue),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(de(e,t,r),t.length!==ue)throw new Error("bad signature size");if(r.length!==le)throw new Error("bad public key size");var n,i=new Uint8Array(ue+e.length),o=new Uint8Array(ue+e.length);for(n=0;n<ue;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+ue]=e[n];return ce(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(he);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==he)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),r=new Uint8Array(he),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=he,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){de(e);var t=new Uint8Array(64);return K(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===g(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];pe(i)})):(t=r(1281))&&t.randomBytes&&e.setPRNG((function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];pe(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},1270:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var o,s=2147483647,a=36,c=26,u=38,l=700,h=/^xn--/,f=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=a-1,m=Math.floor,y=String.fromCharCode;function b(e){throw RangeError(p[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(d,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function _(e){return w(e,(function(e){var t="";return e>65535&&(t+=y((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+y(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,r){var n=0;for(e=r?m(e/l):e>>1,e+=m(e/t);e>g*c>>1;n+=a)e=m(e/g);return m(n+(g+1)*e/(e+u))}function I(e){var t,r,n,i,o,u,l,h,f,d,p,g=[],y=e.length,w=0,v=128,E=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&b("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=w,u=1,l=a;i>=y&&b("invalid-input"),((h=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:a)>=a||h>m((s-w)/u))&&b("overflow"),w+=h*u,!(h<(f=l<=E?1:l>=E+c?c:l-E));l+=a)u>m(s/(d=a-f))&&b("overflow"),u*=d;E=x(w-o,t=g.length+1,0==o),m(w/t)>s-v&&b("overflow"),v+=m(w/t),w%=t,g.splice(w++,0,v)}return _(g)}function A(e){var t,r,n,i,o,u,l,h,f,d,p,g,w,v,_,I=[];for(g=(e=E(e)).length,t=128,r=0,o=72,u=0;u<g;++u)(p=e[u])<128&&I.push(y(p));for(n=i=I.length,i&&I.push("-");n<g;){for(l=s,u=0;u<g;++u)(p=e[u])>=t&&p<l&&(l=p);for(l-t>m((s-r)/(w=n+1))&&b("overflow"),r+=(l-t)*w,t=l,u=0;u<g;++u)if((p=e[u])<t&&++r>s&&b("overflow"),p==t){for(h=r,f=a;!(h<(d=f<=o?1:f>=o+c?c:f-o));f+=a)_=h-d,v=a-d,I.push(y(S(d+_%v,0))),h=m(_/v);I.push(y(S(h,0))),o=x(r,w,n==i),r=0,++n}++r,++t}return I.join("")}o={version:"1.3.2",ucs2:{decode:E,encode:_},decode:I,encode:A,toASCII:function(e){return v(e,(function(e){return f.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return v(e,(function(e){return h.test(e)?I(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},8835:(e,t,r)=>{var n=r(1270);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return b(e)&&(e=y(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],h=/^[a-z0-9A-Z_-]{0,63}$/,f=/^([a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(2894);function y(e,t,r){if(e&&w(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}function b(e){return"string"==typeof e}function w(e){return"object"==typeof e&&null!==e}function v(e){return null===e}i.prototype.parse=function(e,t,r){if(!b(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e;i=i.trim();var s=o.exec(i);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,i=i.substr(s.length)}if(r||s||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var y="//"===i.substr(0,2);!y||s&&p[s]||(i=i.substr(2),this.slashes=!0)}if(!p[s]&&(y||s&&!g[s])){for(var w,v,E=-1,_=0;_<l.length;_++)-1!==(S=i.indexOf(l[_]))&&(-1===E||S<E)&&(E=S);for(-1!==(v=-1===E?i.lastIndexOf("@"):i.lastIndexOf("@",E))&&(w=i.slice(0,v),i=i.slice(v+1),this.auth=decodeURIComponent(w)),E=-1,_=0;_<u.length;_++){var S;-1!==(S=i.indexOf(u[_]))&&(-1===E||S<E)&&(E=S)}-1===E&&(E=i.length),this.host=i.slice(0,E),i=i.slice(E),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var I=this.hostname.split(/\./),A=(_=0,I.length);_<A;_++){var R=I[_];if(R&&!R.match(h)){for(var B="",M=0,T=R.length;M<T;M++)R.charCodeAt(M)>127?B+="x":B+=R[M];if(!B.match(h)){var P=I.slice(0,_),C=I.slice(_+1),k=R.match(f);k&&(P.push(k[1]),C.unshift(k[2])),C.length&&(i="/"+C.join(".")+i),this.hostname=P.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!x){var O=this.hostname.split("."),N=[];for(_=0;_<O.length;++_){var L=O[_];N.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+n.encode(L):L)}this.hostname=N.join(".")}var j=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+j,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!d[a])for(_=0,A=c.length;_<A;_++){var $=c[_],F=encodeURIComponent($);F===$&&(F=escape($)),i=i.split($).join(F)}var D=i.indexOf("#");-1!==D&&(this.hash=i.substr(D),i=i.slice(0,D));var z=i.indexOf("?");return-1!==z?(this.search=i.substr(z),this.query=i.substr(z+1),t&&(this.query=m.parse(this.query)),i=i.slice(0,z)):t&&(this.search="",this.query={}),i&&(this.pathname=i),g[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(j=this.pathname||"",L=this.search||"",this.path=j+L),this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&w(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(b(e)){var t=new i;t.parse(e,!1,!0),e=t}var r=new i;if(Object.keys(this).forEach((function(e){r[e]=this[e]}),this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach((function(t){"protocol"!==t&&(r[t]=e[t])})),g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol])return Object.keys(e).forEach((function(t){r[t]=e[t]})),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||p[e.protocol])r.pathname=e.pathname;else{for(var n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),u=c||a||r.host&&e.pathname,l=u,h=r.pathname&&r.pathname.split("/")||[],f=(n=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(f&&(r.hostname="",r.port=null,r.host&&(""===h[0]?h[0]=r.host:h.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),u=u&&(""===n[0]||""===h[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,h=n;else if(n.length)h||(h=[]),h.pop(),h=h.concat(n),r.search=e.search,r.query=e.query;else if(null!=e.search)return f&&(r.hostname=r.host=h.shift(),(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),r.search=e.search,r.query=e.query,v(r.pathname)&&v(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!h.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var d=h.slice(-1)[0],m=(r.host||e.host)&&("."===d||".."===d)||""===d,y=0,w=h.length;w>=0;w--)"."==(d=h[w])?h.splice(w,1):".."===d?(h.splice(w,1),y++):y&&(h.splice(w,1),y--);if(!u&&!l)for(;y--;y)h.unshift("..");!u||""===h[0]||h[0]&&"/"===h[0].charAt(0)||h.unshift(""),m&&"/"!==h.join("/").substr(-1)&&h.push("");var E,_=""===h[0]||h[0]&&"/"===h[0].charAt(0);return f&&(r.hostname=r.host=_?"":h.length?h.shift():"",(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),(u=u||r.host&&h.length)&&!_&&h.unshift(""),h.length?r.pathname=h.join("/"):(r.pathname=null,r.path=null),v(r.pathname)&&v(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},6622:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},537:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,o=i.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),c=i[r];r<o;c=i[++r])p(c)||!w(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(e,n){if(y(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),i=!0}return e.apply(this,arguments)}};var i,o={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=u(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(_(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var w,S="",x=!1,I=["{","}"];return f(r)&&(x=!0,I=["[","]"]),_(r)&&(S=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(S=" "+RegExp.prototype.toString.call(r)),v(r)&&(S=" "+Date.prototype.toUTCString.call(r)),E(r)&&(S=" "+l(r)),0!==s.length||x&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),w=x?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)A(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return h(e,r,n,a,t,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(w,S,I)):I[0]+S+I[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),A(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=p(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===S(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===S(e)}function E(e){return w(e)&&("[object Error]"===S(e)||e instanceof Error)}function _(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=b,t.isObject=w,t.isDate=v,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6622),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},1281:()=>{},5915:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(5620),i=r(6676);function o(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{(0,n.assert)(e,t)}catch(e){throw o(a,`${r}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},56:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(5620),i=r(5915);t.base64=(e,t={})=>{const r=t.paddingRequired??!1,o=t.characterSet??"base64";let s,a;return"base64"===o?s=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,"u"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,"u"),(0,n.pattern)(e,a)}},2310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.base64ToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToBase64=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const n=r(3203),i=r(5915),o=r(8824),s=48,a=58,c=87,u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function h(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function f(e){if(h(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,o.add0x)(r.join(""))}function d(e){h(e);const t=f(e);return BigInt(t)}function p(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,o.assertIsHexString)(e);const t=(0,o.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),o=t-(t<a?s:c),u=i-(i<a?s:c);n[e]=16*o+u}return n}function g(e){return(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function m(e){return(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function y(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?p(e):y(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=h,t.bytesToHex=f,t.bytesToBigInt=d,t.bytesToSignedBigInt=function(e){h(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){h(e);const t=d(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return h(e),(new TextDecoder).decode(e)},t.bytesToBase64=function(e){return h(e),n.base64.encode(e)},t.hexToBytes=p,t.bigIntToBytes=g,t.signedBigIntToBytes=function(e,t){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)("number"==typeof t,"Byte length must be a number."),(0,i.assert)(t>0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=m,t.stringToBytes=y,t.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),n.base64.decode(e)},t.valueToBytes=b,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=b(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},3498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toCaipChainId=t.parseCaipAccountId=t.parseCaipChainId=t.isCaipAccountAddress=t.isCaipAccountId=t.isCaipReference=t.isCaipNamespace=t.isCaipChainId=t.KnownCaipNamespace=t.CaipAccountAddressStruct=t.CaipAccountIdStruct=t.CaipReferenceStruct=t.CaipNamespaceStruct=t.CaipChainIdStruct=t.CAIP_ACCOUNT_ADDRESS_REGEX=t.CAIP_ACCOUNT_ID_REGEX=t.CAIP_REFERENCE_REGEX=t.CAIP_NAMESPACE_REGEX=t.CAIP_CHAIN_ID_REGEX=void 0;const n=r(5620);function i(e){return(0,n.is)(e,t.CaipNamespaceStruct)}function o(e){return(0,n.is)(e,t.CaipReferenceStruct)}t.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,t.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,t.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,t.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,t.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,t.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_CHAIN_ID_REGEX),t.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_NAMESPACE_REGEX),t.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_REFERENCE_REGEX),t.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ID_REGEX),t.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ADDRESS_REGEX),(t.KnownCaipNamespace||(t.KnownCaipNamespace={})).Eip155="eip155",t.isCaipChainId=function(e){return(0,n.is)(e,t.CaipChainIdStruct)},t.isCaipNamespace=i,t.isCaipReference=o,t.isCaipAccountId=function(e){return(0,n.is)(e,t.CaipAccountIdStruct)},t.isCaipAccountAddress=function(e){return(0,n.is)(e,t.CaipAccountAddressStruct)},t.parseCaipChainId=function(e){const r=t.CAIP_CHAIN_ID_REGEX.exec(e);if(!r?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:r.groups.namespace,reference:r.groups.reference}},t.parseCaipAccountId=function(e){const r=t.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!r?.groups)throw new Error("Invalid CAIP account ID.");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},t.toCaipChainId=function(e,r){if(!i(e))throw new Error(`Invalid "namespace", must match: ${t.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid "reference", must match: ${t.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${r}`}},5388:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(5620),i=r(56);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},3243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(5620),i=r(5915),o=r(2310),s=r(8824),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),c=(0,n.coerce)((0,n.number)(),a,Number),u=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),h=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,h)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},6484:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return i(this,r,"f").entries()}forEach(e,t){return i(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return i(this,r,"f").get(e)}has(e){return i(this,r,"f").has(e)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{get size(){return i(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return i(this,n,"f").entries()}forEach(e,t){return i(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return i(this,n,"f").has(e)}keys(){return i(this,n,"f").keys()}values(){return i(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},2190:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6676:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapError=t.getErrorMessage=t.isErrorWithStack=t.isErrorWithMessage=t.isErrorWithCode=void 0;const n=r(1843),i=r(8897);function o(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=o,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||(0,i.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new n.ErrorWithCause(t,{cause:e}),o(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},8824:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.isValidChecksumAddress=t.getChecksumAddress=t.isValidHexAddress=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.HexChecksumAddressStruct=t.HexAddressStruct=t.StrictHexStruct=t.HexStruct=void 0;const n=r(5620),i=r(2955),o=r(5915),s=r(2310);function a(e){return(0,n.is)(e,t.HexStruct)}function c(e){return(0,n.is)(e,t.StrictHexStruct)}function u(e){(0,o.assert)((0,n.is)(e,t.HexChecksumAddressStruct),"Invalid hex address.");const r=h(e.toLowerCase()),a=h((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split("").map(((e,t)=>{const r=a[t];return(0,o.assert)((0,n.is)(r,(0,n.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,n.is)(e,t.HexChecksumAddressStruct)&&u(e)===e}function h(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),t.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),t.isHexString=a,t.isStrictHexString=c,t.assertIsHexString=function(e){(0,o.assert)(a(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,o.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return(0,n.is)(e,t.HexAddressStruct)||l(e)},t.getChecksumAddress=u,t.isValidChecksumAddress=l,t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=h},2495:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5915),t),i(r(56),t),i(r(2310),t),i(r(3498),t),i(r(5388),t),i(r(3243),t),i(r(6484),t),i(r(2190),t),i(r(6676),t),i(r(8824),t),i(r(327),t),i(r(268),t),i(r(5888),t),i(r(8897),t),i(r(1322),t),i(r(2564),t),i(r(5020),t),i(r(2026),t),i(r(1175),t),i(r(834),t)},327:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.getSafeJson=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=t.exactOptional=t.object=void 0;const n=r(5620),i=r(5915),o=r(8897);function s({path:e,branch:t}){const r=e[e.length-1];return(0,o.hasProperty)(t[t.length-2],r)}function a(e){return new n.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!s(r)||e.validator(t,r),refiner:(t,r)=>!s(r)||e.refiner(t,r)})}function c(e){return(0,n.create)(e,t.JsonStruct)}t.object=e=>(0,n.object)(e),t.exactOptional=a,t.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>t.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>t.UnsafeJsonStruct)))]),t.JsonStruct=(0,n.coerce)(t.UnsafeJsonStruct,(0,n.any)(),(e=>((0,i.assertStruct)(e,t.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))))),t.isValidJson=function(e){try{return c(e),!0}catch{return!1}},t.getSafeJson=c,t.getJsonSize=function(e){(0,i.assertStruct)(e,t.JsonStruct,"Invalid JSON value");const r=JSON.stringify(e);return(new TextEncoder).encode(r).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,t.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(t.JsonStruct),stack:a((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)]),t.JsonRpcRequestStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:a(t.JsonRpcParamsStruct)}),t.JsonRpcNotificationStruct=(0,t.object)({jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:a(t.JsonRpcParamsStruct)}),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},268:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5888:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(7833)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},8897:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.getKnownPropertyNames=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=r,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(t.ESCAPE_CHARACTERS_REGEXP)??[]).length},t.calculateNumberSize=function(e){return e.toString().length}},1322:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(5915),i=r(8824);t.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),t.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},2564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=void 0,t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},2026:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},1175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(5620),i=r(9589),o=r(5915);t.VersionStruct=(0,n.refine)((0,n.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,n.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,n.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,i.gt)(e,t)},t.gtRange=function(e,t){return(0,i.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}},7754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructError=void 0;class r extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}t.StructError=r},5620:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7754),t),i(r(9067),t),i(r(1704),t),i(r(401),t),i(r(7792),t),i(r(5991),t)},9067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.is=t.mask=t.create=t.assert=t.Struct=void 0;const n=r(7754),i=r(639);function o(e,t,r){const n=u(e,t,{message:r});if(n[0])throw n[0]}function s(e,t,r){const n=u(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function a(e,t,r){const n=u(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function c(e,t){return!u(e,t)[0]}function u(e,t,r={}){const o=(0,i.run)(e,t,r),s=(0,i.shiftIterator)(o);return s[0]?[new n.StructError(s[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,s[1]]}t.Struct=class{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:s=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(e,t)=>{const r=n(e,t);return(0,i.toFailures)(r,t,this,e)}:()=>[],this.refiner=o?(e,t)=>{const r=o(e,t);return(0,i.toFailures)(r,t,this,e)}:()=>[]}assert(e,t){return o(e,this,t)}create(e,t){return s(e,this,t)}is(e){return c(e,this)}mask(e,t){return a(e,this,t)}validate(e,t={}){return u(e,this,t)}},t.assert=o,t.create=s,t.mask=a,t.is=c,t.validate=u},1704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trimmed=t.defaulted=t.coerce=void 0;const n=r(9067),i=r(639),o=r(7792);function s(e,t,r){return new n.Struct({...e,coercer:(i,o)=>(0,n.is)(i,t)?e.coercer(r(i,o),o):e.coercer(i,o)})}t.coerce=s,t.defaulted=function(e,t,r={}){return s(e,(0,o.unknown)(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&(0,i.isPlainObject)(e)&&(0,i.isPlainObject)(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))},t.trimmed=function(e){return s(e,(0,o.string)(),(e=>e.trim()))}},401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refine=t.size=t.pattern=t.nonempty=t.min=t.max=t.empty=void 0;const n=r(9067),i=r(639);function o(e){return e instanceof Map||e instanceof Set?e.size:e.length}function s(e,t,r){return new n.Struct({...e,*refiner(n,o){yield*e.refiner(n,o);const s=r(n,o),a=(0,i.toFailures)(s,o,e,n);for(const e of a)yield{...e,refinement:t}}})}t.empty=function(e){return s(e,"empty",(t=>{const r=o(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},t.max=function(e,t,r={}){const{exclusive:n}=r;return s(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},t.min=function(e,t,r={}){const{exclusive:n}=r;return s(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},t.nonempty=function(e){return s(e,"nonempty",(t=>o(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},t.pattern=function(e,t){return s(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},t.size=function(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return s(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}const{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}))},t.refine=s},7792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unknown=t.union=t.type=t.tuple=t.string=t.set=t.regexp=t.record=t.optional=t.object=t.number=t.nullable=t.never=t.map=t.literal=t.intersection=t.integer=t.instance=t.func=t.enums=t.date=t.boolean=t.bigint=t.array=t.any=void 0;const n=r(9067),i=r(639),o=r(5991);function s(){return(0,o.define)("never",(()=>!1))}t.any=function(){return(0,o.define)("any",(()=>!0))},t.array=function(e){return new n.Struct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,i.print)(e)}`})},t.bigint=function(){return(0,o.define)("bigint",(e=>"bigint"==typeof e))},t.boolean=function(){return(0,o.define)("boolean",(e=>"boolean"==typeof e))},t.date=function(){return(0,o.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,i.print)(e)}`))},t.enums=function(e){const t={},r=e.map((e=>(0,i.print)(e))).join();for(const r of e)t[r]=r;return new n.Struct({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${(0,i.print)(t)}`})},t.func=function(){return(0,o.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,i.print)(e)}`))},t.instance=function(e){return(0,o.define)("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,i.print)(t)}`))},t.integer=function(){return(0,o.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,i.print)(e)}`))},t.intersection=function(e){return new n.Struct({type:"intersection",schema:null,*entries(t,r){for(const{entries:n}of e)yield*n(t,r)},*validator(t,r){for(const{validator:n}of e)yield*n(t,r)},*refiner(t,r){for(const{refiner:n}of e)yield*n(t,r)}})},t.literal=function(e){const t=(0,i.print)(e),r=typeof e;return new n.Struct({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${(0,i.print)(r)}`})},t.map=function(e,t){return new n.Struct({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,i.print)(e)}`})},t.never=s,t.nullable=function(e){return new n.Struct({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},t.number=function(){return(0,o.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,i.print)(e)}`))},t.object=function(e){const t=e?Object.keys(e):[],r=s();return new n.Struct({type:"object",schema:e??null,*entries(n){if(e&&(0,i.isObject)(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},t.optional=function(e){return new n.Struct({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})},t.record=function(e,t){return new n.Struct({type:"record",schema:null,*entries(r){if((0,i.isObject)(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`})},t.regexp=function(){return(0,o.define)("regexp",(e=>e instanceof RegExp))},t.set=function(e){return new n.Struct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,i.print)(e)}`})},t.string=function(){return(0,o.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,i.print)(e)}`))},t.tuple=function(e){const t=s();return new n.Struct({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${(0,i.print)(e)}`})},t.type=function(e){const t=Object.keys(e);return new n.Struct({type:"type",schema:e,*entries(r){if((0,i.isObject)(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},t.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new n.Struct({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=(0,i.run)(r,t,n),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${(0,i.print)(r)}`,...o]}})},t.unknown=function(){return(0,o.define)("unknown",(()=>!0))}},5991:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pick=t.partial=t.omit=t.lazy=t.dynamic=t.deprecated=t.define=t.assign=void 0;const n=r(9067),i=r(7792);t.assign=function(...e){const t="type"===e[0]?.type,r=e.map((({schema:e})=>e)),n=Object.assign({},...r);return t?(0,i.type)(n):(0,i.object)(n)},t.define=function(e,t){return new n.Struct({type:e,schema:null,validator:t})},t.deprecated=function(e,t){return new n.Struct({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})},t.dynamic=function(e){return new n.Struct({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},t.lazy=function(e){let t;return new n.Struct({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},t.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?(0,i.type)(n):(0,i.object)(n)},t.partial=function(e){const t=e instanceof n.Struct,r=t?{...e.schema}:{...e};for(const e in r)r[e]=(0,i.optional)(r[e]);return t&&"type"===e.type?(0,i.type)(r):(0,i.object)(r)},t.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return"type"===e.type?(0,i.type)(n):(0,i.object)(n)}},639:(e,t)=>{"use strict";function r(e){return"object"==typeof e&&null!==e}function n(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,i){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:s}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${n(i)}\``}=e;return{value:i,type:a,refinement:c,key:o[o.length-1],path:o,branch:s,...e,message:u}}Object.defineProperty(t,"__esModule",{value:!0}),t.run=t.toFailures=t.toFailure=t.shiftIterator=t.print=t.isPlainObject=t.isObject=void 0,t.isObject=r,t.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},t.print=n,t.shiftIterator=function(e){const{done:t,value:r}=e.next();return t?void 0:r},t.toFailure=i,t.toFailures=function*(e,t,n,o){(function(e){return r(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const r of e){const e=i(r,t,n,o);e&&(yield e)}},t.run=function*e(t,n,i={}){const{path:o=[],branch:s=[t],coerce:a=!1,mask:c=!1}=i,u={path:o,branch:s};if(a&&(t=n.coercer(t,u),c&&"type"!==n.type&&r(n.schema)&&r(t)&&!Array.isArray(t)))for(const e in t)void 0===n.schema[e]&&delete t[e];let l="valid";for(const e of n.validator(t,u))e.explanation=i.message,l="not_valid",yield[e,void 0];for(let[h,f,d]of n.entries(t,u)){const n=e(f,d,{path:void 0===h?o:[...o,h],branch:void 0===h?s:[...s,f],coerce:a,mask:c,message:i.message});for(const e of n)e[0]?(l=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):a&&(f=e[1],void 0===h?t=f:t instanceof Map?t.set(h,f):t instanceof Set?t.add(f):r(t)&&(void 0!==f||h in t)&&(t[h]=f))}if("not_valid"!==l)for(const e of n.refiner(t,u))e.explanation=i.message,l="not_refined",yield[e,void 0];"valid"===l&&(yield[void 0,t])}},2011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(5620),i=r(5940);function o(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{(0,n.assert)(e,t)}catch(e){throw o(a,`${r}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},472:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(5620),i=r(2011);t.base64=(e,t={})=>{const r=t.paddingRequired??!1,o=t.characterSet??"base64";let s,a;return"base64"===o?s=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,"u"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,"u"),(0,n.pattern)(e,a)}},7862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.base64ToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToBase64=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const n=r(3203),i=r(2011),o=r(3976),s=48,a=58,c=87,u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function h(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function f(e){if(h(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,o.add0x)(r.join(""))}function d(e){h(e);const t=f(e);return BigInt(t)}function p(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,o.assertIsHexString)(e);const t=(0,o.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),o=t-(t<a?s:c),u=i-(i<a?s:c);n[e]=16*o+u}return n}function g(e){return(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function m(e){return(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function y(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?p(e):y(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=h,t.bytesToHex=f,t.bytesToBigInt=d,t.bytesToSignedBigInt=function(e){h(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){h(e);const t=d(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return h(e),(new TextDecoder).decode(e)},t.bytesToBase64=function(e){return h(e),n.base64.encode(e)},t.hexToBytes=p,t.bigIntToBytes=g,t.signedBigIntToBytes=function(e,t){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)("number"==typeof t,"Byte length must be a number."),(0,i.assert)(t>0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=m,t.stringToBytes=y,t.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),n.base64.decode(e)},t.valueToBytes=b,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=b(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},7690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toCaipChainId=t.parseCaipAccountId=t.parseCaipChainId=t.isCaipAccountAddress=t.isCaipAccountId=t.isCaipReference=t.isCaipNamespace=t.isCaipChainId=t.KnownCaipNamespace=t.CaipAccountAddressStruct=t.CaipAccountIdStruct=t.CaipReferenceStruct=t.CaipNamespaceStruct=t.CaipChainIdStruct=t.CAIP_ACCOUNT_ADDRESS_REGEX=t.CAIP_ACCOUNT_ID_REGEX=t.CAIP_REFERENCE_REGEX=t.CAIP_NAMESPACE_REGEX=t.CAIP_CHAIN_ID_REGEX=void 0;const n=r(5620);function i(e){return(0,n.is)(e,t.CaipNamespaceStruct)}function o(e){return(0,n.is)(e,t.CaipReferenceStruct)}t.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,t.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,t.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,t.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,t.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,t.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_CHAIN_ID_REGEX),t.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_NAMESPACE_REGEX),t.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_REFERENCE_REGEX),t.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ID_REGEX),t.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ADDRESS_REGEX),(t.KnownCaipNamespace||(t.KnownCaipNamespace={})).Eip155="eip155",t.isCaipChainId=function(e){return(0,n.is)(e,t.CaipChainIdStruct)},t.isCaipNamespace=i,t.isCaipReference=o,t.isCaipAccountId=function(e){return(0,n.is)(e,t.CaipAccountIdStruct)},t.isCaipAccountAddress=function(e){return(0,n.is)(e,t.CaipAccountAddressStruct)},t.parseCaipChainId=function(e){const r=t.CAIP_CHAIN_ID_REGEX.exec(e);if(!r?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:r.groups.namespace,reference:r.groups.reference}},t.parseCaipAccountId=function(e){const r=t.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!r?.groups)throw new Error("Invalid CAIP account ID.");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},t.toCaipChainId=function(e,r){if(!i(e))throw new Error(`Invalid "namespace", must match: ${t.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid "reference", must match: ${t.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${r}`}},8860:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(5620),i=r(472);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},5211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(5620),i=r(2011),o=r(7862),s=r(3976),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),c=(0,n.coerce)((0,n.number)(),a,Number),u=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),h=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,h)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},4180:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return i(this,r,"f").entries()}forEach(e,t){return i(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return i(this,r,"f").get(e)}has(e){return i(this,r,"f").has(e)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{get size(){return i(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return i(this,n,"f").entries()}forEach(e,t){return i(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return i(this,n,"f").has(e)}keys(){return i(this,n,"f").keys()}values(){return i(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},1630:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapError=t.getErrorMessage=t.isErrorWithStack=t.isErrorWithMessage=t.isErrorWithCode=void 0;const n=r(1843),i=r(3745);function o(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=o,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||(0,i.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new n.ErrorWithCause(t,{cause:e}),o(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},3976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.isValidChecksumAddress=t.getChecksumAddress=t.isValidHexAddress=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.HexChecksumAddressStruct=t.HexAddressStruct=t.StrictHexStruct=t.HexStruct=void 0;const n=r(5620),i=r(2955),o=r(2011),s=r(7862);function a(e){return(0,n.is)(e,t.HexStruct)}function c(e){return(0,n.is)(e,t.StrictHexStruct)}function u(e){(0,o.assert)((0,n.is)(e,t.HexChecksumAddressStruct),"Invalid hex address.");const r=h(e.toLowerCase()),a=h((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split("").map(((e,t)=>{const r=a[t];return(0,o.assert)((0,n.is)(r,(0,n.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,n.is)(e,t.HexChecksumAddressStruct)&&u(e)===e}function h(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),t.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),t.isHexString=a,t.isStrictHexString=c,t.assertIsHexString=function(e){(0,o.assert)(a(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,o.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return(0,n.is)(e,t.HexAddressStruct)||l(e)},t.getChecksumAddress=u,t.isValidChecksumAddress=l,t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=h},2367:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2011),t),i(r(472),t),i(r(7862),t),i(r(7690),t),i(r(8860),t),i(r(5211),t),i(r(4180),t),i(r(1630),t),i(r(5940),t),i(r(3976),t),i(r(87),t),i(r(4956),t),i(r(8912),t),i(r(3745),t),i(r(5770),t),i(r(3028),t),i(r(2812),t),i(r(2954),t),i(r(6871),t),i(r(9266),t)},87:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.getSafeJson=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=t.exactOptional=t.object=void 0;const n=r(5620),i=r(2011),o=r(3745);function s({path:e,branch:t}){const r=e[e.length-1];return(0,o.hasProperty)(t[t.length-2],r)}function a(e){return new n.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!s(r)||e.validator(t,r),refiner:(t,r)=>!s(r)||e.refiner(t,r)})}function c(e){return(0,n.create)(e,t.JsonStruct)}t.object=e=>(0,n.object)(e),t.exactOptional=a,t.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>t.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>t.UnsafeJsonStruct)))]),t.JsonStruct=(0,n.coerce)(t.UnsafeJsonStruct,(0,n.any)(),(e=>((0,i.assertStruct)(e,t.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))))),t.isValidJson=function(e){try{return c(e),!0}catch{return!1}},t.getSafeJson=c,t.getJsonSize=function(e){(0,i.assertStruct)(e,t.JsonStruct,"Invalid JSON value");const r=JSON.stringify(e);return(new TextEncoder).encode(r).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,t.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(t.JsonStruct),stack:a((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)]),t.JsonRpcRequestStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:a(t.JsonRpcParamsStruct)}),t.JsonRpcNotificationStruct=(0,t.object)({jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:a(t.JsonRpcParamsStruct)}),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},4956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8912:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(7833)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},3745:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.getKnownPropertyNames=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=r,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(t.ESCAPE_CHARACTERS_REGEXP)??[]).length},t.calculateNumberSize=function(e){return e.toString().length}},5770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(2011),i=r(3976);t.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),t.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},3028:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2812:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=void 0,t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},2954:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},6871:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(5620),i=r(9589),o=r(2011);t.VersionStruct=(0,n.refine)((0,n.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,n.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,n.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,i.gt)(e,t)},t.gtRange=function(e,t){return(0,i.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=r(228),t=r(2046),n=r.n(t);let i=!1,o=!1;const s={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=s.default,c=null;const u=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var l,h;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(l={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(h||(h={}));const f="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),a>s[r]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(o)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=f[t[e]>>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let s="";switch(t){case h.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return c||(c=new d("logger/5.7.0")),c}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!e,i=!!t}static setLogLevel(e){const t=s[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=h,d.levels=l;const p=new d("bytes/5.7.0");function g(e){return"number"==typeof e&&e==e&&e%1==0}function m(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!g(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!g(r)||r<0||r>=256)return!1}return!0}function y(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const b="0123456789abcdef";function w(e,t){if(t||(t={}),"number"==typeof e){p.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=b[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e))return e.toHexString();if(y(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":p.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(m(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=b[(240&n)>>4]+b[15&n]}return t}return p.throwArgumentError("invalid hexlify value","value",e)}var v=n().BN;const E=new d("bignumber/5.7.0"),_={},S=9007199254740991;let x=!1;class I{constructor(e,t){e!==_&&E.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return R(B(this).fromTwos(e))}toTwos(e){return R(B(this).toTwos(e))}abs(){return"-"===this._hex[0]?I.from(this._hex.substring(1)):this}add(e){return R(B(this).add(B(e)))}sub(e){return R(B(this).sub(B(e)))}div(e){return I.from(e).isZero()&&M("division-by-zero","div"),R(B(this).div(B(e)))}mul(e){return R(B(this).mul(B(e)))}mod(e){const t=B(e);return t.isNeg()&&M("division-by-zero","mod"),R(B(this).umod(t))}pow(e){const t=B(e);return t.isNeg()&&M("negative-power","pow"),R(B(this).pow(t))}and(e){const t=B(e);return(this.isNegative()||t.isNeg())&&M("unbound-bitwise-result","and"),R(B(this).and(t))}or(e){const t=B(e);return(this.isNegative()||t.isNeg())&&M("unbound-bitwise-result","or"),R(B(this).or(t))}xor(e){const t=B(e);return(this.isNegative()||t.isNeg())&&M("unbound-bitwise-result","xor"),R(B(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&M("negative-width","mask"),R(B(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&M("negative-width","shl"),R(B(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&M("negative-width","shr"),R(B(this).shrn(e))}eq(e){return B(this).eq(B(e))}lt(e){return B(this).lt(B(e))}lte(e){return B(this).lte(B(e))}gt(e){return B(this).gt(B(e))}gte(e){return B(this).gte(B(e))}isNegative(){return"-"===this._hex[0]}isZero(){return B(this).isZero()}toNumber(){try{return B(this).toNumber()}catch(e){M("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return E.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?x||(x=!0,E.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?E.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):E.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),B(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof I)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new I(_,A(e)):e.match(/^-?[0-9]+$/)?new I(_,A(new v(e))):E.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&M("underflow","BigNumber.from",e),(e>=S||e<=-S)&&M("overflow","BigNumber.from",e),I.from(String(e));const t=e;if("bigint"==typeof t)return I.from(t.toString());if(m(t))return I.from(w(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return I.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(y(e)||"-"===e[0]&&y(e.substring(1))))return I.from(e)}return E.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function A(e){if("string"!=typeof e)return A(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&E.throwArgumentError("invalid hex","value",e),"0x00"===(e=A(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function R(e){return I.from(A(e))}function B(e){const t=I.from(e).toHexString();return"-"===t[0]?new v("-"+t.substring(3),16):new v(t.substring(2),16)}function M(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),E.throwError(e,d.errors.NUMERIC_FAULT,n)}var T,P=(T=function(e,t){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},T(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},k=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},O=function(e){function t(t){var r=void 0===t?{}:t,n=r.backgroundMessenger,i=r.providerRequestTransport,o=r.onConstruct,s=e.call(this)||this;return s.connected=!1,s.isRainbow=!0,s.isReady=!0,s.isMetaMask=!0,s.networkVersion="1",s.providers=void 0,s.requestId=0,s.backgroundMessenger=n,s.providerRequestTransport=i,null==o||o({emit:s.emit.bind(s)}),s.bindMethods(),s}return P(t,e),t.prototype.bindMethods=function(){for(var e=0,t=Object.getOwnPropertyNames(Object.getPrototypeOf(this));e<t.length;e++){var r=t[e],n=this[r];"function"==typeof n&&"constructor"!==r&&(this[r]=n.bind(this))}},t.prototype.enable=function(){return C(this,void 0,void 0,(function(){return k(this,(function(e){return[2,this.request({method:"eth_requestAccounts"})]}))}))},t.prototype.isConnected=function(){return this.connected},t.prototype.handleChainChanged=function(e){return C(this,void 0,void 0,(function(){return k(this,(function(t){var r;return this.chainId=e,this.networkVersion=parseInt(this.chainId,16).toString(),this.emit("chainChanged",(r=String(e),function(e){const t=function(e){"string"!=typeof e&&(e=w(e)),y(e)||p.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}(w(e,{hexPad:"left"}));return"0x"===t?"0x0":t}(I.from(r).toHexString()))),[2]}))}))},t.prototype.request=function(e){var t,r,n=e.method,i=e.params;return C(this,void 0,void 0,(function(){var e,o;return k(this,(function(s){switch(s.label){case 0:if(!this.providerRequestTransport)throw new Error("No transport");return null===(t=this.backgroundMessenger)||void 0===t||t.send("rainbow_prefetchDappMetadata",window.location.href),e=this.requestId++,[4,null===(r=this.providerRequestTransport)||void 0===r?void 0:r.send({id:e,method:n,params:i},{id:e})];case 1:if((o=s.sent()).id!==e)return[2];if(o.error)throw o.error;switch(n){case"eth_requestAccounts":this.selectedAddress=o.result[0],this.connected=!0;break;case"eth_chainId":this.chainId=o.result,this.networkVersion=parseInt(this.chainId,16).toString()}return[2,o.result]}}))}))},t.prototype.sendAsync=function(e,t){return C(this,void 0,void 0,(function(){var r,n;return k(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.request(e)];case 1:return r=i.sent(),t(null,{id:e.id,jsonrpc:"2.0",result:r}),[3,3];case 2:return n=i.sent(),t(n,{id:e.id,jsonrpc:"2.0",error:{code:n.code,message:n.message,name:n.name}}),[3,3];case 3:return[2]}}))}))},t.prototype.send=function(e,t){return C(this,void 0,void 0,(function(){return k(this,(function(r){return"string"==typeof e&&Array.isArray(t)?[2,this.request({method:e,params:t})]:[2,this.request(e)]}))}))},t}(e);function N(e,t={}){const{fees:r=e.fees,formatters:n=e.formatters,serializers:i=e.serializers}=t;return{...e,fees:r,formatters:n,serializers:i}}const L=N({id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),j=N({id:42170,name:"Arbitrum Nova",network:"arbitrum-nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{blast:{http:["https://arbitrum-nova.public.blastapi.io"],webSocket:["wss://arbitrum-nova.public.blastapi.io"]},default:{http:["https://nova.arbitrum.io/rpc"]},public:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://nova.arbiscan.io"},blockScout:{name:"BlockScout",url:"https://nova-explorer.arbitrum.io/"},default:{name:"Arbiscan",url:"https://nova.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),U=N({id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}});class $ extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"viem@1.21.3"});const r=t.cause instanceof $?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof $&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://viem.sh${n}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return F(this,e)}}function F(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?F(e.cause,t):t?null:e}class D extends ${constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class z extends ${constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function H(e){return function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function G(e,{size:t}){if(H(e)>t)throw new z({givenSize:H(e),maxSize:t})}function Z(e,t={}){const{signed:r}=t;t.size&&G(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function V(e,t={}){return Number(Z(e,t))}function J(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const i=t(e);if(r)for(const e of r)delete i[e];return{...i,...n(e)}},type:e})}const W={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function q(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?V(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?V(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?W[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const Y=J("transaction",q);function K(e){const t=e.transactions?.map((e=>"string"==typeof e?e:q(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const X=J("block",K),Q={"0x0":"reverted","0x1":"success"};function ee(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?V(e.transactionIndex):null,status:e.status?Q[e.status]:null,type:e.type?W[e.type]||e.type:null}}const te=J("transactionReceipt",ee),re={block:X({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=q(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Z(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:Y({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Z(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:te({format:e=>({l1GasPrice:e.l1GasPrice?Z(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Z(e.l1GasUsed):null,l1Fee:e.l1Fee?Z(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},ne=N({id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-mainnet.g.alchemy.com/v2"],webSocket:["wss://base-mainnet.g.alchemy.com/v2"]},infura:{http:["https://base-mainnet.infura.io/v3"],webSocket:["wss://base-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},{formatters:re}),ie=N({id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});class oe extends ${constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function se(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;const n=e.replace("0x","");if(n.length>2*r)throw new oe({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new oe({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const o="right"===t;n[o?i:r-i-1]=e[o?i:e.length-i-1]}return n}(e,{dir:t,size:r})}const ae=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function ce(e,t={}){return"number"==typeof e||"bigint"==typeof e?le(e,t):"string"==typeof e?function(e,t={}){return ue(he.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?(G(r,{size:t.size}),se(r,{size:t.size})):r}(e,t):ue(e,t)}function ue(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=ae[e[t]];const n=`0x${r}`;return"number"==typeof t.size?(G(n,{size:t.size}),se(n,{dir:"right",size:t.size})):n}function le(e,t={}){const{signed:r,size:n}=t,i=BigInt(e);let o;n?o=r?(1n<<8n*BigInt(n)-1n)-1n:2n**(8n*BigInt(n))-1n:"number"==typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof o&&r?-o-1n:0;if(o&&i>o||i<s){const t="bigint"==typeof e?"n":"";throw new D({max:o?`${o}${t}`:void 0,min:`${s}${t}`,signed:r,size:n,value:`${e}${t}`})}const a=`0x${(r&&i<0?(1n<<BigInt(8*n))+BigInt(i):i).toString(16)}`;return n?se(a,{size:n}):a}const he=new TextEncoder,fe={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function de(e){return{...e,gas:void 0!==e.gas?le(e.gas):void 0,gasPrice:void 0!==e.gasPrice?le(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?le(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?le(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?le(e.nonce):void 0,type:void 0!==e.type?fe[e.type]:void 0,value:void 0!==e.value?le(e.value):void 0}}const pe=J("transactionRequest",de);function ge(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}function me(e){return 0===e||0n===e||null==e||"0"===e||""===e||"string"==typeof e&&("0x"===ge(e).toLowerCase()||"0x00"===ge(e).toLowerCase())}function ye(e){return!me(e)}function be(e){return ye(e.maxFeePerGas)&&ye(e.maxPriorityFeePerGas)}function we(e){return"cip42"===e.type||be(e)&&(ye(e.feeCurrency)||ye(e.gatewayFeeRecipient)||ye(e.gatewayFee))}function ve(e){return"cip64"===e.type||be(e)&&ye(e.feeCurrency)&&me(e.gatewayFee)&&me(e.gatewayFeeRecipient)}const Ee={block:X({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(e){const t=e.transactions?.map((e=>"string"==typeof e?e:{...q(e),feeCurrency:e.feeCurrency,..."0x7b"!==e.type?{gatewayFee:e.gatewayFee?Z(e.gatewayFee):null,gatewayFeeRecipient:e.gatewayFeeRecipient||null}:{}}));return{randomness:e.randomness,transactions:t}}}),transaction:Y({format(e){const t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?Z(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:pe({format(e){const t={feeCurrency:e.feeCurrency};return ve(e)?t.type="0x7b":(we(e)&&(t.type="0x7c"),t.gatewayFee=void 0!==e.gatewayFee?le(e.gatewayFee):void 0,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}})};class _e extends ${constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class Se extends ${constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}const xe={ether:-9,wei:9};function Ie(e,t="wei"){return function(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}(e,xe[t])}class Ae extends ${constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(Ae,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Ae,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Re extends ${constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ie(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Re,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),Object.defineProperty(class extends ${constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ie(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),Object.defineProperty(class extends ${constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),Object.defineProperty(class extends ${constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Object.defineProperty(class extends ${constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Object.defineProperty(class extends ${constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),Object.defineProperty(class extends ${constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Object.defineProperty(class extends ${constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Object.defineProperty(class extends ${constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Be extends ${constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Ie(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Ie(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Be,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});const Me=/^0x[a-fA-F0-9]{40}$/;function Te(e){return Me.test(e)}function Pe(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class Ce extends ${constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class ke extends ${constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const Oe={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ke({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ce({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new Ce({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}},Ne={zero:48,nine:57,A:65,F:70,a:97,f:102};function Le(e){return e>=Ne.zero&&e<=Ne.nine?e-Ne.zero:e>=Ne.A&&e<=Ne.F?e-(Ne.A-10):e>=Ne.a&&e<=Ne.f?e-(Ne.a-10):void 0}function je(e,t="hex"){const r=Ue(e),n=function(e){const t=Object.create(Oe);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(r.length));return r.encode(n),"hex"===t?ue(n.bytes):n.bytes}function Ue(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),r=$e(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map((e=>Ue(e)))):function(e){const t="string"==typeof e?function(e,t={}){let r=e;t.size&&(G(r,{size:t.size}),r=se(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,o=new Uint8Array(i);for(let e=0,t=0;e<i;e++){const r=Le(n.charCodeAt(t++)),i=Le(n.charCodeAt(t++));if(void 0===r||void 0===i)throw new $(`Invalid byte sequence ("${n[t-2]}${n[t-1]}" in "${n}").`);o[e]=16*r+i}return o}(e):e,r=$e(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function $e(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new $("Length is too large.")}function Fe(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class De extends ${constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class ze extends ${constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Fe(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class He extends ${constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}function Ge(e){if(!e||0===e.length)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:i}=e[r];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new He({storageKey:i[e]});if(!Te(n))throw new _e({address:n});t.push([n,i])}return t}const Ze={transaction:(e,t)=>ve(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,feeCurrency:s}=e;if(t<=0)throw new Se({chainId:t});if(o&&!Te(o))throw new _e({address:o});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(ye(i)&&i>Ve)throw new Re({maxFeePerGas:i});if(ye(r)&&ye(i)&&r>i)throw new Be({maxFeePerGas:i,maxPriorityFeePerGas:r});if(ye(s)&&!Te(s))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(me(s))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}(e);const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,data:h}=e,f=[ce(r),i?ce(i):"0x",c?ce(c):"0x",a?ce(a):"0x",n?ce(n):"0x",o??"0x",s?ce(s):"0x",h??"0x",Ge(u),l];return t&&f.push(27n===t.v?"0x":ce(1),ge(t.r),ge(t.s)),Pe(["0x7b",je(f)])}(e,t):we(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,feeCurrency:s,gatewayFee:a,gatewayFeeRecipient:c}=e;if(t<=0)throw new Se({chainId:t});if(o&&!Te(o))throw new _e({address:o});if(n)throw new $("`gasPrice` is not a valid CIP-42 Transaction attribute.");if(ye(i)&&i>Ve)throw new Re({maxFeePerGas:i});if(ye(r)&&ye(i)&&r>i)throw new Be({maxFeePerGas:i,maxPriorityFeePerGas:r});if(ye(a)&&me(c)||ye(c)&&me(a))throw new $("`gatewayFee` and `gatewayFeeRecipient` must be provided together.");if(ye(s)&&!Te(s))throw new $("`feeCurrency` MUST be a token address for CIP-42 transactions.");if(ye(c)&&!Te(c))throw new _e(c);if(me(s)&&me(c))throw new $("Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.")}(e);const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,gatewayFeeRecipient:h,gatewayFee:f,data:d}=e,p=[ce(r),i?ce(i):"0x",c?ce(c):"0x",a?ce(a):"0x",n?ce(n):"0x",l??"0x",h??"0x",f?ce(f):"0x",o??"0x",s?ce(s):"0x",d??"0x",Ge(u)];return t&&p.push(27n===t.v?"0x":ce(1),ge(t.r),ge(t.s)),Pe(["0x7c",je(p)])}(e,t):function(e,t){const r=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new ze({transaction:e})}(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new Se({chainId:t});if(o&&!Te(o))throw new _e({address:o});if(n)throw new $("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new Re({maxFeePerGas:i});if(r&&i&&r>i)throw new Be({maxFeePerGas:i,maxPriorityFeePerGas:r})}(e);const h=Ge(u),f=[ce(r),i?ce(i):"0x",c?ce(c):"0x",a?ce(a):"0x",n?ce(n):"0x",o??"0x",s?ce(s):"0x",l??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?ce(1):27n===t.v?"0x":ce(1);f.push(e,ge(t.r),ge(t.s))}return Pe(["0x02",je(f)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:i,nonce:o,to:s,value:a,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new Se({chainId:t});if(o&&!Te(o))throw new _e({address:o});if(r||i)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new Re({maxFeePerGas:n})}(e);const l=Ge(c),h=[ce(r),o?ce(o):"0x",u?ce(u):"0x",n?ce(n):"0x",s??"0x",a?ce(a):"0x",i??"0x",l];if(t){const e=0n===t.v?"0x":1n===t.v?ce(1):27n===t.v?"0x":ce(1);h.push(e,ge(t.r),ge(t.s))}return Pe(["0x01",je(h)])}(e,t):function(e,t){const{chainId:r=0,gas:n,data:i,nonce:o,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,accessList:s}=e;if(o&&!Te(o))throw new _e({address:o});if(void 0!==t&&t<=0)throw new Se({chainId:t});if(r||i)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new Re({maxFeePerGas:n});if(s)throw new $("`accessList` is not a valid Legacy Transaction attribute.")}(e);let u=[o?ce(o):"0x",c?ce(c):"0x",n?ce(n):"0x",s??"0x",a?ce(a):"0x",i??"0x"];if(t){const e=(()=>{if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new De({v:t.v});return e})();u=[...u,ce(e),t.r,t.s]}else r>0&&(u=[...u,ce(r),"0x","0x"]);return je(u)}(e,t)}(e,t)},Ve=2n**256n-1n,Je=N({id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},{formatters:Ee,serializers:Ze}),We=N({id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]},public:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),qe=N({id:59144,name:"Linea Mainnet",network:"linea-mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-mainnet.infura.io/v3"],webSocket:["wss://linea-mainnet.infura.io/ws/v3"]},default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.linea.build"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Ye=N({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]},public:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{etherscan:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"},default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),Ke=N({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:re}),Xe=N({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Qe=N({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),et=N({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),tt=N({id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882}}},{formatters:re}),rt=N({id:31337,name:"Hardhat",network:"hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}}),nt=N({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),it=N({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0}),ot=N({id:534352,name:"Scroll",network:"scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]},public:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com"},blockscout:{name:"Blockscout",url:"https://blockscout.scroll.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),st=N({id:17e3,network:"holesky",name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77}},testnet:!0}),at=N({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:re}),ct=N({id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-sepolia.g.alchemy.com/v2"],webSocket:["wss://opt-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},testnet:!0},{formatters:re}),ut=N({id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),lt=N({id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/polygon_mumbai"]},public:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),ht=N({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),ft=N({id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-sepolia.g.alchemy.com/v2"],webSocket:["wss://arb-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"},default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),dt=N({id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-sepolia.g.alchemy.com/v2"],webSocket:["wss://base-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0,sourceId:11155111},{formatters:re}),pt=N({id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123}},testnet:!0},{formatters:re}),gt=N({id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160}},testnet:!0},{formatters:re}),mt=N({id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),yt=N({id:16666e5,name:"Harmony One",network:"harmony",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{public:{http:["https://rpc.ankr.com/harmony"]},default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),bt=N({id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1});var wt,vt;(vt=wt||(wt={}))[vt.arbitrum=L.id]="arbitrum",vt[vt.arbitrumNova=j.id]="arbitrumNova",vt[vt.avalanche=U.id]="avalanche",vt[vt.base=ne.id]="base",vt[vt.bsc=ie.id]="bsc",vt[vt.celo=Je.id]="celo",vt[vt.gnosis=We.id]="gnosis",vt[vt.linea=qe.id]="linea",vt[vt.manta=Ye.id]="manta",vt[vt.optimism=Ke.id]="optimism",vt[vt.mainnet=Xe.id]="mainnet",vt[vt.polygon=Qe.id]="polygon",vt[vt.polygonZkEvm=et.id]="polygonZkEvm",vt[vt.rari=1380012617]="rari",vt[vt.zora=tt.id]="zora",vt[vt.hardhat=rt.id]="hardhat",vt[vt.hardhatOptimism=1338]="hardhatOptimism",vt[vt.goerli=nt.id]="goerli",vt[vt.sepolia=it.id]="sepolia",vt[vt.scroll=ot.id]="scroll",vt[vt.holesky=st.id]="holesky",vt[vt.optimismGoerli=at.id]="optimismGoerli",vt[vt.optimismSepolia=ct.id]="optimismSepolia",vt[vt.bscTestnet=ut.id]="bscTestnet",vt[vt.polygonMumbai=lt.id]="polygonMumbai",vt[vt.arbitrumGoerli=ht.id]="arbitrumGoerli",vt[vt.arbitrumSepolia=ft.id]="arbitrumSepolia",vt[vt.baseSepolia=dt.id]="baseSepolia",vt[vt.zoraTestnet=pt.id]="zoraTestnet",vt[vt.zoraSepolia=gt.id]="zoraSepolia",vt[vt.fantom=mt.id]="fantom",vt[vt.harmonyOne=yt.id]="harmonyOne",vt[vt.moonbeam=bt.id]="moonbeam",r(1553);var Et=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,_t=Math.ceil,St=Math.floor,xt="[BigNumber Error] ",It=xt+"Number primitive has more than 15 significant digits: ",At=1e14,Rt=14,Bt=9007199254740991,Mt=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Tt=1e7,Pt=1e9;function Ct(e){var t=0|e;return e>0||e===t?t:t-1}function kt(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=Rt-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function Ot(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function Nt(e,t,r,n){if(e<t||e>r||e!==St(e))throw Error(xt+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Lt(e){var t=e.c.length-1;return Ct(e.e/Rt)==t&&e.c[t]%2!=0}function jt(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Ut(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var $t=function e(t){var r,n,i,o,s,a,c,u,l,h,f=I.prototype={constructor:I,toString:null,valueOf:null},d=new I(1),p=20,g=4,m=-7,y=21,b=-1e7,w=1e7,v=!1,E=1,_=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"Β ",suffix:""},x="0123456789abcdefghijklmnopqrstuvwxyz";function I(e,t){var r,o,s,a,c,u,l,h,f=this;if(!(f instanceof I))return new I(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>w?f.c=f.e=null:(f.e=a,f.c=[e]))}h=String(e)}else{if(!Et.test(h=String(e)))return i(f,h,u);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(a=h.indexOf("."))>-1&&(h=h.replace(".","")),(c=h.search(/e/i))>0?(a<0&&(a=c),a+=+h.slice(c+1),h=h.substring(0,c)):a<0&&(a=h.length)}else{if(Nt(t,2,x.length,"Base"),10==t)return M(f=new I(e),p+f.e+1,g);if(h=String(e),u="number"==typeof e){if(0*e!=0)return i(f,h,u,t);if(f.s=1/e<0?(h=h.slice(1),-1):1,I.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(It+e)}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=x.slice(0,t),a=c=0,l=h.length;c<l;c++)if(r.indexOf(o=h.charAt(c))<0){if("."==o){if(c>a){a=l;continue}}else if(!s&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(f,String(e),u,t)}u=!1,(a=(h=n(h,t,10,f.s)).indexOf("."))>-1?h=h.replace(".",""):a=h.length}for(c=0;48===h.charCodeAt(c);c++);for(l=h.length;48===h.charCodeAt(--l););if(h=h.slice(c,++l)){if(l-=c,u&&I.DEBUG&&l>15&&(e>Bt||e!==St(e)))throw Error(It+f.s*e);if((a=a-c-1)>w)f.c=f.e=null;else if(a<b)f.c=[f.e=0];else{if(f.e=a,f.c=[],c=(a+1)%Rt,a<0&&(c+=Rt),c<l){for(c&&f.c.push(+h.slice(0,c)),l-=Rt;c<l;)f.c.push(+h.slice(c,c+=Rt));c=Rt-(h=h.slice(c)).length}else c-=l;for(;c--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function A(e,t,r,n){var i,o,s,a,c;if(null==r?r=g:Nt(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=kt(e.c),c=1==n||2==n&&(s<=m||s>=y)?jt(c,s):Ut(c,s,"0");else if(o=(e=M(new I(e),t,r)).e,a=(c=kt(e.c)).length,1==n||2==n&&(t<=o||o<=m)){for(;a<t;c+="0",a++);c=jt(c,o)}else if(t-=s,c=Ut(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function R(e,t){for(var r,n=1,i=new I(e[0]);n<e.length;n++){if(!(r=new I(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function B(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*Rt-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function M(e,t,r,n){var i,o,s,a,c,u,l,h=e.c,f=Mt;if(h){e:{for(i=1,a=h[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=Rt,s=t,l=(c=h[u=0])/f[i-s-1]%10|0;else if((u=_t((o+1)/Rt))>=h.length){if(!n)break e;for(;h.length<=u;h.push(0));c=l=0,i=1,s=(o%=Rt)-Rt+1}else{for(c=a=h[u],i=1;a>=10;a/=10,i++);l=(s=(o%=Rt)-Rt+i)<0?0:c/f[i-s-1]%10|0}if(n=n||t<0||null!=h[u+1]||(s<0?c:c%f[i-s-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?s>0?c/f[i-s]:0:h[u-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,n?(t-=e.e+1,h[0]=f[(Rt-t%Rt)%Rt],e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=u,a=1,u--):(h.length=u+1,a=f[Rt-o],h[u]=s>0?St(c/f[i-s]%f[s])*a:0),n)for(;;){if(0==u){for(o=1,s=h[0];s>=10;s/=10,o++);for(s=h[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,h[0]==At&&(h[0]=1));break}if(h[u]+=a,h[u]!=At)break;h[u--]=0,a=1}for(o=h.length;0===h[--o];h.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function T(e){var t,r=e.e;return null===r?e.toString():(t=kt(e.c),t=r<=m||r>=y?jt(t,r):Ut(t,r,"0"),e.s<0?"-"+t:t)}return I.clone=e,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.EUCLID=9,I.config=I.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(xt+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Nt(r=e[t],0,Pt,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Nt(r=e[t],0,8,t),g=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Nt(r[0],-Pt,0,t),Nt(r[1],0,Pt,t),m=r[0],y=r[1]):(Nt(r,-Pt,Pt,t),m=-(y=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Nt(r[0],-Pt,-1,t),Nt(r[1],1,Pt,t),b=r[0],w=r[1];else{if(Nt(r,-Pt,Pt,t),!r)throw Error(xt+t+" cannot be zero: "+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(xt+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(xt+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Nt(r=e[t],0,9,t),E=r),e.hasOwnProperty(t="POW_PRECISION")&&(Nt(r=e[t],0,Pt,t),_=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(xt+t+" not an object: "+r);S=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(xt+t+" invalid: "+r);x=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:g,EXPONENTIAL_AT:[m,y],RANGE:[b,w],CRYPTO:v,MODULO_MODE:E,POW_PRECISION:_,FORMAT:S,ALPHABET:x}},I.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!I.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-Pt&&i<=Pt&&i===St(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%Rt)<1&&(t+=Rt),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=At||r!==St(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(xt+"Invalid BigNumber: "+e)},I.maximum=I.max=function(){return R(arguments,f.lt)},I.minimum=I.min=function(){return R(arguments,f.gt)},I.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return St(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,c=[],u=new I(d);if(null==e?e=p:Nt(e,0,Pt),i=_t(e/Rt),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw v=!1,Error(xt+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(o%1e14),a+=7);a=i/7}if(!v)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],e%=Rt,i&&e&&(o=Mt[Rt-e],c[a]=St(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=Rt);for(a=1,o=c[0];o>=10;o/=10,a++);a<Rt&&(n-=Rt-a)}return u.e=n,u.c=c,u}),I.sum=function(){for(var e=1,t=arguments,r=new I(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,u,l,h,f,d,m,y,b=n.indexOf("."),w=p,v=g;for(b>=0&&(h=_,_=0,n=n.replace(".",""),d=(y=new I(i)).pow(n.length-b),_=h,y.c=t(Ut(kt(d.c),d.e,"0"),10,o,e),y.e=y.c.length),l=h=(m=t(n,i,o,a?(c=x,e):(c=e,x))).length;0==m[--h];m.pop());if(!m[0])return c.charAt(0);if(b<0?--l:(d.c=m,d.e=l,d.s=s,m=(d=r(d,y,w,v,o)).c,f=d.r,l=d.e),b=m[u=l+w+1],h=o/2,f=f||u<0||null!=m[u+1],f=v<4?(null!=b||f)&&(0==v||v==(d.s<0?3:2)):b>h||b==h&&(4==v||f||6==v&&1&m[u-1]||v==(d.s<0?8:7)),u<1||!m[0])n=f?Ut(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(m.length=u,f)for(--o;++m[--u]>o;)m[u]=0,u||(++l,m=[1].concat(m));for(h=m.length;!m[--h];);for(b=0,n="";b<=h;n+=c.charAt(m[b++]));n=Ut(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,u=t%Tt,l=t/Tt|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%Tt)+(n=l*o+(s=e[c]/Tt|0)*u)%Tt*Tt+a)/r|0)+(n/Tt|0)+l*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,u,l,h,f,d,p,g,m,y,b,w,v,E,_,S,x,A=n.s==i.s?1:-1,R=n.c,B=i.c;if(!(R&&R[0]&&B&&B[0]))return new I(n.s&&i.s&&(R?!B||R[0]!=B[0]:B)?R&&0==R[0]||!B?0*A:A/0:NaN);for(m=(g=new I(A)).c=[],A=o+(u=n.e-i.e)+1,a||(a=At,u=Ct(n.e/Rt)-Ct(i.e/Rt),A=A/Rt|0),l=0;B[l]==(R[l]||0);l++);if(B[l]>(R[l]||0)&&u--,A<0)m.push(1),h=!0;else{for(E=R.length,S=B.length,l=0,A+=2,(f=St(a/(B[0]+1)))>1&&(B=e(B,f,a),R=e(R,f,a),S=B.length,E=R.length),v=S,b=(y=R.slice(0,S)).length;b<S;y[b++]=0);x=B.slice(),x=[0].concat(x),_=B[0],B[1]>=a/2&&_++;do{if(f=0,(c=t(B,y,S,b))<0){if(w=y[0],S!=b&&(w=w*a+(y[1]||0)),(f=St(w/_))>1)for(f>=a&&(f=a-1),p=(d=e(B,f,a)).length,b=y.length;1==t(d,y,p,b);)f--,r(d,S<p?x:B,p,a),p=d.length,c=1;else 0==f&&(c=f=1),p=(d=B.slice()).length;if(p<b&&(d=[0].concat(d)),r(y,d,b,a),b=y.length,-1==c)for(;t(B,y,S,b)<1;)f++,r(y,S<b?x:B,b,a),b=y.length}else 0===c&&(f++,y=[0]);m[l++]=f,y[0]?y[b++]=R[v]||0:(y=[R[v]],b=1)}while((v++<E||null!=y[0])&&A--);h=null!=y[0],m[0]||m.splice(0,1)}if(a==At){for(l=1,A=m[0];A>=10;A/=10,l++);M(g,o+(g.e=l+u*Rt-1)+1,s,h)}else g.e=u,g.r=+h;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(h,"");if(l.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(c,"$1").replace(u,"0.$1")),t!=o))return new I(o,i);if(I.DEBUG)throw Error(xt+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new I(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return Ot(this,new I(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,i,o=this;if(null!=e)return Nt(e,0,Pt),null==t?t=g:Nt(t,0,8),M(new I(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-Ct(this.e/Rt))*Rt,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new I(e,t),p,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new I(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,i,o,s,a,c,u,l=this;if((e=new I(e)).c&&!e.isInteger())throw Error(xt+"Exponent not an integer: "+T(e));if(null!=t&&(t=new I(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new I(Math.pow(+T(l),s?2-Lt(e):+T(e))),t?u.mod(t):u;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new I(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return o=l.s<0&&Lt(e)?-0:0,l.e>-1&&(o=1/o),new I(a?1/o:o);_&&(o=_t(_/Rt+2))}for(s?(r=new I(.5),a&&(e.s=1),c=Lt(e)):c=(i=Math.abs(+T(e)))%2,u=new I(d);;){if(c){if(!(u=u.times(l)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(t))}if(i){if(0===(i=St(i/2)))break;c=i%2}else if(M(e=e.times(r),e.e+1,1),e.e>14)c=Lt(e);else{if(0==(i=+T(e)))break;c=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):n&&(l=l.mod(t))}return n?u:(a&&(u=d.div(u)),t?u.mod(t):o?M(u,_,g,void 0):u)},f.integerValue=function(e){var t=new I(this);return null==e?e=g:Nt(e,0,8),M(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===Ot(this,new I(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return Ot(this,new I(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=Ot(this,new I(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Ct(this.e/Rt)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return Ot(this,new I(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=Ot(this,new I(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new I(e,t)).s,!a||!t)return new I(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/Rt,u=e.e/Rt,l=s.c,h=e.c;if(!c||!u){if(!l||!h)return l?(e.s=-t,e):new I(h?s:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new I(l[0]?s:3==g?-0:0)}if(c=Ct(c),u=Ct(u),l=l.slice(),a=c-u){for((o=a<0)?(a=-a,i=l):(u=c,i=h),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=h.length))?a:t,a=t=0;t<n;t++)if(l[t]!=h[t]){o=l[t]<h[t];break}if(o&&(i=l,l=h,h=i,e.s=-e.s),(t=(n=h.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=At-1;n>a;){if(l[--n]<h[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=At}l[n]-=h[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?B(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,i,o=this;return e=new I(e,t),!o.c||!e.s||e.c&&!e.c[0]?new I(NaN):!e.c||o.c&&!o.c[0]?new I(o):(9==E?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,E),(e=o.minus(n.times(e))).c[0]||1!=E||(e.s=o.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,i,o,s,a,c,u,l,h,f,d,p,g,m,y=this,b=y.c,w=(e=new I(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!y.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=y.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Ct(y.e/Rt)+Ct(e.e/Rt),e.s*=y.s,(c=b.length)<(h=w.length)&&(p=b,b=w,w=p,i=c,c=h,h=i),i=c+h,p=[];i--;p.push(0));for(g=At,m=Tt,i=h;--i>=0;){for(r=0,f=w[i]%m,d=w[i]/m|0,o=i+(s=c);o>i;)r=((u=f*(u=b[--s]%m)+(a=d*u+(l=b[s]/m|0)*f)%m*m+p[o]+r)/g|0)+(a/m|0)+d*l,p[o--]=u%g;p[o]=r}return r?++n:p.splice(0,1),B(e,p,n)},f.negated=function(){var e=new I(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new I(e,t)).s,!i||!t)return new I(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/Rt,s=e.e/Rt,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new I(i/0);if(!a[0]||!c[0])return c[0]?e:new I(a[0]?n:0*i)}if(o=Ct(o),s=Ct(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/At|0,a[t]=At===a[t]?0:a[t]%At;return i&&(a=[i].concat(a),++s),B(e,a,s)},f.precision=f.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return Nt(e,1,Pt),null==t?t=g:Nt(t,0,8),M(new I(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*Rt+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},f.shiftedBy=function(e){return Nt(e,-9007199254740991,Bt),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,u=s.e,l=p+4,h=new I("0.5");if(1!==c||!a||!a[0])return new I(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+T(s)))||c==1/0?(((t=kt(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=Ct((u+1)/2)-(u<0||u%2),n=new I(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new I(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(o=n,n=h.times(o.plus(r(s,o,l,1))),kt(o.c).slice(0,c)===(t=kt(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(M(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(M(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}l+=4,c+=4,i=1}return M(n,n.e+p+1,g,e)},f.toExponential=function(e,t){return null!=e&&(Nt(e,0,Pt),e++),A(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(Nt(e,0,Pt),e=e+this.e+1),A(this,e,t)},f.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=S;else if("object"!=typeof r)throw Error(xt+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=s[0],h=s[1],f=i.s<0,d=f?l.slice(1):l,p=d.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,l=d.substr(0,o);o<p;o+=a)l+=u+d.substr(o,a);c>0&&(l+=u+d.slice(o)),f&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,i,o,s,a,c,u,l,h,f,p,m=this,y=m.c;if(null!=e&&(!(c=new I(e)).isInteger()&&(c.c||1!==c.s)||c.lt(d)))throw Error(xt+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+T(c));if(!y)return new I(m);for(t=new I(d),l=n=new I(d),i=u=new I(d),p=kt(y),s=t.e=p.length-m.e-1,t.c[0]=Mt[(a=s%Rt)<0?Rt+a:a],e=!e||c.comparedTo(t)>0?s>0?t:l:c,a=w,w=1/0,c=new I(p),u.c[0]=0;h=r(c,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,l=u.plus(h.times(o=l)),u=o,t=c.minus(h.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),u=u.plus(o.times(l)),n=n.plus(o.times(i)),u.s=l.s=m.s,f=r(l,i,s*=2,g).minus(m).abs().comparedTo(r(u,n,s,g).minus(m).abs())<1?[l,i]:[u,n],w=a,f},f.toNumber=function(){return+T(this)},f.toPrecision=function(e,t){return null!=e&&Nt(e,1,Pt),A(this,e,t,2)},f.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=m||o>=y?jt(kt(r.c),o):Ut(kt(r.c),o,"0"):10===e?t=Ut(kt((r=M(new I(r),p+o+1,g)).c),r.e,"0"):(Nt(e,2,x.length,"Base"),t=n(Ut(kt(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return T(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&I.set(t),I}();const Ft=$t;function Dt(e){return e&&e.Math==Math?e:void 0}const zt="object"==typeof globalThis&&Dt(globalThis)||"object"==typeof window&&Dt(window)||"object"==typeof self&&Dt(self)||"object"==typeof r.g&&Dt(r.g)||function(){return this}()||{},Ht=e=>{try{if(e){const t=new URL(e).host;return 0===t.indexOf("www.")?t.replace("www.",""):t}return""}catch(e){return""}};var Gt;!function(e){e.success="success",e.no_active_session="no_active_session",e.unsupported_network="unsupported_network",e.already_added="already_added",e.set_as_active="set_as_active",e.already_active="already_active"}(Gt||(Gt={}));var Zt;!function(e){e.eth_chainId="eth_chainId",e.eth_accounts="eth_accounts",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTransaction="eth_signTransaction",e.personal_sign="personal_sign",e.eth_signTypedData="eth_signTypedData",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_getCode="eth_getCode",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.eth_requestAccounts="eth_requestAccounts",e.eth_blockNumber="eth_blockNumber",e.eth_call="eth_call",e.eth_estimateGas="eth_estimateGas",e.personal_ecRecover="personal_ecRecover",e.eth_gasPrice="eth_gasPrice",e.eth_getBlockByNumber="eth_getBlockByNumber",e.eth_getBalance="eth_getBalance",e.eth_getTransactionByHash="eth_getTransactionByHash"}(Zt||(Zt={}));const Vt={available:"undefined"!=typeof window,name:"webviewMessenger",send:async(e,t,{id:r}={})=>(window.ReactNativeWebView.postMessage(JSON.stringify({topic:`> ${e}`,payload:t,id:r})),new Promise(((t,n)=>{const i=o=>{if(!function({id:e,topic:t,message:r}){if(r.topic===`< ${t}`&&(void 0===e||r.id===e)&&r.payload)return!0}({id:r,message:o.data,topic:e}))return;if(o.source!=window)return;window.removeEventListener("message",i);const{response:s,error:a}=o.data.payload;a&&n(new Error(a.message)),t(s)};window.addEventListener("message",i)}))),reply(e,t){const r=async r=>{if(!function({topic:e,message:t}){return!(!t.topic||"*"!==e&&t.topic!==`> ${e}`||"*"===e&&t.topic.startsWith("<"))}({message:r.data,topic:e}))return;if(r.source!=window)return;let n,i;try{i=await t(r.data.payload,{topic:r.data.topic,sender:r.source,id:r.data.id})}catch(e){n=e}const o=r.data.topic.replace(">","<");window.ReactNativeWebView.postMessage(JSON.stringify({topic:o,payload:{error:n,response:i},id:r.data.id}))};return window.addEventListener("message",r,!1),()=>window.removeEventListener("message",r)}},Jt=function({messenger:e,topic:t}){return e.available||console.error(`Messenger "${e.name}" is not available in this context.`),{send:async(r,{id:n})=>e.send(t,r,{id:n}),async reply(r){e.reply(t,r)}}}({messenger:Vt,topic:"providerRequest"}),Wt=new O({backgroundMessenger:Vt,providerRequestTransport:Jt,onConstruct({emit:e}){if((e=>{try{return new URL(e),!0}catch(e){return!1}})(window.location.href)){const t=Ht(window.location.href);Vt?.reply(`accountsChanged:${t}`,(async t=>{e("accountsChanged",[t])})),Vt?.reply(`chainChanged:${t}`,(async t=>{var r,n;e("chainChanged",(r=String(t),(n=(e=>new Ft(e).toString(16))(r)).startsWith("0x")?n:`0x${n}`))})),Vt?.reply(`disconnect:${t}`,(async()=>{e("disconnect",[])})),Vt?.reply(`connect:${t}`,(async t=>{e("connect",t)}))}}});(function(){const{doctype:e}=window.document;return!e||"html"===e.name})()&&function(){const e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname;for(let r=0;r<e.length;r++)if(e[r].test(t))return!1;return!0}()&&function(){const e=document.documentElement.nodeName;return!e||"html"===e.toLowerCase()}()&&(function(e){const t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);window.addEventListener("eip6963:requestProvider",(()=>window.dispatchEvent(t)))}({info:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+",name:"Rainbow",rdns:"me.rainbow",uuid:function(){const e=zt,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}()},provider:Wt}),Vt.reply("rainbow_ethereumChainEvent",(async({chainId:e,chainName:t,status:r,extensionUrl:n,host:i})=>{Ht(window.location.href)===i&&alert("Should inject notification "+JSON.stringify({chainId:e,chainName:t,status:r,extensionUrl:n}))})),Vt.reply("rainbow_reload",(async()=>{window.location.reload()})),Object.defineProperties(window,{rainbow:{value:Wt,configurable:!1,writable:!1},ethereum:{get:()=>window.walletRouter.currentProvider,set(e){window.walletRouter.addProvider(e)},configurable:!1},walletRouter:{value:{rainbowProvider:Wt,lastInjectedProvider:window.ethereum,currentProvider:Wt,providers:[Wt,...window.ethereum?[window.ethereum]:[]],setDefaultProvider(e){if(e)window.walletRouter.currentProvider=window.rainbow;else{const e=window.walletRouter.lastInjectedProvider??window.ethereum;window.walletRouter.currentProvider=e}},addProvider(e){window.walletRouter.providers.includes(e)||window.walletRouter.providers.push(e),Wt!==e&&(window.walletRouter.lastInjectedProvider=e)}},configurable:!1,writable:!1}}),window.rainbow.providers=window.walletRouter.providers,window.dispatchEvent(new Event("ethereum#initialized")),Vt.reply("rainbow_setDefaultProvider",(async({rainbowAsDefault:e})=>{window.walletRouter.setDefaultProvider(e)})))})()})();