PageSourceSearch

https://zk-present.vercel.app/_next/static/chunks/141-8afeb779c352e7ed.js?dpl=dpl_FmDLj2DXotfHBaP2Mz6yEu68aka9

js zk-present.vercel.app collected 2026-10-03 08:05:15 UTC 739,852 bytes, 27 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[141],{28586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;let n=r(47116),i=r(53384),a=r(31359);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){let r=t=>(0,a.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},3828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;let n=r(64185),i=r(61650),a=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){let r=(e,t)=>{let 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>a;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){let{windows:r,windowSize:i}=n(t),a=[],s=e,o=s;for(let e=0;e<r;e++){o=s,a.push(o);for(let e=1;e<i;e++)o=o.add(s),a.push(o);s=o.double()}return a},wNAF(t,i,a){let{windows:o,windowSize:c}=n(t),l=e.ZERO,u=e.BASE,d=BigInt(2**t-1),f=2**t,h=BigInt(t);for(let e=0;e<o;e++){let t=e*c,n=Number(a&d);a>>=h,n>c&&(n-=f,a+=s);let o=t+Math.abs(n)-1,p=e%2!=0,g=n<0;0===n?u=u.add(r(p,i[t])):l=l.add(r(g,i[o]))}return{p:l,f:u}},wNAFCached(e,t,r,n){let i=e._WINDOW_SIZE||1,a=t.get(e);return a||(a=this.precomputeWindow(e,i),1!==i&&t.set(e,n(a))),this.wNAF(i,a,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})}},51779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;let n=r(64185),i=r(61650),a=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw Error(`bad I2OSP call: value=${e} length=${t}`);let 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 o(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw Error("number expected")}function l(e,t,r,n){o(e),o(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:a,blockLen:l}=n,u=Math.ceil(r/a);if(u>255)throw Error("Invalid xmd length");let d=(0,i.concatBytes)(t,s(t.length,1)),f=s(0,l),h=s(r,2),p=Array(u),g=n((0,i.concatBytes)(f,e,h,s(0,1),d));p[0]=n((0,i.concatBytes)(g,s(1,1),d));for(let e=1;e<=u;e++){let t=[function(e,t){let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}(g,p[e-1]),s(e+1,1),d];p[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...p).slice(0,r)}function u(e,t,r,n,a){if(o(e),o(t),c(r),t.length>255){let e=Math.ceil(2*n/8);t=a.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,r){let s;(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:d,k:f,m:h,hash:p,expand:g,DST:b}=r;o(e),c(t);let m=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw Error("DST must be Uint8Array or string")}(b),y=Math.ceil((d.toString(2).length+f)/8),x=t*h*y;if("xmd"===g)s=l(e,m,x,p);else if("xof"===g)s=u(e,m,x,f,p);else if("_internal_pass"===g)s=e;else throw Error('expand must be "xmd" or "xof"');let w=Array(t);for(let e=0;e<t;e++){let t=Array(h);for(let r=0;r<h;r++){let i=y*(r+e*h),o=s.subarray(i,i+y);t[r]=(0,n.mod)(a(o),d)}w[e]=t}return w}t.expand_message_xmd=l,t.expand_message_xof=u,t.hash_to_field=d,t.isogenyMap=function(e,t){let r=t.map(e=>Array.from(e).reverse());return(t,n)=>{let[i,a,s,o]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n)));return t=e.div(i,a),n=e.mul(n,e.div(s,o)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined");return{hashToCurve(n,i){let a=d(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(a[0])),o=e.fromAffine(t(a[1])),c=s.add(o).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){let a=d(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(a[0])).clearCofactor();return s.assertValidity(),s}}}},64185:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;let n=r(61650),i=BigInt(0),a=BigInt(1),s=BigInt(2),o=BigInt(3),c=BigInt(4),l=BigInt(5),u=BigInt(8);function d(e,t){let r=e%t;return r>=i?r:t+r}function f(e,t,r){if(r<=i||t<i)throw Error("Expected power/modulo > 0");if(r===a)return i;let n=a;for(;t>i;)t&a&&(n=n*e%r),e=e*e%r,t>>=a;return n}function h(e,t){if(e===i||t<=i)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=d(e,t),n=t,s=i,o=a,c=a,l=i;for(;r!==i;){let e=n/r,t=n%r,i=s-c*e,a=o-l*e;n=r,r=t,s=c,o=l,c=i,l=a}if(n!==a)throw Error("invert: does not exist");return d(s,t)}function p(e){let t,r,n;let o=(e-a)/s;for(t=e-a,r=0;t%s===i;t/=s,r++);for(n=s;n<e&&f(n,o,e)!==e-a;n++);if(1===r){let t=(e+a)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let l=(t+a)/s;return function(e,i){if(e.pow(i,o)===e.neg(e.ONE))throw Error("Cannot find square root");let s=r,c=e.pow(e.mul(e.ONE,n),t),u=e.pow(i,l),d=e.pow(i,t);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(c,a<<BigInt(s-t-1));c=e.sqr(r),u=e.mul(u,r),d=e.mul(d,c),s=t}return u}}function g(e){if(e%c===o){let t=(e+a)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%u===l){let t=(e-l)/u;return function(e,r){let n=e.mul(r,s),i=e.pow(n,t),a=e.mul(r,i),o=e.mul(e.mul(a,s),i),c=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(c),r))throw Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.mod=d,t.pow=f,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(d(e,t)&a)===a;let b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r<i)throw Error("Expected power > 0");if(r===i)return e.ONE;if(r===a)return t;let n=e.ONE,s=t;for(;r>i;)r&a&&(n=e.mul(n,s)),s=e.sqr(s),r>>=a;return n}function y(e,t){let r=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 x(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function w(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function v(e){let t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){let t=b.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=y,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){let t=(e.ORDER-a)/s;return r=>{let n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=x,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:o,nByteLength:c}=x(e,t);if(c>2048)throw Error("Field lengths over 2048 bytes are not supported");let l=g(e),u=Object.freeze({ORDER:e,BITS:o,BYTES:c,MASK:(0,n.bitMask)(o),ZERO:i,ONE:a,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&a)===a,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,r)=>d(t+r,e),sub:(t,r)=>d(t-r,e),mul:(t,r)=>d(t*r,e),pow:(e,t)=>m(u,e,t),div:(t,r)=>d(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(e=>l(u,e)),invertBatch:e=>y(u,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 Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(u)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){let i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=x(t).nByteLength+8;if(s<24||i<s||i>1024)throw Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return d(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-a)+a},t.getFieldBytesLength=w,t.getMinHashLength=v,t.mapHashToField=function(e,t,r=!1){let i=e.length,s=w(t),o=v(t);if(i<16||i<o||i>1024)throw Error(`expected ${o}-1024 bytes of input, got ${i}`);let c=d(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-a)+a;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},61650:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;let r=BigInt(0),n=BigInt(1),i=BigInt(2),a=e=>e instanceof Uint8Array,s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e){if(!a(e))throw Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function c(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function l(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function u(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){let n=2*t,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");r[t]=i}return r}function d(e,t){return u(e.toString(16).padStart(2*t,"0"))}function f(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;return e.forEach(e=>{if(!a(e))throw Error("Uint8Array expected");t.set(e,r),r+=e.length}),t}t.bytesToHex=o,t.numberToHexUnpadded=c,t.hexToNumber=l,t.hexToBytes=u,t.bytesToNumberBE=function(e){return l(o(e))},t.bytesToNumberLE=function(e){if(!a(e))throw Error("Uint8Array expected");return l(o(Uint8Array.from(e).reverse()))},t.numberToBytesBE=d,t.numberToBytesLE=function(e,t){return d(e,t).reverse()},t.numberToVarBytesBE=function(e){return u(c(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=u(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(a(t))n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=f,t.equalBytes=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.utf8ToBytes=function(e){if("string"!=typeof e)throw 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=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;let h=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=h(e),i=h(e),a=0,s=()=>{n.fill(1),i.fill(0),a=0},o=(...e)=>r(i,n,...e),c=(e=h())=>{i=o(p([0]),e),n=o(),0!==e.length&&(i=o(p([1]),e),n=o())},l=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return f(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(l()));)c();return s(),r}};let g={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||e instanceof Uint8Array,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)};t.validateObject=function(e,t,r={}){let n=(t,r,n)=>{let i=g[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let a=e[t];if((!n||void 0!==a)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}},31359:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;let n=r(64185),i=r(61650),a=r(61650),s=r(3828),{bytesToNumberBE:o,hexToBytes:c}
1=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");let 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:o(i),l:e.subarray(n+2)}},toSig(e){let{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!(n instanceof Uint8Array))throw Error("ui8a expected");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");let{d:a,l:s}=t.DER._parseInt(n.subarray(2)),{d:o,l:l}=t.DER._parseInt(s);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:a,s:o}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),a=n.length/2,s=i.length/2,o=r(a),c=r(s);return`30${r(s+a+4)}02${c}${i}02${o}${n}`}};let l=BigInt(0),u=BigInt(1),d=BigInt(2),f=BigInt(3),h=BigInt(4);function p(e){let t=function(e){let t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a}=t;if(r){if(!n.eql(a,n.ZERO))throw 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 Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,o=t.toBytes||((e,t,n)=>{let a=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(a.x),r.toBytes(a.y))}),c=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function d(e){let{a:n,b:i}=t,a=r.sqr(e),s=r.mul(a,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),d(t.Gx)))throw Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&l<e&&e<t.n}function p(e){if(!h(e))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){let r;let{allowedPrivateKeyLengths:s,nByteLength:o,wrapPrivateKey:c,n:l}=t;if(s&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!s.includes(e.length))throw Error("Invalid key");e=e.padStart(2*o,"0")}try{r="bigint"==typeof e?e:i.bytesToNumberBE((0,a.ensureBytes)("private key",e,o))}catch(t){throw Error(`private key must be ${o} bytes, hex or bigint, not ${typeof e}`)}return c&&(r=n.mod(r,l)),p(r),r}let b=new Map;function m(e){if(!(e instanceof y))throw Error("ProjectivePoint expected")}class y{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof y)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?y.ZERO:new y(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(y.fromAffine)}static fromHex(e){let t=y.fromAffine(c((0,a.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return y.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),a=d(e);if(!r.eql(i,a))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){m(e);let{px:t,py:n,pz:i}=this,{px:a,py:s,pz:o}=e,c=r.eql(r.mul(t,o),r.mul(a,i)),l=r.eql(r.mul(n,o),r.mul(s,i));return c&&l}negate(){return new y(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,f),{px:a,py:s,pz:o}=this,c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(a,a),h=r.mul(s,s),p=r.mul(
1o,o),g=r.mul(a,s);return g=r.add(g,g),u=r.mul(a,o),u=r.add(u,u),c=r.mul(e,u),l=r.mul(i,p),l=r.add(c,l),c=r.sub(h,l),l=r.add(h,l),l=r.mul(c,l),c=r.mul(g,c),u=r.mul(i,u),p=r.mul(e,p),g=r.sub(d,p),g=r.mul(e,g),g=r.add(g,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,p),d=r.mul(d,g),l=r.add(l,d),p=r.mul(s,o),p=r.add(p,p),d=r.mul(p,g),c=r.sub(c,d),u=r.mul(p,h),u=r.add(u,u),new y(c,l,u=r.add(u,u))}add(e){m(e);let{px:n,py:i,pz:a}=this,{px:s,py:o,pz:c}=e,l=r.ZERO,u=r.ZERO,d=r.ZERO,h=t.a,p=r.mul(t.b,f),g=r.mul(n,s),b=r.mul(i,o),x=r.mul(a,c),w=r.add(n,i),v=r.add(s,o);w=r.mul(w,v),v=r.add(g,b),w=r.sub(w,v),v=r.add(n,a);let A=r.add(s,c);return v=r.mul(v,A),A=r.add(g,x),v=r.sub(v,A),A=r.add(i,a),l=r.add(o,c),A=r.mul(A,l),l=r.add(b,x),A=r.sub(A,l),d=r.mul(h,v),l=r.mul(p,x),d=r.add(l,d),l=r.sub(b,d),d=r.add(b,d),u=r.mul(l,d),b=r.add(g,g),b=r.add(b,g),x=r.mul(h,x),v=r.mul(p,v),b=r.add(b,x),x=r.sub(g,x),x=r.mul(h,x),v=r.add(v,x),g=r.mul(b,v),u=r.add(u,g),g=r.mul(A,v),l=r.mul(w,l),l=r.sub(l,g),g=r.mul(w,b),d=r.mul(A,d),new y(l,u,d=r.add(d,g))}subtract(e){return this.add(e.negate())}is0(){return this.equals(y.ZERO)}wNAF(e){return w.wNAFCached(this,b,e,e=>{let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(y.fromAffine)})}multiplyUnsafe(e){let n=y.ZERO;if(e===l)return n;if(p(e),e===u)return this;let{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:a,k1:s,k2neg:o,k2:c}=i.splitScalar(e),d=n,f=n,h=this;for(;s>l||c>l;)s&u&&(d=d.add(h)),c&u&&(f=f.add(h)),h=h.double(),s>>=u,c>>=u;return a&&(d=d.negate()),o&&(f=f.negate()),f=new y(r.mul(f.px,i.beta),f.py,f.pz),d.add(f)}multiply(e){let n,i;p(e);let{endo:a}=t;if(a){let{k1neg:t,k1:s,k2neg:o,k2:c}=a.splitScalar(e),{p:l,f:u}=this.wNAF(s),{p:d,f:f}=this.wNAF(c);l=w.constTimeNegate(t,l),d=w.constTimeNegate(o,d),d=new y(r.mul(d.px,a.beta),d.py,d.pz),n=l.add(d),i=u.add(f)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return y.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=y.BASE,i=(e,t)=>t!==l&&t!==u&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),a=i(this,t).add(i(e,r));return a.is0()?void 0:a}toAffine(e){let{px:t,py:n,pz:i}=this,a=this.is0();null==e&&(e=a?r.ONE:r.inv(i));let s=r.mul(t,e),o=r.mul(n,e),c=r.mul(i,e);if(a)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:s,y:o}}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===u)return!0;if(r)return r(y,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===u?this:r?r(y,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),o(y,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}y.BASE=new y(t.Gx,t.Gy,r.ONE),y.ZERO=new y(r.ZERO,r.ONE,r.ZERO);let x=t.nBitLength,w=(0,s.wNAF)(y,t.endo?Math.ceil(x/2):x);return{CURVE:t,ProjectivePoint:y,normPrivateKeyToScalar:g,weierstrassEquation:d,isWithinCurveOrder:h}}function g(e,t){let r=e.ORDER,n=l;for(let e=r-u;e%d===l;e/=d)n+=u;let i=n,a=d<<i-u-u,s=a*d,o=(r-u)/s,c=(o-u)/d,p=s-u,g=e.pow(t,o),b=e.pow(t,(o+u)/d),m=(t,r)=>{let n=g,s=e.pow(r,p),o=e.sqr(s);o=e.mul(o,r);let l=e.mul(t,o);l=e.pow(l,c),l=e.mul(l,s),s=e.mul(l,r),o=e.mul(l,t);let f=e.mul(o,s);l=e.pow(f,a);let h=e.eql(l,e.ONE);s=e.mul(o,b),l=e.mul(f,n),o=e.cmov(s,o,h),f=e.cmov(l,f,h);for(let t=i;t>u;t--){let r=t-d;r=d<<r-u;let i=e.pow(f,r),a=e.eql(i,e.ONE);s=e.mul(o,n),n=e.mul(n,n),i=e.mul(f,n),o=e.cmov(s,o,a),f=e.cmov(i,f,a)}return{isValid:h,value:o}};if(e.ORDER%h===f){let r=(e.ORDER-f)/h,n=e.sqrt(e.neg(t));m=(t,i)=>{let a=e.sqr(i),s=e.mul(t,i);a=e.mul(a,s);let o=e.pow(a,r);o=e.mul(o,s);let c=e.mul(o,n),l=e.mul(e.sqr(o),i),u=e.eql(l,t),d=e.cmov(c,o,u);return{isValid:u,value:d}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){let r=function(e){let t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:o,n:c}=r,d=o.BYTES+1,f=2*o.BYTES+1;function h(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}let{ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:y,isWithinCurveOrder:x}=p({...r,toBytes(e,t,r){let n=t.toAffine(),a=o.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),a):s(Uint8Array.from([4]),a,o.toBytes(n.y))},fromBytes(e){let t=e.length,r=e[0],n=e.subarray(1);if(t===d&&(2===r||3===r)){let e=i.bytesToNumberBE(n);if(!(l<e&&e<o.ORDER))throw Error("Point is not on curve");let t=y(e),a=o.sqrt(t);return(1&r)==1!=((a&u)===u)&&(a=o.neg(a)),{x:e,y:a}}if(t===f&&4===r)return{x:o.fromBytes(n.subarray(0,o.BYTES)),y:o.fromBytes(n.subarray(o.BYTES,2*o.BYTES))};throw Error(`Point of length ${t}
1 was invalid. Expected ${d} compressed bytes or ${f} uncompressed bytes`)}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength)),v=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class A{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let t=r.nByteLength;return new A(v(e=(0,a.ensureBytes)("compactSignature",e,2*t),0,t),v(e,t,2*t))}static fromDER(e){let{r,s:n}=t.DER.toSig((0,a.ensureBytes)("DER",e));return new A(r,n)}assertValidity(){if(!x(this.r))throw Error("r must be 0 < r < CURVE.n");if(!x(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new A(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:n,recovery:i}=this,s=O((0,a.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw Error("recovery id invalid");let c=2===i||3===i?t+r.n:t;if(c>=o.ORDER)throw Error("recovery id 2 or 3 invalid");let l=(1&i)==0?"02":"03",u=b.fromHex(l+w(c)),d=g(c),f=h(-s*d),p=h(n*d),m=b.BASE.multiplyAndAddUnsafe(u,f,p);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>c>>u}normalizeS(){return this.hasHighS()?new A(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}function P(e){let t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===d||n===f:r?n===2*d||n===2*f:e instanceof b}let E=r.bits2int||function(e){let t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},O=r.bits2int_modN||function(e){return h(E(e))},k=i.bitMask(r.nBitLength);function B(e){if("bigint"!=typeof e)throw Error("bigint expected");if(!(l<=e&&e<k))throw Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}let S={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return b.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(P(e))throw Error("first arg must be private key");if(!P(t))throw Error("second arg must be public key");return b.fromHex(t).multiply(m(e)).toRawBytes(r)},sign:function(e,t,n=S){let{seed:s,k2sig:d}=function(e,t,n=S){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{hash:s,randomBytes:d}=r,{lowS:f,prehash:p,extraEntropy:y}=n;null==f&&(f=!0),e=(0,a.ensureBytes)("msgHash",e),p&&(e=(0,a.ensureBytes)("prehashed msgHash",s(e)));let w=O(e),v=m(t),P=[B(v),B(w)];if(null!=y){let e=!0===y?d(o.BYTES):y;P.push((0,a.ensureBytes)("extraEntropy",e))}return{seed:i.concatBytes(...P),k2sig:function(e){let t=E(e);if(!x(t))return;let r=g(t),n=b.BASE.multiply(t).toAffine(),i=h(n.x);if(i===l)return;let a=h(r*h(w+i*v));if(a===l)return;let s=(n.x===i?0:2)|Number(n.y&u),o=a;if(f&&a>c>>u)o=a>c>>u?h(-a):a,s^=1;return new A(i,o,s)}}}(e,t,n);return i.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(s,d)},verify:function(e,n,i,s=C){let o,c;if(n=(0,a.ensureBytes)("msgHash",n),i=(0,a.ensureBytes)("publicKey",i),"strict"in s)throw Error("options.strict was renamed to lowS");let{lowS:l,prehash:u}=s;try{if("string"==typeof e||e instanceof Uint8Array)try{c=A.fromDER(e)}catch(r){if(!(r instanceof t.DER.Err))throw r;c=A.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;c=new A(t,r)}else throw Error("PARSE");o=b.fromHex(i)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(l&&c.hasHighS())return!1;u&&(n=r.hash(n));let{r:d,s:f}=c,p=O(n),m=g(f),y=h(p*m),x=h(d*m),w=b.BASE.multiplyAndAddUnsafe(o,y,x)?.toAffine();return!!w&&h(w.x)===d},ProjectivePoint:b,Signature:A,utils:{isValidPrivateKey(e){try{return m(e),!0}catch(e){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{let e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invali
1d opts");let r=g(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let i,a,s,o,c,l,u,d;i=e.sqr(n),i=e.mul(i,t.Z),a=e.sqr(i),a=e.add(a,i),s=e.add(a,e.ONE),s=e.mul(s,t.B),o=e.cmov(t.Z,e.neg(a),!e.eql(a,e.ZERO)),o=e.mul(o,t.A),a=e.sqr(s),l=e.sqr(o),c=e.mul(l,t.A),a=e.add(a,c),a=e.mul(a,s),l=e.mul(l,o),c=e.mul(l,t.B),a=e.add(a,c),u=e.mul(i,s);let{isValid:f,value:h}=r(a,l);d=e.mul(i,n),d=e.mul(d,h),u=e.cmov(u,s,f),d=e.cmov(d,h,f);let p=e.isOdd(n)===e.isOdd(d);return d=e.cmov(e.neg(d),d,p),{x:u=e.div(u,o),y:d}}}},61782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;let n=r(70732),i=r(53384),a=r(64185),s=r(31359),o=r(61650),c=r(51779),l=r(28586),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function g(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),l=e*e*e%u,d=l*l*e%u,f=(0,a.pow2)(d,t,u)*d%u,p=(0,a.pow2)(f,t,u)*d%u,g=(0,a.pow2)(p,h,u)*l%u,m=(0,a.pow2)(g,n,u)*g%u,y=(0,a.pow2)(m,i,u)*m%u,x=(0,a.pow2)(y,o,u)*y%u,w=(0,a.pow2)(x,c,u)*x%u,v=(0,a.pow2)(w,o,u)*y%u,A=(0,a.pow2)(v,t,u)*d%u,P=(0,a.pow2)(A,s,u)*m%u,E=(0,a.pow2)(P,r,u)*l%u,O=(0,a.pow2)(E,h,u);if(!b.eql(b.sqr(O),e))throw Error("Cannot find square root");return O}let b=(0,a.Field)(u,void 0,void 0,{sqrt:g});t.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),s=p(t*e,d),o=p(-r*e,d),c=(0,a.mod)(e-s*t-o*n,d),l=(0,a.mod)(-s*r-o*t,d),u=c>i,h=l>i;if(u&&(c=d-c),h&&(l=d-l),c>i||l>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:u,k1:c,k2neg:h,k2:l}}}},n.sha256);let m=BigInt(0),y=e=>"bigint"==typeof e&&m<e&&e<u,x=e=>"bigint"==typeof e&&m<e&&e<d,w={};function v(e,...t){let r=w[e];if(void 0===r){let t=(0,n.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,o.concatBytes)(t,t),w[e]=r}return(0,n.sha256)((0,o.concatBytes)(r,...t))}let A=e=>e.toRawBytes(!0).slice(1),P=e=>(0,o.numberToBytesBE)(e,32),E=e=>(0,a.mod)(e,u),O=e=>(0,a.mod)(e,d),k=t.secp256k1.ProjectivePoint,B=(e,t,r)=>k.BASE.multiplyAndAddUnsafe(e,t,r);function S(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=k.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:O(-r),bytes:A(n)}}function C(e){if(!y(e))throw Error("bad x: need 0 < x < p");let t=E(e*e),r=g(E(t*e+BigInt(7)));r%h!==m&&(r=E(-r));let n=new k(e,r,f);return n.assertValidity(),n}function T(...e){return O((0,o.bytesToNumberBE)(v("BIP0340/challenge",...e)))}function I(e,t,r){let n=(0,o.ensureBytes)("signature",e,64),i=(0,o.ensureBytes)("message",t),a=(0,o.ensureBytes)("publicKey",r,32);try{let e=C((0,o.bytesToNumberBE)(a)),t=(0,o.bytesToNumberBE)(n.subarray(0,32));if(!y(t))return!1;let r=(0,o.bytesToNumberBE)(n.subarray(32,64));if(!x(r))return!1;let s=T(P(t),A(e),i),c=B(e,r,O(-s));if(!c||!c.hasEvenY()||c.toAffine().x!==t)return!1;return!0}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return S(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){let n=(0,o.ensureBytes)("message",e),{bytes:a,scalar:s}=S(t),c=(0,o.ensureBytes)("auxRand",r,32),l=P(s^(0,o.bytesToNumberBE)(v("BIP0340/aux",c))),u=v("BIP0340/nonce",l,a,n),d=O((0,o.bytesToNumberBE)(u));if(d===m)throw Error("sign failed: k is zero");let{bytes:f,scalar:h}=S(d),p=T(f,a,n),g=new Uint8Array(64);if(g.set(f,0),g.set(P(O(h+p*s)),32),!I(g,n,a))throw Error("sign: Invalid signature produced");return g},verify:I,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:C,pointToBytes:A,numberToBytesBE:o.numberToBytesBE,bytesToNumberBE:o.bytesToNumberBE,taggedHash:v,mod:a.mod}};let N=(0,c.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
113deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))),R=(0,s.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}),M=(0,c.createHasher)(t.secp256k1.ProjectivePoint,e=>{let{x:t,y:r}=R(b.create(e[0]));return N(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256});t.hashToCurve=M.hashToCurve,t.encodeToCurve=M.encodeToCurve},43946:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw 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=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=a,t.exists=s,t.output=o,t.default={number:r,bool:n,bytes:i,hash:a,exists:s,output:o}},69892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;let n=r(43946),i=r(53384);class a 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);let{view:t,buffer:r,blockLen:a}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){let o=Math.min(a-this.pos,s-n);if(o===a){let t=(0,i.createView)(e);for(;a<=s-n;n+=a)this.process(t,n);continue}r.set(e.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===a&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:a,isLE:s}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>a-o&&(this.process(r,0),o=0);for(let e=o;e<a;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),c=n?4:0,l=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+l,o,n)}(r,a-8,BigInt(8*this.length),s),this.process(r,0);let c=(0,i.createView)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=l/4,d=this.get();if(u>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)c.setUint32(4*e,d[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:a,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=a,n%t&&e.buffer.set(r),e}}t.SHA2=a},27321:(e,t)=>{"use strict";
1Object.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;let r=BigInt(0x100000000-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 a(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let a=0;a<e.length;a++){let{h:s,l:o}=i(e[a],t);[r[a],n[a]]=[s,o]}return[r,n]}t.fromBig=i,t.split=a;let s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;let o=(e,t,r)=>e>>>r;t.shrSH=o;let c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;let l=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=l;let u=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=u;let d=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=d;let f=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=f;let h=(e,t)=>t;t.rotr32H=h;let p=(e,t)=>e;t.rotr32L=p;let g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;let b=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=b;let m=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=m;let y=(e,t,r)=>e<<r-32|t>>>64-r;function x(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}}t.rotlBL=y,t.add=x;let w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;let v=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0;t.add3H=v;let A=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=A;let P=(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0;t.add4H=P;let E=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=E;let O=(e,t,r,n,i,a)=>t+r+n+i+a+(e/0x100000000|0)|0;t.add5H=O,t.default={fromBig:i,split:a,toBig:s,shrSH:o,shrSL:c,rotrSH:l,rotrSL:u,rotrBH:d,rotrBL:f,rotr32H:h,rotr32L:p,rotlSH:g,rotlSL:b,rotlBH:m,rotlBL:y,add:x,add3L:w,add3H:v,add4L:A,add4H:P,add5H:O,add5L:E}},53262:(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},47116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(43946),i=r(53384);class a extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);let r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let a=this.blockLen,s=new Uint8Array(a);s.set(r.length>a?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(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=a,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=a,t.hmac=(e,t,r)=>new a(e,t).update(r).digest(),t.hmac.create=(e,t)=>new a(e,t)},75118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;let n=r(43946),i=r(47116),a=r(53384);function s(e,t,r,s){(0,n.hash)(e);let{c:o,dkLen:c,asyncTick:l}=(0,a.checkOpts)({dkLen:32,asyncTick:10},s);if((0,n.number)(o),(0,n.number)(c),(0,n.number)(l),o<1)throw Error("PBKDF2: iterations (c) should be >= 1");let u=(0,a.toBytes)(t),d=(0,a.toBytes)(r),f=new Uint8Array(c),h=i.hmac.create(e,u),p=h._cloneInto().update(d);return{c:o,dkLen:c,asyncTick:l,DK:f,PRF:h,PRFSalt:p}}function o(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}async function c(e,t,r,n){let i;let{c,dkLen:l,asyncTick:u,DK:d,PRF:f,PRFSalt:h}=s(e,t,r,n),p=new Uint8Array(4),g=(0,a.createView)(p),b=new Uint8Array(f.outputLen);for(let e=1,t=0;t<l;e++,t+=f.outputLen){let r=d.subarray(t,t+f.outputLen);g.setInt32(0,e,!1),(i=h._cloneInto(i)).update(p).digestInto(b),r.set(b.subarray(0,r.length)),await (0,a.asyncLoop)(c-1,u,()=>{f._cloneInto(i).update(b).digestInto(b);for(let e=0;e<r.length;e++)r[e]^=b[e]})}return o(f,h,d,i,b)}t.pbkdf2=function(e,t,r,n){let i;let{c,dkLen:l,DK:u,PRF:d,PRFSalt:f}=s(e,t,r,n),h=new Uint8Array(4),p=(0,a.createView)(h),g=new Uint8Array(d.outputLen);for(let e=1,t=0;t<l;e++,t+=d.outputLen){let r=u.subarray(t,t+d.outputLen);p.setInt32(0,e,!1),(i=f._cloneInto(i)).update(h).digestInto(g),r.set(g.subarray(0,r.length));for(let e=1;e<c;e++){d._cloneInto(i).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}}return o(d,f,u,i,g)}
1,t.pbkdf2Async=c},43573:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;let n=r(69892),i=r(53384),a=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),s=Uint8Array.from({length:16},(e,t)=>t),o=s.map(e=>(9*e+5)%16),c=[s],l=[o];for(let e=0;e<4;e++)for(let t of[c,l])t.push(t[e].map(e=>a[e]));let u=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),d=c.map((e,t)=>e.map(e=>u[t][e])),f=l.map((e,t)=>e.map(e=>u[t][e])),h=new Uint32Array([0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e]),p=new Uint32Array([0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0]),g=(e,t)=>e<<t|e>>>32-t;function b(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let m=new Uint32Array(16);class y extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=0x67452301,this.h1=-0x10325477,this.h2=-0x67452302,this.h3=0x10325476,this.h4=-0x3c2d1e10}get(){let{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)m[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,a=i,s=0|this.h2,o=s,u=0|this.h3,y=u,x=0|this.h4,w=x;for(let e=0;e<5;e++){let t=4-e,v=h[e],A=p[e],P=c[e],E=l[e],O=d[e],k=f[e];for(let t=0;t<16;t++){let n=g(r+b(e,i,s,u)+m[P[t]]+v,O[t])+x|0;r=x,x=u,u=0|g(s,10),s=i,i=n}for(let e=0;e<16;e++){let r=g(n+b(t,a,o,y)+m[E[e]]+A,k[e])+w|0;n=w,w=y,y=0|g(o,10),o=a,a=r}}this.set(this.h1+s+y|0,this.h2+u+w|0,this.h3+x+n|0,this.h4+r+a|0,this.h0+i+o|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=y,t.ripemd160=(0,i.wrapConstructor)(()=>new y)},55436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;let n=r(43946),i=r(70732),a=r(75118),s=r(53384),o=(e,t)=>e<<t|e>>>32-t;function c(e,t,r,n,i,a){let s=e[t++]^r[n++],c=e[t++]^r[n++],l=e[t++]^r[n++],u=e[t++]^r[n++],d=e[t++]^r[n++],f=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],g=e[t++]^r[n++],b=e[t++]^r[n++],m=e[t++]^r[n++],y=e[t++]^r[n++],x=e[t++]^r[n++],w=e[t++]^r[n++],v=e[t++]^r[n++],A=e[t++]^r[n++],P=s,E=c,O=l,k=u,B=d,S=f,C=h,T=p,I=g,N=b,R=m,M=y,_=x,j=w,F=v,U=A;for(let e=0;e<8;e+=2)B^=o(P+_|0,7),I^=o(B+P|0,9),_^=o(I+B|0,13),P^=o(_+I|0,18),N^=o(S+E|0,7),j^=o(N+S|0,9),E^=o(j+N|0,13),S^=o(E+j|0,18),F^=o(R+C|0,7),O^=o(F+R|0,9),C^=o(O+F|0,13),R^=o(C+O|0,18),k^=o(U+M|0,7),T^=o(k+U|0,9),M^=o(T+k|0,13),U^=o(M+T|0,18),E^=o(P+k|0,7),O^=o(E+P|0,9),k^=o(O+E|0,13),P^=o(k+O|0,18),C^=o(S+B|0,7),T^=o(C+S|0,9),B^=o(T+C|0,13),S^=o(B+T|0,18),M^=o(R+N|0,7),I^=o(M+R|0,9),N^=o(I+M|0,13),R^=o(N+I|0,18),_^=o(U+F|0,7),j^=o(_+U|0,9),F^=o(j+_|0,13),U^=o(F+j|0,18);i[a++]=s+P|0,i[a++]=c+E|0,i[a++]=l+O|0,i[a++]=u+k|0,i[a++]=d+B|0,i[a++]=f+S|0,i[a++]=h+C|0,i[a++]=p+T|0,i[a++]=g+I|0,i[a++]=b+N|0,i[a++]=m+R|0,i[a++]=y+M|0,i[a++]=x+_|0,i[a++]=w+j|0,i[a++]=v+F|0,i[a++]=A+U|0}function l(e,t,r,n,i){let a=n+0,s=n+16*i;for(let n=0;n<16;n++)r[s+n]=e[t+(2*i-1)*16+n];for(let n=0;n<i;n++,a+=16,t+=16)c(r,s,e,t,r,a),n>0&&(s+=16),c(r,a,e,t+=16,r,s)}function u(e,t,r){let{N:o,r:c,p:l,dkLen:u,asyncTick:d,maxmem:f,onProgress:h}=(0,s.checkOpts)({dkLen:32,asyncTick:10,maxmem:0x40000400},r);if((0,n.number)(o),(0,n.number)(c),(0,n.number)(l),(0,n.number)(u),(0,n.number)(d),(0,n.number)(f),void 0!==h&&"function"!=typeof h)throw Error("progressCb should be function");let p=128*c,g=p/4;if(o<=1||(o&o-1)!=0||o>=2**(p/8)||o>0x100000000)throw Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(l<0||l>(0x100000000-1)*32/p)throw Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(u<0||u>(0x100000000-1)*32)throw Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let b=p*(o+l);if(b>f)throw Error(`Scrypt: parameters too large, ${b} (128 * r * (N + p)) > ${f} (maxmem)`);let m=(0,a.pbkdf2)(i.sha256,e,t,{c:1,dkLen:p*l}),y=(0,s.u32)(m),x=(0,s.u32)(new Uint8Array(p*o)),w=(0,s.u32)(new Uint8Array(p)),v=()=>{};if(h){let e=2*o*l,t=Math.max(Math.floor(e/1e4),1),r=0;v=()=>{r++,h&&(!(r%t)||r===e)&&h(r/e)}}return{N:o,r:c,p:l,dkLen:u,blockSize32:g,V:x,B32:y,B:m,tmp:w,blockMixCb:v,asyncTick:d}}function d(e,t,r,n,s){let o=(0,a.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),s.fill(0),o}async function f(e,t,r){let{N:n,r:i,p:a,dkLen:o,blockSize32:c,V:f,B32:h,B:p,tmp:g,blockMixCb:b,asyncTick:m}=u(e,t,r);for(let e=0;e<a;e++){let t=c*e;for(let e=0;e<c;e++)f[e]=h[t+e];let r=0;await (0,s.asyncLoop)(n-1,m,()=>{l(f,r,f,r+=c,i),b()}),l(f,(n-1)*c,h,t,i),b(),await (0,s.asyncLoop)(n,m,()=>{let e=h[t+c-16]%n;for(let r=0;r<c;r++)g[r]=h[t+r]^f[e*c+r];l(g,0,h,t,i),b()})}return d(e,o,p,f,g)}t.scrypt=function(e,t,r){let{N:n,r:i,p:a,dkLen:s,blockSize32:o,V:c,B32:f,B:h,tmp:p,blockMixCb:g}=u(e,t,r);for(let e=0;e<a;
1e++){let t=o*e;for(let e=0;e<o;e++)c[e]=f[t+e];for(let e=0,t=0;e<n-1;e++)l(c,t,c,t+=o,i),g();l(c,(n-1)*o,f,t,i),g();for(let e=0;e<n;e++){let e=f[t+o-16]%n;for(let r=0;r<o;r++)p[r]=f[t+r]^c[e*o+r];l(p,0,f,t,i),g()}}return d(e,s,h,c,p)},t.scryptAsync=f},70732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;let n=r(69892),i=r(53384),a=(e,t,r)=>e&t^~e&r,s=(e,t,r)=>e&t^e&r^t&r,o=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),c=new Uint32Array([0x6a09e66
17,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),l=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3],this.E=0|c[4],this.F=0|c[5],this.G=0|c[6],this.H=0|c[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:s,H:o}=this;return[e,t,r,n,i,a,s,o]}set(e,t,r,n,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=l[e-15],r=l[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,a=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;l[e]=a+l[e-7]+n+l[e-16]|0}let{A:r,B:n,C:c,D:u,E:d,F:f,G:h,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.rotr)(d,6)^(0,i.rotr)(d,11)^(0,i.rotr)(d,25))+a(d,f,h)+o[e]+l[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+s(r,n,c)|0;p=h,h=f,f=d,d=u+t|0,u=c,c=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,c=c+this.C|0,u=u+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,c,u,d,f,h,p)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends u{constructor(){super(),this.A=-0x3efa6128,this.B=0x367cd507,this.C=0x3070dd17,this.D=-0x8f1a6c7,this.E=-4191439,this.F=0x68581511,this.G=0x64f98fa7,this.H=-0x4105b05c,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new u),t.sha224=(0,i.wrapConstructor)(()=>new d)},76748:(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;let n=r(43946),i=r(27321),a=r(53384),[s,o,c]=[[],[],[]],l=BigInt(0),u=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=u,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),o.push((e+1)*(e+2)/2%64);let i=l;for(let e=0;e<7;e++)(t=(t<<u^(t>>f)*p)%h)&d&&(i^=u<<(u<<BigInt(e))-u);c.push(i)}let[g,b]=(0,i.split)(c,!0),m=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),y=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function x(e,t=24){let 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){let n=(t+8)%10,i=(t+2)%10,a=r[i],s=r[i+1],o=m(a,s,1)^r[n],c=y(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=o[r],a=m(t,i,n),c=y(t,i,n),l=s[r];t=e[l],i=e[l+1],e[l]=a,e[l+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]^=b[n]}r.fill(0)}t.keccakP=x;class w extends a.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 Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,a.u32)(this.state)}keccak(){x(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);let{blockLen:t,state:r}=this,i=(e=(0,a.toBytes)(e)).length;for(let n=0;n<i;){let a=Math.min(t-this.pos,i-n);for(let t=0;t<a;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw 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 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){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:a}=this;return e||(e=new w(t,r,n,a,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=a,e.destroyed=this.destroyed,e}}t.Keccak=w;let v=(e,t,r)=>(0,a.wrapConstructor)(()=>new w(t,e,r));t.sha3_224=v(6,144,28),t.sha3_256=v(6,136,32),t.sha3_384=v(6,104,48),t.sha3_512=v(6,72,64),t.keccak_224=v(1,144,28),t.keccak_256=v(1,136,32),t.keccak_384=v(1,104,48),t.keccak_512=v(1,72,64);let A=(e,t,r)=>(0,a.wrapXOFConstructorWithOpts)((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=A(31,168,16),t.shake256=A(31,136,32)},87377:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;let n=r(69892),i=r(27321),a=r(53384),[s,o]=i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),c=new Uint32Array(80),l=new Uint32Array(80);class u extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=0x6a09e667,this.Al=-0xc4336f8,this.Bh=-0x4498517b,this.Bl=-0x7b3558c5,this.Ch=0x3c6ef372,this.Cl=-0x16b07d5,this.Dh=-0x5ab00ac6,this.Dl=0x5f1d36f1,this.Eh=0x510e527f,this.El=-0x52197d2f,this.Fh=-0x64fa9774,this.Fl=0x2b3e6c1f,this.Gh=0x1f83d9ab,this.Gl=-0x4be4295,this.Hh=0x5be0cd19,this.Hl=0x137e2179}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:a,Dh:s,Dl:o,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:h,Hh:p,Hl:g}=this;return[e,t,r,n,i,a,s,o,c,l,u,d,f,h,p,g]}set(e,t,r,n,i,a,s,o,c,l,u,d,f,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t),l[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|c[e-15],r=0|l[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),a=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),s=0|c[e-2],o=0|l[e-2],u=i.default.rotrSH(s,o,19)^i.default.rotrBH(s,o,61)^i.default.shrSH(s,o,6),d=i.default.rotrSL(s,o,19)^i.default.rotrBL(s,o,61)^i.default.shrSL(s,o,6),f=i.default.add4L(a,d,l[e-7],l[e-16]),h=i.default.add4H(f,n,u,c[e-7],c[e-16]);c[e]=0|h,l[e]=0|f}let{Ah:r,Al:n,Bh:a,Bl:u,Ch:d,Cl:f,Dh:h,Dl:p,Eh:g,El:b,Fh:m,Fl:y,Gh:x,Gl:w,Hh:v,Hl:A}=this;for(let e=0;e<80;e++){let t=i.default.rotrSH(g,b,14)^i.default.rotrSH(g,b,18)^i.default.rotrBH(g,b,41),P=i.default.rotrSL(g,b,14)^i.default.rotrSL(g,b,18)^i.default.rotrBL(g,b,41),E=g&m^~g&x,O=b&y^~b&w,k=i.default.add5L(A,P,O,o[e],l[e]),B=i.default.add5H(k,v,t,E,s[e],c[e]),S=0|k,C=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),T=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),I=r&a^r&d^a&d,N=n&u^n&f^u&f;v=0|x,A=0|w,x=0|m,w=0|y,m=0|g,y=0|b,({h:g,l:b}=i.default.add(0|h,0|p,0|B,0|S)),h=0|d,p=0|f,d=0|a,f=0|u,a=0|r,u=0|n;let R=i.default.add3L(S,T,N);r=i.default.add3H(R,B,C,I),n=0|R}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:a,l:u}=i.default.add(0|this.Bh,0|this.Bl,0|a,0|u)),({h:d,l:f}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|f)),({h:h,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:g,l:b}=i.default.add(0|this.Eh,0|this.El,0|g,0|b)),({h:m,l:y}=i.default.add(0|this.Fh,0|this.Fl,0|m,0|y)),({h:x,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|x,0|w)),({h:v,l:A}=i.default.add(0|this.Hh,0|this.Hl,0|v,0|A)),this.set(r,n,a,u,d,f,h,p,g,b,m,y,x,w,v,A)}roundClean(){c.fill(0),l.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=u;class d extends u{constructor(){super(),this.Ah=-0x73c2c838,this.Al=0x19544da2,this.Bh=0x73e19966,this.Bl=-0x76232b2a,this.Ch=0x1dfab7ae,this.Cl=0x32ff9c82,this.Dh=0x679dd514,this.Dl=0x582f9fcf,this.Eh=0xf6d2b69,this.El=0x7bd44da8,this.Fh=0x77e36f73,this.Fl=0x4c48942,this.Gh=0x3f9d85a8,this.Gl=0x6a1d36c8,this.Hh=0x1112e6ad,this.Hl=-0x6e296d5f,this.outputLen=28}}class f extends u{constructor(){super(),this.Ah=0x22312194,this.Al=-0x3d408d4,this.Bh=-0x60aaa05d,this.Bl=-0x37b39b3e,this.Ch=0x2393b86b,this.Cl=0x6f53b151,this.Dh=-0x69c788e7,this.Dl=0x5940eabd,this.Eh=-0x69d7c11e,this.El=-0x5771001d,this.Fh=-0x41a1e1db,this.Fl=0x53863992,this.Gh=0x2b0199fc,this.Gl=0x2c85b8aa,this.Hh=0xeb72ddc,this.Hl=-0x7e3ad35e,this.outputLen=32}}class h extends u{constructor(){super(),this.Ah=-0x344462a3,this.Al=-0x3efa6128,this.Bh=0x629a292a,this.Bl=0x367cd507,this.Ch=-0x6ea6fea6,this.Cl=0x3070dd17,this.Dh=0x152fecd8,this.Dl=-0x8f1a6c7,this.Eh=0x67332667,this.El=-4191439,this.Fh=-0x714bb579,this.Fl=0x68581511,this.Gh=-0x24f3d1f3,this.Gl=0x64f98fa7,this.Hh=0x47b5481d,this.Hl=-0x4105b05c,this.outputLen=48}}t.sha512=(0,a.wrapConstructor)(()=>new u),t.sha512_224=(0,a.wrapConstructor)(()=>new d),t.sha512_256=(0,a.wrapConstructor)(()=>new f),t.sha384=(0,a.wrapConstructor)(()=>new h)},53384:(e,t,r)=>{"use strict";
1Object.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.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;let n=r(53262),i=e=>e instanceof Uint8Array;if(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.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],!t.isLE)throw Error("Non little-endian hardware is not supported");let a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));t.bytesToHex=function(e){if(!i(e))throw Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=a[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){let n=2*t,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");r[t]=i}return r};let s=async()=>{};async function o(e,r,n){let i=Date.now();for(let a=0;a<e;a++){n(a);let e=Date.now()-i;e>=0&&e<r||(await (0,t.nextTick)(),i+=e)}}function c(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function l(e){if("string"==typeof e&&(e=c(e)),!i(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}t.nextTick=s,t.asyncLoop=o,t.utf8ToBytes=c,t.toBytes=l,t.concatBytes=function(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;return e.forEach(e=>{if(!i(e))throw Error("Uint8Array expected");t.set(e,r),r+=e.length}),t};class u{clone(){return this._cloneInto()}}t.Hash=u;let d={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==d.call(t))throw Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){let t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(l(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(l(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 Error("crypto.getRandomValues must be defined")}},36056:(e,t,r)=>{"use strict";var n=Object.create,i=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&h(e,r,t[r]);if(l)for(var r of l(t))f.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>a(e,o(t)),b=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of c(t))d.call(e,a)||a===r||i(e,a,{get:()=>t[a],enumerable:!(n=s(t,a))||n.enumerable});return e},m=(e,t,r)=>(r=null!=e?n(u(e)):{},b(!t&&e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),y=(e,t,r)=>new Promise((n,i)=>{var a=e=>{try{o(r.next(e))}catch(e){i(e)}},s=e=>{try{o(r.throw(e))}catch(e){i(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,s);o((r=r.apply(e,t)).next())}),x=((e,t)=>function(){return t||(0,e[c(e)[0]])((t={exports:{}}).exports,t),t.exports})({"package.json"(e,t){t.exports={name:"@reclaimprotocol/js-sdk",version:"2.1.0",description:"Designed to request proofs from the Reclaim protocol and manage the flow of claims and witness interactions.",main:"dist/index.js",types:"dist/index.d.ts",keywords:["reclaim","protocol","blockchain","proof","verification","identity","claims","witness","sdk","javascript","typescript","decentralized","web3"],files:["dist"],tsup:{entry:["src/index.ts"],splitting:!1,sourcemap:!0,clean:!0},scripts:{build:"sh scripts/build.sh",release:"release-it",test:'echo "Error: no test specified" && exit 1',commitlint:"commitlint --edit"},repository:{type:"git",url:"https://github.com/reclaimprotocol/reclaim-js-sdk"},author:"ali <[email protected]>",license:"See License in <https://github.com/reclaimprotocol/.github/blob/main/LICENSE>",bugs:{url:"https://github.com/reclaimprotocol/reclaim-js-sdk/issues"},homepage:"https://github.com/reclaimprotocol/reclaim-js-sdk/",publishConfig:{registry:"https://registry.npmjs.org/",access:"public"},"release-it":{git:{commitMessage:"chore: release ${version}",tagName:"v${version}"},npm:{publish:!0,tag:"latest"},github:{release:!0},plugins:{"@release-it/conventional-changelog":{preset:"angular"}}},devDependencies:{"@bconnorwhite/bob":"^2.9.5","@commitlint/cli":"^17.7.1","@commitlint/config-conventional":"^17.7.0","@release-it/conventional-changelog":"^5.0.0","@types/qs":"^6.9.11","@types/url-parse":"^1.4.11","@types/uuid":"^9.0.7","release-it":"^15.0.0",tsup:"^8.0.1",typescript:"^5.3.3"},dependencies:{canonicalize:"^2.0.0",ethers:"^6.9.1",qs:"^6.11.2","url-parse":"^1.5.10",uuid:"^9.0.1"}}}}),w={};((e,t)=>
1{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(w,{ReclaimProofRequest:()=>ey,transformForOnchain:()=>em,verifyProof:()=>eb}),e.exports=b(i({},"__esModule",{value:!0}),w);var v=r(58167);function A(e){let t=`${e.provider}
2${e.parameters}
3${e.context||""}`;return v.ethers.keccak256(P(t)).toLowerCase()}function P(e){return new TextEncoder().encode(e)}var E=r(58167),O=m(r(90999));function k(e){return class extends Error{constructor(t,r){super(t),this.innerError=r,this.name=e,r&&(this.stack+=`
4Caused by: ${r.stack}`)}}}var B=k("TimeoutError"),S=k("ProofNotVerifiedError"),C=k("SessionNotStartedError");k("ProviderNotFoundError");var T=k("BuildProofRequestError"),I=k("SignatureGeneratingError"),N=k("SignatureNotFoundError"),R=k("InvalidSignatureError"),M=k("UpdateSessionError"),_=k("InitSessionError"),j=k("ProviderFailedError"),F=k("InvalidParamError");k("ApplicationError");var U=k("InitError"),L=k("AvailableParamsError");k("BackendServerError");var D=k("GetStatusUrlError"),G=k("NoProviderParamsError"),H=k("SetParamsError"),$=k("AddContextError"),z=k("SetSignatureError"),q=k("GetAppCallbackUrlError");k("GetRequestUrlError");var V=k("StatusUrlError"),K=k("ProofSubmissionFailedError"),J=new class{constructor(){this.level="info"}setLevel(e){this.level=e}shouldLog(e){let t=["error","warn","info","silent"];return t.indexOf(this.level)>=t.indexOf(e)}log(e,t,...r){if(this.shouldLog(e)&&"silent"!==this.level){let n=this.getLogFunction(e);console.log("current level",this.level),n(`[${e.toUpperCase()}]`,t,...r)}}getLogFunction(e){switch(e){case"error":return console.error;case"warn":return console.warn;case"info":return console.info;default:return()=>{}}}info(e,...t){this.log("info",e,...t)}warn(e,...t){this.log("warn",e,...t)}error(e,...t){this.log("error",e,...t)}},W={logger:J,setLogLevel:function(e){J.setLevel(e)}},Q=W.logger;function Z(e,t,r){return""===t?e:e.replace(RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),r)}var Y="https://api.reclaimprotocol.org",X={DEFAULT_RECLAIM_CALLBACK_URL:`${Y}/api/sdk/callback?callbackId=`,DEFAULT_RECLAIM_STATUS_URL:`${Y}/api/sdk/session/`,RECLAIM_SHARE_URL:"https://share.reclaimprotocol.org/verifier/?template="},ee=r(58167),et=m(r(90999)),er=W.logger;function en(e,t){e.forEach(({input:e,paramName:r,isString:n})=>{if(null==e)throw er.info(`Validation failed: ${r} in ${t} is null or undefined`),new F(`${r} passed to ${t} must not be null or undefined.`);if(n&&"string"!=typeof e)throw er.info(`Validation failed: ${r} in ${t} is not a string`),new F(`${r} passed to ${t} must be a string.`);if(n&&""===e.trim())throw er.info(`Validation failed: ${r} in ${t} is an empty string`),new F(`${r} passed to ${t} must not be an empty string.`)})}function ei(e,t){try{new URL(e)}catch(r){throw er.info(`URL validation failed for ${e} in ${t}: ${r.message}`),new F(`Invalid URL format ${e} passed to ${t}.`,r)}}var ea=W.logger,es=r(58167),eo=r(58167),ec=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"uint32",name:"id",type:"uint32"},{internalType:"uint32",name:"timestampStart",type:"uint32"},{internalType:"uint32",name:"timestampEnd",type:"uint32"},{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"string",name:"host",type:"string"}],internalType:"struct Reclaim.Witness[]",name:"witnesses",type:"tuple[]"},{internalType:"uint8",name:"minimumWitnessesForClaimCreation",type:"uint8"}],indexed:!1,internalType:"struct Reclaim.Epoch",name:"epoch",type:"tuple"}],name:"EpochAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[{internalType:"address",name:"witnessAddress",type:"address"},{internalType:"string",name:"host",type:"string"}],name:"addAsWitness",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"addNewEpoch",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint32",name:"epochNum",type:"uint32"},{components:[{internalType:"string",name:"provider",type:"string"},{internalType:"string",name:"parameters",type:"string"},{internalType:"string",name:"context",type:"string"}],internalType:"struct Claims.ClaimInfo",name:"claimInfo",type:"tuple"},{components:[{internalType:"bytes32",name:"identifier",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint32",name:"timestampS",type:"uint32"},{internalType:"uint256",name:"epoch",type:"uint256"}],internalType:"struct Claims.CompleteClaimData",name:"claimData",type:"tuple"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],name:"assertValidEpochAndSignedClaim",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"currentEpoch",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"epochDurationS",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"epochs",outputs:[{internalType:"uint32",name:"id",type:"uint32"},{internalType:"uint32",name:"timestampStart",type:"uint32"},{internalType:"uint32",name:"timestampEnd",type:"uint32"},{internalType:"uint8",name:"minimumWitnessesForClaimCreation",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"epoch",type:"uint32"}],name:"fetchEpoch",outputs:[{components:[{internalType:"uint32",name:"id",type:"uint32"},{internalType:"uint32",name:"timestampStart",type:"uint32"},{internalType:"uint32",name:"timestampEnd",type:"uint32"},{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"string",name:"host",type:"string"}],internalType:"struct Reclaim.Witness[]",name:"witnesses",type:"tuple[]"},{internalType:"uint8",name:"minimumWitnessesForClaimCreation",type:"uint8"}],internalType:"struct Reclaim.Epoch",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"epoch",type:"uint32"},{internalType:"bytes32",name:"identifier",type:"bytes32"},{internalType:"uint32",name:"timestampS",type:"uint32"}],name:"fetchWitnessesForClaim",outputs:[{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"string",name:"host",type:"string"}],internalType:"struct Reclaim.Witness[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"minimumWitnessesForClaimCreation",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"witnessAddress",type:"address"}],name:"removeAsWitness",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"},{internalType:"bool",name:"isWhitelisted",type:"bool"}],name:"updateWitnessWhitelist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"witnesses",outputs:[{internalType:"address",name:"addr",type:"address"},{internalType:"string",name:"host",type:"string"}],stateMutability:"view",type:"function"}],el=class{static connect(e,t){return new eo.Contract(e,ec,t)}};el.abi=ec;var eu={"0x1a4":{chainName:"opt-goerli",address:"0xF93F605142Fb1Efad7Aa58253dDffF67775b4520",rpcUrl:"https://opt-goerli.g.alchemy.com/v2/rksDkSUXd2dyk2ANy_zzODknx_AAokui"},"0xaa37dc":{chainName:"opt-sepolia",address:"0x6D0f81BDA11995f25921aAd5B43359630E65Ca96",rpcUrl:"https://opt-sepolia.g.alchemy.com/v2/aO1-SfG4oFRLyAiLREqzyAUu0HTCwHgs"}},ed=r(58167),ef={},eh=W.logger,ep=W.logger,eg=x().version;function eb(e){return y(this,null,function*(){var t;if(!e.signatures.length)throw new N("No signatures");try{let r=[];e.witnesses.length&&(null==(t=e.witnesses[0])?void 0:t.url)==="manual-verify"?r.push(e.witnesses[0].id):r=yield function(e,t,r){return y(this,null,function*(){let n=function(e){let t=function(e){let t=`0x${e.toString(16)}`;if(!ef[t]){let e=eu[t];if(!e)throw Error(`Unsupported chain: "${t}"`);let r=new ed.ethers.JsonRpcProvider(e.rpcUrl);ef[t]=el.connect(e.address,r)}return ef[t]}
4(e=e||0xaa37dc);return t?function(e){let t={};return g(p({},e),{getState(r){return y(this,null,function*(){return r?(t[r]||(t[r]=e.getState(r)),t[r]):yield e.getState()})}})}({getState(e){return y(this,null,function*(){let r=yield t.fetchEpoch(e||0);if(!r.id)throw Error(`Invalid epoch ID: ${e}`);return{epoch:r.id,witnesses:r.witnesses.map(e=>({id:e.addr.toLowerCase(),url:e.host})),witnessesRequiredForClaim:r.minimumWitnessesForClaimCreation,nextEpochTimestampS:r.timestampEnd}})}}):void 0}();if(!n)throw eh.info("No beacon available for getting witnesses"),Error("No beacon available");return(function({witnesses:e,witnessesRequiredForClaim:t,epoch:r},n,i){let a=["string"==typeof n?n:A(n),r.toString(),t.toString(),i.toString()].join("\n"),s=v.ethers.keccak256(P(a)),o=v.ethers.getBytes(s),c=new DataView(o.buffer,o.byteOffset,o.byteLength),l=[...e],u=[],d=0;for(let e=0;e<t;e++){let e=c.getUint32(d)%l.length,t=l[e];u.push(t),l[e]=l[l.length-1],l.pop(),d=(d+4)%o.length}return u})((yield n.getState(e)),t,r).map(e=>e.id.toLowerCase())})}(e.claimData.epoch,e.identifier,e.claimData.timestampS);let n=A({parameters:JSON.parse((0,O.default)(e.claimData.parameters)),provider:e.claimData.provider,context:e.claimData.context});if(e.identifier=Z(e.identifier,'"',""),n!==e.identifier)throw new S("Identifier Mismatch");let i={claim:p({},e.claimData),signatures:e.signatures.map(e=>E.ethers.getBytes(e))};!function(e,t){let r=function({claim:e,signatures:t}){var r;let n=["identifier"in(r=p({},e))?r.identifier:A(r),r.owner.toLowerCase(),r.timestampS.toString(),r.epoch.toString()].join("\n");return t.map(e=>es.ethers.verifyMessage(n,es.ethers.hexlify(e)).toLowerCase())}(e),n=new Set(t);for(let e of r)n.has(e)&&n.delete(e);if(n.size>0){let e=Array.from(n).join(", ");throw eh.info(`Claim validation failed. Missing signatures from: ${e}`),new S(`Missing signatures from ${e}`)}}(i,r)}catch(e){return ep.info(`Error verifying proof: ${e instanceof Error?e.message:String(e)}`),!1}return!0})}function em(e){return{claimInfo:Object.fromEntries(new Map([["context",e.claimData.context],["parameters",e.claimData.parameters],["provider",e.claimData.provider]])),signedClaim:{claim:Object.fromEntries(new Map([["epoch",e.claimData.epoch],["identifier",e.claimData.identifier],["owner",e.claimData.owner],["timestampS",e.claimData.timestampS]])),signatures:e.signatures}}}var ey=class e{constructor(e,t,r){this.context={contextAddress:"0x0",contextMessage:"sample context"},this.intervals=new Map,this.providerId=t,this.timeStamp=Date.now().toString(),this.applicationId=e,this.sessionId="",(null==r?void 0:r.log)?W.setLogLevel("info"):W.setLogLevel("silent"),this.options=r,this.sdkVersion="js-"+eg,ep.info(`Initializing client with applicationId: ${this.applicationId}`)}static init(t,r,n,i){return y(this,null,function*(){try{en([{paramName:"applicationId",input:t,isString:!0},{paramName:"providerId",input:n,isString:!0},{paramName:"appSecret",input:r,isString:!0}],"the constructor"),i&&(i.acceptAiProviders&&en([{paramName:"acceptAiProviders",input:i.acceptAiProviders}],"the constructor"),i.log&&en([{paramName:"log",input:i.log}],"the constructor"));let a=new e(t,n,i),s=yield a.generateSignature(r);a.setSignature(s);let o=yield function(e,t,r,n){return y(this,null,function*(){ea.info(`Initializing session for providerId: ${e}, appId: ${t}`);try{let i=yield fetch(`${Y}/api/sdk/init-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerId:e,appId:t,timestamp:r,signature:n})}),a=yield i.json();if(!i.ok)throw ea.info(`Session initialization failed: ${a.message||"Unknown error"}`),new _(a.message||`Error initializing session with providerId: ${e}`);return a}catch(r){throw ea.info(`Failed to initialize session for providerId: ${e}, appId: ${t}`,r),r}})}(n,t,a.timeStamp,s);return a.sessionId=o.sessionId,yield a.buildProofRequest(o.provider),a}catch(e){throw ep.info("Failed to initialize ReclaimProofRequest",e),new U("Failed to initialize ReclaimProofRequest",e)}})}static fromJsonString(t){return y(this,null,function*(){try{let{applicationId:r,providerId:n,sessionId:i,context:a,requestedProof:s,signature:o,redirectUrl:c,timeStamp:l,appCallbackUrl:u,options:d,sdkVersion:f}=JSON.parse(t);en([{input:r,paramName:"applicationId",isString:!0},{input:n,paramName:"providerId",isString:!0},{input:o,paramName:"signature",isString:!0},{input:i,paramName:"sessionId",isString:!0},{input:l,paramName:"timeStamp",isString:!0},{input:f,paramName:"sdkVersion",isString:!0}],"fromJsonString"),function(e){if(!e.url)throw er.info("Requested proof val
4idation failed: Provided url in requested proof is not valid"),new F("The provided url in requested proof is not valid");if(e.parameters&&"object"!=typeof e.parameters)throw er.info("Requested proof validation failed: Provided parameters in requested proof is not valid"),new F("The provided parameters in requested proof is not valid")}(s),c&&ei(c,"fromJsonString"),u&&ei(u,"fromJsonString"),a&&function(e){if(!e.contextAddress)throw er.info("Context validation failed: Provided context address in context is not valid"),new F("The provided context address in context is not valid");if(!e.contextMessage)throw er.info("Context validation failed: Provided context message in context is not valid"),new F("The provided context message in context is not valid");en([{input:e.contextAddress,paramName:"contextAddress",isString:!0},{input:e.contextMessage,paramName:"contextMessage",isString:!0}],"validateContext")}(a);let h=new e(r,n,d);return h.sessionId=i,h.context=a,h.requestedProof=s,h.appCallbackUrl=u,h.redirectUrl=c,h.timeStamp=l,h.signature=o,h.sdkVersion=f,h}catch(e){throw ep.info("Failed to parse JSON string in fromJsonString:",e),new F("Invalid JSON string provided to fromJsonString")}})}setAppCallbackUrl(e){ei(e,"setAppCallbackUrl"),this.appCallbackUrl=e}setRedirectUrl(e){ei(e,"setRedirectUrl"),this.redirectUrl=e}addContext(e,t){try{en([{input:e,paramName:"address",isString:!0},{input:t,paramName:"message",isString:!0}],"addContext"),this.context={contextAddress:e,contextMessage:t}}catch(e){throw ep.info("Error adding context",e),new $("Error adding context",e)}}setParams(e){try{let t=this.getRequestedProof();if(!t||!this.requestedProof)throw new T("Requested proof is not present.");let r=this.availableParams();if(!r)throw new G("No params present in the provider config.");for(let t of Object.keys(e))if(!r.includes(t))throw new F(`Cannot set parameter ${t} for provider ${this.providerId}. Available parameters: ${r}`);this.requestedProof.parameters=p(p({},t.parameters),e)}catch(e){throw ep.info("Error Setting Params:",e),new H("Error setting params",e)}}getAppCallbackUrl(){try{return en([{input:this.sessionId,paramName:"sessionId",isString:!0}],"getAppCallbackUrl"),this.appCallbackUrl||`${X.DEFAULT_RECLAIM_CALLBACK_URL}${this.sessionId}`}catch(e){throw ep.info("Error getting app callback url",e),new q("Error getting app callback url",e)}}getStatusUrl(){try{return en([{input:this.sessionId,paramName:"sessionId",isString:!0}],"getStatusUrl"),`${X.DEFAULT_RECLAIM_STATUS_URL}${this.sessionId}`}catch(e){throw ep.info("Error fetching Status Url",e),new D("Error fetching status url",e)}}setSignature(e){try{en([{input:e,paramName:"signature",isString:!0}],"setSignature"),this.signature=e,ep.info(`Signature set successfully for applicationId: ${this.applicationId}`)}catch(e){throw ep.info("Error setting signature",e),new z("Error setting signature",e)}}generateSignature(e){return y(this,null,function*(){try{let t=new E.ethers.Wallet(e),r=(0,O.default)({providerId:this.providerId,timestamp:this.timeStamp});if(!r)throw new I("Failed to canonicalize data for signing.");let n=E.ethers.keccak256(new TextEncoder().encode(r));return yield t.signMessage(E.ethers.getBytes(n))}catch(t){throw ep.info(`Error generating proof request for applicationId: ${this.applicationId}, providerId: ${this.providerId}, signature: ${this.signature}, timeStamp: ${this.timeStamp}`,t),new I(`Error generating signature for applicationSecret: ${e}`)}})}buildProofRequest(e){return y(this,null,function*(){try{return this.requestedProof=function(e){let t={};return e.responseSelections.forEach(e=>e.responseMatch.split(/{{(.*?)}}/).filter((e,t)=>t%2).forEach(e=>t[e]="")),{url:e.url,parameters:t}}(e),this.requestedProof}catch(e){throw ep.info(e instanceof Error?e.message:String(e)),new T("Something went wrong while generating proof request",e)}})}getRequestedProof(){if(!this.requestedProof)throw new T("RequestedProof is not present in the instance.");return this.requestedProof}availableParams(){try{let e=this.getRequestedProof(),t=Object.keys(e.parameters);return t=t.concat(e.url.split(/{{(.*?)}}/).filter((e,t)=>
4t%2)),[...new Set(t)]}catch(e){throw ep.info("Error fetching available params",e),new L("Error fetching available params",e)}}clearInterval(){this.sessionId&&this.intervals.has(this.sessionId)&&(clearInterval(this.intervals.get(this.sessionId)),this.intervals.delete(this.sessionId))}toJsonString(e){return JSON.stringify({applicationId:this.applicationId,providerId:this.providerId,sessionId:this.sessionId,context:this.context,requestedProof:this.requestedProof,appCallbackUrl:this.appCallbackUrl,signature:this.signature,redirectUrl:this.redirectUrl,timeStamp:this.timeStamp,options:this.options,sdkVersion:this.sdkVersion})}getRequestUrl(){return y(this,null,function*(){var e,t,r;if(ep.info("Creating Request Url"),!this.signature)throw new N("Signature is not set.");try{let n=this.getRequestedProof();!function(e,t,r,n){try{er.info(`Starting signature validation for providerId: ${e}, applicationId: ${r}, timestamp: ${n}`);let i=(0,et.default)({providerId:e,timestamp:n});if(!i)throw er.info("Failed to canonicalize message for signature validation"),Error("Failed to canonicalize message");let a=ee.ethers.keccak256(new TextEncoder().encode(i)),s=ee.ethers.verifyMessage(ee.ethers.getBytes(a),ee.ethers.hexlify(t)).toLowerCase();if(ee.ethers.getAddress(s)!==ee.ethers.getAddress(r))throw er.info(`Signature validation failed: Mismatch between derived appId (${s}) and provided applicationId (${r})`),new R(`Signature does not match the application id: ${s}`);er.info(`Signature validated successfully for applicationId: ${r}`)}catch(e){if(er.info(`Signature validation failed: ${e.message}`),e instanceof R)throw e;throw new R(`Failed to validate signature: ${e.message}`)}}(this.providerId,this.signature,this.applicationId,this.timeStamp);let i={sessionId:this.sessionId,providerId:this.providerId,applicationId:this.applicationId,signature:this.signature,timestamp:this.timeStamp,callbackUrl:this.getAppCallbackUrl(),context:JSON.stringify(this.context),parameters:Object.keys(n.parameters).reduce((e,t)=>(n.parameters[t]&&(e[t]=n.parameters[t]),e),{}),redirectUrl:null!=(e=this.redirectUrl)?e:"",acceptAiProviders:null!=(r=null==(t=this.options)?void 0:t.acceptAiProviders)&&r,sdkVersion:this.sdkVersion},a=yield function(e){return y(this,null,function*(){let t=encodeURIComponent(JSON.stringify(e));t=Z(t,"(","%28"),t=Z(t,")","%29");let r=`${X.RECLAIM_SHARE_URL}${t}`;try{return yield function(e){return y(this,null,function*(){eh.info(`Attempting to shorten URL: ${e}`);try{ei(e,"getShortenedUrl");let t=yield fetch(`${Y}/api/sdk/shortener`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fullUrl:e})}),r=yield t.json();if(!t.ok)return eh.info(`Failed to shorten URL: ${e}, Response: ${JSON.stringify(r)}`),e;return r.result.shortUrl}catch(t){return eh.info(`Error shortening URL: ${e}, Error: ${t}`),e}})}(r)}catch(t){return eh.info(`Error creating link for sessionId: ${e.sessionId}, Error: ${t}`),r}})}(i);return ep.info("Request Url created successfully: "+a),yield function(e,t){return y(this,null,function*(){ea.info(`Updating session status for sessionId: ${e}, new status: ${t}`),en([{input:e,paramName:"sessionId",isString:!0}],"updateSession");try{let r=yield fetch(`${Y}/api/sdk/update/session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,status:t})}),n=yield r.json();if(!r.ok){let t=`Error updating session with sessionId: ${e}. Status Code: ${r.status}`;throw ea.info(t,n),new M(t)}return ea.info(`Session status updated successfully for sessionId: ${e}`),n}catch(r){let t=`Failed to update session with sessionId: ${e}`;throw ea.info(t,r),new M(`Error updating session with sessionId: ${e}`)}})}(this.sessionId,"SESSION_STARTED"),a}catch(e){throw ep.info("Error creating Request Url:",e),e}})}startSession(e){return y(this,arguments,function*({onSuccess:e,onError:t}){if(!this.sessionId){let e="Session can't be started due to undefined value of sessionId";throw ep.info(e),new C(e)}ep.info("Starting session");let r=setInterval(()=>y(this,null,function*(){try{let t=yield function(e){return y(this,null,function*(){en([{input:e,paramName:"sessionId",isString:!0}],"fetchStatusUrl");try{let t=yield fetch(`${X.DEFAULT_RECLAIM_STATUS_URL}${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),r=yield t.json();if(!t.ok){let n=`Error fetching status URL for sessionId: ${e}. Status Code: ${t.status}`;throw ea.info(n,r),new V(n)}return r}catch(r){let t=`Failed to fetch status URL for sessionId: ${e}`;throw ea.info(t,r),new V(`Error fetching status URL for sessionId: ${e}`)}})}(this.sessionId);if(!t.session)return;if("PROOF_GENERATION_FAILED"===t.session.statusV2)throw new j;if(this.getAppCallbackUrl()===`${X.DEFAULT_RECLAIM_CALLBACK_URL}${this.sessionId}`){if(t.session.proofs&&t.session.proofs.length>0){let r=t.session.proofs[0];if(!(yield eb(r)))throw ep.info(`Proof not verified: ${JSON.stringify(r)}`),new S;e&&e(r),this.clearInterval()}}else{if("PROOF_SUBMISSION_FAILED"===t.session.statusV2)throw new K;"PROOF_SUBMITTED"===t.session.statusV2&&(e&&e("Proof submitted successfully to the custom callback url"),this.clearInterval())}}catch(e){t&&t(e),this.clearInterval()}}),3e3);this.intervals.set(this.sessionId,r),function(e,t,r,n=6e5){setTimeout(()=>{if(t.has(e)){let n="Interval ended without receiving proofs";r(new B(n)),Q.info(n),clearInterval(t.get(e)),t.delete(e)}},n)}(this.sessionId,this.intervals,t)}
4)}}},90999:e=>{"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw Error("Infinity is not allowed");if(null===t||"object"!=typeof t)return JSON.stringify(t);if(t.toJSON instanceof Function)return e(t.toJSON());if(Array.isArray(t)){let r=t.reduce((t,r,n)=>`${t}${0===n?"":","}${e(void 0===r||"symbol"==typeof r?null:r)}`,"");return`[${r}]`}let r=Object.keys(t).sort().reduce((r,n)=>{if(void 0===t[n]||"symbol"==typeof t[n])return r;let i=0===r.length?"":",";return`${r}${i}${e(n)}:${e(t[n])}`},"");return`{${r}}`}},33533:(e,t,r)=>{"use strict";r.d(t,{default:()=>i.a});var n=r(54404),i=r.n(n)},54808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(63222);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6908:(e,t,r)=>{"use strict";function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(63222),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return v}});let n=r(50482),i=r(56804),a=n._(r(39880)),s=r(13462),o=r(83512),c=r(66725),l=r(45543),u=r(54808),d=r(49941),f=r(82395),h=r(55239),p=r(6908),g=r(62857),b=r(31194),m=r(4894),y=new Set;function x(e,t,r,n,i,a){if("undefined"!=typeof window&&(a||(0,o.isLocalURL)(t))){if(!n.bypassPrefetchedCheck&&!a){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(y.has(i))return;y.add(i)}(async()=>a?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function w(e){return"string"==typeof e?e:(0,c.formatUrl)(e)}let v=a.default.forwardRef(function(e,t){let r,n;let{href:c,as:y,children:v,prefetch:A=null,passHref:P,replace:E,shallow:O,scroll:k,locale:B,onClick:S,onMouseEnter:C,onTouchStart:T,legacyBehavior:I=!1,...N}=e;r=v,I&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let R=a.default.useContext(d.RouterContext),M=a.default.useContext(f.AppRouterContext),_=null!=R?R:M,j=!R,F=!1!==A,U=null===A?b.PrefetchKind.AUTO:b.PrefetchKind.FULL,{href:L,as:D}=a.default.useMemo(()=>{if(!R){let e=w(c);return{href:e,as:y?w(y):e}}let[e,t]=(0,s.resolveHref)(R,c,!0);return{href:e,as:y?(0,s.resolveHref)(R,y):t||e}},[R,c,y]),G=a.default.useRef(L),H=a.default.useRef(D);I&&(n=a.default.Children.only(r));let $=I?n&&"object"==typeof n&&n.ref:t,[z,q,V]=(0,h.useIntersection)({rootMargin:"200px"}),K=a.default.useCallback(e=>{(H.current!==D||G.current!==L)&&(V(),H.current=D,G.current=L),z(e)},[D,L,V,z]),J=(0,m.useMergedRef)(K,$);a.default.useEffect(()=>{_&&q&&F&&x(_,L,D,{locale:B},{kind:U},j)},[D,L,q,B,F,null==R?void 0:R.locale,_,j,U]);let W={ref:J,onClick(e){I||"function"!=typeof S||S(e),I&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),_&&!e.defaultPrevented&&function(e,t,r,n,i,s,c,l,u){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,o.isLocalURL)(r)))return;e.preventDefault();let f=()=>{let e=null==c||c;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:s,locale:l,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};u?a.default.startTransition(f):f()}(e,_,L,D,E,O,k,B,j)},onMouseEnter(e){I||"function"!=typeof C||C(e),I&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),_&&(F||!j)&&x(_,L,D,{locale:B,priority:!0,bypassPrefetchedCheck:!0},{kind:U},j)},onTouchStart:function(e){I||"function"!=typeof T||T(e),I&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),_&&(F||!j)&&x(_,L,D,{locale:B,priority:!0,bypassPrefetchedCheck:!0},{kind:U},j)}};if((0,l.isAbsoluteUrl)(D))W.href=D;else if(!I||P||"a"===n.type&&!("href"in n.props)){let e=void 0!==B?B:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,p.getDomainLocale)(D,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);W.href=t||(0,g.addBasePath)((0,u.addLocale)(D,e,null==R?void 0:R.defaultLocale))}return I?a.default.cloneElement(n,W):(0,i.jsx)("a",{...N,...W,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
4dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},90262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return d}});let n=r(40587),i=r(66725),a=r(77659),s=r(45543),o=r(63222),c=r(83512),l=r(67030),u=r(71848);function d(e,t,r){let d;let f="string"==typeof t?t:(0,i.formatWithValidation)(t),h=f.match(/^[a-zA-Z]{1,}:\/\//),p=h?f.slice(h[0].length):f;if((p.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,s.normalizeRepeatedSlashes)(p);f=(h?h[0]:"")+t}if(!(0,c.isLocalURL)(f))return r?[f]:f;try{d=new URL(f.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){d=new URL("/","http://n")}try{let e=new URL(f,d);e.pathname=(0,o.normalizePathTrailingSlash)(e.pathname);let t="";if((0,l.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:s,params:o}=(0,u.interpolateAs)(e.pathname,e.pathname,r);s&&(t=(0,i.formatWithValidation)({pathname:s,hash:e.hash,query:(0,a.omit)(r,o)}))}let s=e.origin===d.origin?e.href.slice(e.origin.length):e.href;return r?[s,t||s]:s}catch(e){return r?[f]:f}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return c}});let n=r(39880),i=r(90262),a="function"==typeof IntersectionObserver,s=new Map,o=[];function c(e){let{rootRef:t,rootMargin:r,disabled:c}=e,l=c||!a,[u,d]=(0,n.useState)(!1),f=(0,n.useRef)(null),h=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(a){if(l||u)return;let e=f.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:a}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=o.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=s.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},o.push(r),s.set(r,t),t}(r);return a.set(e,t),i.observe(e),function(){if(a.delete(e),i.unobserve(e),0===a.size){i.disconnect(),s.delete(n);let e=o.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&o.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!u){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[l,r,t,u,f.current]),[h,u,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=r(39880);function i(e,t){let r=(0,n.useRef)(()=>{}),i=(0,n.useRef)(()=>{});return(0,n.useMemo)(()=>e&&t?n=>{null===n?(r.current(),i.current()):(r.current=a(e,n),i.current=a(t,n))}:e||t,[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
4dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99025:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_SUFFIX:function(){return d},APP_DIR_ALIAS:function(){return N},CACHE_ONE_YEAR:function(){return E},DOT_NEXT_ALIAS:function(){return T},ESLINT_DEFAULT_DIRS:function(){return Z},GSP_NO_RETURNED_VALUE:function(){return q},GSSP_COMPONENT_MEMBER_ERROR:function(){return J},GSSP_NO_RETURNED_VALUE:function(){return V},INFINITE_CACHE:function(){return O},INSTRUMENTATION_HOOK_FILENAME:function(){return S},MATCHED_PATH_HEADER:function(){return i},MIDDLEWARE_FILENAME:function(){return k},MIDDLEWARE_LOCATION_REGEXP:function(){return B},NEXT_BODY_SUFFIX:function(){return p},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return P},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return m},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return b},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return A},NEXT_CACHE_TAGS_HEADER:function(){return g},NEXT_CACHE_TAG_MAX_ITEMS:function(){return w},NEXT_CACHE_TAG_MAX_LENGTH:function(){return v},NEXT_DATA_SUFFIX:function(){return f},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return h},NEXT_QUERY_PARAM_PREFIX:function(){return r},NEXT_RESUME_HEADER:function(){return x},NON_STANDARD_NODE_ENV:function(){return W},PAGES_DIR_ALIAS:function(){return C},PRERENDER_REVALIDATE_HEADER:function(){return a},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return s},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return L},ROOT_DIR_ALIAS:function(){return I},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return U},RSC_ACTION_ENCRYPTION_ALIAS:function(){return F},RSC_ACTION_PROXY_ALIAS:function(){return _},RSC_ACTION_VALIDATE_ALIAS:function(){return M},RSC_CACHE_WRAPPER_ALIAS:function(){return j},RSC_MOD_REF_PROXY_ALIAS:function(){return R},RSC_PREFETCH_SUFFIX:function(){return o},RSC_SEGMENTS_DIR_SUFFIX:function(){return c},RSC_SEGMENT_SUFFIX:function(){return l},RSC_SUFFIX:function(){return u},SERVER_PROPS_EXPORT_ERROR:function(){return z},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return G},SERVER_PROPS_SSG_CONFLICT:function(){return H},SERVER_RUNTIME:function(){return Y},SSG_FALLBACK_EXPORT_ERROR:function(){return Q},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return D},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return $},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return K},WEBPACK_LAYERS:function(){return ee},WEBPACK_RESOURCE_QUERIES:function(){return et}});let r="nxtP",n="nxtI",i="x-matched-path",a="x-prerender-revalidate",s="x-prerender-revalidate-if-generated",o=".prefetch.rsc",c=".segments",l=".segment.rsc",u=".rsc",d=".action",f=".json",h=".meta",p=".body",g="x-next-cache-tags",b="x-next-cache-soft-tags",m="x-next-revalidated-tags",y="x-next-revalidate-tag-token",x="next-resume",w=64,v=256,A=1024,P="_N_T_",E=31536e3,O=0xfffffffe,k="middleware",B=`(?:src/)?${k}`,S="instrumentation",C="private-next-pages",T="private-dot-next",I="private-next-root-dir",N="private-next-app-dir",R="private-next-rsc-mod-ref-proxy",M="private-next-rsc-action-validate",_="private-next-rsc-server-reference",j="private-next-rsc-cache-wrapper",F="private-next-rsc-action-encryption",U="private-next-rsc-action-client-wrapper",L="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",D="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",G="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",H="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",$="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",z="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",q="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",V="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",K="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",J="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",W='You are using a non-standard "NODE_ENV" value in y
4our environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',Q="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",Z=["app","pages","components","lib","src"],Y={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},X={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser"},ee={...X,GROUP:{builtinReact:[X.reactServerComponents,X.actionBrowser],serverOnly:[X.reactServerComponents,X.actionBrowser,X.instrument,X.middleware],neutralTarget:[X.api],clientOnly:[X.serverSideRendering,X.appPagesBrowser],bundled:[X.reactServerComponents,X.actionBrowser,X.serverSideRendering,X.appPagesBrowser,X.shared,X.instrument],appPages:[X.reactServerComponents,X.serverSideRendering,X.appPagesBrowser,X.actionBrowser]}},et={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},75397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return i}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function i(e){return r.test(e)?e.replace(n,"\\$&"):e}},49941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(50482)._(r(39880)).default.createContext(null)},66725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return o},urlObjectKeys:function(){return s}});let n=r(81507)._(r(40587)),i=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",s=e.pathname||"",o=e.hash||"",c=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(l+=":"+e.port)),c&&"object"==typeof c&&(c=String(n.urlQueryToSearchParams(c)));let u=e.search||c&&"?"+c||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),""+a+l+(s=s.replace(/[?#]/g,encodeURIComponent))+(u=u.replace("#","%23"))+o}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return a(e)}},67030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return n.getSortedRouteObjects},getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return i.isDynamicRoute}});let n=r(68960),i=r(32590)},71848:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(92392),i=r(98521);function a(e,t,r){let a="",s=(0,i.getRouteRegex)(e),o=s.groups,c=(t!==e?(0,n.getRouteMatcher)(s)(t):"")||r;a=e;let l=Object.keys(o);return l.every(e=>{let t=c[e]||"",{repeat:r,optional:n}=o[e],i="["+(r?"...":"")+e+"]";return n&&(i=(t?"":"/")+"["+i+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in c)&&(a=a.replace(i,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:l,result:a}}},32590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let n=r(79613),i=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},83512:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(45543),i=r(64030);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},77659:(e,t)=>{"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},40587:(e,t)=>{"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,i]=e;Array.isArray(i)?i.forEach(e=>t.append(r,n(e))):t.set(r,n(i))}),t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return i}})},92392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let n=r(45543);function i(e){let{re:t,groups:r}=e;return e=>{let i=t.exec(e);if(!i)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},s={};return Object.keys(r).forEach(e=>{let t=r[e],n=i[t.pos];void 0!==n&&(s[e]=~n.indexOf("/")?n.split("/").map(e=>a(e)):t.repeat?[a(n)]:a(n))}),s}}},98521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return g},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return d},parseParameter:function(){return c}});let n=r(99025),i=r(79613),a=r(75397),s=r(78713),o=/\[((?:\[.*\])|.+)\]/;function c(e){let t=e.match(o);return t?l(t[1]):l(e)}function l(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,s.removeTrailingSlash)(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=i.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),s=e.match(o);if(t&&s){let{key:e,optional:i,repeat:o}=l(s[1]);return r[e]={pos:n++,repeat:o,optional:i},"/"+(0,a.escapeStringRegexp)(t)+"([^/]+?)"}if(!s)return"/"+(0,a.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:i}=l(s[1]);return r[e]={pos:n++,repeat:t,optional:i},t?i?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function d(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function f(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:i,keyPrefix:s}=e,{key:o,optional:c,repeat:u}=l(n),d=o.replace(/\W/g,"");s&&(d=""+s+d);let f=!1;(0===d.length||d.length>30)&&(f=!0),isNaN(parseInt(d.slice(0,1)))||(f=!0),f&&(d=r()),s?i[d]=""+s+o:i[d]=o;let h=t?(0,a.escapeStringRegexp)(t):"";return u?c?"(?:/"+h+"(?<"+d+">.+?))?":"/"+h+"(?<"+d+">.+?)":"/"+h+"(?<"+d+">[^/]+?)"}function h(e,t){let r;let o=(0,s.removeTrailingSlash)(e).slice(1).split("/"),c=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:o.map(e=>{let r=i.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),s=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&s){let[r]=e.split(s[0]);return f({getSafeRouteKey:c,interceptionMarker:r,segment:s[1],routeKeys:l,keyPrefix:t?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}return s?f({getSafeRouteKey:c,segment:s[1],routeKeys:l,keyPrefix:t?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function p(e,t){let r=h(e,t);return{...d(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function g(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:i}=h(e,!1);return{namedRegex:"^"+i+(n?"(?:(/.*)?)":"")+"$"}}},68960:(e,t)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return i},getSortedRoutes:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let r=i.slice(1,-1),s=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),s=!0),r.startsWith("…"))throw Error("Detected a three-dot character ('…') at ('"+r+"'). Did you mean ('...')?");if(r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function a(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,r),this.restSlugName=r,i="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,r),this.slugName=r,i="[]"}}this.children.has(i)||this.children.set(i,new r),this.children.get(i)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}function i(e,t){let r={},i=[];for(let n=0;n<e.length;n++){let a=t(e[n]);r[a]=n,i[n]=a}return n(i).map(t=>e[r[t]])}},45543:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return p},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return m},NormalizeError:function(){return g},PageNotFoundError:function(){return b},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return c},getLocationOrigin:function(){return s},getURL:function(){return o},isAbsoluteUrl:function(){return a},isResSent:function(){return l},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return u},stringifyError:function(){return x}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return r||(r=!0,t=e(...i)),t}}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>i.test(e);function s(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function o(){let{href:e}=window.location,t=s();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function l(e){return e.finished||e.headersSent}function u(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&l(r))return n;if(!n)throw Error('"'+c(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let f="undefined"!=typeof performance,h=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);
4class p extends Error{}class g extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(e){return JSON.stringify({message:e.message,stack:e.stack})}},46420:(e,t,r)=>{"use strict";var n=r(97228);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,a,s){if(s!==n){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
4;return r.PropTypes=r,r}},73568:(e,t,r)=>{e.exports=r(46420)()},97228:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},97148:(e,t,r)=>{var n=r(33206);function i(e){this.mode=n.MODE_8BIT_BYTE,this.data=e}i.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=i},62250:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},10753:e=>{e.exports={L:1,M:0,Q:3,H:2}},69843:(e,t,r)=>{var n=r(68235);function i(e,t){if(void 0==e.length)throw Error(e.length+"/"+t);for(var r=0;r<e.length&&0==e[r];)r++;this.num=Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}i.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var a=0;a<e.getLength();a++)t[r+a]^=n.gexp(n.glog(this.get(r))+n.glog(e.get(a)));return new i(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=n.glog(this.get(0))-n.glog(e.get(0)),r=Array(this.getLength()),a=0;a<this.getLength();a++)r[a]=this.get(a);for(var a=0;a<e.getLength();a++)r[a]^=n.gexp(n.glog(e.get(a))+t);return new i(r,0).mod(e)}},e.exports=i},32287:(e,t,r)=>{var n=r(97148),i=r(19607),a=r(62250),s=r(7585),o=r(69843);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=c.prototype;l.addData=function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},l.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw Error(e+","+t);return this.modules[e][t]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=i.getRSBlocks(e,this.errorCorrectLevel),r=new a,n=0,o=0;o<t.length;o++)n+=t[o].dataCount;for(var o=0;o<this.dataList.length;o++){var c=this.dataList[o];r.put(c.mode,4),r.put(c.getLength(),s.getLengthInBits(c.mode,e)),c.write(r)}if(r.getLengthInBits()<=8*n)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},l.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1)&&!(this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},l.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=s.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},l.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var i=0;i<this.modules.length;i++)for(var a=1*i,s=0;s<this.modules[i].length;s++){var o=1*s;this.modules[i][s]&&(n.beginFill(0,100),n.moveTo(o,a),n.lineTo(o+1,a),n.lineTo(o+1,a+1),n.lineTo(o,a+1),n.endFill())}return n},l.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},l.setupPositionAdjustPattern=function(){for(var e=s.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],i=e[r];if(null==this.modules[n][i])for(var a=-2;a<=2;a++)for(var o=-2;o<=2;o++)-2==a||2==a||-2==o||2==o||0==a&&0==o?this.modules[n+a][i+o]=!0:this.modules[n+a][i+o]=!1}},l.setupTypeNumber=function(e){for(var t=s.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},l.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=s.getBCHTypeInfo(r),i=0;i<15;i++){var a=!e&&(n>>i&1)==1;i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(var i=0;i<15;i++){var a=!e&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!e},l.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,i=7,a=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var c=0;c<2;c++)if(null==this.modules[n][o-c]){var l=!1;a<e.length&&(l=(e[a]>>>i&1)==1),s.getMask(t,n,o-c)&&(l=!l),this.modules[n][o-c]=l,-1==--i&&(a++,i=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,r){for(var n=i.getRSBlocks(e,t),o=new a,l=0;l<r.length;l++){var u=r[l];o.put(u.mode,4),o.put(u.getLength(),s.getLengthInBits(u.mode,e)),u.write(o)}for(var d=0,l=0;l<n.length;l++)d+=n[l].dataCount;if(o.getLengthInBits()>8*d)throw Error("code length overflow. ("+o.getLengthInBits()+">"+8*d+")");for(o.getLengthInBits()+4<=8*d&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*d)&&(o.put(c.PAD0,8),!(o.getLengthInBits()>=8*d));)o.put(c.PAD1,8);return c.createBytes(o,n)},c.createBytes=function(e,t){for(var r=0,n=0,i=0,a=Array(t.length),c=Array(t.length),l=0;l<t.length;l++){var u=t[l].dataCount,d=t[l].totalCount-u;n=Math.max(n,u),i=Math.max(i,d),a[l]=Array(u);for(var f=0;f<a[l].length;f++)a[l][f]=255&e.buffer[f+r];r+=u;var h=s.getErrorCorrectPolynomial(d),p=new o(a[l],h.getLength()-1).mod(h);c[l]=Array(h.getLength()-1);for(var f=0;f<c[l].length;f++){var g=f+p.getLength()-c[l].length;c[l][f]=g>=0?p.get(g):0}}for(var b=0,f=0;f<t.length;f++)b+=t[f].totalCount;for(var m=Array(b),y=0,f=0;f<n;f++)for(var l=0;l<t.length;l++)f<a[l].length&&(m[y++]=a[l][f]);for(var f=0;f<i;f++)for(var l=0;l<t.length;l++)f<c[l].length&&(m[y++]=c[l][f]);return m},e.exports=c},19607:(e,t,r)=>{var n=r(10753);function i(e,t){this.totalCount=e,this.dataCount=t}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37
4],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(e,t){var r=i.getRsBlockTable(e,t);if(void 0==r)throw Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,a=[],s=0;s<n;s++)for(var o=r[3*s+0],c=r[3*s+1],l=r[3*s+2],u=0;u<o;u++)a.push(new i(c,l));return a},i.getRsBlockTable=function(e,t){switch(t){case n.L:return i.RS_BLOCK_TABLE[(e-1)*4+0];case n.M:return i.RS_BLOCK_TABLE[(e-1)*4+1];case n.Q:return i.RS_BLOCK_TABLE[(e-1)*4+2];case n.H:return i.RS_BLOCK_TABLE[(e-1)*4+3];default:return}},e.exports=i},68235:e=>{for(var t={glog:function(e){if(e<1)throw Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},r=0;r<8;r++)t.EXP_TABLE[r]=1<<r;for(var r=8;r<256;r++)t.EXP_TABLE[r]=t.EXP_TABLE[r-4]^t.EXP_TABLE[r-5]^t.EXP_TABLE[r-6]^t.EXP_TABLE[r-8];for(var r=0;r<255;r++)t.LOG_TABLE[t.EXP_TABLE[r]]=r;e.exports=t},33206:e=>{e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},7585:(e,t,r)=>{var n=r(33206),i=r(69843),a=r(68235),s={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;
4o.getBCHDigit(t)-o.getBCHDigit(o.G15)>=0;)t^=o.G15<<o.getBCHDigit(t)-o.getBCHDigit(o.G15);return(e<<10|t)^o.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;o.getBCHDigit(t)-o.getBCHDigit(o.G18)>=0;)t^=o.G18<<o.getBCHDigit(t)-o.getBCHDigit(o.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return o.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case s.PATTERN000:return(t+r)%2==0;case s.PATTERN001:return t%2==0;case s.PATTERN010:return r%3==0;case s.PATTERN011:return(t+r)%3==0;case s.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case s.PATTERN101:return t*r%2+t*r%3==0;case s.PATTERN110:return(t*r%2+t*r%3)%2==0;case s.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),r=0;r<e;r++)t=t.multiply(new i([1,a.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw Error("mode:"+e)}else if(t<27)switch(e){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw Error("mode:"+e)}else if(t<41)switch(e){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw Error("mode:"+e)}else throw Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var i=0;i<t;i++){for(var a=0,s=e.isDark(n,i),o=-1;o<=1;o++)if(!(n+o<0)&&!(t<=n+o))for(var c=-1;c<=1;c++)!(i+c<0)&&!(t<=i+c)&&(0!=o||0!=c)&&s==e.isDark(n+o,i+c)&&a++;a>5&&(r+=3+a-5)}for(var n=0;n<t-1;n++)for(var i=0;i<t-1;i++){var l=0;e.isDark(n,i)&&l++,e.isDark(n+1,i)&&l++,e.isDark(n,i+1)&&l++,e.isDark(n+1,i+1)&&l++,(0==l||4==l)&&(r+=3)}for(var n=0;n<t;n++)for(var i=0;i<t-6;i++)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(var i=0;i<t;i++)for(var n=0;n<t-6;n++)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);for(var u=0,i=0;i<t;i++)for(var n=0;n<t;n++)e.isDark(n,i)&&u++;return r+Math.abs(100*u/t/t-50)/5*10}};e.exports=o},92495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}
4,i=o(r(73568)),a=r(39880),s=o(a);function o(e){return e&&e.__esModule?e:{default:e}}var c={bgColor:i.default.oneOfType([i.default.object,i.default.string]).isRequired,bgD:i.default.string.isRequired,fgColor:i.default.oneOfType([i.default.object,i.default.string]).isRequired,fgD:i.default.string.isRequired,size:i.default.number.isRequired,title:i.default.string,viewBoxSize:i.default.number.isRequired,xmlns:i.default.string},l=(0,a.forwardRef)(function(e,t){var r=e.bgColor,i=e.bgD,a=e.fgD,o=e.fgColor,c=e.size,l=e.title,u=e.viewBoxSize,d=e.xmlns,f=function(e,t){var r={};for(var n in e)!(t.indexOf(n)>=0)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",n({},f,{height:c,ref:t,viewBox:"0 0 "+u+" "+u,width:c,xmlns:void 0===d?"http://www.w3.org/2000/svg":d}),l?s.default.createElement("title",null,l):null,s.default.createElement("path",{d:i,fill:r}),s.default.createElement("path",{d:a,fill:o}))});l.displayName="QRCodeSvg",l.propTypes=c,t.default=l},78964:(e,t,r)=>{"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=u(r(73568)),a=u(r(10753)),s=u(r(32287)),o=r(39880),c=u(o),l=u(r(92495));function u(e){return e&&e.__esModule?e:{default:e}}var d={bgColor:i.default.oneOfType([i.default.object,i.default.string]),fgColor:i.default.oneOfType([i.default.object,i.default.string]),level:i.default.string,size:i.default.number,value:i.default.string.isRequired},f=(0,o.forwardRef)(function(e,t){var r=e.bgColor,i=e.fgColor,o=e.level,u=e.size,d=e.value,f=function(e,t){var r={};for(var n in e)!(t.indexOf(n)>=0)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["bgColor","fgColor","level","size","value"]),h=new s.default(-1,a.default[void 0===o?"L":o]);h.addData(d),h.make();var p=h.modules;return c.default.createElement(l.default,n({},f,{bgColor:void 0===r?"#FFFFFF":r,bgD:p.map(function(e,t){return e.map(function(e,r){return e?"":"M "+r+" "+t+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:void 0===i?"#000000":i,fgD:p.map(function(e,t){return e.map(function(e,r){return e?"M "+r+" "+t+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:t,size:void 0===u?256:u,viewBoxSize:p.length}))});f.displayName="QRCode",f.propTypes=d,t.Ay=f},53322:(e,t)=>{"use strict";let r,n,i,a,s,o,c,l,u,d,f,h,p,g,b,m;let y=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function x(e){var t;let r;return t=function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,a=[0,1];for(let e=1;e<n;e++)a.push(i+=r());let s=r(),o=t;t+=s;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}let d=0x80000000-1,f=0;for(let e=0;e<31;e++)f=f<<1|u();let h=[],p=0,g=0x80000000;for(;;){let e=Math.floor(((f-p+1)*i-1)/g),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<a[n]?r=n:t=n}if(0==t)break;h.push(t);let s=p+Math.floor(g*a[t]/i),o=p+Math.floor(g*a[t+1]/i)-1;for(;((s^o)&0x40000000)==0;)f=f<<1&d|u(),s=s<<1&d,o=o<<1&d|1;for(;s&~o&0x20000000;)f=0x40000000&f|f<<1&d>>>1|u(),s=s<<1^0x40000000,o=(0x40000000^o)<<1|0x40000001;p=s,g=1+o-s}let b=n-4;return h.map(t=>{switch(t-b){case 3:return b+65792+(e[o++]<<16|e[o++]<<8|e[o++]);case 2:return b+256+(e[o++]<<8|e[o++]);case 1:return b+e[o++];default:return t-1}})}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((e,r)=>t[e.charCodeAt(0)]=r);let r=e.length,n=new Uint8Array(6*r>>
43);for(let i=0,a=0,s=0,o=0;i<r;i++)o=o<<6|t[e.charCodeAt(i)],(s+=6)>=8&&(n[a++]=o>>(s-=8));return n}(e)),r=0,()=>t[r++]}function w(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function v(e){return P(()=>{let t=w(e);if(t.length)return t})}function A(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(function(e,t){let r=1+t(),n=t(),i=P(t);return E(i.length,1+e,t).flatMap((e,t)=>{let[a,...s]=e;return Array(i[t]).fill().map((e,t)=>{let i=t*n;return[a+t*r,s.map(e=>e+i)]})})}(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(E(1+e(),1+r,e).map(e=>[e[0],e.slice(1)]))}return t.flat()}function P(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function E(e,t,r){let n=Array(e).fill().map(()=>[]);for(let i=0;i<t;i++)(function(e,t){let r=Array(e);for(let i=0,a=0;i<e;i++){var n;r[i]=a+=1&(n=t())?~n>>1:n>>1}return r})(e,r).forEach((e,t)=>n[t].push(e));return n}function O(e){return`{${e.toString(16).toUpperCase().padStart(2,"0")}}`}function k(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}function B(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}function S(e,t){let r=e.length,n=r-t.length;for(let i=0;0==n&&i<r;i++)n=e[i]-t[i];return n}function C(e){return e>>24&255}function T(e){return 0xffffff&e}function I(e){return e>=44032&&e<55204}function N(e){r||function(){let e=x
vendor: 7,457 bytes, line 4
4("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");f
4or(let[t,s]of(r=new Map(v(e).flatMap((e,t)=>e.map(e=>[e,t+1<<24]))),n=new Set(w(e)),i=new Map,a=new Map,A(e))){if(!n.has(t)&&2==s.length){let[e,r]=s,n=a.get(e);n||(n=new Map,a.set(e,n)),n.set(r,t)}i.set(t,s.reverse())}}();let t=[],s=[],o=!1;function c(e){let n=r.get(e);n&&(o=!0,e|=n),t.push(e)}for(let r of e)for(;;){if(r<128)t.push(r);else if(I(r)){let e=r-44032,t=e/588|0,n=e%588/28|0,i=e%28;c(4352+t),c(4449+n),i>0&&c(4519+i)}else{let e=i.get(r);e?s.push(...e):c(r)}if(!s.length)break;r=s.pop()}if(o&&t.length>1){let e=C(t[0]);for(let r=1;r<t.length;r++){let n=C(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i||(e=C(t[--i]))<=n)break}e=C(t[r])}}return t}function R(e){return N(e).map(T)}function M(e){return function(e){let t=[],r=[],n=-1,i=0;for(let s of e){let e=C(s),o=T(s);if(-1==n)0==e?n=o:t.push(o);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=o):r.push(o),i=e;else{let s=function(e,t){if(e>=4352&&e<4371&&t>=4449&&t<4470)return 44032+(e-4352)*588+(t-4449)*28;if(I(e)&&t>4519&&t<4547&&(e-44032)%28==0)return e+(t-4519);{let r=a.get(e);return r&&(r=r.get(t))?r:-1}}(n,o);s>=0?n=s:0==i&&0==e?(t.push(n),n=o):(r.push(o),i=e)}}return n>=0&&t.push(n,...r),t}(N(e))}let _=e=>Array.from(e);function j(e,t){return e.P.has(t)||e.Q.has(t)}class F extends Array{get is_emoji(){return!0}}function U(){let e,t;if(s)return;let r=x("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhT
4yiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9ey
4MgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduP
4jbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESV
4FFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI"),n=()=>w(r),i=()=>new Set(n()),a=(e,t)=>t.forEach(t=>e.add(t));s=new Map(A(r)),o=i(),c=n(),l=new Set(n().map(e=>c[e])),c=new Set(c),u=i(),d=i();let y=v(r),E=r(),O=()=>{let e=new Set;
4return n().forEach(t=>a(e,y[t])),a(e,n()),e};f=P(e=>{let t=P(r).map(e=>e+96);if(t.length){let n=e>=E;return t[0]-=32,t=B(t),n&&(t=`Restricted[${t}]`),{N:t,P:O(),Q:O(),M:!r(),R:n}}}),h=i(),p=new Map;let k=n().concat(_(h)).sort((e,t)=>e-t);for(let{V:e,M:t}of(k.forEach((e,t)=>{let n=r(),i=k[t]=n?k[t-n]:{V:[],M:new Map};i.V.push(e),h.has(e)||p.set(e,i)}),new Set(p.values()))){let r=[];for(let t of e){let e=f.filter(e=>j(e,t)),n=r.find(({G:t})=>e.some(e=>t.has(e)));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),a(n.G,e)}let n=r.flatMap(e=>_(e.G));for(let{G:e,V:i}of r){let r=new Set(n.filter(t=>!e.has(t)));for(let e of i)t.set(e,r)}}g=new Set;let C=new Set,T=e=>g.has(e)?C.add(e):g.add(e);for(let e of f){for(let t of e.P)T(t);for(let t of e.Q)T(t)}for(let e of g)p.has(e)||C.has(e)||p.set(e,1);for(let n of(a(g,R(g)),b=(e=[],t=w(r),function t({S:r,B:n},i,a){if(!(4&r)||a!==i[i.length-1])for(let s of(2&r&&(a=i[i.length-1]),1&r&&e.push(i),n))for(let e of s.Q)t(s,[...i,e],a)}(function e(n){return{S:r(),B:P(()=>{let n=w(r).map(e=>t[e]);if(n.length)return e(n)}),Q:n}}([]),[]),e).map(e=>F.from(e)).sort(S),m=new Map,b)){let e=[m];for(let t of n){let r=e.map(e=>{let r=e.get(t);return r||(r=new Map,e.set(t,r)),r});65039===t?e.push(...r):e=r}for(let t of e)t.V=n}}function L(e){return($(e)?"":`${D(G([e]))} `)+O(e)}function D(e){return`"${e}"\u200E`}function G(e,t=1/0,r=O){let n=[];H(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,a=e.length;for(let t=0;t<a;t++){let a=e[t];
4$(a)&&(n.push(B(e.slice(i,t))),n.push(r(a)),i=t+1)}return n.push(B(e.slice(i,a))),n.join("")}function H(e){return U(),c.has(e)}function $(e){return U(),u.has(e)}function z(e,t,r){if(!e)return[];U();let n=0;return e.split(".").map(e=>{let i=k(e),a={input:i,offset:n};n+=i.length+1;try{let e,n=a.tokens=W(i,t,r),s=n.length;if(!s)throw Error("empty label");let o=a.output=n.flat();if(!function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw Error("underscore allowed only at start")}(o),!(a.emoji=s>1||n[0].is_emoji)&&o.every(e=>e<128))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw Error(`invalid label extension: "${B(e.slice(0,4))}"`)}(o),e="ASCII";else{let t=n.flatMap(e=>e.is_emoji?[]:e);if(t.length){if(c.has(o[0]))throw J("leading combining mark");for(let e=1;e<s;e++){let t=n[e];if(!t.is_emoji&&c.has(t[0]))throw J(`emoji + combining mark: "${B(n[e-1])} + ${G([t[0]])}"`)}!function(e){let t=e[0],r=y.get(t);if(r)throw J(`leading ${r}`);let n=e.length,i=-1;for(let a=1;a<n;a++){t=e[a];let n=y.get(t);if(n){if(i==a)throw J(`${r} + ${n}`);i=a+1,r=n}}if(i==n)throw J(`trailing ${r}`)}(o);let r=_(new Set(t)),[i]=function(e){let t=f;for(let r of e){let e=t.filter(e=>j(e,r));if(!e.length){if(f.some(e=>j(e,r)))throw K(t[0],r);throw V(r)}if(t=e,1==e.length)break}return t}(r);(function(e,t){for(let r of t)if(!j(e,r))throw K(e,r);if(e.M){let e=R(t);for(let t=1,r=e.length;t<r;t++)if(l.has(e[t])){let n=t+1;for(let i;n<r&&l.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw Error(`duplicate non-spacing marks: ${L(i)}`);if(n-t>4)throw Error(`excessive non-spacing marks: ${D(G(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}})(i,t),function(e,t){let r;let n=[];for(let e of t){let t=p.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(!(r=r?r.filter(e=>n.has(e)):_(n)).length)return}else n.push(e)}if(r){for(let t of r)if(n.every(e=>j(t,e)))throw Error(`whole-script confusable: ${e.N}/${t.N}`)}}(i,r),e=i.N}else e="Emoji"}a.type=e}catch(e){a.error=e}return a})}function q(e){return e.map(({input:t,error:r,output:n})=>{if(r){let n=r.message;throw Error(1==e.length?n:`Invalid label ${D(G(t,63))}: ${n}`)}return B(n)}).join(".")}function V(e){return Error(`disallowed character: ${L(e)}`)}function K(e,t){let r=L(t),n=f.find(e=>e.P.has(t));return n&&(r=`${n.N} ${r}`),Error(`illegal mixture: ${e.N} + ${r}`)}function J(e){return Error(`illegal placement: ${e}`)}function W(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let a=Z(e);if(a)i.length&&(n.push(t(i)),i=[]),n.push(r(a));else{let t=e.pop();if(g.has(t))i.push(t);else{let e=s.get(t);if(e)i.push(...e);else if(!o.has(t))throw V(t)}}}return i.length&&n.push(t(i)),n}function Q(e){return e.filter(e=>65039!=e)}function Z(e,t){let r,n=m,i=e.length;for(;i&&(n=n.get(e[--i]));){let{V:a}=n;a&&(r=a,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}let Y="valid",X="mapped",ee="ignored";function et(e){return e==Y||e==X}function er(e){return e.some(e=>d.has(e))}function en(e){for(let t=0;t<e.length;t++)if(e[t].type==Y){let r=t+1;for(;r<e.length&&e[r].type==Y;)r++;e.splice(t,r-t,{type:Y,cps:e.slice(t,r).flatMap(e=>e.cps)})}return e}t.ens_beautify=function(e){let t=z(e,M,e=>e);for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&function(e,t,r){let n=0;for(;;){let t=e.indexOf(958,n);if(t<0)break;e[t]=926,n=t+1}}(r,0,0)}return q(t)},t.ens_emoji=function(){return U(),b.map(e=>e.slice())},t.ens_normalize=function(e){return q(z(e,M,Q))},t.ens_normalize_fragment=function(e,t){U();let r=t?R:M;return e.split(".").map(e=>B(W(k(e),r,Q).flat())).join(".")},t.ens_split=function(e,t){return z(e,M,t?e=>e.slice():Q)},t.ens_tokenize=function e(t,{nf:r=!0}={}){U();let n=k(t).reverse(),i=[],a=[];for(;n.length;){let e=Z(n,i);
4if(e)a.push({type:"emoji",emoji:e.slice(),input:i,cps:Q(e)}),i=[];else{let e=n.pop();if(46==e)a.push({type:"stop",cp:e});else if(g.has(e))a.push({type:Y,cps:[e]});else if(o.has(e))a.push({type:ee,cp:e});else{let t=s.get(e);t?a.push({type:X,cp:e,cps:t.slice()}):a.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;t<a.length;t++){let n=a[t];if(et(n.type)){if(er(n.cps)){let n=t+1;for(let e=n;e<a.length;e++){let{type:t,cps:r}=a[e];if(et(t)){if(!er(r))break;n=e+1}else if(t!==ee)break}r<0&&(r=t);let i=a.slice(r,n),s=i.flatMap(e=>et(e.type)?e.cps:[]),o=M(s);S(o,s)?(a.splice(r,n-r,{type:"nfc",input:s,cps:o,tokens0:en(i),tokens:e(B(o),{nf:!1})}),t=r):t=n-1,r=-1}else r=t}else n.type!==ee&&(r=-1)}return en(a)},t.is_combining_mark=H,t.nfc=M,t.nfd=R,t.safe_str_from_cps=G,t.should_escape=$},68850:function(e,t){"use strict";var r,n,i,a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)},s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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.AES=void 0;let o={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],u=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[0xc66363a5,0xf87c7c84,0xee777799,0xf67b7b8d,0xfff2f20d,0xd66b6bbd,0xde6f6fb1,0x91c5c554,0x60303050,0x2010103,0xce6767a9,0x562b2b7d,0xe7fefe19,0xb5d7d762,0x4dababe6,0xec76769a,0x8fcaca45,0x1f82829d,0x89c9c940,0xfa7d7d87,0xeffafa15,0xb25959eb,0x8e4747c9,0xfbf0f00b,0x41adadec,0xb3d4d467,0x5fa2a2fd,0x45afafea,0x239c9cbf,0x53a4a4f7,0xe4727296,0x9bc0c05b,0x75b7b7c2,0xe1fdfd1c,0x3d9393ae,0x4c26266a,0x6c36365a,0x7e3f3f41,0xf5f7f702,0x83cccc4f,0x6834345c,0x51a5a5f4,0xd1e5e534,0xf9f1f108,0xe2717193,0xabd8d873,0x62313153,0x2a15153f,0x804040c,0x95c7c752,0x46232365,0x9dc3c35e,0x30181828,0x379696a1,0xa05050f,0x2f9a9ab5,0xe070709,0x24121236,0x1b80809b,0xdfe2e23d,0xcdebeb26,0x4e272769,0x7fb2b2cd,0xea75759f,0x1209091b,0x1d83839e,0x582c2c74,0x341a1a2e,0x361b1b2d,0xdc6e6eb2,0xb45a5aee,0x5ba0a0fb,0xa45252f6,0x763b3b4d,0xb7d6d661,0x7db3b3ce,0x5229297b,0xdde3e33e,0x5e2f2f71,0x13848497,0xa65353f5,0xb9d1d168,0,0xc1eded2c,0x40202060,0xe3fcfc1f,0x79b1b1c8,0xb65b5bed,0xd46a6abe,0x8dcbcb46,0x67bebed9,0x7239394b,0x944a4ade,0x984c4cd4,0xb05858e8,0x85cfcf4a,0xbbd0d06b,0xc5efef2a,0x4faaaae5,0xedfbfb16,0x864343c5,0x9a4d4dd7,0x66333355,0x11858594,0x8a4545cf,0xe9f9f910,0x4020206,0xfe7f7f81,0xa05050f0,0x783c3c44,0x259f9fba,0x4ba8a8e3,0xa25151f3,0x5da3a3fe,0x804040c0,0x58f8f8a,0x3f9292ad,0x219d9dbc,0x70383848,0xf1f5f504,0x63bcbcdf,0x77b6b6c1,0xafdada75,0x42212163,0x20101030,0xe5ffff1a,0xfdf3f30e,0xbfd2d26d,0x81cdcd4c,0x180c0c14,0x26131335,0xc3ecec2f,0xbe5f5fe1,0x359797a2,0x884444cc,0x2e171739,0x93c4c457,0x55a7a7f2,0xfc7e7e82,0x7a3d3d47,0xc86464ac,0xba5d5de7,0x3219192b,0xe6737395,0xc06060a0,0x19818198,0x9e4f4fd1,0xa3dcdc7f,0x44222266,0x542a2a7e,0x3b9090ab,0xb888883,0x8c4646ca,0xc7eeee29,0x6bb8b8d3,0x2814143c,0xa7dede79,0xbc5e5ee2,0x160b0b1d,0xaddbdb76,0xdbe0e03b,0x64323256,0x743a3a4e,0x140a0a1e,0x924949db,0xc06060a,0x4824246c,0xb85c5ce4,0x9fc2c25d,0xbdd3d36e,0x43acacef,0xc46262a6,0x399191a8,0x319595a4,0xd3e4e437,0xf279798b,0xd5e7e732,0x8bc8c843,0x6e373759,0xda6d6db7,0x18d8d8c,0xb1d5d564,0x9c4e4ed2,0x49a9a9e0,0xd86c6cb4,0xac5656fa,0xf3f4f407,0xcfeaea25,0xca6565af,0xf47a7a8e,0x47aeaee9,0x10080818,0x6fbabad5,0xf0787888,0x4a25256f,0x5c2e2e72,0x381c1c24,0x57a6a6f1,0x73b4b4c7,0x97c6c651,0xcbe8e823,0xa1dddd7c,0xe874749c,0x3e1f1f21,0x964b4bdd,0x61bdbddc,0xd8b8b86,0xf8a8a85,0xe0707090,0x7c3e3e42,0x71b5b5c4,0xcc6666aa,0x904848d8,0x6030305,0xf7f6f601,0x1c0e0e12,0xc26161a3,0x6a35355f,0xae5757f9,0x69b9b9d0,0x17868691,0x99c1c158,0x3a1d1d27,0x279e9eb9,0xd9e1e138,0
4xebf8f813,0x2b9898b3,0x22111133,0xd26969bb,0xa9d9d970,0x78e8e89,0x339494a7,0x2d9b9bb6,0x3c1e1e22,0x15878792,0xc9e9e920,0x87cece49,0xaa5555ff,0x50282878,0xa5dfdf7a,0x38c8c8f,0x59a1a1f8,0x9898980,0x1a0d0d17,0x65bfbfda,0xd7e6e631,0x844242c6,0xd06868b8,0x824141c3,0x299999b0,0x5a2d2d77,0x1e0f0f11,0x7bb0b0cb,0xa85454fc,0x6dbbbbd6,0x2c16163a],f=[0xa5c66363,0x84f87c7c,0x99ee7777,0x8df67b7b,0xdfff2f2,0xbdd66b6b,0xb1de6f6f,0x5491c5c5,0x50603030,0x3020101,0xa9ce6767,0x7d562b2b,0x19e7fefe,0x62b5d7d7,0xe64dabab,0x9aec7676,0x458fcaca,0x9d1f8282,0x4089c9c9,0x87fa7d7d,0x15effafa,0xebb25959,0xc98e4747,0xbfbf0f0,0xec41adad,0x67b3d4d4,0xfd5fa2a2,0xea45afaf,0xbf239c9c,0xf753a4a4,0x96e47272,0x5b9bc0c0,0xc275b7b7,0x1ce1fdfd,0xae3d9393,0x6a4c2626,0x5a6c3636,0x417e3f3f,0x2f5f7f7,0x4f83cccc,0x5c683434,0xf451a5a5,0x34d1e5e5,0x8f9f1f1,0x93e27171,0x73abd8d8,0x53623131,0x3f2a1515,0xc080404,0x5295c7c7,0x65462323,0x5e9dc3c3,0x28301818,0xa1379696,0xf0a0505,0xb52f9a9a,0x90e0707,0x36241212,0x9b1b8080,0x3ddfe2e2,0x26cdebeb,0x694e2727,0xcd7fb2b2,0x9fea7575,0x1b120909,0x9e1d8383,0x74582c2c,0x2e341a1a,0x2d361b1b,0xb2dc6e6e,0xeeb45a5a,0xfb5ba0a0,0xf6a45252,0x4d763b3b,0x61b7d6d6,0xce7db3b3,0x7b522929,0x3edde3e3,0x715e2f2f,0x97138484,0xf5a65353,0x68b9d1d1,0,0x2cc1eded,0x60402020,0x1fe3fcfc,0xc879b1b1,0xedb65b5b,0xbed46a6a,0x468dcbcb,0xd967bebe,0x4b723939,0xde944a4a,0xd4984c4c,0xe8b05858,0x4a85cfcf,0x6bbbd0d0,0x2ac5efef,0xe54faaaa,0x16edfbfb,0xc5864343,0xd79a4d4d,0x55663333,0x94118585,0xcf8a4545,0x10e9f9f9,0x6040202,0x81fe7f7f,0xf0a05050,0x44783c3c,0xba259f9f,0xe34ba8a8,0xf3a25151,0xfe5da3a3,0xc0804040,0x8a058f8f,0xad3f9292,0xbc219d9d,0x48703838,0x4f1f5f5,0xdf63bcbc,0xc177b6b6,0x75afdada,0x63422121,0x30201010,0x1ae5ffff,0xefdf3f3,0x6dbfd2d2,0x4c81cdcd,0x14180c0c,0x35261313,0x2fc3ecec,0xe1be5f5f,0xa2359797,0xcc884444,0x392e1717,0x5793c4c4,0xf255a7a7,0x82fc7e7e,0x477a3d3d,0xacc86464,0xe7ba5d5d,0x2b321919,0x95e67373,0xa0c06060,0x98198181,0xd19e4f4f,0x7fa3dcdc,0x66442222,0x7e542a2a,0xab3b9090,0x83
40b8888,0xca8c4646,0x29c7eeee,0xd36bb8b8,0x3c281414,0x79a7dede,0xe2bc5e5e,0x1d160b0b,0x76addbdb,0x3bdbe0e0,0x56643232,0x4e743a3a,0x1e140a0a,0xdb924949,0xa0c0606,0x6c482424,0xe4b85c5c,0x5d9fc2c2,0x6ebdd3d3,0xef43acac,0xa6c46262,0xa8399191,0xa4319595,0x37d3e4e4,0x8bf27979,0x32d5e7e7,0x438bc8c8,0x596e3737,0xb7da6d6d,0x8c018d8d,0x64b1d5d5,0xd29c4e4e,0xe049a9a9,0xb4d86c6c,0xfaac5656,0x7f3f4f4,0x25cfeaea,0xafca6565,0x8ef47a7a,0xe947aeae,0x18100808,0xd56fbaba,0x88f07878,0x6f4a2525,0x725c2e2e,0x24381c1c,0xf157a6a6,0xc773b4b4,0x5197c6c6,0x23cbe8e8,0x7ca1dddd,0x9ce87474,0x213e1f1f,0xdd964b4b,0xdc61bdbd,0x860d8b8b,0x850f8a8a,0x90e07070,0x427c3e3e,0xc471b5b5,0xaacc6666,0xd8904848,0x5060303,0x1f7f6f6,0x121c0e0e,0xa3c26161,0x5f6a3535,0xf9ae5757,0xd069b9b9,0x91178686,0x5899c1c1,0x273a1d1d,0xb9279e9e,0x38d9e1e1,0x13ebf8f8,0xb32b9898,0x33221111,0xbbd26969,0x70a9d9d9,0x89078e8e,0xa7339494,0xb62d9b9b,0x223c1e1e,0x92158787,0x20c9e9e9,0x4987cece,0xffaa5555,0x78502828,0x7aa5dfdf,0x8f038c8c,0xf859a1a1,0x80098989,0x171a0d0d,0xda65bfbf,0x31d7e6e6,0xc6844242,0xb8d06868,0xc3824141,0xb0299999,0x775a2d2d,0x111e0f0f,0xcb7bb0b0,0xfca85454,0xd66dbbbb,0x3a2c1616],h=[0x63a5c663,0x7c84f87c,0x7799ee77,0x7b8df67b,0xf20dfff2,0x6bbdd66b,0x6fb1de6f,0xc55491c5,0x30506030,0x1030201,0x67a9ce67,0x2b7d562b,0xfe19e7fe,0xd762b5d7,0xabe64dab,0x769aec76,0xca458fca,0x829d1f82,0xc94089c9,0x7d87fa7d,0xfa15effa,0x59ebb259,0x47c98e47,0xf00bfbf0,0xadec41ad,0xd467b3d4,0xa2fd5fa2,0xafea45af,0x9cbf239c,0xa4f753a4,0x7296e472,0xc05b9bc0,0xb7c275b7,0xfd1ce1fd,0x93ae3d93,0x266a4c26,0x365a6c36,0x3f417e3f,0xf702f5f7,0xcc4f83cc,0x345c6834,0xa5f451a5,0xe534d1e5,0xf108f9f1,0x7193e271,0xd873abd8,0x31536231,0x153f2a15,0x40c0804,0xc75295c7,0x23654623,0xc35e9dc3,0x18283018,0x96a13796,0x50f0a05,0x9ab52f9a,0x7090e07,0x12362412,0x809b1b80,0xe23ddfe2,0xeb26cdeb,0x27694e27,0xb2cd7fb2,0x759fea75,0x91b1209,0x839e1d83,0x2c74582c,0x1a2e341a,0x1b2d361b,0x6eb2dc6e,0x5aeeb45a,0xa0fb5ba0,0x52f6a452,0x3b4d763b,0xd661b7d6,0xb3ce7db3,0x297b5229,0xe33edde3,0x2f715e2f,0x84971384,0x53f5a653,0xd168b9d1,0,0xed2cc1ed,0x20604020,0xfc1fe3fc,0xb1c879b1,0x5bedb65b,0x6abed46a,0xcb468dcb,0xbed967be,0x394b7239,0x4ade944a,0x4cd4984c,0x58e8b058,0xcf4a85cf,0xd06bbbd0,0xef2ac5ef,0xaae54faa,0xfb16edfb,0x43c58643,0x4dd79a4d,0x33556633,0x85941185,0x45cf8a45,0xf910e9f9,0x2060402,0x7f81fe7f,0x50f0a050,0x3c44783c,0x9fba259f,0xa8e34ba8,0x51f3a251,0xa3fe5da3,0x40c08040,0x8f8a058f,0x92ad3f92,0x9dbc219d,0x38487038,0xf504f1f5,0xbcdf63bc,0xb6c177b6,0xda75afda,0x21634221,0x10302010,0xff1ae5ff,0xf30efdf3,0xd26dbfd2,0xcd4c81cd,0xc14180c,0x13352613,0xec2fc3ec,0x5fe1be5f,0x97a23597,0x44cc8844,0x17392e17,0xc45793c4,0xa7f255a7,0x7e82fc7e,0x3d477a3d,0x64acc864,0x5de7ba5d,0x192b3219,0x7395e673,0x60a0c060,0x81981981,0x4fd19e4f,0xdc7fa3dc,0x22664422,0x2a7e542a,0x90ab3b90,0x88830b88,0x46ca8c46,0xee29c7ee,0xb8d36bb8,0x143c2814,0xde79a7de,0x5ee2bc5e,0xb1d160b,0xdb76addb,0xe03bdbe0,0x32566432,0x3a4e743a,0xa1e140a,0x49db9249,0x60a0c06,0x246c4824,0x5ce4b85c,0xc25d9fc2,0xd36ebdd3,0xacef43ac,0x62a6c462,0x91a83991,0x95a43195,0xe437d3e4,0x798bf279,0xe732d5e7,0xc8438bc8,0x37596e37,0x6db7da6d,0x8d8c018d,0xd564b1d5,0x4ed29c4e,0xa9e049a9,0x6cb4d86c,0x56faac56,0xf407f3f4,0xea25cfea,0x65afca65,0x7a8ef47a,0xaee947ae,0x8181008,0xbad56fba,0x7888f078,0x256f4a25,0x2e725c2e,0x1c24381c,0xa6f157a6,0xb4c773b4,0xc65197c6,0xe823cbe8,0xdd7ca1dd,0x749ce874,0x1f213e1f,0x4bdd964b,0xbddc61bd,0x8b860d8b,0x8a850f8a,0x7090e070,0x3e427c3e,0xb5c471b5,0x66aacc66,0x48d89048,0x3050603,0xf601f7f6,0xe121c0e,0x61a3c261,0x355f6a35,0x57f9ae57,0xb9d069b9,0x86911786,0xc15899c1,0x1d273a1d,0x9eb9279e,0xe138d9e1,0xf813ebf8,0x98b32b98,0x11332211,0x69bbd269,0xd970a9d9,0x8e89078e,0x94a73394,0x9bb62d9b,0x1e223c1e,0x87921587,0xe920c9e9,0xce4987ce,0x55ffaa55,0x28785028,0xdf7aa5df,0x8c8f038c,0xa1f859a1,0x89800989,0xd171a0d,0xbfda65bf,0xe631d7e6,0x42c68442,0x68b8d068,0x41c38241,0x99b02999,0x2d775a2d,0xf111e0f,0xb0cb7bb0,0x54fca854,0xbbd66dbb,0x163a2c16],p=[0x6363a5c6,0x7c7c84f8,0x777799ee,0x7b7b8df6,0xf2f20dff,0x6b6bbdd6,0x6f6fb1de,0xc5c55491,0x30305060,0x1010302,0x6767a9ce,0x2b2b7d56,0xfefe19e7,0xd7d762b5,0xababe64d,0x76769aec,0xcaca458f,0x82829d1f,0xc9c94089,0x7d7d87fa,0xfafa15ef,0x5959ebb2,0x4747c98e,0xf0f00bfb,0xadadec41,0xd4d467b3,0xa2a2fd5f,0
4xafafea45,0x9c9cbf23,0xa4a4f753,0x727296e4,0xc0c05b9b,0xb7b7c275,0xfdfd1ce1,0x9393ae3d,0x26266a4c,0x36365a6c,0x3f3f417e,0xf7f702f5,0xcccc4f83,0x34345c68,0xa5a5f451,0xe5e534d1,0xf1f108f9,0x717193e2,0xd8d873ab,0x31315362,0x15153f2a,0x4040c08,0xc7c75295,0x23236546,0xc3c35e9d,0x18182830,0x9696a137,0x5050f0a,0x9a9ab52f,0x707090e,0x12123624,0x80809b1b,0xe2e23ddf,0xebeb26cd,0x2727694e,0xb2b2cd7f,0x75759fea,0x9091b12,0x83839e1d,0x2c2c7458,0x1a1a2e34,0x1b1b2d36,0x6e6eb2dc,0x5a5aeeb4,0xa0a0fb5b,0x5252f6a4,0x3b3b4d76,0xd6d661b7,0xb3b3ce7d,0x29297b52,0xe3e33edd,0x2f2f715e,0x84849713,0x5353f5a6,0xd1d168b9,0,0xeded2cc1,0x20206040,0xfcfc1fe3,0xb1b1c879,0x5b5bedb6,0x6a6abed4,0xcbcb468d,0xbebed967,0x39394b72,0x4a4ade94,0x4c4cd498,0x5858e8b0,0xcfcf4a85,0xd0d06bbb,0xefef2ac5,0xaaaae54f,0xfbfb16ed,0x4343c586,0x4d4dd79a,0x33335566,0x85859411,0x4545cf8a,0xf9f910e9,0x2020604,0x7f7f81fe,0x5050f0a0,0x3c3c4478,0x9f9fba25,0xa8a8e34b,0x5151f3a2,0xa3a3fe5d,0x4040c080,0x8f8f8a05,0x9292ad3f,0x9d9dbc21,0x38384870,0xf5f504f1,0xbcbcdf63,0xb6b6c177,0xdada75af,0x21216342,0x10103020,0xffff1ae5,0xf3f30efd,0xd2d26dbf,0xcdcd4c81,0xc0c1418,0x13133526,0xecec2fc3,0x5f5fe1be,0x9797a235,0x4444cc88,0x1717392e,0xc4c45793,0xa7a7f255,0x7e7e82fc,0x3d3d477a,0x6464acc8,0x5d5de7ba,0x19192b32,0x737395e6,0x6060a0c0,0x81819819,0x4f4fd19e,0xdcdc7fa3,0x22226644,0x2a2a7e54,0x9090ab3b,0x8888830b,0x4646ca8c,0xeeee29c7,0xb8b8d36b,0x14143c28,0xdede79a7,0x5e5ee2bc,0xb0b1d16,0xdbdb76ad,0xe0e03bdb,0x32325664,0x3a3a4e74,0xa0a1e14,0x4949db92,0x6060a0c,0x24246c48,0x5c5ce4b8,0xc2c25d9f,0xd3d36ebd,0xacacef43,0x6262a6c4,0x9191a839,0x9595a431,0xe4e437d3,0x79798bf2,0xe7e732d5,0xc8c8438b,0x3737596e,0x6d6db7da,0x8d8d8c01,0xd5d564b1,0x4e4ed29c,0xa9a9e049,0x6c6cb4d8,0x5656faac,0xf4f407f3,0xeaea25cf,0x6565afca,0x7a7a8ef4,0xaeaee947,0x8081810,0xbabad56f,0x787888f0,0x25256f4a,0x2e2e725c,0x1c1c2438,0xa6a6f157,0xb4b4c773,0xc6c65197,0xe8e823cb,0xdddd7ca1,0x74749ce8,0x1f1f213e,0x4b4bdd96,0xbdbddc61,0x8b8b860d,0x8a8a850f,0x707090e0,0x3e3e427c,0xb5b5c471,0x6666aacc,0x4848d890,0x3030506,0xf6f601f7,0xe0e121c,0x6161a3c2,0x35355f6a,0x5757f9ae,0xb9b9d069,0x86869117,0xc1c15899,0x1d1d273a,0x9e9eb927,0xe1e138d9,0xf8f813eb,0x9898b32b,0x11113322,0x6969bbd2,0xd9d970a9,0x8e8e8907,0x9494a733,0x9b9bb62d,0x1e1e223c,0x87879215,0xe9e920c9,0xcece4987,0x5555ffaa,0x28287850,0xdfdf7aa5,0x8c8c8f03,0xa1a1f859,0x89898009,0xd0d171a,0xbfbfda65,0xe6e631d7,0x4242c684,0x6868b8d0,0x4141c382,0x9999b029,0x2d2d775a,0xf0f111e,0xb0b0cb7b,0x5454fca8,0xbbbbd66d,0x16163a2c],g=[0x51f4a750,0x7e416553,0x1a17a4c3,0x3a275e96,0x3bab6bcb,0x1f9d45f1,0xacfa58ab,0x4be30393,0x2030fa55,0xad766df6,0x88cc7691,0xf5024c25,0x4fe5d7fc,0xc52acbd7,0x26354480,0xb562a38f,0xdeb15a49,0x25ba1b67,0x45ea0e98,0x5dfec0e1,0xc32f7502,0x814cf012,0x8d4697a3,0x6bd3f9c6,0x38f5fe7,0x15929c95,0xbf6d7aeb,0x955259da,0xd4be832d,0x587421d3,0x49e06929,0x8ec9c844,0x75c2896a,0xf48e7978,0x99583e6b,0x27b971dd,0xbee14fb6,0xf088ad17,0xc920ac66,0x7dce3ab4,0x63df4a18,0xe51a3182,0x97513360,0x62537f45,0xb16477e0,0xbb6bae84,0xfe81a01c,0xf9082b94,0x70486858,0x8f45fd19,0x94de6c87,0x527bf8b7,0xab73d323,0x724b02e2,0xe31f8f57,0x6655ab2a,0xb2eb2807,0x2fb5c203,0x86c57b9a,0xd33708a5,0x302887f2,0x23bfa5b2,0x2036aba,0xed16825c,0x8acf1c2b,0xa779b492,0xf307f2f0,0x4e69e2a1,0x65daf4cd,0x605bed5,0xd134621f,0xc4a6fe8a,0x342e539d,0xa2f355a0,0x58ae132,0xa4f6eb75,0xb83ec39,0x4060efaa,0x5e719f06,0xbd6e1051,0x3e218af9,0x96dd063d,0xdd3e05ae,0x4de6bd46,0x91548db5,0x71c45d05,0x406d46f,0x605015ff,0x1998fb24,0xd6bde997,0x894043cc,0x67d99e77,0xb0e842bd,0x7898b88,0xe7195b38,0x79c8eedb,0xa17c0a47,0x7c420fe9,0xf8841ec9,0,0x9808683,0x322bed48,0x1e1170ac,0x6c5a724e,0xfd0efffb,0xf853856,0x3daed51e,0x362d3927,0xa0fd964,0x685ca621,0x9b5b54d1,0x24362e3a,0xc0a67b1,0x9357e70f,0xb4ee96d2,0x1b9b919e,0x80c0c54f,0x61dc20a2,0x5a774b69,0x1c121a16,0xe293ba0a,0xc0a02ae5,0x3c22e043,0x121b171d,0xe090d0b,0xf28bc7ad,0x2db6a8b9,0x141ea9c8,0x57f11985,0xaf75074c,0xee99ddbb,0xa37f60fd,0xf701269f,0x5c72f5bc,0x44663bc5,0x5bfb7e34,0x8b432976,0xcb23c6dc,0xb6edfc68,0xb8e4f163,0xd731dcca,0x42638510,0x13972240,0x84c61120,0x854a247d,0xd2bb3df8,0xaef93211,0xc729a16d,0x1d9e2f4b,0xdcb230f3,0xd8652ec,0x77c1e3d0,0x2bb3166c,0xa970b999,0x119448fa,0x47e96422,0xa8fc8cc4,0xa0f03f1a,0x567d2cd8,0x223390ef,0x87494ec7,0xd938d1c1,0x8ccaa2fe,0x98d40b36,0xa6f581cf,0xa57ade28,0xdab78e26,0x3fadbfa4,0x2c3a9de4,0x5078920d,0x6a5fcc9b,0x547e4662,0xf68d13c2,0x90d8b8e8,0x2e39f75e,0x82c3aff5,0x9f5d80be,0x69d0937c,0x6fd52da9,0xcf2512b3,0xc8ac993b,0x10187da7,0xe89c636e,0xdb3bbb7b,0xcd267809,0x6e5918f4,0xec9ab701,0x834f9aa8,0xe6956e65,0xaaffe67e,0x21bccf08,0xef15e8e6,0xbae79bd9,0x4a6f36ce,0xea9f09d4,0x29b07cd6,0x31a4b2af,0x2a3f2331,0xc6a59430,0x35a266c0,0x744ebc37,0xfc82caa6,0xe090d0b0,0x33a7d815,0xf104984a,0x41ecdaf7,0x7fcd500e,0x1791f62f,0x764dd68d,0x43efb04d,0xccaa4d54,0xe49604df,0x9ed1b5e3,0x4c6a881b,0xc12c1fb8,0x4665517f,0x9d5eea04,0
4x18c355d,0xfa877473,0xfb0b412e,0xb3671d5a,0x92dbd252,0xe9105633,0x6dd64713,0x9ad7618c,0x37a10c7a,0x59f8148e,0xeb133c89,0xcea927ee,0xb761c935,0xe11ce5ed,0x7a47b13c,0x9cd2df59,0x55f2733f,0x1814ce79,0x73c737bf,0x53f7cdea,0x5ffdaa5b,0xdf3d6f14,0x7844db86,0xcaaff381,0xb968c43e,0x3824342c,0xc2a3405f,0x161dc372,0xbce2250c,0x283c498b,0xff0d9541,0x39a80171,0x80cb3de,0xd8b4e49c,0x6456c190,0x7bcb8461,0xd532b670,0x486c5c74,0xd0b85742],b=[0x5051f4a7,0x537e4165,0xc31a17a4,0x963a275e,0xcb3bab6b,0xf11f9d45,0xabacfa58,0x934be303,0x552030fa,0xf6ad766d,0x9188cc76,0x25f5024c,0xfc4fe5d7,0xd7c52acb,0x80263544,0x8fb562a3,0x49deb15a,0x6725ba1b,0x9845ea0e,0xe15dfec0,0x2c32f75,0x12814cf0,0xa38d4697,0xc66bd3f9,0xe7038f5f,0x9515929c,0xebbf6d7a,0xda955259,0x2dd4be83,0xd3587421,0x2949e069,0x448ec9c8,0x6a75c289,0x78f48e79,0x6b99583e,0xdd27b971,0xb6bee14f,0x17f088ad,0x66c920ac,0xb47dce3a,0x1863df4a,0x82e51a31,0x60975133,0x4562537f,0xe0b16477,0x84bb6bae,0x1cfe81a0,0x94f9082b,0x58704868,0x198f45fd,0x8794de6c,0xb7527bf8,0x23ab73d3,0xe2724b02,0x57e31f8f,0x2a6655ab,0x7b2eb28,0x32fb5c2,0x9a86c57b,0xa5d33708,0xf2302887,0xb223bfa5,0xba02036a,0x5ced1682,0x2b8acf1c,0x92a779b4,0xf0f307f2,0xa14e69e2,0xcd65daf4,0xd50605be,0x1fd13462,0x8ac4a6fe,0x9d342e53,0xa0a2f355,0x32058ae1,0x75a4f6eb,0x390b83ec,0xaa4060ef,0x65e719f,0x51bd6e10,0xf93e218a,0x3d96dd06,0xaedd3e05,0x464de6bd,0xb591548d,0x571c45d,0x6f0406d4,0xff605015,0x241998fb,0x97d6bde9,0xcc894043,0x7767d99e,0xbdb0e842,0x8807898b,0x38e7195b,0xdb79c8ee,0x47a17c0a,0xe97c420f,0xc9f8841e,0,0x83098086,0x48322bed,0xac1e1170,0x4e6c5a72,0xfbfd0eff,0x560f8538,0x1e3daed5,0x27362d39,0x640a0fd9,0x21685ca6,0xd19b5b54,0x3a24362e,0xb10c0a67,0xf9357e7,0xd2b4ee96,0x9e1b9b91,0x4f80c0c5,0xa261dc20,0x695a774b,0x161c121a,0xae293ba,0xe5c0a02a,0x433c22e0,0x1d121b17,0xb0e090d,0xadf28bc7,0xb92db6a8,0xc8141ea9,0x8557f119,0x4caf7507,0xbbee99dd,0xfda37f60,0x9ff70126,0xbc5c72f5,0xc544663b,0x345bfb7e,0x768b4329,0xdccb23c6,0x68b6edfc,0x63b8e4f1,0xcad731dc,0x10426385,0x40139722,0x2084c611,0x7d854a24,0xf8d2bb3d,0x11aef932,0x6dc729a1,0x4b1d9e2f,0xf3dcb230,0xec0d8652,0xd077c1e3,0x6c2bb316,0x99a970b9,0xfa119448,0x2247e964,0xc4a8fc8c,0x1aa0f03f,0xd8567d2c,0xef223390,0xc787494e,0xc1d938d1,0xfe8ccaa2,0x3698d40b,0xcfa6f581,0x28a57ade,0x26dab78e,0xa43fadbf,0xe42c3a9d,0xd507892,0x9b6a5fcc,0x62547e46,0xc2f68d13,0xe890d8b8,0x5e2e39f7,0xf582c3af,0xbe9f5d80,0x7c69d093,0xa96fd52d,0xb3cf2512,0x3bc8ac99,0xa710187d,0x6ee89c63,0x7bdb3bbb,0x9cd2678,0xf46e5918,0x1ec9ab7,0xa8834f9a,0x65e6956e,0x7eaaffe6,0x821bccf,0xe6ef15e8,0xd9bae79b,0xce4a6f36,0xd4ea9f09,0xd629b07c,0xaf31a4b2,0x312a3f23,0x30c6a594,0xc035a266,0x37744ebc,0xa6fc82ca,0xb0e090d0,0x1533a7d8,0x4af10498,0xf741ecda,0xe7fcd50,0x2f1791f6,0x8d764dd6,0x4d43efb0,0x54ccaa4d,0xdfe49604,0xe39ed1b5,0x1b4c6a88,0xb8c12c1f,0x7f466551,0x49d5eea,0x5d018c35,0x73fa8774,0x2efb0b41,0x5ab3671d,0x5292dbd2,0x33e91056,0x136dd647,0x8c9ad761,0x7a37a10c,0x8e59f814,0x89eb133c,0xeecea927,0x35b761c9,0xede11ce5,0x3c7a47b1,0x599cd2df,0x3f55f273,0x791814ce,0xbf73c737,0xea53f7cd,0x5b5ffdaa,0x14df3d6f,0x867844db,0x81caaff3,0x3eb968c4,0x2c382434,0x5fc2a340,0x72161dc3,0xcbce225,0x8b283c49,0x41ff0d95,0x7139a801,0xde080cb3,0x9cd8b4e4,0x906456c1,0x617bcb84,0x70d532b6,0x74486c5c,0x42d0b857],m=[0xa75051f4,0x65537e41,0xa4c31a17,0x5e963a27,0x6bcb3bab,0x45f11f9d,0x58abacfa,0x3934be3,0xfa552030,0x6df6ad76,0x769188cc,0x4c25f502,0xd7fc4fe5,0xcbd7c52a,0x44802635,0xa38fb562,0x5a49deb1,0x1b6725ba,0xe9845ea,0xc0e15dfe,0x7502c32f,0xf012814c,0x97a38d46,0xf9c66bd3,0x5fe7038f,0x9c951592,0x7aebbf6d,0x59da9552,0x832dd4be,0x21d35874,0x692949e0,0xc8448ec9,0x896a75c2,0x7978f48e,1047239e3,0x71dd27b9,0x4fb6bee1,0xad17f088,0xac66c920,0x3ab47dce,0x4a1863df,0x3182e51a,0x33609751,0x7f456253,0x77e0b164,0xae84bb6b,0xa01cfe81,0x2b94f908,0x68587048,0xfd198f45,0x6c8794de,0xf8b7527b,0xd323ab73,0x2e2724b,0x8f57e31f,0xab2a6655,0x2807b2eb,0xc2032fb5,0x7b9a86c5,0x8a5d337,0x87f23028,0xa5b223bf,0x6aba0203,0x825ced16,0x1c2b8acf,0xb492a779,0xf2f0f307,0xe2a14e69,0xf4cd65da,0xbed50605,0x621fd134,0xfe8ac4a6,0x539d342e,0x55a0a2f3,0xe132058a,0xeb75a4f6,0xec390b83,0xefaa4060,0x9f065e71,0x1051bd6e,0x8af93e21,0x63d96dd,0x5aedd3e,0xbd464de6,0x8db59154,0x5d0571c4,0xd46f0406,0x15ff6050,0xfb241998,0xe997d6bd,0x43cc8940,0x9e7767d9,0x42bdb0e8,0x8b880789,0x5b38e719,0xeedb79c8,0xa47a17c,0xfe97c42,0x1ec9f884,0,0x86830980,0xed48322b,0x70ac1e11,0x724e6c5a,0xfffbfd0e,0x38560f85,0xd51e3dae,0x3927362d,0xd9640a0f,0xa621685c,0x54d19b5b,0x2e3a2436,0x67b10c0a,0xe70f9357,0x96d2b4ee,0x919e1b9b,0xc54f80c0,0x20a261dc,0x4b695a77,0x1a161c12,0xba0ae293,0x2ae5c0a0,0xe0433c22,0x171d121b,0xd0b0e09,0xc7adf28b,0xa8b92db6,0xa9c8141e,0x198557f
41,0x74caf75,0xddbbee99,0x60fda37f,0x269ff701,0xf5bc5c72,0x3bc54466,0x7e345bfb,0x29768b43,0xc6dccb23,0xfc68b6ed,0xf163b8e4,0xdccad731,0x85104263,0x22401397,0x112084c6,0x247d854a,0x3df8d2bb,0x3211aef9,0xa16dc729,0x2f4b1d9e,0x30f3dcb2,0x52ec0d86,0xe3d077c1,0x166c2bb3,0xb999a970,0x48fa1194,0x642247e9,0x8cc4a8fc,0x3f1aa0f0,0x2cd8567d,0x90ef2233,0x4ec78749,0xd1c1d938,0xa2fe8cca,0xb3698d4,0x81cfa6f5,0xde28a57a,0x8e26dab7,0xbfa43fad,0x9de42c3a,0x920d5078,0xcc9b6a5f,0x4662547e,0x13c2f68d,0xb8e890d8,0xf75e2e39,0xaff582c3,0x80be9f5d,0x937c69d0,0x2da96fd5,0x12b3cf25,0x993bc8ac,0x7da71018,0x636ee89c,0xbb7bdb3b,0x7809cd26,0x18f46e59,0xb701ec9a,0x9aa8834f,0x6e65e695,0xe67eaaff,0xcf0821bc,0xe8e6ef15,0x9bd9bae7,0x36ce4a6f,0x9d4ea9f,0x7cd629b0,0xb2af31a4,0x23312a3f,0x9430c6a5,0x66c035a2,0xbc37744e,0xcaa6fc82,0xd0b0e090,0xd81533a7,0x984af104,0xdaf741ec,0x500e7fcd,0xf62f1791,0xd68d764d,0xb04d43ef,0x4d54ccaa,0x4dfe496,0xb5e39ed1,0x881b4c6a,0x1fb8c12c,0x517f4665,0xea049d5e,0x355d018c,0x7473fa87,0x412efb0b,0x1d5ab367,0xd25292db,0x5633e910,0x47136dd6,0x618c9ad7,0xc7a37a1,0x148e59f8,0x3c89eb13,0x27eecea9,0xc935b761,0xe5ede11c,0xb13c7a47,0xdf599cd2,0x733f55f2,0xce791814,0x37bf73c7,0xcdea53f7,0xaa5b5ffd,0x6f14df3d,0xdb867844,0xf381caaf,0xc43eb968,0x342c3824,0x405fc2a3,0xc372161d,0x250cbce2,0x498b283c,0x9541ff0d,0x17139a8,0xb3de080c,0xe49cd8b4,0xc1906456,0x84617bcb,0xb670d532,0x5c74486c,0x5742d0b8],y=[0xf4a75051,0x4165537e,0x17a4c31a,0x275e963a,0xab6bcb3b,0x9d45f11f,0xfa58abac,0xe303934b,0x30fa5520,0x766df6ad,0xcc769188,0x24c25f5,0xe5d7fc4f,0x2acbd7c5,0x35448026,0x62a38fb5,0xb15a49de,0xba1b6725,0xea0e9845,0xfec0e15d,0x2f7502c3,0x4cf01281,0x4697a38d,0xd3f9c66b,0x8f5fe703,0x929c9515,0x6d7aebbf,0x5259da95,0xbe832dd4,0x7421d358,0xe0692949,0xc9c8448e,0xc2896a75,0x8e7978f4,0x583e6b99,0xb971dd27,0xe14fb6be,0x88ad17f0,0x20ac66c9,0xce3ab47d,0xdf4a1863,0x1a3182e5,0x51336097,0x537f4562,0x6477e0b1,0x6bae84bb,0x81a01cfe,0x82b94f9,0x48685870,0x45fd198f,0xde6c8794,0x7bf8b752,0x73d323ab,0x4b02e272,0x1f8f57e3,0x55ab2a66,0xeb2807b2,0xb5c2032f,0xc57b9a86,0x3708a5d3,679998e3,0xbfa5b223,0x36aba02,0x16825ced,0xcf1c2b8a,0x79b492a7,0x7f2f0f3,0x69e2a14e,0xdaf4cd65,0x5bed506,0x34621fd1,0xa6fe8ac4,0x2e539d34,0xf355a0a2,0x8ae13205,0xf6eb75a4,0x83ec390b,0x60efaa40,0x719f065e,0x6e1051bd,0x218af93e,0xdd063d96,0x3e05aedd,0xe6bd464d,0x548db591,0xc45d0571,0x6d46f04,0x5015ff60,0x98fb2419,0xbde997d6,0x4043cc89,0xd99e7767,0xe842bdb0,0x898b8807,0x195b38e7,0xc8eedb79,0x7c0a47a1,0x420fe97c,0x841ec9f8,0,0x80868309,0x2bed4832,0x1170ac1e,0x5a724e6c,0xefffbfd,0x8538560f,0xaed51e3d,0x2d392736,0xfd9640a,0x5ca62168,0x5b54d19b,0x362e3a24,0xa67b10c,0x57e70f93,0xee96d2b4,0x9b919e1b,0xc0c54f80,0xdc20a261,0x774b695a,0x121a161c,0x93ba0ae2,0xa02ae5c0,0x22e0433c,0x1b171d12,0x90d0b0e,0x8bc7adf2,0xb6a8b92d,0x1ea9c814,0xf1198557,0x75074caf,0x99ddbbee,0x7f60fda3,0x1269ff7,0x72f5bc5c,0x663bc544,0xfb7e345b,0x4329768b,0x23c6dccb,0xedfc68b6,0xe4f163b8,0x31dccad7,0x63851042,0x97224013,0xc6112084,0x4a247d85,0xbb3df8d2,0xf93211ae,0x29a16dc7,0x9e2f4b1d,0xb230f3dc,0x8652ec0d,0xc1e3d077,0xb3166c2b,0x70b999a9,0x9448fa11,0xe9642247,0xfc8cc4a8,0xf03f1aa0,0x7d2cd856,0x3390ef22,0x494ec787,0x38d1c1d9,0xcaa2fe8c,0xd40b3698,0xf581cfa6,0x7ade28a5,0xb78e26da,0xadbfa43f,0x3a9de42c,0x78920d50,0x5fcc9b6a,0x7e466254,0x8d13c2f6,0xd8b8e890,0x39f75e2e,0xc3aff582,0x5d80be9f,0xd0937c69,0xd52da96f,0x2512b3cf,0xac993bc8,0x187da710,0x9c636ee8,0x3bbb7bdb,0x267809cd,0x5918f46e,0x9ab701ec,0x4f9aa883,0x956e65e6,0xffe67eaa,0xbccf0821,0x15e8e6ef,0xe79bd9ba,0x6f36ce4a,0x9f09d4ea,0xb07cd629,0xa4b2af31,0x3f23312a,0xa59430c6,0xa266c035,0x4ebc3774,0x82caa6fc,0x90d0b0e0,0xa7d81533,0x4984af1,0xecdaf741,0xcd500e7f,0x91f62f17,0x4dd68d76,0xefb04d43,0xaa4d54cc,0x9604dfe4,0xd1b5e39e,0x6a881b4c,0x2c1fb8c1,0x65517f46,0x5eea049d,0x8c355d01,0x877473fa,0xb412efb,0x671d5ab3,0xdbd25292,0x105633e9,0
4xd647136d,0xd7618c9a,0xa10c7a37,0xf8148e59,0x133c89eb,0xa927eece,0x61c935b7,0x1ce5ede1,0x47b13c7a,0xd2df599c,0xf2733f55,0x14ce7918,0xc737bf73,0xf7cdea53,0xfdaa5b5f,0x3d6f14df,0x44db8678,0xaff381ca,0x68c43eb9,0x24342c38,0xa3405fc2,0x1dc37216,0xe2250cbc,0x3c498b28,0xd9541ff,0xa8017139,0xcb3de08,0xb4e49cd8,0x56c19064,0xcb84617b,0x32b670d5,0x6c5c7448,0xb85742d0],x=[0,0xe090d0b,0x1c121a16,0x121b171d,0x3824342c,0x362d3927,0x24362e3a,0x2a3f2331,0x70486858,0x7e416553,0x6c5a724e,0x62537f45,0x486c5c74,0x4665517f,0x547e4662,0x5a774b69,0xe090d0b0,0xee99ddbb,0xfc82caa6,0xf28bc7ad,0xd8b4e49c,0xd6bde997,0xc4a6fe8a,0xcaaff381,0x90d8b8e8,0x9ed1b5e3,0x8ccaa2fe,0x82c3aff5,0xa8fc8cc4,0xa6f581cf,0xb4ee96d2,0xbae79bd9,0xdb3bbb7b,0xd532b670,0xc729a16d,0xc920ac66,0xe31f8f57,0xed16825c,0xff0d9541,0xf104984a,0xab73d323,0xa57ade28,0xb761c935,0xb968c43e,0x9357e70f,0x9d5eea04,0x8f45fd19,0x814cf012,0x3bab6bcb,0x35a266c0,0x27b971dd,0x29b07cd6,0x38f5fe7,0xd8652ec,0x1f9d45f1,0x119448fa,0x4be30393,0x45ea0e98,0x57f11985,0x59f8148e,0x73c737bf,0x7dce3ab4,0x6fd52da9,0x61dc20a2,0xad766df6,0xa37f60fd,0xb16477e0,0xbf6d7aeb,0x955259da,0x9b5b54d1,0x894043cc,0x87494ec7,0xdd3e05ae,0xd33708a5,0xc12c1fb8,0xcf2512b3,0xe51a3182,0xeb133c89,0xf9082b94,0xf701269f,0x4de6bd46,0x43efb04d,0x51f4a750,0x5ffdaa5b,0x75c2896a,0x7bcb8461,0x69d0937c,0x67d99e77,0x3daed51e,0x33a7d815,0x21bccf08,0x2fb5c203,0x58ae132,0xb83ec39,0x1998fb24,0x1791f62f,0x764dd68d,0x7844db86,0x6a5fcc9b,0x6456c190,0x4e69e2a1,0x4060efaa,0x527bf8b7,0x5c72f5bc,0x605bed5,0x80cb3de,0x1a17a4c3,0x141ea9c8,0x3e218af9,0x302887f2,0x223390ef,0x2c3a9de4,0x96dd063d,0x98d40b36,0x8acf1c2b,0x84c61120,0xaef93211,0xa0f03f1a,0xb2eb2807,0xbce2250c,0xe6956e65,0xe89c636e,0xfa877473,0xf48e7978,0xdeb15a49,0xd0b85742,0xc2a3405f,0xccaa4d54,0x41ecdaf7,0x4fe5d7fc,0x5dfec0e1,0x53f7cdea,0x79c8eedb,0x77c1e3d0,0x65daf4cd,0x6bd3f9c6,0x31a4b2af,0x3fadbfa4,0x2db6a8b9,0x23bfa5b2,0x9808683,0x7898b88,0x15929c95,0x1b9b919e,0xa17c0a47,0xaf75074c,0xbd6e1051,0xb3671d5a,0x99583e6b,0x97513360,0x854a247d,0x8b432976,0xd134621f,0xdf3d6f14,0xcd267809,0xc32f7502,0xe9105633,0xe7195b38,0xf5024c25,0xfb0b412e,0x9ad7618c,0x94de6c87,0x86c57b9a,0x88cc7691,0xa2f355a0,0xacfa58ab,0xbee14fb6,0xb0e842bd,0xea9f09d4,0xe49604df,0xf68d13c2,0xf8841ec9,0xd2bb3df8,0xdcb230f3,0xcea927ee,0xc0a02ae5,0x7a47b13c,0x744ebc37,0x6655ab2a,0x685ca621,0x42638510,0x4c6a881b,0x5e719f06,0x5078920d,0xa0fd964,0x406d46f,0x161dc372,0x1814ce79,0x322bed48,0x3c22e043,0x2e39f75e,0x2030fa55,0xec9ab701,0xe293ba0a,0xf088ad17,0xfe81a01c,0xd4be832d,0xdab78e26,0xc8ac993b,0xc6a59430,0x9cd2df59,0x92dbd252,0x80c0c54f,0x8ec9c844,0xa4f6eb75,0xaaffe67e,0xb8e4f163,0xb6edfc68,0xc0a67b1,0x2036aba,0x10187da7,0x1e1170ac,0x342e539d,0x3a275e96,0x283c498b,0x26354480,0x7c420fe9,0x724b02e2,0x605015ff,0x6e5918f4,0x44663bc5,0x4a6f36ce,0x587421d3,0x567d2cd8,0x37a10c7a,0x39a80171,0x2bb3166c,0x25ba1b67,0xf853856,0x18c355d,0x13972240,0x1d9e2f4b,0x47e96422,0x49e06929,0x5bfb7e34,0x55f2733f,0x7fcd500e,0x71c45d05,0x63df4a18,0x6dd64713,0xd731dcca,0xd938d1c1,0xcb23c6dc,0xc52acbd7,0xef15e8e6,0xe11ce5ed,0xf307f2f0,0xfd0efffb,0xa779b492,0xa970b999,0xbb6bae84,0xb562a38f,0x9f5d80be,0x91548db5,0x834f9aa8,0x8d4697a3],w=[0,0xb0e090d,0x161c121a,0x1d121b17,0x2c382434,0x27362d39,0x3a24362e,0x312a3f23,0x58704868,0x537e4165,0x4e6c5a72,0x4562537f,0x74486c5c,0x7f466551,0x62547e46,0x695a774b,0xb0e090d0,0xbbee99dd,0xa6fc82ca,0xadf28bc7,0x9cd8b4e4,0x97d6bde9,0x8ac4a6fe,0x81caaff3,0xe890d8b8,0xe39ed1b5,0xfe8ccaa2,0xf582c3af,0xc4a8fc8c,0xcfa6f581,0xd2b4ee96,0xd9bae79b,0x7bdb3bbb,0x70d532b6,0x6dc729a1,0x66c920ac,0x57e31f8f,0x5ced1682,0x41ff0d95,0x4af10498,0x23ab73d3,0x28a57ade,0x35b761c9,0x3eb968c4,0xf9357e7,0x49d5eea,0x198f45fd,0x12814cf0,0xcb3bab6b,0xc035a266,0xdd27b971,0xd629b07c,0xe7038f5f,0xec0d8652,0xf11f9d45,0xfa119448,0x934be303,0x9845ea0e,0x8557f119,0x8e59f814,0xbf73c737,0xb47dce3a,0xa96fd52d,0xa261dc20,0xf6ad766d,0xfda37f60,0xe0b16477,0xebbf6d7a,0xda955259,0xd19b5b54,0xcc894043,0xc787494e,0xaedd3e05,0xa5d33708,0xb8c12c1f,0xb3cf2512,0x82e51a31,0x89eb133c,0x94f9082b,0x9ff70126,0x464de6bd,0x4d43efb0,0x5051f4a7,0x5b5ffdaa,0x6a75c289,0x617bcb84,0x7c69d093,0x7767d99e,0x1e3daed5,0x1533a7d8,0x821bccf,0x32fb5c2,0x32058ae1,0x390b83ec,0x241998fb,0x2f1791f6,0x8d764dd6,0x867844db,0x9b6a5fcc,0x906456c1,
40xa14e69e2,0xaa4060ef,0xb7527bf8,0xbc5c72f5,0xd50605be,0xde080cb3,0xc31a17a4,0xc8141ea9,0xf93e218a,0xf2302887,0xef223390,0xe42c3a9d,0x3d96dd06,0x3698d40b,0x2b8acf1c,0x2084c611,0x11aef932,0x1aa0f03f,0x7b2eb28,0xcbce225,0x65e6956e,0x6ee89c63,0x73fa8774,0x78f48e79,0x49deb15a,0x42d0b857,0x5fc2a340,0x54ccaa4d,0xf741ecda,0xfc4fe5d7,0xe15dfec0,0xea53f7cd,0xdb79c8ee,0xd077c1e3,0xcd65daf4,0xc66bd3f9,0xaf31a4b2,0xa43fadbf,0xb92db6a8,0xb223bfa5,0x83098086,0x8807898b,0x9515929c,0x9e1b9b91,0x47a17c0a,0x4caf7507,0x51bd6e10,0x5ab3671d,0x6b99583e,0x60975133,0x7d854a24,0x768b4329,0x1fd13462,0x14df3d6f,0x9cd2678,0x2c32f75,0x33e91056,0x38e7195b,0x25f5024c,0x2efb0b41,0x8c9ad761,0x8794de6c,0x9a86c57b,0x9188cc76,0xa0a2f355,0xabacfa58,0xb6bee14f,0xbdb0e842,0xd4ea9f09,0xdfe49604,0xc2f68d13,0xc9f8841e,0xf8d2bb3d,0xf3dcb230,0xeecea927,0xe5c0a02a,0x3c7a47b1,0x37744ebc,0x2a6655ab,0x21685ca6,0x10426385,0x1b4c6a88,0x65e719f,0xd507892,0x640a0fd9,0x6f0406d4,0x72161dc3,0x791814ce,0x48322bed,0x433c22e0,0x5e2e39f7,0x552030fa,0x1ec9ab7,0xae293ba,0x17f088ad,0x1cfe81a0,0x2dd4be83,0x26dab78e,0x3bc8ac99,0x30c6a594,0x599cd2df,0x5292dbd2,0x4f80c0c5,0x448ec9c8,0x75a4f6eb,0x7eaaffe6,0x63b8e4f1,0x68b6edfc,0xb10c0a67,0xba02036a,0xa710187d,0xac1e1170,0x9d342e53,0x963a275e,0x8b283c49,0x80263544,0xe97c420f,0xe2724b02,0xff605015,0xf46e5918,0xc544663b,0xce4a6f36,0xd3587421,0xd8567d2c,0x7a37a10c,0x7139a801,0x6c2bb316,0x6725ba1b,0x560f8538,0x5d018c35,0x40139722,0x4b1d9e2f,0x2247e964,0x2949e069,0x345bfb7e,0x3f55f273,0xe7fcd50,0x571c45d,0x1863df4a,0x136dd647,0xcad731dc,0xc1d938d1,0xdccb23c6,0xd7c52acb,0xe6ef15e8,0xede11ce5,0xf0f307f2,0xfbfd0eff,0x92a779b4,0x99a970b9,0x84bb6bae,0x8fb562a3,0xbe9f5d80,0xb591548d,0xa8834f9a,0xa38d4697],v=[0,0xd0b0e09,0x1a161c12,0x171d121b,0x342c3824,0x3927362d,0x2e3a2436,0x23312a3f,0x68587048,0x65537e41,0x724e6c5a,0x7f456253,0x5c74486c,0x517f4665,0x4662547e,0x4b695a77,0xd0b0e090,0xddbbee99,0xcaa6fc82,0xc7adf28b,0xe49cd8b4,0xe997d6bd,0xfe8ac4a6,0xf381caaf,0xb8e890d8,0xb5e39ed1,0xa2fe8cca,0xaff582c3,0x8cc4a8fc,0x81cfa6f5,0x96d2b4ee,0x9bd9bae7,0xbb7bdb3b,0xb670d532,0xa16dc729,0xac66c920,0x8f57e31f,0x825ced16,0x9541ff0d,0x984af104,0xd323ab73,0xde28a57a,0xc935b761,0xc43eb968,0xe70f9357,0xea049d5e,0xfd198f45,0xf012814c,0x6bcb3bab,0x66c035a2,0x71dd27b9,0x7cd629b0,0x5fe7038f,0x52ec0d86,0x45f11f9d,0x48fa1194,0x3934be3,0xe9845ea,0x198557f1,0x148e59f8,0x37bf73c7,0x3ab47dce,0x2da96fd5,0x20a261dc,0x6df6ad76,0x60fda37f,0x77e0b164,0x7aebbf6d,0x59da9552,0x54d19b5b,0x43cc8940,0x4ec78749,0x5aedd3e,0x8a5d337,0x1fb8c12c,0x12b3cf25,0x3182e51a,0x3c89eb13,0x2b94f908,0x269ff701,0xbd464de6,0xb04d43ef,0xa75051f4,0xaa5b5ffd,0x896a75c2,0x84617bcb,0x937c69d0,0x9e7767d9,0xd51e3dae,0xd81533a7,0xcf0821bc,0xc2032fb5,0xe132058a,0xec390b83,0xfb241998,0xf62f1791,0xd68d764d,0xdb867844,0xcc9b6a5f,0xc1906456,0xe2a14e69,0xefaa4060,0xf8b7527b,0xf5bc5c72,0xbed50605,0xb3de080c,0xa4c31a17,0xa9c8141e,0x8af93e21,0x87f23028,0x90ef2233,0x9de42c3a,0x63d96dd,0xb3698d4,0x1c2b8acf,0x112084c6,0x3211aef9,0x3f1aa0f0,0x2807b2eb,0x250cbce2,0x6e65e695,0x636ee89c,0x7473fa87,0x7978f48e,0x5a49deb1,0x5742d0b8,0x405fc2a3,0x4d54ccaa,0xdaf741ec,0xd7fc4fe5,0xc0e15dfe,0xcdea53f7,0xeedb79c8,0xe3d077c1,0xf4cd65da,0xf9c66bd3,0xb2af31a4,0xbfa43fad,0xa8b92db6,0xa5b223bf,0x86830980,0x8b880789,0x9c951592,0x919e1b9b,0xa47a17c,0x74caf75,0x1051bd6e,0x1d5ab367,1047239e3,0x33609751,0x247d854a,0x29768b43,0x621fd134,0x6f14df3d,0x7809cd26,0x7502c32f,0x5633e910,0x5b38e719,0x4c25f502,0x412efb0b,0x618c9ad7,0x6c8794de,0x7b9a86c5,0x769188cc,0x55a0a2f3,0x58abacfa,0x4fb6bee1,0x42bdb0e8,0x9d4ea9f,0x4dfe496,0x13c2f68d,0x1ec9f884,0x3df8d2bb,0x30f3dcb2,0x27eecea9,0x2ae5c0a0,0xb13c7a47,0xbc37744e,0xab2a6655,0xa621685c,0x85104263,0x881b4c6a,0x9f065e71,0x920d5078,0xd9640a0f,0xd46f0406,0xc372161d,0xce791814,0xed48322b,0xe0433c22,0xf75e2e39,0xfa552030,0xb701ec9a,0xba0ae293,0xad17f088,0xa01cfe81,0x832dd4be,0x8e26dab7,0x993bc8ac,0x9430c6a5,0xdf599cd2,0xd25292db,0xc54f80c0,0xc8448ec9,0xeb75a4f6,0xe67eaaff,0xf163b8e4,0xfc68b6ed,0x67b10c0a,0x6aba0203,0x7da71018,0x70ac1e11,0x539d342e,0x5e963a27,0x498b283c,0x44802635,0xfe97c42,0x2e2724b,0x15ff6050,0x18f46e59,0x3bc54466,0x36ce4a6f,0x21d35874,0x2cd8567d,0xc7a37a1,0x17139a8,0x166c2bb3,0x1b6725ba,0x38560f85,0x355d018c,0x22401397,0x2f4b1d9e,0x642247e9,0x692949e0,0x7e345bfb,0x733f55f2,0x500e7fcd,0x5d0571c4,0x4a1863df,0x47136dd6,0xdccad731,0xd1c1d938,0xc6dccb23,0xcbd7c52a,0xe8e6ef15,0xe5ede11c,0xf2f0f307,0xfffbfd0e,0xb492a779,0xb999a970,0xae84bb6b,0xa38fb562,0x80be9f5d,0x8db59154,0x9aa8834f,0x97a38d46],A=[0,0x90d0b0e,0x121a161c,0x1b171d12,0x24342c38,0x2d392736,0x362e3a24,0x3f23312a,0x48685870,0x4165537e,0x5a724e6c,0x537f4562,0x6c5c7448,0x65517f46,0x7e466254,0x774b695a,0x90d0b0e0,0x99ddbbee,0x82caa6fc,0x8bc7adf2,0xb4e49cd8,0xbde997d6,0xa6fe8ac4,0xaff381ca,0xd8b8e890,0xd1b5e39e,0xcaa2fe8c,0xc3aff582,0xfc8cc4a8,0xf581cfa6,0xee96d2b4,0xe79bd9ba,0x3bbb7bdb,0x32b670d5,0x29a16dc7,0x20ac66c9,0x1f8f57e3,0x16825ced,0xd9541ff,0x4984af1,0x73d323ab,0x7ade28a5,0x61c935b7,0x68c43eb9,0x57e70f93,0x5eea049d,0x45fd198f,0x4cf01281,0xab6bcb3b,0xa266c035,0xb971dd27,0xb07cd629,0
4x8f5fe703,0x8652ec0d,0x9d45f11f,0x9448fa11,0xe303934b,0xea0e9845,0xf1198557,0xf8148e59,0xc737bf73,0xce3ab47d,0xd52da96f,0xdc20a261,0x766df6ad,0x7f60fda3,0x6477e0b1,0x6d7aebbf,0x5259da95,0x5b54d19b,0x4043cc89,0x494ec787,0x3e05aedd,0x3708a5d3,0x2c1fb8c1,0x2512b3cf,0x1a3182e5,0x133c89eb,0x82b94f9,0x1269ff7,0xe6bd464d,0xefb04d43,0xf4a75051,0xfdaa5b5f,0xc2896a75,0xcb84617b,0xd0937c69,0xd99e7767,0xaed51e3d,0xa7d81533,0xbccf0821,0xb5c2032f,0x8ae13205,0x83ec390b,0x98fb2419,0x91f62f17,0x4dd68d76,0x44db8678,0x5fcc9b6a,0x56c19064,0x69e2a14e,0x60efaa40,0x7bf8b752,0x72f5bc5c,0x5bed506,0xcb3de08,0x17a4c31a,0x1ea9c814,0x218af93e,679998e3,0x3390ef22,0x3a9de42c,0xdd063d96,0xd40b3698,0xcf1c2b8a,0xc6112084,0xf93211ae,0xf03f1aa0,0xeb2807b2,0xe2250cbc,0x956e65e6,0x9c636ee8,0x877473fa,0x8e7978f4,0xb15a49de,0xb85742d0,0xa3405fc2,0xaa4d54cc,0xecdaf741,0xe5d7fc4f,0xfec0e15d,0xf7cdea53,0xc8eedb79,0xc1e3d077,0xdaf4cd65,0xd3f9c66b,0xa4b2af31,0xadbfa43f,0xb6a8b92d,0xbfa5b223,0x80868309,0x898b8807,0x929c9515,0x9b919e1b,0x7c0a47a1,0x75074caf,0x6e1051bd,0x671d5ab3,0x583e6b99,0x51336097,0x4a247d85,0x4329768b,0x34621fd1,0x3d6f14df,0x267809cd,0x2f7502c3,0x105633e9,0
4x195b38e7,0x24c25f5,0xb412efb,0xd7618c9a,0xde6c8794,0xc57b9a86,0xcc769188,0xf355a0a2,0xfa58abac,0xe14fb6be,0xe842bdb0,0x9f09d4ea,0x9604dfe4,0x8d13c2f6,0x841ec9f8,0xbb3df8d2,0xb230f3dc,0xa927eece,0xa02ae5c0,0x47b13c7a,0x4ebc3774,0x55ab2a66,0x5ca62168,0x63851042,0x6a881b4c,0x719f065e,0x78920d50,0xfd9640a,0x6d46f04,0x1dc37216,0x14ce7918,0x2bed4832,0x22e0433c,0x39f75e2e,0x30fa5520,0x9ab701ec,0x93ba0ae2,0x88ad17f0,0x81a01cfe,0xbe832dd4,0xb78e26da,0xac993bc8,0xa59430c6,0xd2df599c,0xdbd25292,0xc0c54f80,0xc9c8448e,0xf6eb75a4,0xffe67eaa,0xe4f163b8,0xedfc68b6,0xa67b10c,0x36aba02,0x187da710,0x1170ac1e,0x2e539d34,0x275e963a,0x3c498b28,0x35448026,0x420fe97c,0x4b02e272,0x5015ff60,0x5918f46e,0x663bc544,0x6f36ce4a,0x7421d358,0x7d2cd856,0xa10c7a37,0xa8017139,0xb3166c2b,0xba1b6725,0x8538560f,0x8c355d01,0x97224013,0x9e2f4b1d,0xe9642247,0xe0692949,0xfb7e345b,0xf2733f55,0xcd500e7f,0xc45d0571,0xdf4a1863,0xd647136d,0x31dccad7,0x38d1c1d9,0x23c6dccb,0x2acbd7c5,0x15e8e6ef,0x1ce5ede1,0x7f2f0f3,0xefffbfd,0x79b492a7,0x70b999a9,0x6bae84bb,0x62a38fb5,0x5d80be9f,0x548db591,0x4f9aa883,0x4697a38d];function P(e){let t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class E{get key(){return a(this,r,"f").slice()}constructor(e){let t;if(r.set(this,void 0),n.set(this,void 0),i.set(this,void 0),!(this instanceof E))throw Error("AES must be instanitated with `new`");s(this,r,new Uint8Array(e),"f");let u=o[this.key.length];if(null==u)throw TypeError("invalid key size (must be 16, 24 or 32 bytes)");s(this,i,[],"f"),s(this,n,[],"f");for(let e=0;e<=u;e++)a(this,i,"f").push([0,0,0,0]),a(this,n,"f").push([0,0,0,0]);let d=(u+1)*4,f=this.key.length/4,h=P(this.key);for(let e=0;e<f;e++)t=e>>2,a(this,i,"f")[t][e%4]=h[e],a(this,n,"f")[u-t][e%4]=h[e];let p=0,g=f,b;for(;g<d;){if(b=h[f-1],h[0]^=l[b>>16&255]<<24^l[b>>8&255]<<16^l[255&b]<<8^l[b>>24&255]^c[p]<<24,p+=1,8!=f)for(let e=1;e<f;e++)h[e]^=h[e-1];else{for(let e=1;e<f/2;e++)h[e]^=h[e-1];b=h[f/2-1],h[f/2]^=l[255&b]^l[b>>8&255]<<8^l[b>>16&255]<<16^l[b>>24&255]<<24;for(let e=f/2+1;e<f;e++)h[e]^=h[e-1]}let e=0,t,r;for(;e<f&&g<d;)t=g>>2,r=g%4,a(this,i,"f")[t][r]=h[e],a(this,n,"f")[u-t][r]=h[e++],g++}for(let e=1;e<u;e++)for(let t=0;t<4;t++)b=a(this,n,"f")[e][t],a(this,n,"f")[e][t]=x[b>>24&255]^w[b>>16&255]^v[b>>8&255]^A[255&b]}encrypt(e){if(16!=e.length)throw TypeError("invalid plaintext size (must be 16 bytes)");let t=a(this,i,"f").length-1,r=[0,0,0,0],n=P(e);for(let e=0;e<4;e++)n[e]^=a(this,i,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=d[n[t]>>24&255]^f[n[(t+1)%4]>>16&255]^h[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^a(this,i,"f")[e][t];n=r.slice()}let s=new Uint8Array(16),o=0;for(let e=0;e<4;e++)o=a(this,i,"f")[t][e],s[4*e]=(l[n[e]>>24&255]^o>>24)&255,s[4*e+1]=(l[n[(e+1)%4]>>16&255]^o>>16)&255,s[4*e+2]=(l[n[(e+2)%4]>>8&255]^o>>8)&255,s[4*e+3]=(l[255&n[(e+3)%4]]^o)&255;return s}decrypt(e){if(16!=e.length)throw TypeError("invalid ciphertext size (must be 16 bytes)");let t=a(this,n,"f").length-1,r=[0,0,0,0],i=P(e);for(let e=0;e<4;e++)i[e]^=a(this,n,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=g[i[t]>>24&255]^b[i[(t+3)%4]>>16&255]^m[i[(t+2)%4]>>8&255]^y[255&i[(t+1)%4]]^a(this,n,"f")[e][t];i=r.slice()}let s=new Uint8Array(16),o=0;for(let e=0;e<4;e++)o=a(this,n,"f")[t][e],s[4*e]=(u[i[e]>>24&255]^o>>24)&255,s[4*e+1]=(u[i[(e+3)%4]>>16&255]^o>>16)&255,s[4*e+2]=(u[i[(e+2)%4]>>8&255]^o>>8)&255,s[4*e+3]=(u[255&i[(e+1)%4]]^o)&255;return s}}t.AES=E,r=new WeakMap,n=new WeakMap,i=new WeakMap},73853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(68850);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(46768);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var a=r(98191);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return a.CBC}});var s=r(29568);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return s.CFB}});var o=r(35410);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return o.CTR}});var c=r(1567);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return c.ECB}});var l=r(4420);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return l.OFB}});var u=r(8900);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return u.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return u.pkcs7Strip}})},98191:function(e,t,r){"use strict";var n,i,a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)};
4Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;let o=r(46768);class c extends o.ModeOfOperation{constructor(e,t){if(super("ECC",e,c),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw TypeError("invalid iv size (must be 16 bytes)");a(this,n,new Uint8Array(t),"f")}else a(this,n,new Uint8Array(16),"f");a(this,i,this.iv,"f")}get iv(){return new Uint8Array(s(this,n,"f"))}encrypt(e){if(e.length%16)throw TypeError("invalid plaintext size (must be multiple of 16 bytes)");let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){for(let t=0;t<16;t++)s(this,i,"f")[t]^=e[r+t];a(this,i,this.aes.encrypt(s(this,i,"f")),"f"),t.set(s(this,i,"f"),r)}return t}decrypt(e){if(e.length%16)throw TypeError("invalid ciphertext size (must be multiple of 16 bytes)");let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){let n=this.aes.decrypt(e.subarray(r,r+16));for(let a=0;a<16;a++)t[r+a]=n[a]^s(this,i,"f")[a],s(this,i,"f")[a]=e[r+a]}return t}}t.CBC=c,n=new WeakMap,i=new WeakMap},29568:function(e,t,r){"use strict";var n,i,a,s,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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},c=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)};Object.defineProperty(t,"__esModule",{value:!0}),t.CFB=void 0;let l=r(46768);class u extends l.ModeOfOperation{constructor(e,t,r=8){if(super("CFB",e,u),n.add(this),i.set(this,void 0),a.set(this,void 0),!Number.isInteger(r)||r%8)throw TypeError("invalid segmentSize");if(Object.defineProperties(this,{segmentSize:{enumerable:!0,value:r}}),t){if(t.length%16)throw TypeError("invalid iv size (must be 16 bytes)");o(this,i,new Uint8Array(t),"f")}else o(this,i,new Uint8Array(16),"f");o(this,a,this.iv,"f")}get iv(){return new Uint8Array(c(this,i,"f"))}encrypt(e){if(8*e.length%this.segmentSize)throw TypeError("invalid plaintext size (must be multiple of segmentSize bytes)");let t=this.segmentSize/8,r=new Uint8Array(e);for(let e=0;e<r.length;e+=t){let i=this.aes.encrypt(c(this,a,"f"));for(let n=0;n<t;n++)r[e+n]^=i[n];c(this,n,"m",s).call(this,r.subarray(e))}return r}decrypt(e){if(8*e.length%this.segmentSize)throw TypeError("invalid ciphertext size (must be multiple of segmentSize bytes)");let t=this.segmentSize/8,r=new Uint8Array(e);for(let i=0;i<r.length;i+=t){let o=this.aes.encrypt(c(this,a,"f"));for(let e=0;e<t;e++)r[i+e]^=o[e];c(this,n,"m",s).call(this,e.subarray(i))}return r}}t.CFB=u,i=new WeakMap,a=new WeakMap,n=new WeakSet,s=function(e){let t=this.segmentSize/8;c(this,a,"f").set(c(this,a,"f").subarray(t)),c(this,a,"f").set(e.subarray(0,t),16-t)}},35410:function(e,t,r){"use strict";var n,i,a,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)};Object.defineProperty(t,"__esModule",{value:!0}),t.CTR=void 0;let c=r(46768);class l extends c.ModeOfOperation{constructor(e,t){super("CTR",e,l),n.set(this,void 0),i.set(this,void 0),a.set(this,void 0),s(this,a,new Uint8Array(16),"f"),o(this,a,"f").fill(0),s(this,n,o(this,a,"f"),"f"),s(this,i,16,"f"),null==t&&(t=1),"number"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(o(this,a,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)o(this,a,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw TypeError("invalid counter initial Uint8Array value length");o(this,a,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(255===o(this,a,"f")[e])o(this,a,"f")[e]=0;else{o(this,a,"f")[e]++;break}}encrypt(e){var t,r;let c=new Uint8Array(e);for(let e=0;e<c.length;
4e++)16===o(this,i,"f")&&(s(this,n,this.aes.encrypt(o(this,a,"f")),"f"),s(this,i,0,"f"),this.increment()),c[e]^=o(this,n,"f")[s(this,i,(r=o(this,i,"f"),t=r++,r),"f"),t];return c}decrypt(e){return this.encrypt(e)}}t.CTR=l,n=new WeakMap,i=new WeakMap,a=new WeakMap},1567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;let n=r(46768);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw TypeError("invalid plaintext size (must be multiple of 16 bytes)");let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.encrypt(e.subarray(r,r+16)),r);return t}decrypt(e){if(e.length%16)throw TypeError("invalid ciphertext size (must be multiple of 16 bytes)");let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.decrypt(e.subarray(r,r+16)),r);return t}}t.ECB=i},4420:function(e,t,r){"use strict";var n,i,a,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)};Object.defineProperty(t,"__esModule",{value:!0}),t.OFB=void 0;let c=r(46768);class l extends c.ModeOfOperation{constructor(e,t){if(super("OFB",e,l),n.set(this,void 0),i.set(this,void 0),a.set(this,void 0),t){if(t.length%16)throw TypeError("invalid iv size (must be 16 bytes)");s(this,n,new Uint8Array(t),"f")}else s(this,n,new Uint8Array(16),"f");s(this,i,this.iv,"f"),s(this,a,16,"f")}get iv(){return new Uint8Array(o(this,n,"f"))}encrypt(e){var t,r;if(e.length%16)throw TypeError("invalid plaintext size (must be multiple of 16 bytes)");let n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===o(this,a,"f")&&(s(this,i,this.aes.encrypt(o(this,i,"f")),"f"),s(this,a,0,"f")),n[e]^=o(this,i,"f")[s(this,a,(r=o(this,a,"f"),t=r++,r),"f"),t];return n}decrypt(e){if(e.length%16)throw TypeError("invalid ciphertext size (must be multiple of 16 bytes)");return this.encrypt(e)}}t.OFB=l,n=new WeakMap,i=new WeakMap,a=new WeakMap},46768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;let n=r(68850);class i{constructor(e,t,r){if(r&&!(this instanceof r))throw Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}t.ModeOfOperation=i},8900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){let t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n<r.length;n++)r[n]=t;return r},t.pkcs7Strip=function(e){if(e.length<16)throw TypeError("PKCS#7 invalid length");let t=e[e.length-1];if(t>16)throw TypeError("PKCS#7 padding byte out of range");let r=e.length-t;for(let n=0;n<t;n++)if(e[r+n]!==t)throw TypeError("PKCS#7 invalid padding byte");return new Uint8Array(e.subarray(0,r))}},41202:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.13.4"},3092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;let n=r(75553),i=r(28539),a=r(58923),s=r(74278),o=r(40603),c=r(9920),l=r(25615),u=r(34016),d=r(57540),f=r(58896),h=r(82361),p=r(51335),g=r(3052),b=r(75553),m=new Map;m.set(0,"GENERIC_PANIC"),m.set(1,"ASSERT_FALSE"),m.set(17,"OVERFLOW"),m.set(18,"DIVIDE_BY_ZERO"),m.set(33,"ENUM_RANGE_ERROR"),m.set(34,"BAD_STORAGE_DATA"),m.set(49,"STACK_UNDERFLOW"),m.set(50,"ARRAY_RANGE_ERROR"),m.set(65,"OUT_OF_MEMORY"),m.set(81,"UNINITIALIZED_FUNCTION_CALL");let y=new RegExp(/^bytes([0-9]*)$/),x=new RegExp(/^(u?int)([0-9]*)$/),w=null,v=1024;class A{#e(e){if(e.isArray())return new s.ArrayCoder(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new h.TupleCoder(e.components.map(e=>this.#e(e)),e.name);switch(e.baseType){case"address":return new a.AddressCoder(e.name);case"bool":return new o.BooleanCoder(e.name);case"string":return new f.StringCoder(e.name);case"bytes":return new c.BytesCoder(e.name);case"":return new u.NullCoder(e.name)}
4let t=e.type.match(x);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new d.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(y)){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new l.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){let t=e.map(e=>this.#e(p.ParamType.from(e)));return new h.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");let r=e.map(e=>this.#e(p.ParamType.from(e))),a=new h.TupleCoder(r,"_"),s=new i.Writer;return a.encode(s,t),s.data}decode(e,t,r){let n=e.map(e=>this.#e(p.ParamType.from(e)));return new h.TupleCoder(n,"_").decode(new i.Reader(t,r,v))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),v=e}static defaultAbiCoder(){return null==w&&(w=new A),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",a=null,s=null;if(r){i="execution reverted";let e=(0,b.getBytes)(r);if(r=(0,b.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,b.hexlify)(e.slice(0,4)))try{a=n.decode(["string"],e.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,b.hexlify)(e.slice(0,4)))try{let t=Number(n.decode(["uint256"],e.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[t]},a=`Panic due to ${m.get(t)||"UNKNOWN"}(${t})`,i+=`: ${a}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}let o={to:t.to?(0,g.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(o.from=(0,g.getAddress)(t.from)),(0,b.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:a,transaction:o,invocation:null,revert:s})}(e,t,r,A.defaultAbiCoder())}}t.AbiCoder=A},85036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;let n=r(75553);t.encodeBytes32String=function(e){let t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){let t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},28539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;let n=r(75553);t.WordSize=32;let i=new Uint8Array(t.WordSize),a=["then"],s={},o=new WeakMap;function c(e){return o.get(e)}function l(e,t){let r=Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}class u extends Array{#t;constructor(...e){var t,r;let i=e[0],u=e[1],d=(e[2]||[]).slice(),f=!0;i!==s&&(u=e,d=[],f=!1),super(u.length),u.forEach((e,t)=>{this[t]=e});let h=d.reduce((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e),new Map);if(t=Object.freeze(u.map((e,t)=>{let r=d[t];return null!=r&&1===h.get(r)?r:null})),o.set(this,t),this.#t=[],null==this.#t&&this.#t,!f)return;Object.freeze(this);let p=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){let r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw RangeError("out of result range");let i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(a.indexOf(t)>=0)return Reflect.get(e,t,r);let i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return r=c(this),o.set(p,r),p}toArray(e){let t=[];return this.forEach((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof u&&(r=r.toArray(e)),t.push(r)}),t}toObject(e){let t=c(this);return t.reduce((r,i,a)=>((0,n.assert)(null!=i,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),function e(t,r,n){return t.indexOf(null)>=0?r.map((t,r)=>t instanceof u?e(c(t),t,n):t):t.reduce((t,i,a)=>{let s=r.getValue(i);return i in t||(n&&s instanceof u&&(s=e(c(s),s,n)),t[i]=s),t},{})}(t,this,e)),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);let r=c(this),n=[],i=[];for(let a=e;a<t;a++)n.push(this[a]),i.push(r[a]);return new u(s,n,i)}filter(e,t){let r=c(this),n=[],i=[];for(let a=0;a<this.length;a++){let s=this[a];s instanceof Error&&l(`index ${a}`,s),e.call(t,s,a,this)&&(n.push(s),i.push(r[a]))}return new u(s,n,i)}map(e,t){let r=[];for(let n=0;n<this.length;n++){let i=this[n];i instanceof Error&&l(`index ${n}`,i),r.push(e.call(t,i,n,this))}return r}getValue(e){let t=c(this).indexOf(e);if(-1===t)return;let r=this[t];return r instanceof Error&&l(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new u(s,e,t)}}function d(e){let r=(0,n.toBeArray)(e);return(0,n.assert)(r.length<=t.WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:r,length:t.WordSize,offset:r.length}),r.length!==t.WordSize&&(r=(0,n.getBytesCopy)((0,n.concat)([i.slice(r.length%t.WordSize),r]))),r}t.Result=u,t.checkResultErrors=function(e){let t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){let a=e.slice();a.push(i);try{r(a,n[i])}catch(e){t.push({path:a,error:e})}}};return r([],e),t};class f{name;type;localName;dynamic;
4constructor(e,t,r,i){(0,n.defineProperties)(this,{name:e,type:t,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){(0,n.assertArgument)(!1,e,this.localName,t)}}t.Coder=f;class h{#r;#n;constructor(){this.#r=[],this.#n=0}get data(){return(0,n.concat)(this.#r)}get length(){return this.#n}#i(e){return this.#r.push(e),this.#n+=e.length,e.length}appendWriter(e){return this.#i((0,n.getBytesCopy)(e.data))}writeBytes(e){let r=(0,n.getBytesCopy)(e),a=r.length%t.WordSize;return a&&(r=(0,n.getBytesCopy)((0,n.concat)([r,i.slice(a)]))),this.#i(r)}writeValue(e){return this.#i(d(e))}writeUpdatableValue(){let e=this.#r.length;return this.#r.push(i),this.#n+=t.WordSize,t=>{this.#r[e]=d(t)}}}t.Writer=h;class p{allowLoose;#r;#a;#s;#o;#c;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#r=(0,n.getBytesCopy)(e),this.#s=0,this.#o=null,this.#c=null!=r?r:1024,this.#a=0}get data(){return(0,n.hexlify)(this.#r)}get dataLength(){return this.#r.length}get consumed(){return this.#a}get bytes(){return new Uint8Array(this.#r)}#l(e){if(this.#o)return this.#o.#l(e);this.#s+=e,(0,n.assert)(this.#c<1||this.#s<=this.#c*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#c} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),offset:this.#a,length:e,info:{bytesRead:this.#s,dataLength:this.dataLength}})}#u(e,r,i){let a=Math.ceil(r/t.WordSize)*t.WordSize;return this.#a+a>this.#r.length&&(this.allowLoose&&i&&this.#a+r<=this.#r.length?a=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#r),length:this.#r.length,offset:this.#a+a})),this.#r.slice(this.#a,this.#a+a)}subReader(e){let t=new p(this.#r.slice(this.#a+e),this.allowLoose,this.#c);return t.#o=this,t}readBytes(e,t){let r=this.#u(0,e,!!t);return this.#l(e),this.#a+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},58923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;let n=r(3052),i=r(30442),a=r(50534),s=r(28539);class o extends s.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=a.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=o},41754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;let n=r(28539);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},74278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;let n=r(75553),i=r(50534),a=r(28539),s=r(41754);function o(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map(t=>{let i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]})}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let s=new a.Writer,o=new a.Writer,c=[];return t.forEach((e,t)=>{let r=i[t];if(e.dynamic){let t=o.length;e.encode(o,r);let n=s.writeUpdatableValue();c.push(e=>{n(e+t)})}else e.encode(s,r)}),c.forEach(e=>{e(s.length)}),e.appendWriter(s)+e.appendWriter(o)}function c(e,t){let r=[],i=[],s=e.subReader(0);return t.forEach(t=>{let a=null;if(t.dynamic){let r=e.readIndex(),i=s.subReader(r);try{a=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;
4(a=e).baseType=t.name,a.name=t.localName,a.type=t.type}}else try{a=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;(a=e).baseType=t.name,a.name=t.localName,a.type=t.type}if(void 0==a)throw Error("investigate");r.push(a),i.push(t.localName||null)}),a.Result.fromItems(r,i)}t.pack=o,t.unpack=c;class l extends a.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){let r=i.Typed.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let a=this.length;-1===a&&(a=r.length,e.writeValue(r.length)),(0,n.assertArgumentCount)(r.length,a,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let e=0;e<r.length;e++)s.push(this.coder);return o(e,s,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),(0,n.assert)(t*a.WordSize<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*a.WordSize,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new s.AnonymousCoder(this.coder));return c(e,r)}}t.ArrayCoder=l},40603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;let n=r(50534),i=r(28539);class a extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){let r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=a},9920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;let n=r(75553),i=r(28539);class a extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){return t=(0,n.getBytesCopy)(t),e.writeValue(t.length)+e.writeBytes(t)}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=a;class s extends a{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}t.BytesCoder=s},25615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;let n=r(75553),i=r(50534),a=r(28539);class s extends a.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=s},34016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;let n=r(28539),i=new Uint8Array([]);class a extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=a},57540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;let n=r(75553),i=r(50534),a=r(28539),s=BigInt(0),o=BigInt(1),c=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class l extends a.Coder{size;signed;constructor(e,t,r){let i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),l=(0,n.mask)(c,8*a.WordSize);if(this.signed){let e=(0,n.mask)(l,8*this.size-1);(r>e||r<-(e+o))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*a.WordSize)}else(r<s||r>(0,n.mask)(l,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=l},58896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;let n=r(26516),i=r(50534),a=r(9920);class s extends a.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=s},82361:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;let n=r(58674),i=r(50534),a=r(28539),s=r(74278);class o extends a.Coder{coders;constructor(e,t){let r=!1,i=[];e.forEach(e=>{e.dynamic&&(r=!0),i.push(e.type)}),super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});return this.coders.forEach((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))}),Object.freeze(e)}encode(e,t){let r=i.Typed.dereference(t,"tuple");return(0,s.pack)(e,this.coders,r)}decode(e){return(0,s.unpack)(e,this.coders)}}t.TupleCoder=o},51335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;let n=r(75553),i=r(45826);function a(e){let t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}let s=a("external public payable override".split(" ")),o="constant external internal payable private public pure view override",c=a(o.split(" ")),l="constructor error event fallback function receive struct",u=a(l.split(" ")),d="calldata memory storage payable indexed",f=a(d.split(" ")),h=a([l,d,"tuple returns",o].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},g=RegExp("^(\\s*)"),b=RegExp("^([0-9]+)"),m=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),y=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),x=RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#a;#d;get offset(){return this.#a}get length(){return this.#d.length-this.#a}constructor(e){this.#a=0,this.#d=e.slice()}clone(){return new w(this.#d)}reset(){this.#a=0}#f(e=0,t=0){return new w(this.#d.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){let t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){let t=this.peek();throw Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){let e=this.peek();if("OPEN_PAREN"!==e.type)throw Error("bad start");let t=this.#f(this.#a+1,e.match+1);return this.#a=e.match+1,t}popParams(){let e=this.peek();if("OPEN_PAREN"!==e.type)throw Error("bad start");let t=[];for(;this.#a<e.match-1;){let e=this.peek().linkNext;t.push(this.#f(this.#a+1,e)),this.#a=e}return this.#a=e.match+1,t}peek(){if(this.#a>=this.#d.length)throw Error("out-of-bounds");return this.#d[this.#a]}peekKeyword(e){let t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;let t=this.peek();return t.type===e?t.text:null}pop(){let e=this.peek();return this.#a++,e}toString(){let e=[];for(let t=this.#a;t<this.#d.length;t++){let r=this.#d[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function v(e){let t=[],r=t=>{let r=s<e.length?JSON.stringify(e[s]):"$EOI";throw Error(`invalid token ${r} at ${s}: ${t}`)},i=[],a=[],s=0;for(;s<e.length;){let o=e.substring(s),c=o.match(g);c&&(s+=c[1].length,o=e.substring(s));let l={depth:i.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(l);let u=p[o[0]]||"";if(u){if(l.type=u,l.text=o[0],s++,"OPEN_PAREN"===u)i.push(t.length-1),a.push(t.length-1);else if("CLOSE_PAREN"==u)0===i.length&&r("no matching open bracket"),l.match=i.pop(),t[l.match].match=t.length-1,l.depth--,l.linkBack=a.pop(),t[l.linkBack].linkNext=t.length-1;else if("COMMA"===u)l.linkBack=a.pop(),t[l.linkBack].linkNext=t.length-1,a.push(t.length-1);else if("OPEN_BRACKET"===u)l.type="BRACKET";else if("CLOSE_BRACKET"===u){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){let r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw Error("missing opening bracket");t[t.length-1].text+=e}continue}
4if(c=o.match(m)){if(l.text=c[1],s+=l.text.length,h.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(x)){l.type="TYPE";continue}l.type="ID";continue}if(c=o.match(b)){l.text=c[1],l.type="NUMBER",s+=l.text.length;continue}throw Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new w(t.map(e=>Object.freeze(e)))}function A(e,t){let r=[];for(let n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw Error(`conflicting types: ${r.join(", ")}`)}function P(e,t){if(t.peekKeyword(u)){let r=t.pop().text;if(r!==e)throw Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function E(e,t){let r=new Set;for(;;){let n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function O(e){let t=E(e,c);return(A(t,a("constant payable nonpayable".split(" "))),A(t,a("pure view payable nonpayable".split(" "))),t.has("view"))?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function k(e,t){return e.popParams().map(e=>D.from(e,t))}function B(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw Error("invalid gas")}return null}function S(e){if(e.length)throw Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}let C=new RegExp(/^(.*)\[([0-9]*)\]$/);function T(e){let t=e.match(x);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){let r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){let r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}let I={},N=Symbol.for("_ethers_internal"),R="_ParamTypeInternal",M="_ErrorInternal",_="_EventInternal",j="_ConstructorInternal",F="_FallbackInternal",U="_FunctionInternal",L="_StructInternal";class D{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,a,s,o,c){if((0,n.assertPrivate)(e,I,"ParamType"),Object.defineProperty(this,N,{value:R}),s&&(s=Object.freeze(s.slice())),"array"===i){if(null==o||null==c)throw Error("")}else if(null!=o||null!=c)throw Error("");if("tuple"===i){if(null==s)throw Error("")}else if(null!=s)throw Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:a,components:s,arrayLength:o,arrayChildren:c})}format(e){if(null==e&&(e="sighash"),"json"===e){let t=this.name||"";if(this.isArray()){let e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}let r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(t=>t.format(e)).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw Error("array is wrong length");let r=this;return e.map(e=>r.arrayChildren.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw Error("invalid tuple value");if(e.length!==this.components.length)throw Error("array is wrong length");let r=this;return e.map((e,n)=>r.components[n].walk(e,t))}return t(this.type,e)}#h(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw Error("array is wrong length");let i=this.arrayChildren,a=t.slice();a.forEach((t,n)=>{i.#h(e,t,r,e=>{a[n]=e})}),n(a);return}if(this.isTuple()){let i;let a=this.components;if(Array.isArray(t))i=t.slice();else{if(null==t||"object"!=typeof t)throw Error("invalid tuple value");i=a.map(e=>{if(!e.name)throw Error("cannot use object value with unnamed components");if(!(e.name in t))throw Error(`missing value for component ${e.name}`);return t[e.name]})}if(i.length!==this.components.length)throw Error("array is wrong length");
4i.forEach((t,n)=>{a[n].#h(e,t,r,e=>{i[n]=e})}),n(i);return}let i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){let r=[],n=[e];return this.#h(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(D.isParamType(e))return e;if("string"==typeof e)try{return D.from(v(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;E(e,a(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map(e=>D.from(e)),r=`tuple(${i.map(e=>e.format()).join(",")})`):n=r=T(e.popType("TYPE"));let s=null,o=null;for(;e.length&&e.peekType("BRACKET");){let t=e.pop();s=new D(I,"",r,n,null,i,o,s),o=t.value,r+=t.text,n="array",i=null}let c=null;if(E(e,f).has("indexed")){if(!t)throw Error("");c=!0}let l=e.peekType("ID")?e.pop().text:"";if(e.length)throw Error("leftover tokens");return new D(I,l,r,n,c,i,o,s)}let r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(y),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(C);if(o){let t=parseInt(o[2]||"-1"),n=D.from({type:o[1],components:e.components});return new D(I,r||"",s,"array",i,null,t,n)}if("tuple"===s||s.startsWith("tuple(")||s.startsWith("(")){let t=null!=e.components?e.components.map(e=>D.from(e)):null;return new D(I,r||"",s,"tuple",i,t,null,null)}return new D(I,r||"",s=T(e.type),s,i,null,null,null)}static isParamType(e){return e&&e[N]===R}}t.ParamType=D;class G{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,I,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{G.from(JSON.parse(e))}catch(e){}return G.from(v(e))}if(e instanceof w)switch(e.peekKeyword(u)){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return q.from(e);case"fallback":case"receive":return K.from(e);case"function":return J.from(e);case"struct":return W.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return q.from(e);case"fallback":case"receive":return K.from(e);case"function":return J.from(e);case"struct":return W.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return z.isFragment(e)}static isEvent(e){return q.isFragment(e)}static isFunction(e){return J.isFragment(e)}static isStruct(e){return W.isFragment(e)}}t.Fragment=G;class H extends G{name;
4constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(y),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function $(e,t){return"("+t.map(t=>t.format(e)).join("full"===e?", ":",")+")"}t.NamedFragment=H;class z extends H{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,N,{value:M})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+$(e,this.inputs)),t.join(" ")}static from(e){if(z.isFragment(e))return e;if("string"==typeof e)return z.from(v(e));if(e instanceof w){let t=P("error",e),r=k(e);return S(e),new z(I,t,r)}return new z(I,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[N]===M}}t.ErrorFragment=z;class q extends H{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,N,{value:_}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+$(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return new q(I,e,t=(t||[]).map(e=>D.from(e)),!1).topicHash}static from(e){if(q.isFragment(e))return e;if("string"==typeof e)try{return q.from(v(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){let t=P("event",e),r=k(e,!0),n=!!E(e,a(["anonymous"])).has("anonymous");return S(e),new q(I,t,r,n)}return new q(I,e.name,e.inputs?e.inputs.map(e=>D.from(e,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[N]===_}}t.EventFragment=q;class V extends G{payable;gas;constructor(e,t,r,i,a){super(e,t,r),Object.defineProperty(this,N,{value:j}),(0,n.defineProperties)(this,{payable:i,gas:a})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[`constructor${$(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(v(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){E(e,a(["constructor"]));let t=k(e),r=!!E(e,s).has("payable"),n=B(e);return S(e),new V(I,"constructor",t,r,n)}return new V(I,"constructor",e.inputs?e.inputs.map(D.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[N]===j}}t.ConstructorFragment=V;class K extends G{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,N,{value:F}),(0,n.defineProperties)(this,{payable:r})}format(e){let t=0===this.inputs.length?"receive":"fallback";return"json"===e?JSON.stringify({type:t,stateMutability:this.payable?"payable":"nonpayable"}):`${t}()${this.payable?" payable":""}`}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(v(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){let t=e.toString(),r=e.peekKeyword(a(["fallback","receive"]));if((0,n.assertArgument)(r,"type must be fallback or receive","obj",t),"receive"===e.popKeyword(a(["fallback","receive"]))){let t=k(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),E(e,a(["payable"])),S(e),new K(I,[],!0)}let i=k(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map(e=>e.format("minimal")).join(", ")):i=[D.from("bytes")];let s=O(e);
4if((0,n.assertArgument)("nonpayable"===s||"payable"===s,"fallback cannot be constants","obj.stateMutability",s),E(e,a(["returns"])).has("returns")){let t=k(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map(e=>e.format("minimal")).join(", "))}return S(e),new K(I,i,"payable"===s)}return"receive"===e.type?new K(I,[],!0):"fallback"===e.type?new K(I,[D.from("bytes")],"payable"===e.stateMutability):void(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[N]===F}}t.FallbackFragment=K;class J extends H{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,a,s){super(e,"function",t,i),Object.defineProperty(this,N,{value:U}),a=Object.freeze(a.slice()),(0,n.defineProperties)(this,{constant:"view"===r||"pure"===r,gas:s,outputs:a,payable:"payable"===r,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+$(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push($(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return new J(I,e,"view",t=(t||[]).map(e=>D.from(e)),[],null).selector}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(v(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){let t=P("function",e),r=k(e),n=O(e),i=[];E(e,a(["returns"])).has("returns")&&(i=k(e));let s=B(e);return S(e),new J(I,t,n,r,i,s)}let t=e.stateMutability;return null!=t||(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new J(I,e.name,t,e.inputs?e.inputs.map(D.from):[],e.outputs?e.outputs.map(D.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[N]===U}}t.FunctionFragment=J;class W extends H{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,N,{value:L})}format(){throw Error("@TODO")}static from(e){if("string"==typeof e)try{return W.from(v(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){let t=P("struct",e),r=k(e);return S(e),new W(I,t,r)}return new W(I,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[N]===L}}t.StructFragment=W},93230:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(3092);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(85036);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var a=r(51335);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return a.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return a.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return a.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return a.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return a.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return a.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return a.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return a.StructFragment}});var s=r(47605);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return s.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});var o=r(50534);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return o.Typed}})},47605:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;let n=r(91971),i=r(45826),a=r(75553),s=r(3092),o=r(28539);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return o.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return o.Result}});let c=r(51335),l=r(50534);class u{fragment;name;signature;topic;args;constructor(e,t,r){let n=e.name,i=e.format();(0,a.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=u;class d{fragment;name;args;signature;selector;value;constructor(e,t,r,n){let i=e.name,s=e.format();(0,a.defineProperties)(this,{fragment:e,name:i,args:r,signature:s,selector:t,value:n})}}t.TransactionDescription=d;class f{fragment;name;args;signature;selector;constructor(e,t,r){let n=e.name,i=e.format();(0,a.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=f;class h{hash;_isIndexed;static isIndexed(e){return!!(e&&e._isIndexed)}constructor(e){(0,a.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=h;let p={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class b{fragments;deploy;fallback;receive;#p;#g;#b;#m;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#b=new Map,this.#p=new Map,this.#g=new Map;let r=[];for(let e of t)try{r.push(c.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,a.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#m=this.getAbiCoder(),this.fragments.forEach((e,t)=>{let r;switch(e.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}(0,a.defineProperties)(this,{deploy:e});return;case"fallback":0===e.inputs.length?i=!0:((0,a.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),i=(n=e).payable);return;case"function":r=this.#b;break;case"event":r=this.#g;break;case"error":r=this.#p;break;default:return}let s=e.format();r.has(s)||r.set(s,e)}
4),this.deploy||(0,a.defineProperties)(this,{deploy:c.ConstructorFragment.from("constructor()")}),(0,a.defineProperties)(this,{fallback:n,receive:i})}format(e){let t=e?"minimal":"full";return this.fragments.map(e=>e.format(t))}formatJson(){return JSON.stringify(this.fragments.map(e=>e.format("json")).map(e=>JSON.parse(e)))}getAbiCoder(){return s.AbiCoder.defaultAbiCoder()}#y(e,t,r){if((0,a.isHexString)(e)){let t=e.toLowerCase();for(let e of this.#b.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){let n=[];for(let[t,r]of this.#b)t.split("(")[0]===e&&n.push(r);if(t){let e=t.length>0?t[t.length-1]:null,r=t.length,i=!0;l.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){let t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){let r=n[e].inputs;for(let i=0;i<t.length;i++)if(l.Typed.isTyped(t[i])){if(i>=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){let e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){let t=n.map(e=>JSON.stringify(e.format())).join(", ");(0,a.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#b.get(c.FunctionFragment.from(e).format())||null}getFunctionName(e){let t=this.#y(e,null,!1);return(0,a.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#y(e,null,!1)}getFunction(e,t){return this.#y(e,t||null,!0)}forEachFunction(e){let t=Array.from(this.#b.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#b.get(n),r)}}#x(e,t,r){if((0,a.isHexString)(e)){let t=e.toLowerCase();for(let e of this.#g.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){let n=[];for(let[t,r]of this.#g)t.split("(")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){let r=n[e].inputs;for(let i=0;i<t.length;i++)if(l.Typed.isTyped(t[i])&&t[i].type!==r[i].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){let t=n.map(e=>JSON.stringify(e.format())).join(", ");(0,a.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#g.get(c.EventFragment.from(e).format())||null}getEventName(e){let t=this.#x(e,null,!1);return(0,a.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#x(e,null,!1)}getEvent(e,t){return this.#x(e,t||null,!0)}forEachEvent(e){let t=Array.from(this.#g.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#g.get(n),r)}}getError(e,t){if((0,a.isHexString)(e)){let t=e.toLowerCase();if(g[t])return c.ErrorFragment.from(g[t].signature);for(let e of this.#p.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){let t=[];for(let[r,n]of this.#p)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?c.ErrorFragment.from("error Error(string)"):"Panic"===e?c.ErrorFragment.from("error Panic(uint256)"):null;if(t.length>1){let r=t.map(e=>JSON.stringify(e.format())).join(", ");(0,a.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}return"Error(string)"===(e=c.ErrorFragment.from(e).format())?c.ErrorFragment.from("error Error(string)"):"Panic(uint256)"===e?c.ErrorFragment.from("error Panic(uint256)"):this.#p.get(e)||null}forEachError(e){let t=Array.from(this.#p.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#p.get(n),r)}}_decodeParams(e,t){return this.#m.decode(e,t)}_encodeParams(e,t){return this.#m.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){let t=this.getError(e);(0,a.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,a.assertArgument)((0,a.dataSlice)(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,a.dataSlice)(t,4))}encodeErrorResult(e,t){if("string"==typeof e){let t=this.getError(e);(0,a.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,a.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,a.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,a.assertArgument)((0,a.dataSlice)(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,a.dataSlice)(t,4))}encodeFunctionData(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,a.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,a.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,a.assertArgument)(t,"unknown function","fragment",e),e=t}let r="invalid length for result data",n=(0,a.getBytesCopy)(t);if(n.length%32==0)try{return this.#m.decode(e.outputs,n)}catch(e){r="could not decode result data"}(0,a.assert)(!1,r,"BAD_DATA",{value:(0,a.hexlify)(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){let r=(0,a.getBytes)(e,"data"),n=s.AbiCoder.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){let e=(0,a.hexlify)(r.slice(0,4)),t=this.getError(e);
4if(t)try{let e=this.#m.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}let i=this.parseTransaction(t);return i&&(n.invocation={method:i.name,signature:i.signature,args:i.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,a.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,a.hexlify)(this.#m.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){let t=this.getEvent(e);(0,a.assertArgument)(t,"unknown event","eventFragment",e),e=t}(0,a.assert)(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});let r=[];e.anonymous||r.push(e.topicHash);let s=(e,t)=>"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,a.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,a.toBeHex)(t):e.type.match(/^bytes/)?t=(0,a.zeroPadBytes)(t,32):"address"===e.type&&this.#m.encode(["address"],[t]),(0,a.zeroPadValue)((0,a.hexlify)(t),32));for(t.forEach((t,n)=>{let i=e.inputs[n];if(!i.indexed){(0,a.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t);return}null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,a.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map(e=>s(i,e))):r.push(s(i,t))});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){let t=this.getEvent(e);(0,a.assertArgument)(t,"unknown event","eventFragment",e),e=t}let r=[],s=[],o=[];return e.anonymous||r.push(e.topicHash),(0,a.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((e,a)=>{let c=t[a];if(e.indexed){if("string"===e.type)r.push((0,i.id)(c));else if("bytes"===e.type)r.push((0,n.keccak256)(c));else if("tuple"===e.baseType||"array"===e.baseType)throw Error("not implemented");else r.push(this.#m.encode([e.type],[c]))}else s.push(e),o.push(c)}),{data:this.#m.encode(s,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){let t=this.getEvent(e);(0,a.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){let t=e.topicHash;(0,a.assertArgument)((0,a.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}let n=[],i=[],s=[];e.inputs.forEach((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(c.ParamType.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))});let l=null!=r?this.#m.decode(n,(0,a.concat)(r)):null,u=this.#m.decode(i,t,!0),d=[],f=[],p=0,g=0;return e.inputs.forEach((e,t)=>{let r=null;
4if(e.indexed){if(null==l)r=new h(null);else if(s[t])r=new h(l[g++]);else try{r=l[g++]}catch(e){r=e}}else try{r=u[p++]}catch(e){r=e}d.push(r),f.push(e.name||null)}),o.Result.fromItems(d,f)}parseTransaction(e){let t=(0,a.getBytes)(e.data,"tx.data"),r=(0,a.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,a.hexlify)(t.slice(0,4)));if(!n)return null;let i=this.#m.decode(n.inputs,t.slice(4));return new d(n,n.selector,i,r)}parseCallResult(e){throw Error("@TODO")}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new u(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){let t=(0,a.hexlify)(e),r=this.getError((0,a.dataSlice)(t,0,4));if(!r)return null;let n=this.#m.decode(r.inputs,(0,a.dataSlice)(t,4));return new f(r,r.selector,n)}static from(e){return e instanceof b?e:new b("string"==typeof e?JSON.parse(e):"function"==typeof e.formatJson?e.formatJson():"function"==typeof e.format?e.format("json"):e)}}t.Interface=b},50534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;let n=r(75553),i={};function a(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new c(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function s(e,t){return new c(i,`bytes${t||""}`,e,{size:t})}let o=Symbol.for("_ethers_typed");class c{type;value;#w;_typedSymbol;constructor(e,t,r,a){null==a&&(a=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:o,type:t,value:r}),this.#w=a,this.format()}format(){if("array"===this.type||"dynamicArray"===this.type)throw Error("");return"tuple"===this.type?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#w}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#w?-1:!1===this.#w?this.value.length:null}static from(e,t){return new c(i,e,t)}static uint8(e){return a(e,8)}static uint16(e){return a(e,16)}static uint24(e){return a(e,24)}static uint32(e){return a(e,32)}static uint40(e){return a(e,40)}static uint48(e){return a(e,48)}static uint56(e){return a(e,56)}static uint64(e){return a(e,64)}static uint72(e){return a(e,72)}static uint80(e){return a(e,80)}static uint88(e){return a(e,88)}static uint96(e){return a(e,96)}static uint104(e){return a(e,104)}static uint112(e){return a(e,112)}static uint120(e){return a(e,120)}static uint128(e){return a(e,128)}static uint136(e){return a(e,136)}static uint144(e){return a(e,144)}static uint152(e){return a(e,152)}static uint160(e){return a(e,160)}static uint168(e){return a(e,168)}static uint176(e){return a(e,176)}static uint184(e){return a(e,184)}static uint192(e){return a(e,192)}static uint200(e){return a(e,200)}static uint208(e){return a(e,208)}static uint216(e){return a(e,216)}static uint224(e){return a(e,224)}static uint232(e){return a(e,232)}static uint240(e){return a(e,240)}static uint248(e){return a(e,248)}static uint256(e){return a(e,256)}static uint(e){return a(e,256)}static int8(e){return a(e,-8)}static int16(e){return a(e,-16)}static int24(e){return a(e,-24)}static int32(e){return a(e,-32)}static int40(e){return a(e,-40)}static int48(e){return a(e,-48)}static int56(e){return a(e,-56)}static int64(e){return a(e,-64)}static int72(e){return a(e,-72)}static int80(e){return a(e,-80)}static int88(e){return a(e,-88)}static int96(e){return a(e,-96)}static int104(e){return a(e,-104)}static int112(e){return a(e,-112)}static int120(e){return a(e,-120)}static int128(e){return a(e,-128)}static int136(e){return a(e,-136)}static int144(e){return a(e,-144)}static int152(e){return a(e,-152)}static int160(e){return a(e,-160)}static int168(e){return a(e,-168)}static int176(e){return a(e,-176)}static int184(e){return a(e,-184)}static int192(e){return a(e,-192)}static int200(e){return a(e,-200)}static int208(e){return a(e,-208)}static int216(e){return a(e,-216)}static int224(e){return a(e,-224)}static int232(e){return a(e,-232)}static int240(e){return a(e,-240)}static int248(e){return a(e,-248)}static int256(e){return a(e,-256)}static int(e){return a(e,-256)}static bytes1(e){return s(e,1)}static bytes2(e){return s(e,2)}static bytes3(e){return s(e,3)}static bytes4(e){return s(e,4)}static bytes5(e){return s(e,5)}static bytes6(e){return s(e,6)}static bytes7(e){return s(e,7)}static bytes8(e){return s(e,8)}static bytes9(e){return s(e,9)}static bytes10(e){return s(e,10)}static bytes11(e){return s(e,11)}static bytes12(e){return s(e,12)}static bytes13(e){return s(e,13)}static bytes14(e){return s(e,14)}static bytes15(e){return s(e,15)}static bytes16(e){return s(e,16)}static bytes17(e){return s(e,17)}static bytes18(e){return s(e,18)}static bytes19(e){return s(e,19)}static bytes20(e){return s(e,20)}static bytes21(e){return s(e,21)}static bytes22(e){return s(e,22)}static bytes23(e){return s(e,23)}static bytes24(e){return s(e,24)}static bytes25(e){return s(e,25)}static bytes26(e){return s(e,26)}static bytes27(e){return s(e,27)}static bytes28(e){return s(e,28)}static bytes29(e){return s(e,29)}static bytes30(e){return s(e,30)}static bytes31(e){return s(e,31)}static bytes32(e){return s(e,32)}static address(e){return new c(i,"address",e)}static bool(e){return new c(i,"bool",!!e)}static bytes(e){return new c(i,"bytes",e)}static string(e){return new c(i,"string",e)}static array(e,t){throw Error("not implemented yet")}static tuple(e,t){throw Error("not implemented yet")}static overrides(e){return new c(i,"overrides",Object.assign({},e))}
4static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===o}static dereference(e,t){if(c.isTyped(e)){if(e.type!==t)throw Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=c},9336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;let n=r(91971),i=r(75553),a=BigInt(0),s=BigInt(36);function o(e){let t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let a=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)a[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&a[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);function l(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>c[e]).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}let u=function(){let e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function d(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);let t=o(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===l(e),"bad icap checksum","address",e);let t=(function(e){e=e.toLowerCase();let t=a;for(let r=0;r<e.length;r++)t=t*s+u[e[r]];return t})(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return o("0x"+t)}(0,i.assertArgument)(!1,"invalid address","address",e)}t.getAddress=d,t.getIcapAddress=function(e){let t=BigInt(d(e)).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+l("XE00"+t)+t}},8333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;let n=r(75553),i=r(9336);function a(e){return e&&"function"==typeof e.getAddress}async function s(e,t){let r=await t;return(null==r||"0x0000000000000000000000000000000000000000"===r)&&((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=a,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),s(e,t.resolveName(e))):a(e)?s(e,e.getAddress()):e&&"function"==typeof e.then?s(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},62339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;let n=r(91971),i=r(75553),a=r(9336);t.getCreateAddress=function(e){let t=(0,a.getAddress)(e.from),r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,a.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){let s=(0,a.getAddress)(e),o=(0,i.getBytes)(t,"salt"),c=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===o.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===c.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,a.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",s,o,c])),12))}},3052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(9336);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(62339);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var a=r(8333);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return a.isAddressable}}
4),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return a.resolveAddress}})},12201:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},75183:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},57489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(12201);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(75183);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var a=r(11123);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return a.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return a.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return a.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return a.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return a.MaxInt256}});var s=r(41787);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}})},11123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},41787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="\x19Ethereum Signed Message:\n"},13134:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;let n=r(93230),i=r(3052),a=r(15367),s=r(75553),o=r(71268),c=BigInt(0);function l(e){return e&&"function"==typeof e.call}function u(e){return e&&"function"==typeof e.estimateGas}function d(e){return e&&"function"==typeof e.resolveName}function f(e){return e&&"function"==typeof e.sendTransaction}function h(e){if(null!=e){if(d(e))return e;if(e.provider)return e.provider}}class p{#v;fragment;constructor(e,t,r){if((0,s.defineProperties)(this,{fragment:t}),t.inputs.length<r.length)throw Error("too many arguments");let n=g(e.runner,"resolveName"),a=d(n)?n:null;this.#v=async function(){let n=await Promise.all(t.inputs.map((e,t)=>null==r[t]?null:e.walkAsync(r[t],(e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map(e=>(0,i.resolveAddress)(e,a))):(0,i.resolveAddress)(t,a):t)));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#v}}function g(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function b(e){return null==e?null:e.provider||null}async function m(e,t){let r=n.Typed.dereference(e,"overrides");(0,s.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);let i=(0,a.copyRequest)(r);return(0,s.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,s.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function y(e,t,r){let a=g(e,"resolveName"),s=d(a)?a:null;return await Promise.all(t.map((e,t)=>e.walkAsync(r[t],(e,t)=>(t=n.Typed.dereference(t,e),"address"===e)?(0,i.resolveAddress)(t,s):t)))}t.copyOverrides=m,t.resolveArgs=y;let x=Symbol.for("_ethersInternal_contract"),w=new WeakMap;function v(e){return w.get(e[x])}async function A(e,t){let r;let n=null;if(Array.isArray(t)){let n=function(t){if((0,s.isHexString)(t,32))return t;let r=e.interface.getEvent(t);return(0,s.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map(e=>null==e?null:Array.isArray(e)?e.map(n):n(e))}else"*"===t?r=[null]:"string"==typeof t?(0,s.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,s.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):t&&"object"==typeof t&&"getTopicFilter"in t&&"function"==typeof t.getTopicFilter&&t.fragment?r=await t.getTopicFilter():"fragment"in t?r=[(n=t.fragment).topicHash]:(0,s.assertArgument)(!1,"unknown event name","event",t);return{fragment:n,tag:(r=r.map(e=>{if(null==e)return null;if(Array.isArray(e)){let t=Array.from(new Set(e.map(e=>e.toLowerCase())).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})).map(e=>null==e?"null":Array.isArray(e)?e.join("|"):e).join("&"),topics:r}}async function P(e,t){let{subs:r}=v(e);return r.get((await A(e,t)).tag)||null}async function E(e,t,r){let n=b(e.runner);(0,s.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});let{fragment:i,tag:a,topics:c}=await A(e,r),{addr:l,subs:u}=v(e),d=u.get(a);if(!d){let t={address:l||e,topics:c},s=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){let a=n,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];B(e,r,s,n=>new o.ContractEventPayload(e,n,r,a,t))}else B(e,r,[],n=>new o.ContractUnknownEventPayload(e,n,r,t))},f=[];d={tag:a,listeners:[],start:()=>{f.length||f.push(n.on(t,s))},stop:async()=>
4{if(0==f.length)return;let e=f;f=[],await Promise.all(e),n.off(t,s)}},u.set(a,d)}return d}let O=Promise.resolve();async function k(e,t,r,n){await O;let i=await P(e,t);if(!i)return!1;let a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:t,once:i})=>{let a=Array.from(r);n&&a.push(n(i?null:t));try{t.call(e,...a)}catch(e){}return!i}),0===i.listeners.length&&(i.stop(),v(e).subs.delete(i.tag)),a>0}async function B(e,t,r,n){try{await O}catch(e){}let i=k(e,t,r,n);return O=i,await i}let S=["then"];class C{target;interface;runner;filters;[x];fallback;constructor(e,t,r,a){var p;let y;(0,s.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);let A=n.Interface.from(t);(0,s.defineProperties)(this,{target:e,runner:r,interface:A}),Object.defineProperty(this,x,{value:{}});let P=null,E=null;if(a){let e=b(r);E=new o.ContractTransactionResponse(this.interface,e,a)}let O=new Map;if("string"==typeof e){if((0,s.isHexString)(e))P=e,y=Promise.resolve(e);else{let t=g(r,"resolveName");if(!d(t))throw(0,s.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});y=t.resolveName(e).then(t=>{if(null==t)throw(0,s.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return v(this).addr=t,t})}}else y=e.getAddress().then(e=>{if(null==e)throw Error("TODO");return v(this).addr=e,e});p={addrPromise:y,addr:P,deployTx:E,subs:O},w.set(this[x],p);let k=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||S.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>S.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,s.defineProperties)(this,{filters:k}),(0,s.defineProperties)(this,{fallback:A.receive||A.fallback?function(e){let t=async function(t){let r=await m(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await (0,i.resolveAddress)(r.from,h(e.runner)));let n=e.interface,a=(0,s.getBigInt)(r.value||c,"overrides.value")===c,o="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||o||a||(0,s.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,s.assertArgument)(n.fallback||o,"cannot send data to receive-only contract","overrides.data",r.data);let l=n.receive||n.fallback&&n.fallback.payable;return(0,s.assertArgument)(l||a,"cannot send value to non-payable fallback","overrides.value",r.value),(0,s.assertArgument)(n.fallback||o,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){let n=g(e.runner,"call");(0,s.assert)(l(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let i=await t(r);try{return await n.call(i)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}},n=async function(r){let n=e.runner;(0,s.assert)(f(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await n.sendTransaction(await t(r)),a=b(e.runner);return new o.ContractTransactionResponse(e.interface,a,i)},a=async function(r){let n=g(e.runner,"estimateGas");return(0,s.assert)(u(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},d=async e=>await n(e);return(0,s.defineProperties)(d,{_contract:e,estimateGas:a,populateTransaction:t,send:n,staticCall:r}),d}(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||S.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||S.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new C(this.target,this.interface,e)}attach(e){return new C(e,this.interface,this.runner)}async getAddress(){return await v(this).addrPromise}async getDeployedCode(){let e=b(this.runner);(0,s.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){let e=this.deploymentTransaction();
4if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;let t=b(this.runner);return(0,s.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((e,r)=>{let n=async()=>{try{let r=await this.getDeployedCode();if(null!=r)return e(this);t.once("block",n)}catch(e){r(e)}};n()})}deploymentTransaction(){return v(this).deployTx}getFunction(e){return"string"!=typeof e&&(e=e.format()),function(e,t){let r=function(...r){let n=e.interface.getFunction(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){let n=r(...t),a={};if(n.inputs.length+1===t.length&&(a=await m(t.pop())).from&&(a.from=await (0,i.resolveAddress)(a.from,h(e.runner))),n.inputs.length!==t.length)throw Error("internal error: fragment inputs doesn't match arguments; should not happen");let o=await y(e.runner,n.inputs,t);return Object.assign({},a,await (0,s.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,o)}))},a=async function(...e){let t=await p(...e);return 1===t.length?t[0]:t},c=async function(...t){let r=e.runner;(0,s.assert)(f(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await r.sendTransaction(await n(...t)),a=b(e.runner);return new o.ContractTransactionResponse(e.interface,a,i)},d=async function(...t){let r=g(e.runner,"estimateGas");return(0,s.assert)(u(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},p=async function(...t){let i=g(e.runner,"call");(0,s.assert)(l(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let a=await n(...t),o="0x";try{o=await i.call(a)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,a);throw t}let c=r(...t);return e.interface.decodeFunctionResult(c,o)},x=async(...e)=>r(...e).constant?await a(...e):await c(...e);return(0,s.defineProperties)(x,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:d,populateTransaction:n,send:c,staticCall:a,staticCallResult:p}),Object.defineProperty(x,"fragment",{configurable:!1,enumerable:!0,get:()=>{let r=e.interface.getFunction(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),x}(this,e)}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){let r=function(...r){let n=e.interface.getEvent(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,s.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{let r=e.interface.getEvent(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");let{addr:n,addrPromise:i}=v(this),c=n||await i,{fragment:l,topics:u}=await A(this,e),d={address:c,topics:u,fromBlock:t,toBlock:r},f=b(this.runner);return(0,s.assert)(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(d)).map(e=>{let t=l;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new o.EventLog(e,this.interface,t)}catch(t){return new o.UndecodedEventLog(e,t)}return new a.Log(e,f)})}async on(e,t){let r=await E(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){let r=await E(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await B(this,e,t,null)}async listenerCount(e){if(e){let t=await P(this,e);return t?t.listeners.length:0}let{subs:t}=v(this),r=0;for(let{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){let t=await P(this,e);return t?t.listeners.map(({listener:e})=>e):[]}let{subs:t}=v(this),r=[];for(let{listeners:e}of t.values())r=r.concat(e.map(({listener:e})=>e));return r}async off(e,t){let r=await P(this,e);if(!r)return this;if(t){let e=r.listeners.map(({listener:e})=>e).indexOf(t);e>=0&&r.listeners.splice(e,1)}return(null==t||0===r.listeners.length)&&(r.stop(),v(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){let t=await P(this,e);if(!t)return this;t.stop(),v(this).subs.delete(t.tag)}else{let{subs:e}=v(this);for(let{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends C{constructor(t,r=null){super(t,e,r)}}return t}static from(e,t,r){return null==r&&(r=null),new this(e,t,r)}}function T(){return C}t.BaseContract=C;class I extends T(){}t.Contract=I},32826:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;let n=r(93230),i=r(3052),a=r(75553),s=r(13134);class o{interface;bytecode;runner;constructor(e,t,r){let i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,a.hexlify)((0,a.getBytes)(t)),(0,a.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new s.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={},r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await (0,s.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw Error("incorrect number of arguments to constructor");let n=await (0,s.resolveArgs)(this.runner,r.inputs,e);return Object.assign({},t,{data:(0,a.concat)([this.bytecode,this.interface.encodeDeploy(n)])})}async deploy(...e){let t=await this.getDeployTransaction(...e);(0,a.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new s.BaseContract(n,this.interface,this.runner,r)}connect(e){return new o(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,a.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));let r=e.abi,n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=o},78800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(13134);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(32826);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var a=r(71268);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return a.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return a.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return a.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return a.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return a.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return a.UndecodedEventLog}})},71268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;let n=r(15367),i=r(75553);class a extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);let n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=a;class s extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=s;class o extends n.TransactionReceipt{#A;constructor(e,t,r){super(r,t),this.#A=e}get logs(){return super.logs.map(e=>{let t=e.topics.length?this.#A.getEvent(e.topics[0]):null;if(t)try{return new a(e,this.#A,t)}catch(t){return new s(e,t)}return e})}}t.ContractTransactionReceipt=o;class c extends n.TransactionResponse{#A;constructor(e,t,r){super(r,t),this.#A=e}async wait(e,t){let r=await super.wait(e,t);return null==r?null:new o(this.#A,this.provider,r)}}t.ContractTransactionResponse=c;class l extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=l;class u extends l{constructor(e,t,r,n,s){super(e,t,r,new a(s,e.interface,n));let o=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:o,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.ContractEventPayload=u},87221:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;let n=r(47116),i=r(75118),a=r(70732),s=r(87377),o=r(75553),c=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}(),l=c.crypto||c.msCrypto;t.createHash=function(e){switch(e){case"sha256":return a.sha256.create();case"sha512":return s.sha512.create()}(0,o.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){let r={sha256:a.sha256,sha512:s.sha512}[e];return(0,o.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,c){let l={sha256:a.sha256,sha512:s.sha512}[c];return(0,o.assertArgument)(null!=l,"invalid pbkdf2 algorithm","algorithm",c),(0,i.pbkdf2)(l,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,o.assert)(null!=l,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,o.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);let t=new Uint8Array(e);return l.getRandomValues(t),t}},27402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;let n=r(87221),i=r(75553),a=!1,s=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()},o=s;function c(e,t,r){let n=(0,i.getBytes)(t,"key"),a=(0,i.getBytes)(r,"data");return(0,i.hexlify)(o(e,n,a))}t.computeHmac=c,c._=s,c.lock=function(){a=!0},c.register=function(e){if(a)throw Error("computeHmac is locked");o=e},Object.freeze(c)},91971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;let n=r(27402);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});let i=r(53951);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});let a=r(65187);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return a.ripemd160}});let s=r(67080);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return s.pbkdf2}});let o=r(30410);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return o.randomBytes}});let c=r(36794);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}});let l=r(14721);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return l.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return l.sha512}});var u=r(92442);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return u.SigningKey}});var d=r(73461);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return d.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),s.pbkdf2.lock(),o.randomBytes.lock(),a.ripemd160.lock(),c.scrypt.lock(),c.scryptSync.lock(),l.sha256.lock(),l.sha512.lock(),o.randomBytes.lock()}},53951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;let n=r(76748),i=r(75553),a=!1,s=function(e){return(0,n.keccak_256)(e)},o=s;function c(e){let t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(o(t))}t.keccak256=c,c._=s,c.lock=function(){a=!0},c.register=function(e){if(a)throw TypeError("keccak256 is locked");o=e},Object.freeze(c)},67080:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;let n=r(87221),i=r(75553),a=!1,s=function(e,t,r,i,a){return(0,n.pbkdf2Sync)(e,t,r,i,a)},o=s;function c(e,t,r,n,a){let s=(0,i.getBytes)(e,"password"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(o(s,c,r,n,a))}t.pbkdf2=c,c._=s,c.lock=function(){a=!0},c.register=function(e){if(a)throw Error("pbkdf2 is locked");o=e},Object.freeze(c)},30410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;let n=r(87221),i=!1,a=function(e){return new Uint8Array((0,n.randomBytes)(e))},s=a;function o(e){return s(e)}t.randomBytes=o,o._=a,o.lock=function(){i=!0},o.register=function(e){if(i)throw Error("randomBytes is locked");s=e},Object.freeze(o)},65187:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;let n=r(43573),i=r(75553),a=!1,s=function(e){return(0,n.ripemd160)(e)},o=s;function c(e){let t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(o(t))}t.ripemd160=c,c._=s,c.lock=function(){a=!0},c.register=function(e){if(a)throw TypeError("ripemd160 is locked");o=e},Object.freeze(c)},36794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;let n=r(55436),i=r(75553),a=!1,s=!1,o=async function(e,t,r,i,a,s,o){return await (0,n.scryptAsync)(e,t,{N:r,r:i,p:a,dkLen:s,onProgress:o})},c=function(e,t,r,i,a,s){return(0,n.scrypt)(e,t,{N:r,r:i,p:a,dkLen:s})},l=o,u=c;async function d(e,t,r,n,a,s,o){let c=(0,i.getBytes)(e,"passwd"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await l(c,u,r,n,a,s,o))}function f(e,t,r,n,a,s){let o=(0,i.getBytes)(e,"passwd"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(u(o,c,r,n,a,s))}t.scrypt=d,d._=o,d.lock=function(){s=!0},d.register=function(e){if(s)throw Error("scrypt is locked");l=e},Object.freeze(d),t.scryptSync=f,f._=c,f.lock=function(){a=!0},f.register=function(e){if(a)throw Error("scryptSync is locked");u=e},Object.freeze(f)},14721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;let n=r(87221),i=r(75553),a=function(e){return(0,n.createHash)("sha256").update(e).digest()},s=function(e){return(0,n.createHash)("sha512").update(e).digest()},o=a,c=s,l=!1,u=!1;function d(e){let t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(o(t))}function f(e){let t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(c(t))}t.sha256=d,d._=a,d.lock=function(){l=!0},d.register=function(e){if(l)throw Error("sha256 is locked");o=e},Object.freeze(d),t.sha512=f,f._=s,f.lock=function(){u=!0},f.register=function(e){if(u)throw Error("sha512 is locked");c=e},Object.freeze(d)},73461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;let n=r(57489),i=r(75553),a=BigInt(0),s=BigInt(1),o=BigInt(2),c=BigInt(27),l=BigInt(28),u=BigInt(35),d={};function f(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class h{#P;#E;#O;#k;get r(){return this.#P}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#P=(0,i.hexlify)(e)}get s(){return this.#E}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);let t=(0,i.hexlify)(e);(0,i.assertArgument)(8>parseInt(t.substring(0,3)),"non-canonical s","value",t),this.#E=t}get v(){return this.#O}set v(e){let t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#O=t}get networkV(){return this.#k}get legacyChainId(){let e=this.networkV;return null==e?null:h.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){let e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,d,"Signature"),this.#P=t,this.#E=r,this.#O=n,this.#k=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){let e=new h(d,this.r,this.s,this.v);return this.networkV&&(e.#k=this.networkV),e}toJSON(){let e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){let t=(0,i.getBigInt)(e,"v");return t==c||t==l?a:((0,i.assertArgument)(t>=u,"invalid EIP-155 v","v",e),(t-u)/o)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*o+BigInt(35+t-27)}static getNormalizedV(e){let t=(0,i.getBigInt)(e);return t===a||t===c?27:t===s||t===l?28:((0,i.assertArgument)(t>=u,"invalid v","v",e),t&s?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new h(d,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){let r=(0,i.getBytes)(e,"signature");if(64===r.length){let e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new h(d,e,(0,i.hexlify)(t),n)}if(65===r.length){let e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t((128&n[0])==0,"non-canonical s");let a=h.getNormalizedV(r[64]);return new h(d,e,(0,i.hexlify)(n),a)}t(!1,"invalid raw signature length")}if(e instanceof h)return e.clone();let r=e.r;t(null!=r,"missing r");let a=f(r),s=function(e,r){if(null!=e)return f(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");let e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t((128&(0,i.getBytes)(s)[0])==0,"non-canonical s");let{networkV:o,v:c}=function(e,r,n){if(null!=e){let t=(0,i.getBigInt)(e);return{networkV:t>=u?t:void 0,v:h.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}
4(e.v,e.yParityAndS,e.yParity),l=new h(d,a,s,c);return o&&(l.#k=o),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}}t.Signature=h},92442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;let n=r(61782),i=r(75553),a=r(73461);class s{#B;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#B=(0,i.hexlify)(e)}get privateKey(){return this.#B}get publicKey(){return s.computePublicKey(this.#B)}get compressedPublicKey(){return s.computePublicKey(this.#B,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);let t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#B),{lowS:!0});return a.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){let t=s.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#B),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){let e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){let e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}let a=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(a.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);let r=a.Signature.from(t),s=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s]))),o=(s=s.addRecoveryBit(r.yParity)).recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=o,"invalid signautre for digest","signature",t),"0x"+o.toHex(!1)}static addPoints(e,t,r){let i=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(e).substring(2)),a=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(t).substring(2));return"0x"+i.add(a).toHex(!!r)}}t.SigningKey=s},32148:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.EnsPlugin=t.Network=t.EnsResolver=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=void 0,t.wordl
4ists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=void 0;var n=r(41202);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(93230);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var a=r(3052);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return a.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return a.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return a.resolveAddress}});var s=r(57489);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return s.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return s.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return s.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return s.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return s.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return s.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return s.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}});var o=r(78800);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return o.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return o.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}});var c=r(91971);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return c.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return c.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return c.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return c.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return c.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return c.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return c.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return c.SigningKey}});var l=r(45826);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return l.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return l.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return l.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return l.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return l.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return l.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return l.verifyTypedData}
4});var u=r(74650);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return u.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return u.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return u.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return u.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return u.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return u.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return u.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return u.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return u.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return u.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return u.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return u.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return u.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return u.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return u.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return u.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return u.AnkrProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return u.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return u.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return u.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return u.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return u.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return u.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return u.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return u.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return u.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return u.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return u.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return u.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return u.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return u.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return u.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return u.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return u.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return u.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return u.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return u.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return u.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return u.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return u.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return u.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return u.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return u.showThrottleMessage}});var d=r(36280);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return d.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return d.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return d.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return d.Transaction}});var f=r(75553);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return f.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return f.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return f.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return f.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return f.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return f.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return f.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return f.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return f.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return f.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return f.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return f.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return f.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return f.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return f.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return f.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return f.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return f.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return f.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return f.assertPrivate}}
4),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return f.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return f.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return f.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return f.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return f.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return f.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return f.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return f.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return f.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return f.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return f.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return f.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return f.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return f.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return f.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return f.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return f.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return f.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return f.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return f.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return f.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return f.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return f.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return f.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return f.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return f.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return f.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return f.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return f.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return f.uuidV4}});var h=r(86071);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return h.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return h.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return h.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return h.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return h.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return h.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return h.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return h.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return h.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return h.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return h.encryptKe
4ystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.encryptKeystoreJsonSync}});var p=r(993);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},26063:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;let n=r(91971),i=r(75553);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},45826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=void 0;var n=r(26063);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}});var i=r(27977);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}});var a=r(27845);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return a.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return a.verifyMessage}});var s=r(95347);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return s.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return s.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return s.solidityPackedSha256}});var o=r(20441);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return o.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return o.verifyTypedData}})},27845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;let n=r(91971),i=r(57489),a=r(36280),s=r(75553);function o(e){return"string"==typeof e&&(e=(0,s.toUtf8Bytes)(e)),(0,n.keccak256)((0,s.concat)([(0,s.toUtf8Bytes)(i.MessagePrefix),(0,s.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=o,t.verifyMessage=function(e,t){let r=o(e);return(0,a.recoverAddress)(r,t)}},27977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;let n=r(91971),i=r(75553),a=r(53322),s=new Uint8Array(32);function o(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function c(e){let t=(0,i.toUtf8Bytes)(l(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(o(t.slice(n,e))),n=e+1);return(0,i.assertArgument)(n<t.length,"invalid ENS name; empty component","name",e),r.push(o(t.slice(n))),r}function l(e){try{if(0===e.length)throw Error("empty label");return(0,a.ens_normalize)(e)}catch(t){(0,i.assertArgument)(!1,`invalid ENS name (${t.message})`,"name",e)}}s.fill(0),t.ensNormalize=l,t.isValidName=function(e){try{return 0!==c(e).length}catch(e){}return!1},t.namehash=function(e){(0,i.assertArgument)("string"==typeof e,"invalid ENS name; not a string","name",e),(0,i.assertArgument)(e.length,"invalid ENS name (empty label)","name",e);let t=s,r=c(e);for(;r.length;)t=(0,n.keccak256)((0,i.concat)([t,(0,n.keccak256)(r.pop())]));return(0,i.hexlify)(t)},t.dnsEncode=function(e,t){let r=null!=t?t:63;return(0,i.assertArgument)(r<=255,"DNS encoded label cannot exceed 255","length",r),(0,i.hexlify)((0,i.concat)(c(e).map(t=>{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);let n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n})))+"00"}},95347:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;let n=r(3052),i=r(91971),a=r(75553),s=RegExp("^bytes([0-9]+)$"),o=RegExp("^(u?int)([0-9]*)$"),c=RegExp("^(.*)\\[([0-9]*)\\]$");function l(e,t){(0,a.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);let r=[];return e.forEach(function(e,i){r.push(function e(t,r,i){switch(t){case"address":if(i)return(0,a.getBytes)((0,a.zeroPadValue)(r,32));return(0,a.getBytes)((0,n.getAddress)(r));case"string":return(0,a.toUtf8Bytes)(r);case"bytes":return(0,a.getBytes)(r);case"bool":if(r=r?"0x01":"0x00",i)return(0,a.getBytes)((0,a.zeroPadValue)(r,32));return(0,a.getBytes)(r)}let l=t.match(o);if(l){let e="int"===l[1],n=parseInt(l[2]||"256");return(0,a.assertArgument)((!l[2]||l[2]===String(n))&&n%8==0&&0!==n&&n<=256,"invalid number type","type",t),i&&(n=256),e&&(r=(0,a.toTwos)(r,n)),(0,a.getBytes)((0,a.zeroPadValue)((0,a.toBeArray)(r),n/8))}if(l=t.match(s)){let e=parseInt(l[1]);return((0,a.assertArgument)(String(e)===l[1]&&0!==e&&e<=32,"invalid bytes type","type",t),(0,a.assertArgument)((0,a.dataLength)(r)===e,`invalid value for ${t}`,"value",r),i)?(0,a.getBytes)((0,a.zeroPadBytes)(r,32)):r}if((l=t.match(c))&&Array.isArray(r)){let n=l[1],i=parseInt(l[2]||String(r.length));(0,a.assertArgument)(i===r.length,`invalid array length for ${t}`,"value",r);let s=[];return r.forEach(function(t){s.push(e(n,t,!0))}),(0,a.getBytes)((0,a.concat)(s))}(0,a.assertArgument)(!1,"invalid type","type",t)}(e,t[i]))}),(0,a.hexlify)((0,a.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},20441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;let n=r(3052),i=r(91971),a=r(36280),s=r(75553),o=r(26063),c=new Uint8Array(32);c.fill(0);let l=BigInt(-1),u=BigInt(0),d=BigInt(1),f=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),h=(0,s.toBeHex)(d,32),p=(0,s.toBeHex)(u,32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},b=["name","version","chainId","verifyingContract","salt"];function m(e){return function(t){return(0,s.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}let y={name:m("name"),version:m("version"),chainId:function(e){let t=(0,s.getBigInt)(e,"domain.chainId");return((0,s.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t))?Number(t):(0,s.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,s.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){let t=(0,s.getBytes)(e,"domain.salt");return(0,s.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,s.hexlify)(t)}};function x(e){{let t=e.match(/^(u?)int(\d+)$/);if(t){let r=""===t[1],n=parseInt(t[2]);(0,s.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);let i=(0,s.mask)(f,r?n-1:n),a=r?(i+d)*l:u;return function(t){let n=(0,s.getBigInt)(t,"value");return(0,s.assertArgument)(n>=a&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,s.toBeHex)(r?(0,s.toTwos)(n,256):n,32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let r=parseInt(t[1]);return(0,s.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){let n=(0,s.getBytes)(t);return(0,s.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){let t=(0,s.getBytes)(e),r=t.length%32;return r?(0,s.concat)([t,c.slice(r)]):(0,s.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,s.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?h:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,o.id)(e)}}return null}function w(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`}function v(e){let t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class A{primaryType;#S;get types(){return JSON.parse(this.#S)}#C;#T;constructor(e){this.#C=new Map,this.#T=new Map;let t=new Map,r=new Map,n=new Map,i={};for(let a in Object.keys(e).forEach(a=>{i[a]=e[a].map(({name:t,type:r})=>{let{base:n,index:i}=v(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}}),t.set(a,new Set),r.set(a,[]),n.set(a,new Set)}),this.#S=JSON.stringify(i),i){let n=new Set;for(let o of i[a]){(0,s.assertArgument)(!n.has(o.name),`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(a)}`,"types",e),n.add(o.name);let i=v(o.type).base;(0,s.assertArgument)(i!==a,`circular type reference to ${JSON.stringify(i)}`,"types",e),x(i)||((0,s.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(a),t.get(a).add(i))}}let a=Array.from(r.keys()).filter(e=>0===r.get(e).length);for(let[o,c]of((0,s.assertArgument)(0!==a.length,"missing primary type","types",e),(0,s.assertArgument)(1===a.length,`ambiguous primary types or unused types: ${a.map(e=>JSON.stringify(e)).join(", ")}`,"types",e),(0,s.defineProperties)(this,{primaryType:a[0]}),!function i(a,o){for(let c of((0,s.assertArgument)(!o.has(a),`circular type reference to ${JSON.stringify(a)}`,"types",e),o.add(a),t.get(a)))if(r.has(c))for(let e of(i(c,o),o))n.get(e).add(c);o.delete(a)}(this.primaryType,new Set),n)){let e=Array.from(c);e.sort(),this.#C.set(o,w(o,i[o])+e.map(e=>w(e,i[e])).join(""))}}getEncoder(e){let t=this.#T.get(e);return t||(t=this.#I(e),this.#T.set(e,t)),t}#I(e){{let t=x(e);if(t)return t}let t=v(e).array;
4if(t){let e=t.prefix,r=this.getEncoder(e);return n=>{(0,s.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let a=n.map(r);return this.#C.has(e)&&(a=a.map(i.keccak256)),(0,i.keccak256)((0,s.concat)(a))}}let r=this.types[e];if(r){let t=(0,o.id)(this.#C.get(e));return e=>{let n=r.map(({name:t,type:r})=>{let n=this.getEncoder(r)(e[t]);return this.#C.has(r)?(0,i.keccak256)(n):n});return n.unshift(t),(0,s.concat)(n)}}(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){let t=this.#C.get(e);return(0,s.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(x(e))return r(e,t);let n=v(e).array;if(n)return(0,s.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map(e=>this._visit(n.prefix,e,r));let i=this.types[e];if(i)return i.reduce((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e),{});(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new A(e)}static getPrimaryType(e){return A.from(e).primaryType}static hashStruct(e,t,r){return A.from(t).hashStruct(e,r)}static hashDomain(e){let t=[];for(let r in e){if(null==e[r])continue;let n=g[r];(0,s.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort((e,t)=>b.indexOf(e.name)-b.indexOf(t.name)),A.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,s.concat)(["0x1901",A.hashDomain(e),A.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(A.encode(e,t,r))}static async resolveNames(e,t,r,n){for(let t in e=Object.assign({},e))null==e[t]&&delete e[t];let i={};e.verifyingContract&&!(0,s.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");let a=A.from(t);for(let e in a.visit(r,(e,t)=>("address"!==e||(0,s.isHexString)(t,20)||(i[t]="0x"),t)),i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=a.visit(r,(e,t)=>"address"===e&&i[t]?i[t]:t),{domain:e,value:r}}static getPayload(e,t,r){A.hashDomain(e);let n={},i=[];b.forEach(t=>{let r=e[t];null!=r&&(n[t]=y[t](r),i.push({name:t,type:g[t]}))});let a=A.from(t),o=Object.assign({},t=a.types);return(0,s.assertArgument)(null==o.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),o.EIP712Domain=i,a.encode(r),{types:o,domain:n,primaryType:a.primaryType,message:a.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return(0,s.hexlify)((0,s.getBytes)(t));if(e.match(/^u?int/))return(0,s.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,s.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,s.assertArgument)(!1,"unsupported type","type",e)})}}}t.TypedDataEncoder=A,t.verifyTypedData=function(e,t,r,n){return(0,a.recoverAddress)(A.hash(e,t,r),n)}},58167:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;let n=r(8853),i=n.__importStar(r(32148));t.ethers=i,n.__exportStar(r(32148),t)},83774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;let n=r(3052),i=r(57489),a=r(78800),s=r(45826),o=r(36280),c=r(75553),l=r(96155),u=r(97345),d=r(1624),f=r(15367),h=r(48578),p=BigInt(2);function g(e){return e&&"function"==typeof e.then}function b(e,t){return e+":"+JSON.stringify(t,(e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){let e=Object.keys(t);return e.sort(),e.reduce((e,r)=>(e[r]=t[r],e),{})}return t})}class m{name;constructor(e){(0,c.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}
4function y(e){return(e=Array.from(new Set(e).values())).sort(),e}async function x(e,t){if(null==e)throw Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,c.isHexString)(e,32)){let t=e.toLowerCase();return{type:"transaction",tag:b("tx",{hash:t}),hash:t}}if(e.orphan){let t=e;return{type:"orphan",tag:b("orphan",t),filter:JSON.parse(JSON.stringify(t))}}if(e.address||e.topics){let r=e,i={topics:(r.topics||[]).map(e=>null==e?null:Array.isArray(e)?y(e.map(e=>e.toLowerCase())):e.toLowerCase())};if(r.address){let e=[],a=[],s=r=>{(0,c.isHexString)(r)?e.push(r):a.push((async()=>{e.push(await (0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),a.length&&await Promise.all(a),i.address=y(e.map(e=>e.toLowerCase()))}return{filter:i,tag:b("event",i),type:"event"}}(0,c.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return new Date().getTime()}t.UnmanagedSubscriber=m;let v={cacheTimeout:250,pollingInterval:4e3};class A{#N;#R;#M;#_;#j;#F;#U;#L;#D;#G;#H;#w;constructor(e,t){if(this.#w=Object.assign({},v,t||{}),"any"===e)this.#F=!0,this.#j=null;else if(e){let t=d.Network.from(e);this.#F=!1,this.#j=Promise.resolve(t),setTimeout(()=>{this.emit("network",t,null)},0)}else this.#F=!1,this.#j=null;this.#L=-1,this.#U=new Map,this.#N=new Map,this.#R=new Map,this.#M=null,this.#_=!1,this.#D=1,this.#G=new Map,this.#H=!1}get pollingInterval(){return this.#w.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#R.values())}attachPlugin(e){if(this.#R.get(e.name))throw Error(`cannot replace existing plugin: ${e.name} `);return this.#R.set(e.name,e.connect(this)),this}getPlugin(e){return this.#R.get(e)||null}get disableCcipRead(){return this.#H}set disableCcipRead(e){this.#H=!!e}async #$(e){let t=this.#w.cacheTimeout;if(t<0)return await this._perform(e);let r=b(e.method,e),n=this.#U.get(r);return n||(n=this._perform(e),this.#U.set(r,n),setTimeout(()=>{this.#U.get(r)===n&&this.#U.delete(r)},t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;let n=e.to.toLowerCase(),i=t.toLowerCase(),a=[];for(let t=0;t<r.length;t++){let s;let o=r[t],l=o.replace("{sender}",n).replace("{data}",i),u=new c.FetchRequest(l);-1===o.indexOf("{data}")&&(u.body={data:i,sender:n}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:t,urls:r});let d="unknown error";try{s=await u.send()}catch(e){a.push(e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:e}});continue}try{let e=s.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:e}),e.data;e.message&&(d=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:e})}catch(e){}(0,c.assert)(s.statusCode<400||s.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:o,errorMessage:d}}),a.push(d)}(0,c.assert)(!1,`error encountered during CCIP fetch: ${a.map(e=>JSON.stringify(e)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:a}})}_wrapBlock(e,t){return new f.Block((0,u.formatBlock)(e),this)}_wrapLog(e,t){return new f.Log((0,u.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new f.TransactionReceipt((0,u.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new f.TransactionResponse((0,u.formatTransactionResponse)(e),this)}_detectNetwork(){(0,c.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,c.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){let e=(0,c.getNumber)(await this.#$({method:"getBlockNumber"}),"%response");return this.#L>=0&&(this.#L=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,c.isHexString)(e)?(0,c.isHexString)(e,32)?e:(0,c.toQuantity)(e):("bigint"==typeof e&&(e=(0,c.getNumber)(e,"blockTag")),"number"==typeof e)?e>=0?(0,c.toQuantity)(e):this.#L>=0?(0,c.toQuantity)(this.#L+e):this.getBlockNumber().then(t=>(0,c.toQuantity)(t+e)):void(0,c.assertArgument)(!1,"invalid blockTag","blockTag",e)}_getFilter(e){let t,r;let n=(e.topics||[]).map(e=>null==e?null:Array.isArray(e)?y(e.map(e=>e.toLowerCase())):e.toLowerCase()),i="blockHash"in e?e.blockHash:void 0,a=(e,t,r)=>{let a;switch(e.length){case 0:break;case 1:a=e[0];break;default:e.sort(),a=e}if(i&&(null!=t||null!=r))throw Error("invalid filter");let s={};return a&&(s.address=a),n.length&&(s.topics=n),t&&(s.fromBlock=t),r&&(s.toBlock=r),i&&(s.blockHash=i),s},s=[];if(e.address){if(Array.isArray(e.address))for(let t of e.address)s.push(this._getAddress(t));else s.push(this._getAddress(e.address))}return"fromBlock"in e&&(t=this._getBlockTag(e.fromBlock)),("toBlock"in e&&(r=this._getBlockTag(e.toBlock)),s.filter(e=>"string"!=typeof e).length||null!=t&&"string"!=typeof t||null!=r&&"string"!=typeof r)?Promise.all([Promise.all(s),t,r]).then(e=>a(e[0],e[1],e[2])):a(s,t,r)}_getTransactionRequest(e){let t=(0,f.copyRequest)(e),r=[];
4if(["to","from"].forEach(e=>{if(null==t[e])return;let i=(0,n.resolveAddress)(t[e],this);g(i)?r.push(async function(){t[e]=await i}()):t[e]=i}),null!=t.blockTag){let e=this._getBlockTag(t.blockTag);g(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#j){let e=(async()=>{try{let e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#j===e&&(this.#j=null),t}})();return this.#j=e,(await e).clone()}let e=this.#j,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#F?(this.emit("network",r,t),this.#j===e&&(this.#j=Promise.resolve(r))):(0,c.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){let e=await this.getNetwork(),t=async()=>{let{_block:t,gasPrice:r,priorityFee:n}=await (0,c.resolveProperties)({_block:this.#z("latest",!1),gasPrice:(async()=>{try{let e=await this.#$({method:"getGasPrice"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{let e=await this.#$({method:"getPriorityFee"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})()}),i=null,a=null,s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(a=null!=n?n:BigInt("1000000000"),i=s.baseFeePerGas*p+a),new f.FeeData(r,i,a)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){let e=new c.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new f.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return g(t)&&(t=await t),(0,c.getBigInt)(await this.#$({method:"estimateGas",transaction:t}),"%response")}async #q(e,t,r){(0,c.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});let i=(0,f.copyRequest)(e);try{return(0,c.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,c.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,c.dataSlice)(e.data,0,4)){let a;let s=e.data,o=await (0,n.resolveAddress)(i.to,this);try{a=function(e){let t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,c.assert)((0,c.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});let r=(0,c.dataSlice)(e,0,32);(0,c.assert)((0,c.dataSlice)(r,0,12)===(0,c.dataSlice)(k,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,c.dataSlice)(r,12);try{let r=[],n=(0,c.getNumber)((0,c.dataSlice)(e,32,64)),i=(0,c.getNumber)((0,c.dataSlice)(e,n,n+32)),a=(0,c.dataSlice)(e,n+32);for(let e=0;e<i;e++){let t=function(e,t){try{let r=P(e,t);if(r)return(0,c.toUtf8String)(r)}catch(e){}return null}(a,32*e);if(null==t)throw Error("abort");r.push(t)}t.urls=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{let r=P(e,64);if(null==r)throw Error("abort");t.calldata=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}(0,c.assert)((0,c.dataSlice)(e,100,128)===(0,c.dataSlice)(k,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=(0,c.dataSlice)(e,96,100);try{let r=P(e,128);if(null==r)throw Error("abort");t.extraData=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(e=>t[e]),t}((0,c.dataSlice)(e.data,4))}catch(e){(0,c.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:s}})}(0,c.assert)(a.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});let l=await this.ccipReadFetch(i,a.calldata,a.urls);(0,c.assert)(null!=l,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:a.errorArgs}});let u={to:o,data:(0,c.concat)([a.selector,function(e){let t=[],r=0;for(let n=0;n<e.length;n++)t.push(O),r+=32;for(let n=0;n<e.length;n++){let i=(0,c.getBytes)(e[n]);t[n]=E(r),t.push(E(i.length)),t.push(function(e){if(e.length%32==0)return e;let t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}(i)),r+=32+32*Math.ceil(i.length/32)}return(0,c.concat)(t)}([l,a.extraData])])};
4this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{let e=await this.#q(u,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:e}),e}}throw e}}async #V(e){let{value:t}=await (0,c.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){let{tx:t,blockTag:r}=await (0,c.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#V(this.#q(t,r,e.enableCcipRead?0:-1))}async #K(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return("string"!=typeof n||"string"!=typeof i)&&([n,i]=await Promise.all([n,i])),await this.#V(this.#$(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,c.getBigInt)(await this.#K({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,c.getNumber)(await this.#K({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,c.hexlify)(await this.#K({method:"getCode"},e,t))}async getStorage(e,t,r){let n=(0,c.getBigInt)(t,"position");return(0,c.hexlify)(await this.#K({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){let{blockNumber:t,hash:r,network:n}=await (0,c.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=o.Transaction.from(e);if(i.hash!==r)throw Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async #z(e,t){if((0,c.isHexString)(e,32))return await this.#$({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#$({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){let{network:r,params:n}=await (0,c.resolveProperties)({network:this.getNetwork(),params:this.#z(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){let{network:t,params:r}=await (0,c.resolveProperties)({network:this.getNetwork(),params:this.#$({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){let{network:t,params:r}=await (0,c.resolveProperties)({network:this.getNetwork(),params:this.#$({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){let t=await this.#$({method:"getTransaction",hash:e});if(null==t)throw Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){let{result:t}=await (0,c.resolveProperties)({network:this.getNetwork(),result:this.#$({method:"getTransactionResult",hash:e})});return null==t?null:(0,c.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);g(t)&&(t=await t);let{network:r,params:n}=await (0,c.resolveProperties)({network:this.getNetwork(),params:this.#$({method:"getLogs",filter:t})});return n.map(e=>this._wrapLog(e,r))}_getProvider(e){(0,c.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await l.EnsResolver.fromName(this,e)}async getAvatar(e){let t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){let t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);let t=(0,s.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{let r=await l.EnsResolver.getEnsAddress(this),n=new a.Contract(r,["function resolver(bytes32) view returns (address)"],this),s=await n.resolver(t);if(null==s||s===i.ZeroAddress)return null;let o=new a.Contract(s,["function name(bytes32) view returns (string)"],this),c=await o.name(t);if(await this.resolveName(c)!==e)return null;return c}catch(e){if((0,c.isError)(e,"BAD_DATA")&&"0x"===e.value||(0,c.isError)(e,"CALL_EXCEPTION"))return null;throw e}return null}async waitForTransaction(e,t,r){let n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise(async(t,i)=>{let a=null,s=async r=>{try{let i=await this.getTransactionReceipt(e);
4if(null!=i&&r-i.blockNumber+1>=n){t(i),a&&(clearTimeout(a),a=null);return}}catch(e){console.log("EEE",e)}this.once("block",s)};null!=r&&(a=setTimeout(()=>{null!=a&&(a=null,this.off("block",s),i((0,c.makeError)("timeout","TIMEOUT",{reason:"timeout"})))},r)),s(await this.getBlockNumber())})}async waitForBlock(e){(0,c.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){let t=this.#G.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#G.delete(e))}_setTimeout(e,t){null==t&&(t=0);let r=this.#D++,n=()=>{this.#G.delete(r),e()};if(this.paused)this.#G.set(r,{timer:null,func:n,time:t});else{let e=setTimeout(n,t);this.#G.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(let t of this.#N.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new m(e.type);case"block":{let e=new h.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new h.PollingBlockTagSubscriber(this,e.type);case"event":return new h.PollingEventSubscriber(this,e.filter);case"transaction":return new h.PollingTransactionSubscriber(this,e.hash);case"orphan":return new h.PollingOrphanSubscriber(this,e.filter)}throw Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(let r of this.#N.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#M&&t.pause(this.#M);break}}async #J(e,t){let r=await x(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await x({orphan:"drop-log",log:t[0]},this)),this.#N.get(r.tag)||null}async #W(e){let t=await x(e,this),r=t.tag,n=this.#N.get(r);return!n&&(n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#N.set(r,n)),n}async on(e,t){let r=await this.#W(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#M&&r.subscriber.pause(this.#M)),this}async once(e,t){let r=await this.#W(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#M&&r.subscriber.pause(this.#M)),this}async emit(e,...t){let r=await this.#J(e,t);if(!r||0===r.listeners.length)return!1;let n=r.listeners.length;return r.listeners=r.listeners.filter(({listener:r,once:n})=>{let i=new c.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n}),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#N.delete(r.tag)),n>0}async listenerCount(e){if(e){let t=await this.#J(e);return t?t.listeners.length:0}let t=0;for(let{listeners:e}of this.#N.values())t+=e.length;return t}async listeners(e){if(e){let t=await this.#J(e);return t?t.listeners.map(({listener:e})=>e):[]}let t=[];for(let{listeners:e}of this.#N.values())t=t.concat(e.map(({listener:e})=>e));return t}async off(e,t){let r=await this.#J(e);if(!r)return this;if(t){let e=r.listeners.map(({listener:e})=>e).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#N.delete(r.tag)),this}async removeAllListeners(e){if(e){let{tag:t,started:r,subscriber:n}=await this.#W(e);r&&n.stop(),this.#N.delete(t)}else for(let[e,{started:t,subscriber:r}]of this.#N)t&&r.stop(),this.#N.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#_}destroy(){for(let e of(this.removeAllListeners(),this.#G.keys()))this._clearTimeout(e);this.#_=!0}get paused(){return null!=this.#M}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#L=-1,null!=this.#M){if(!!e==this.#M)return;(0,c.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}for(let t of(this._forEachSubscriber(t=>t.pause(e)),this.#M=!!e,this.#G.values()))t.timer&&clearTimeout(t.timer),t.time=w()-t.time}resume(){if(null!=this.#M)for(let e of(this._forEachSubscriber(e=>e.resume()),this.#M=null,this.#G.values())){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}function P(e,t){if("0x"===e)return null;try{let r=(0,c.getNumber)((0,c.dataSlice)(e,t,t+32)),n=(0,c.getNumber)((0,c.dataSlice)(e,r,r+32));return(0,c.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function E(e){let t=(0,c.toBeArray)(e);if(t.length>32)throw Error("internal; should not happen");let r=new Uint8Array(32);return r.set(t,32-t.length),r}t.AbstractProvider=A;let O=new Uint8Array([]),k="0x0000000000000000000000000000000000000000000000000000000000000000"},54509:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;let n=r(3052),i=r(36280),a=r(75553),s=r(15367);function o(e,t){if(e.provider)return e.provider;(0,a.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function c(e,t){let r=(0,s.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){let t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then(([e,t])=>((0,a.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e))}else r.from=e.getAddress();return await (0,a.resolveProperties)(r)}class l{provider;constructor(e){(0,a.defineProperties)(this,{provider:e||null})}async getNonce(e){return o(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await c(this,e)}async populateTransaction(e){let t=o(this,"populateTransaction"),r=await c(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));let n=await this.provider.getNetwork();if(null!=r.chainId){let t=(0,a.getBigInt)(r.chainId);(0,a.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;let i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null!=r.gasPrice&&(2===r.type||i)?(0,a.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e):(0===r.type||1===r.type)&&i&&(0,a.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(2===r.type||null==r.type)&&null!=r.maxFeePerGas&&null!=r.maxPriorityFeePerGas)r.type=2;else if(0===r.type||1===r.type){let e=await t.getFeeData();(0,a.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{let e=await t.getFeeData();if(null==r.type){if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas){if(r.type=2,null!=r.gasPrice){let e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas)}else null!=e.gasPrice?((0,a.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,a.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"})}else(2===r.type||3===r.type)&&(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}return await (0,a.resolveProperties)(r)}async estimateGas(e){return o(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return o(this,"call").call(await this.populateCall(e))}async resolveName(e){let t=o(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){let t=o(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;let n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}t.AbstractSigner=l;class u extends l{address;constructor(e,t){super(t),(0,a.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new u(this.address,e)}#Q(e,t){(0,a.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#Q("transactions","signTransaction")}async signMessage(e){this.#Q("messages","signMessage")}async signTypedData(e,t,r){this.#Q("typed-data","signTypedData")}}t.VoidSigner=u},1471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;let r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},82231:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;let n=r(75553),i=r(11388),a=r(64933),s=r(62193),o=r(80225),c=r(64291),l=r(27417),u=r(94285),d=r(53720),f=r(55899),h=r(1624),p=r(10525),g="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});let r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new f.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||e&&"function"==typeof e.send&&"function"==typeof e.close)return new p.WebSocketProvider(e);let b=null;try{b=h.Network.from(e)}catch(e){}let m=[];if(r("publicPolygon")&&b&&("matic"===b.name?m.push(new f.JsonRpcProvider("https://polygon-rpc.com/",b,{staticNetwork:b})):"matic-amoy"===b.name&&m.push(new f.JsonRpcProvider("https://rpc-amoy.polygon.technology/",b,{staticNetwork:b}))),r("alchemy"))try{m.push(new a.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{m.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{m.push(new s.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{m.push(new o.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{m.push(new c.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),m.push(new l.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;m.push(new u.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(m.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===m.length)return m[0];let y=Math.floor(m.length/2);return y>2&&(y=2),b&&-1!==g.indexOf(b.name)&&(y=1),t&&t.quorum&&(y=t.quorum),new d.FallbackProvider(m,void 0,{quorum:y})}},96155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;let n=r(3052),i=r(57489),a=r(78800),s=r(45826),o=r(75553);function c(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,o.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class l{name;constructor(e){(0,o.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw Error("unsupported coin")}async decodeAddress(e,t){throw Error("unsupported coin")}}t.MulticoinProviderPlugin=l;class u extends l{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}}t.BasicMulticoinProviderPlugin=u;let d=RegExp("^(ipfs)://(.*)$","i"),f=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),d,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class h{provider;address;name;#Z;#Y;constructor(e,t,r){(0,o.defineProperties)(this,{provider:e,address:t,name:r}),this.#Z=null,this.#Y=new a.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#Z&&(this.#Z=(async()=>{try{return await this.#Y.supportsInterface("0x9061b923")}catch(e){if((0,o.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#Z=null,e}})()),await this.#Z}async #X(e,t){t=(t||[]).slice();let r=this.#Y.interface;t.unshift((0,s.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,o.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,s.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{let i=await this.#Y[e](...t);if(n)return r.decodeFunctionResult(n,i)[0];return i}catch(e){if(!(0,o.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{let e=await this.#X("addr(bytes32)");if(null==e||e===i.ZeroAddress)return null;return e}catch(e){if((0,o.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<0x80000000){let t=e+0x80000000,r=await this.#X("addr(bytes32,uint)",[t]);if((0,o.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(let r of this.provider.plugins)if(r instanceof l&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;let r=await this.#X("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;let a=await t.decodeAddress(e,r);if(null!=a)return a;(0,o.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){let t=await this.#X("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){let e=await this.#X("contenthash(bytes32)");if(null==e||"0x"===e)return null;let t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,o.encodeBase58)("0x"+t[2])}`}let r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,o.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){let e=[{type:"name",value:this.name}];try{let t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r<f.length;r++){let n=t.match(f[r]);if(null==n)continue;let i=n[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{let r=c(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:r}),{linkage:e,url:r}}case"erc721":case"erc1155":{let r="erc721"===i?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:t});let s=await this.getAddress();if(null==s)return e.push({type:"!owner",value:""}),{url:null,linkage:e};let l=(n[2]||"").split("/");if(2!==l.length)return e.push({type:`!${i}caip`,value:n[2]||""}),{url:null,linkage:e};let u=l[1],f=new a.Contract(l[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===i){let t=await f.ownerOf(u);
4if(s!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===i){let t=await f.balanceOf(s,u);if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let h=await f[r](u);if(null==h||"0x"===h)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),"erc1155"===i&&(h=h.replace("{id}",(0,o.toBeHex)(u,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=c(h)),e.push({type:"metadata-url",value:h});let p={},g=await new o.FetchRequest(h).send();g.assertOk();try{p=g.bodyJson}catch(t){try{e.push({type:"!metadata",value:g.bodyText})}catch(r){let t=g.body;t&&e.push({type:"!metadata",value:(0,o.hexlify)(t)})}return{url:null,linkage:e}}if(!p)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(p)});let b=p.image;if("string"!=typeof b)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(b.match(/^(https:\/\/|data:)/i));else{let t=b.match(d);if(null==t)return e.push({type:"!imageUrl-ipfs",value:b}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:b}),b=c(b)}return e.push({type:"url",value:b}),{linkage:e,url:b}}}}}catch(e){}return{linkage:e,url:null}}static async getEnsAddress(e){let t=await e.getNetwork(),r=t.getPlugin("org.ethers.plugins.network.Ens");return(0,o.assert)(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),r.address}static async #ee(e,t){let r=await h.getEnsAddress(e);try{let n=new a.Contract(r,["function resolver(bytes32) view returns (address)"],e),o=await n.resolver((0,s.namehash)(t),{enableCcipRead:!0});if(o===i.ZeroAddress)return null;return o}catch(e){throw e}return null}static async fromName(e,t){let r=t;for(;;){if(""===r||"."===r||"eth"!==t&&"eth"===r)return null;let n=await h.#ee(e,r);if(null!=n){let i=new h(e,n,t);if(r!==t&&!await i.supportsWildcard())return null;return i}r=r.split(".").slice(1).join(".")}}}t.EnsResolver=h},97345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;let n=r(3052),i=r(91971),a=r(36280),s=r(75553),o=BigInt(0);function c(e,t){return function(r){return null==r?t:e(r)}}function l(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw Error("not an array");return r.map(t=>e(t))}}function u(e,t){return r=>{let n={};for(let i in e){let a=i;if(t&&i in t&&!(a in r)){for(let e of t[i])if(e in r){a=e;break}}try{let t=e[i](r[a]);void 0!==t&&(n[i]=t)}catch(t){let e=t instanceof Error?t.message:"not-an-error";(0,s.assert)(!1,`invalid value for value.${i} (${e})`,"BAD_DATA",{value:r})}}return n}}function d(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,s.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function f(e){return(0,s.assertArgument)((0,s.isHexString)(e,!0),"invalid data","value",e),e}function h(e){return(0,s.assertArgument)((0,s.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=c,t.arrayOf=l,t.object=u,t.formatBoolean=d,t.formatData=f,t.formatHash=h,t.formatUint256=function(e){if(!(0,s.isHexString)(e))throw Error("invalid uint256");return(0,s.zeroPadValue)(e,32)};let p=u({address:n.getAddress,blockHash:h,blockNumber:s.getNumber,data:f,index:s.getNumber,removed:c(d,!1),topics:l(h),transactionHash:h,transactionIndex:s.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};let g=u({hash:c(h),parentHash:h,parentBeaconBlockRoot:c(h,null),number:s.getNumber,timestamp:s.getNumber,nonce:c(f),difficulty:s.getBigInt,gasLimit:s.getBigInt,gasUsed:s.getBigInt,stateRoot:c(h,null),receiptsRoot:c(h,null),blobGasUsed:c(s.getBigInt,null),excessBlobGas:c(s.getBigInt,null),miner:c(n.getAddress),prevRandao:c(h,null),extraData:f,baseFeePerGas:c(s.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){let t=g(e);return t.transactions=e.transactions.map(e=>
4"string"==typeof e?e:x(e)),t};let b=u({transactionIndex:s.getNumber,blockNumber:s.getNumber,transactionHash:h,address:n.getAddress,topics:l(h),data:f,index:s.getNumber,blockHash:h},{index:["logIndex"]});function m(e){return b(e)}t.formatReceiptLog=m;let y=u({to:c(n.getAddress,null),from:c(n.getAddress,null),contractAddress:c(n.getAddress,null),index:s.getNumber,root:c(s.hexlify),gasUsed:s.getBigInt,blobGasUsed:c(s.getBigInt,null),logsBloom:c(f),blockHash:h,hash:h,logs:l(m),blockNumber:s.getNumber,cumulativeGasUsed:s.getBigInt,effectiveGasPrice:c(s.getBigInt),blobGasPrice:c(s.getBigInt,null),status:c(s.getNumber),type:c(s.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function x(e){e.to&&(0,s.getBigInt)(e.to)===o&&(e.to="0x0000000000000000000000000000000000000000");let t=u({hash:h,index:c(s.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,s.getNumber)(e),accessList:c(a.accessListify,null),blobVersionedHashes:c(l(h,!0),null),blockHash:c(h,null),blockNumber:c(s.getNumber,null),transactionIndex:c(s.getNumber,null),from:n.getAddress,gasPrice:c(s.getBigInt),maxPriorityFeePerGas:c(s.getBigInt),maxFeePerGas:c(s.getBigInt),maxFeePerBlobGas:c(s.getBigInt,null),gasLimit:s.getBigInt,to:c(n.getAddress,null),value:s.getBigInt,nonce:s.getNumber,data:f,creates:c(n.getAddress,null),chainId:c(s.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),(1===e.type||2===e.type)&&null==e.accessList&&(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){let e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,s.getBigInt)(t.blockHash)===o&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return y(e)},t.formatTransactionResponse=x},74650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(83774);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(54509);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var a=r(1471);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return a.showThrottleMessage}});var s=r(82231);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return s.getDefaultProvider}});var o=r(96155);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return o.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return o.MulticoinProviderPlugin}});var c=r(1624);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return c.Network}});var l=r(18685);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}});var u=r(853);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return u.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return u.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return u.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return u.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return u.FetchUrlFeeDataNetworkPlugin}});var d=r(15367);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return d.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return d.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return d.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return d.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return d.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return d.copyRequest}});
4var f=r(53720);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return f.FallbackProvider}});var h=r(55899);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return h.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return h.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return h.JsonRpcSigner}});var p=r(19214);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var g=r(64933);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return g.AlchemyProvider}});var b=r(11388);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return b.AnkrProvider}});var m=r(80225);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return m.CloudflareProvider}});var y=r(62193);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return y.ChainstackProvider}});var x=r(64291);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return x.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return x.EtherscanPlugin}});var w=r(27417);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return w.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return w.InfuraWebSocketProvider}});var v=r(26300);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return v.PocketProvider}});var A=r(94285);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return A.QuickNodeProvider}});let P=r(64972);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return P.IpcSocketProvider}});var E=r(97211);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return E.SocketProvider}});var O=r(10525);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return O.WebSocketProvider}});var k=r(97211);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return k.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return k.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return k.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return k.SocketEventSubscriber}})},1624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;let n=r(36280),i=r(75553),a=r(853),s=new Map;class o{#et;#er;#R;constructor(e,t){this.#et=e,this.#er=(0,i.getBigInt)(t),this.#R=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#et}set name(e){this.#et=e}get chainId(){return this.#er}set chainId(e){this.#er=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}if(null!=e.name)return this.name===e.name}return!1}get plugins(){return Array.from(this.#R.values())}attachPlugin(e){if(this.#R.get(e.name))throw Error(`cannot replace existing plugin: ${e.name} `);return this.#R.set(e.name,e.clone()),this}getPlugin(e){return this.#R.get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){let e=new o(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){let t=this.getPlugin("org.ethers.plugins.network.GasCost")||new a.GasCostPlugin,r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n<e.data.length;n+=2)"00"===e.data.substring(n,n+2)?r+=t.txDataZero:r+=t.txDataNonzero;if(e.accessList){let i=(0,n.accessListify)(e.accessList);for(let e in i)r+=t.txAccessListAddress+t.txAccessListStorageKey*i[e].storageKeys.length}return r}static from(e){if(function(){u||(u=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",0xaa36a7,{ensNetwork:0xaa36a7}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[l("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}
4),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[l("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",0xaa37dc,{}),e("xdai",100,{ensNetwork:1}));function e(e,t,r){let n=function(){let n=new o(e,t);return null!=r.ensNetwork&&n.attachPlugin(new a.EnsPlugin(null,r.ensNetwork)),n.attachPlugin(new a.GasCostPlugin),(r.plugins||[]).forEach(e=>{n.attachPlugin(e)}),n};o.register(e,n),o.register(t,n),r.altNames&&r.altNames.forEach(e=>{o.register(e,n)})}}(),null==e)return o.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){let t=s.get(e);if(t)return t();if("bigint"==typeof e)return new o("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);let t=new o(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new a.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));let r=s.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),s.set(e,t)}}function c(e,t){let r=String(e);if(!r.match(/^[0-9.]+$/))throw Error(`invalid gwei value: ${e}`);let n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw Error(`invalid gwei value: ${e}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let e=BigInt(n[1].substring(0,9));!n[1].substring(9).match(/^0+$/)&&e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function l(e){return new a.FetchUrlFeeDataNetworkPlugin(e,async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{let[t,i]=await Promise.all([r.send(),e()]),a=(n=t).bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:c(a.maxFee,9),maxPriorityFeePerGas:c(a.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}})}t.Network=o;let u=!1},853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;let n=r(58674),i=r(75553);class a{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new a(this.name)}}t.NetworkPlugin=a;class s extends a{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);let r={effectiveBlock:e};function a(e,n){let a=(t||{})[e];null==a&&(a=n),(0,i.assertArgument)("number"==typeof a,`invalud value for ${e}`,"costs",t),r[e]=a}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new s(this.effectiveBlock,this)}}t.GasCostPlugin=s;class o extends a{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new o(this.address,this.targetNetwork)}}t.EnsPlugin=o;class c extends a{#en;get feeDataFunc(){return this.#en}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#en=e}async getFeeData(e){return await this.#en(e)}clone(){return new c(this.#en)}}t.FeeDataNetworkPlugin=c;class l extends a{#ei;#ea;get url(){return this.#ei}get processFunc(){return this.#ea}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#ei=e,this.#ea=t}clone(){return this}}t.FetchUrlFeeDataNetworkPlugin=l},64933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899),o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");let r=a.Network.from(e);
4null==t&&(t=o),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){let t;let{trace:r,tx:i}=await (0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==r||null==i)return null;let a=!1;try{t=r[0].result.output,a="Reverted"===r[0].error}catch(e){}if(t)return(0,n.assert)(!a,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:t,reason:null,transaction:i,invocation:null,revert:null}),t;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:r})}return await super._perform(e)}isCommunityResource(){return this.apiKey===o}static getRequest(e,t){null==t&&(t=o);let r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===o&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=c},11388:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899),o="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");let r=a.Network.from(e);null==t&&(t=o),super(c.getRequest(r,t),r,{polling:!0,staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=o);let r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===o&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===o}}t.AnkrProvider=c},19214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;let n=r(75553),i=r(55899);class a extends i.JsonRpcApiPollingProvider{#es;constructor(e,t,r){let i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#es=async(t,r)=>{let n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{let t=await e.request(n);
4return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(t){let e=Error(t.message);throw e.code=t.code,e.data=t.data,e.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:e}),e}}}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{let t=await this.#es(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);let t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter(t=>t.toLowerCase()===e).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#es("eth_requestAccounts",[])}catch(t){let e=t.payload;throw this.getRpcError(e,{id:e.id,error:t})}return await super.getSigner(e)}}t.BrowserProvider=a},62193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899);function o(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");let r=a.Network.from(e);null==t&&(t=o(r.name)),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===o(this._network.name)}static getRequest(e,t){null==t&&(t=o(e.name));let r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===o(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=c},80225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;let n=r(75553),i=r(1624),a=r(55899);class s extends a.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");let t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=s},64291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;let n=r(93230),i=r(78800),a=r(36280),s=r(75553),o=r(83774),c=r(1624),l=r(853),u=r(1471),d="org.ethers.plugins.provider.Etherscan";class f extends l.NetworkPlugin{baseUrl;constructor(e){super(d),(0,s.defineProperties)(this,{baseUrl:e})}clone(){return new f(this.baseUrl)}}t.EtherscanPlugin=f;let h=["enableCcipRead"],p=1;class g extends o.AbstractProvider{network;apiKey;#eo;constructor(e,t){super();let r=c.Network.from(e);this.#eo=r.getPlugin(d),(0,s.defineProperties)(this,{apiKey:null!=t?t:null,network:r}),this.getBaseUrl()}getBaseUrl(){if(this.#eo)return this.#eo.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,s.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){let r=Object.keys(t).reduce((e,r)=>{let n=t[r];return null!=n&&(e+=`&${r}=${n}`),e},""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}async detectNetwork(){return this.network}async fetch(e,t,r){let n=p++,i=r?this.getPostUrl():this.getUrl(e,t),a=r?this.getPostData(e,t):null;
4this.emit("debug",{action:"sendRequest",id:n,url:i,payload:a});let o=new s.FetchRequest(i);o.setThrottleParams({slotInterval:1e3}),o.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,u.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),o.processFunc=async(t,r)=>{let i=r.hasBody()?JSON.parse((0,s.toUtf8String)(r.body)):{},a=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&a&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):a&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},a&&(o.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),o.body=Object.keys(a).map(e=>`${e}=${a[e]}`).join("&"));let c=await o.send();try{c.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,s.assert)(!1,"response error","SERVER_ERROR",{request:o,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,s.assert)(!1,"missing response","SERVER_ERROR",{request:o,response:c}));let l=JSON.parse((0,s.toUtf8String)(c.body));return"proxy"===e?("2.0"!=l.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:l,reason:"invalid JSON-RPC"}),(0,s.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:o,response:c,info:{result:l}}
4)),l.error&&(this.emit("debug",{action:"receiveError",id:n,result:l,reason:"JSON-RPC error"}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:o,response:c,info:{result:l}}))):0==l.status&&("No records found"===l.message||"No transactions found"===l.message)||1==l.status&&("string"!=typeof l.message||l.message.match(/^OK/))||(this.emit("debug",{action:"receiveError",id:n,result:l}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:o,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:n,result:l}),l.result}_getTransactionPostData(e){let t={};for(let r in e){if(h.indexOf(r)>=0||null==e[r])continue;let n=e[r];if(("type"!==r||0!==n)&&("blockTag"!==r||"latest"!==n)){if(({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0})[r])n=(0,s.toQuantity)(n);else if("accessList"===r)n="["+(0,a.accessListify)(n).map(e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,s.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,s.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,s.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,s.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(e){}let i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){let t=a.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,s.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,s.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,s.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch(t=>this._checkError(e,t,e.signedTransaction));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,s.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw Error("EtherscanProvider does not support blockTag for call");let t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{let t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){var t;let r=this._getAddress(e);(t=r)&&"function"==typeof t.then&&(r=await r);try{let e=await this.fetch("contract",{action:"getabi",address:r}),t=JSON.parse(e);return new i.Contract(r,t,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=g},53720:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;let n=r(75553),i=r(83774),a=r(1624),s=BigInt("1"),o=BigInt("2");function c(){return new Date().getTime()}function l(e){return JSON.stringify(e,(e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t)}let u={stallTimeout:400,priority:1,weight:1},d={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function f(e,t){for(;(e.blockNumber<0||e.blockNumber<t)&&(e._updateNumber||(e._updateNumber=(async()=>{try{let t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=c()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}function h(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(h).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return h(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{let t=Object.keys(e);return t.sort(),"{"+t.map(t=>`${JSON.stringify(t)}:${h(e[t])}`).join(",")+"}"}}throw console.log("Could not serialize",e),Error("Hmm...")}function p(e){if("error"in e){let t=e.error;return{tag:h(t),value:t}}let t=e.result;return{tag:h(t),value:t}}function g(e,t){let r=new Map;for(let{value:e,tag:n,weight:i}of t){let t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(let t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function b(e,t){let r=0,n=new Map,i=null,a=[];for(let{value:e,tag:s,weight:o}of t)if(e instanceof Error){let t=n.get(s)||{value:e,weight:0};t.weight+=o,n.set(s,t),(null==i||t.weight>i.weight)&&(i=t)}else a.push(BigInt(e)),r+=o;if(r<e)return i&&i.weight>=e?i.value:void 0;a.sort((e,t)=>e<t?-1:t>e?1:0);let c=Math.floor(a.length/2);return a.length%2?a[c]:(a[c-1]+a[c]+s)/o}function m(e,t){let r=g(e,t);if(void 0!==r)return r;for(let e of t)if(e.value)return e.value}class y extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#ec;#el;#eu;constructor(e,t,r){super(t,r),this.#ec=e.map(e=>e instanceof i.AbstractProvider?Object.assign({provider:e},u,d):Object.assign({},u,e,d)),this.#el=-2,this.#eu=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#ec.reduce((e,t)=>e+=t.weight,0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#ec.reduce((e,t)=>e+t.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#ec.map(e=>{let t=Object.assign({},e);for(let e in t)"_"===e[0]&&delete t[e];return t})}async _detectNetwork(){return a.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{let r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#ed(e){let t=Array.from(e).map(e=>e.config),r=this.#ec.slice();for(let e of(!function(e){for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort((e,t)=>
4e.priority-t.priority),r))if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#ef(e,t){let r=this.#ed(e);if(null==r)return null;let n={config:r,result:null,didBump:!1,perform:null,staller:null},i=c();return n.perform=(async()=>{try{r.requests++;let e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}let e=c()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await (e=r.stallTimeout,new Promise(t=>{setTimeout(t,e)})),n.staller=null})(),e.add(n),n}async #eh(){let e=this.#eu;if(!e){let t=[];this.#ec.forEach(e=>{t.push((async()=>{await f(e,0),e._lastFatalError||(e._network=await e.provider.getNetwork())})())}),this.#eu=e=(async()=>{await Promise.all(t);let e=null;for(let t of this.#ec){if(t._lastFatalError)continue;let r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async #ep(e,t){let r=[];for(let t of e)if(null!=t.result){let{tag:e,value:n}=p(t.result);r.push({tag:e,value:n,weight:t.config.weight})}if(!(r.reduce((e,t)=>e+t.weight,0)<this.quorum)){switch(t.method){case"getBlockNumber":{-2===this.#el&&(this.#el=Math.ceil((0,n.getNumber)(b(this.quorum,this.#ec.filter(e=>!e._lastFatalError).map(e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight}))))));let e=function(e,t){let r;if(1===e)return(0,n.getNumber)(b(e,t),"%internal");let i=new Map,a=(e,t)=>{let r=i.get(e)||{result:e,weight:0};r.weight+=t,i.set(e,r)};for(let{weight:e,value:r}of t){let t=(0,n.getNumber)(r);a(t-1,e),a(t,e),a(t+1,e)}let s=0;for(let{weight:t,result:n}of i.values())t>=e&&(t>s||null!=r&&t===s&&n>r)&&(s=t,r=n);return r}(this.quorum,r);if(void 0===e)return;return e>this.#el&&(this.#el=e),this.#el}case"getGasPrice":case"getPriorityFee":case"estimateGas":return b(this.quorum,r);case"getBlock":if("blockTag"in t&&"pending"===t.blockTag)return m(this.quorum,r);return g(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return g(this.quorum,r);case"broadcastTransaction":return m(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${l(t.method)})`})}}async #eg(e,t){if(0===e.size)throw Error("no runners?!");let r=[],i=0;for(let t of e){if(t.perform&&r.push(t.perform),t.staller){r.push(t.staller);continue}!t.didBump&&(t.didBump=!0,i++)}let a=await this.#ep(e,t);if(void 0!==a){if(a instanceof Error)throw a;return a}for(let r=0;r<i;r++)this.#ef(e,t);return(0,n.assert)(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map(e=>l(e.result))}}),await Promise.race(r),await this.#eg(e,t)}async _perform(e){if("broadcastTransaction"===e.method){let t=this.#ec.map(e=>null),r=this.#ec.map(async({provider:r,weight:n},i)=>{try{let a=await r._perform(e);t[i]=Object.assign(p({result:a}),{weight:n})}catch(e){t[i]=Object.assign(p({error:e}),{weight:n})}});for(;;){for(let{value:e}of t.filter(e=>null!=e))if(!(e instanceof Error))return e;let e=g(this.quorum,t.filter(e=>null!=e));if((0,n.isError)(e,"INSUFFICIENT_FUNDS"))throw e;let i=r.filter((e,r)=>null==t[r]);if(0===i.length)break;await Promise.race(i)}let i=m(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(l)}}),i instanceof Error)throw i;return i}await this.#eh();let t=new Set,r=0;for(;;){let n=this.#ef(t,e);if(null==n||(r+=n.config.weight)>=this.quorum)break}let i=await this.#eg(t,e);for(let e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(let{provider:e}of this.#ec)e.destroy();super.destroy()}}t.FallbackProvider=y},27417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899),o=r(10525),c="84842078b09946638c03157f83405213";class l extends o.WebSocketProvider{projectId;projectSecret;constructor(e,t){let r=new u(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"}),super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===c}}t.InfuraWebSocketProvider=l;class u extends s.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");let i=a.Network.from(e);
4null==t&&(t=c),null==r&&(r=null),super(u.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new u(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===c}static getWebSocketProvider(e,t){return new l(e,t)}static getRequest(e,t,r){null==t&&(t=c),null==r&&(r=null);let a=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return a.allowGzip=!0,r&&a.setCredentials("",r),t===c&&(a.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),a}}t.InfuraProvider=u},64972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0,t.IpcSocketProvider=void 0},55899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;let n=r(93230),i=r(3052),a=r(45826),s=r(36280),o=r(75553),c=r(83774),l=r(54509),u=r(1624),d=r(21368),f=r(48578),h="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||h.indexOf(typeof e)>=0||"function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce((t,r)=>(t[r]=e[r],t),{});throw Error(`should not happen: ${e} (${typeof e})`)}function g(e){return e?e.toLowerCase():e}function b(e){return e&&"number"==typeof e.pollingInterval}let m={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1048576,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class y extends l.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,o.defineProperties)(this,{address:t})}connect(e){(0,o.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){let t=p(e),r=[];if(t.from){let n=t.from;r.push((async()=>{let r=await (0,i.resolveAddress)(n,this.provider);(0,o.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){let e=t.to;r.push((async()=>{t.to=await (0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);let n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){let t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise((e,n)=>{let i=[1e3,100],a=0,s=async()=>{try{let n=await this.provider.getTransaction(r);if(null!=n){e(n.replaceableTransaction(t));return}}catch(e){if((0,o.isError)(e,"CANCELLED")||(0,o.isError)(e,"BAD_DATA")||(0,o.isError)(e,"NETWORK_ERROR")||(0,o.isError)(e,"UNSUPPORTED_OPERATION")){null==e.info&&(e.info={}),e.info.sendTransactionHash=r,n(e);return}if((0,o.isError)(e,"INVALID_ARGUMENT")&&(a++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,a>10)){n(e);return}this.provider.emit("error",(0,o.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout(()=>{s()},i.pop()||4e3)};s()})}async signTransaction(e){let t=p(e);if(t.from){let r=await (0,i.resolveAddress)(t.from,this.provider);(0,o.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;let r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){let t="string"==typeof e?(0,o.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,o.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){let n=p(r),s=await a.TypedDataEncoder.resolveNames(e,t,n,async e=>{let t=await (0,i.resolveAddress)(e);return(0,o.assertArgument)(null!=t,"TypedData does not support null address","value",e),t});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(a.TypedDataEncoder.getPayload(s.domain,t,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){let t="string"==typeof e?(0,o.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,o.hexlify)(t)])}}t.JsonRpcSigner=y;class x extends c.AbstractProvider{#w;#eb;#em;#ey;#ex;#ew;#ev;#eA(){if(this.#ey)return;let e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#ey=setTimeout(()=>{this.#ey=null;let e=this.#em;for(this.#em=[];e.length;){let t=[e.shift()];for(;e.length&&t.length!==this.#w.batchMaxCount;)if(t.push(e.shift()),JSON.stringify(t.map(e=>e.payload)).length>this.#w.batchMaxSize){e.unshift(t.pop());break}(async()=>{let e=1===t.length?t[0].payload:t.map(e=>e.payload);
4this.emit("debug",{action:"sendRpcPayload",payload:e});try{let r=await this._send(e);for(let{resolve:e,reject:n,payload:i}of(this.emit("debug",{action:"receiveRpcResult",result:r}),t)){if(this.destroyed){n((0,o.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}let t=r.filter(e=>e.id===i.id)[0];if(null==t){let e=(0,o.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e);continue}if("error"in t){n(this.getRpcError(i,t));continue}e(t.result)}}catch(e){for(let{reject:r}of(this.emit("debug",{action:"receiveRpcError",error:e}),t))r(e)}})()}},e)}constructor(e,t){super(e,t),this.#eb=1,this.#w=Object.assign({},m,t||{}),this.#em=[],this.#ey=null,this.#ew=null,this.#ev=null;{let e=null,t=new Promise(t=>{e=t});this.#ex={promise:t,resolve:e}}let r=this._getOption("staticNetwork");"boolean"==typeof r?((0,o.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#ew=u.Network.from(e))):r&&((0,o.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#ew=r)}_getOption(e){return this.#w[e]}get _network(){return(0,o.assert)(this.#ew,"network is not available yet","NETWORK_ERROR"),this.#ew}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,o.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){let r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}let t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){let e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#ew)return this.#ew}return this.#ev||(this.ready?this.#ev=(async()=>{try{let e=u.Network.from((0,o.getBigInt)(await this.send("eth_chainId",[])));return this.#ev=null,e}catch(e){throw this.#ev=null,e}})():this.#ev=(async()=>{let e;let t={id:this.#eb++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:t});try{e=(await this._send(t))[0],this.#ev=null}catch(e){throw this.#ev=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}
4if(this.emit("debug",{action:"receiveRpcResult",result:e}),"result"in e)return u.Network.from((0,o.getBigInt)(e.result));throw this.getRpcError(t,e)})()),await this.#ev}_start(){null!=this.#ex&&null!=this.#ex.resolve&&(this.#ex.resolve(),this.#ex=null,(async()=>{for(;null==this.#ew&&!this.destroyed;)try{this.#ew=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,o.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await new Promise(e=>{setTimeout(e,1e3)})}this.#eA()})())}async _waitUntilReady(){if(null!=this.#ex)return await this.#ex.promise}_getSubscriber(e){return"pending"===e.type?new d.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new f.PollingEventSubscriber(this,e.filter):new d.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new c.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#ex}getRpcTransaction(e){let t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,o.toQuantity)((0,o.getBigInt)(e[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{null!=e[r]&&(t[r]=(0,o.hexlify)(e[r]))}),e.accessList&&(t.accessList=(0,s.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map(e=>e.toLowerCase())),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[g(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[g(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[g(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[g(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(g):e.filter.address=g(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){let{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){let t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,o.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){let t=function e(t){if(null==t)return null;if("string"==typeof t.message&&t.message.match(/revert/i)&&(0,o.isHexString)(t.data))return{message:t.message,data:t.data};if("object"==typeof t){for(let r in t){let n=e(t[r]);if(n)return n}return null}if("string"==typeof t)try{return e(JSON.parse(t))}catch(e){}return null}(i),a=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return a.info={error:i,payload:e},a}let a=JSON.stringify(function(e){let t=[];return!function e(t,r){if(null!=t){if("string"==typeof t.message&&r.push(t.message),"object"==typeof t)for(let n in t)e(t[n],r);if("string"==typeof t)try{return e(JSON.parse(t),r)}catch(e){}}}(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i))return(0,o.makeError)("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:e,error:i}});if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){let t=e.params[0];if(a.match(/insufficient funds|base fee exceeds gas limit/i))return(0,o.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(a.match(/nonce/i)&&a.match(/too low/i))return(0,o.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(a.match(/replacement transaction/i)&&a.match(/underpriced/i))return(0,o.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(a.match(/only replay-protected/i))return(0,o.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let s=!!a.match(/the method .* does not exist/i);return(!s&&i&&i.details&&i.details.startsWith("Unauthorized method:")&&(s=!0),s)?(0,o.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}
4):(0,o.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,o.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));let r=this.#eb++,n=new Promise((n,i)=>{this.#em.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})});return this.#eA(),n}async getSigner(e){null==e&&(e=0);let t=this.send("eth_accounts",[]);if("number"==typeof e){let r=await t;if(e>=r.length)throw Error("no such account");return new y(this,r[e])}let{accounts:r}=await (0,o.resolveProperties)({network:this.getNetwork(),accounts:t});for(let t of(e=(0,i.getAddress)(e),r))if((0,i.getAddress)(t)===e)return new y(this,e);throw Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new y(this,e))}destroy(){for(let{payload:e,reject:t}of(this.#ey&&(clearTimeout(this.#ey),this.#ey=null),this.#em))t((0,o.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#em=[],super.destroy()}}t.JsonRpcApiProvider=x;class w extends x{#eP;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=m.pollingInterval),this.#eP=r}_getSubscriber(e){let t=super._getSubscriber(e);return b(t)&&(t.pollingInterval=this.#eP),t}get pollingInterval(){return this.#eP}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw Error("invalid interval");this.#eP=e,this._forEachSubscriber(e=>{b(e)&&(e.pollingInterval=this.#eP)})}}t.JsonRpcApiPollingProvider=w;class v extends w{#eE;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),"string"==typeof e?this.#eE=new o.FetchRequest(e):this.#eE=e.clone()}_getConnection(){return this.#eE.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){let t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");let r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}t.JsonRpcProvider=v},26300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899),o="62e1ad51b37b8e00394bda3b";class c extends s.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");let i=a.Network.from(e);null==t&&(t=o),null==r&&(r=null),super(c.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new c(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=o);let a=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return a.allowGzip=!0,r&&a.setCredentials("",r),t===o&&(a.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),a}isCommunityResource(){return this.applicationId===o}}t.PocketProvider=c},94285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;let n=r(75553),i=r(1471),a=r(1624),s=r(55899),o="919b412a057b5e9c9b6dce193c5a60242d6efadb";class c extends s.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");let r=a.Network.from(e);null==t&&(t=o),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new c(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===o}static getRequest(e,t){null==t&&(t=o);let r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===o&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=c},97211:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;let n=r(83774),i=r(75553),a=r(55899);class s{#eO;#v;get filter(){return JSON.parse(this.#v)}#ek;#eB;#eS;constructor(e,t){this.#eO=e,this.#v=JSON.stringify(t),this.#ek=null,this.#eB=null,this.#eS=null}start(){this.#ek=this.#eO.send("eth_subscribe",this.filter).then(e=>(this.#eO._register(e,this),e))}stop(){this.#ek.then(e=>{this.#eO.destroyed||this.#eO.send("eth_unsubscribe",[e])}),this.#ek=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#eB=!!e}resume(){this.#eB=null}_handleMessage(e){if(null!=this.#ek&&null===this.#eB){let t=this.#eS;t=null==t?this._emit(this.#eO,e):t.then(async()=>{await this._emit(this.#eO,e)}),this.#eS=t.then(()=>{this.#eS===t&&(this.#eS=null)})}}async _emit(e,t){throw Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=s;class o extends s{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=o;class c extends s{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=c;class l extends s{#eC;get logFilter(){return JSON.parse(this.#eC)}constructor(e,t){super(e,["logs",t]),this.#eC=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=l;class u extends a.JsonRpcApiProvider{#eT;#N;#eI;constructor(e,t){let r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#eT=new Map,this.#N=new Map,this.#eI=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new o(this);case"pending":return new c(this);case"event":return new l(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#N.set(e,t);let r=this.#eI.get(e);if(r){for(let e of r)t._handleMessage(e);this.#eI.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);let t=new Promise((t,r)=>{this.#eT.set(e.id,{payload:e,resolve:t,reject:r})});return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){let t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){let e=this.#eT.get(t.id);if(null==e){this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));return}this.#eT.delete(t.id),e.resolve(t)}else if(t&&"eth_subscription"===t.method){let e=t.params.subscription,r=this.#N.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#eI.get(e);null==r&&(r=[],this.#eI.set(e,r)),r.push(t.params.result)}}else{this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));return}}async _write(e){throw Error("sub-classes must override this")}}t.SocketProvider=u},10525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;let n=r(16765),i=r(97211);class a extends i.SocketProvider{#eE;#eN;get websocket(){if(null==this.#eN)throw Error("websocket closed");return this.#eN}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#eE=()=>new n.WebSocket(e),this.#eN=this.#eE()):"function"==typeof e?(this.#eE=e,this.#eN=e()):(this.#eE=null,this.#eN=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#eN&&(this.#eN.close(),this.#eN=null),super.destroy()}}t.WebSocketProvider=a},15367:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;let n=r(75553),i=r(36280),a=BigInt(0);function s(e){return null==e?null:e}function o(e){return null==e?null:e.toString()}class c{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)})}toJSON(){let{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:o(e),maxFeePerGas:o(t),maxPriorityFeePerGas:o(r)}}}t.FeeData=c,t.copyRequest=function(e){let t={};for(let r of(e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data)),"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/)))r in e&&null!=e[r]&&(t[r]=(0,n.getBigInt)(e[r],`request.${r}`));for(let r of"type,nonce".split(/,/))r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map(e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e))),t};class l{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#eR;constructor(e,t){this.#eR=e.transactions.map(e=>"string"!=typeof e?new f(e,t):e),(0,n.defineProperties)(this,{provider:t,hash:s(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:s(e.prevRandao),extraData:e.extraData,baseFeePerGas:s(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#eR.map(e=>"string"==typeof e?e:e.hash)}get prefetchedTransactions(){let e=this.#eR.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){let{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:a,miner:s,prevRandao:c,nonce:l,number:u,parentHash:d,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:p,timestamp:g,transactions:b}=this;return{_type:"Block",baseFeePerGas:o(e),difficulty:o(t),extraData:r,gasLimit:o(n),gasUsed:o(i),blobGasUsed:o(this.blobGasUsed),excessBlobGas:o(this.excessBlobGas),hash:a,miner:s,prevRandao:c,nonce:l,number:u,parentHash:d,timestamp:g,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:p,transactions:b}}[Symbol.iterator](){let e=0,t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#eR.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"==typeof e)t=this.#eR[e];else{let r=e.toLowerCase();for(let e of this.#eR){if("string"==typeof e){if(e!==r)continue;t=e;break}if(e.hash!==r){t=e;break}}}if(null==t)throw Error("no such tx");return"string"==typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){let t=this.prefetchedTransactions;if("number"==typeof e)return t[e];for(let r of(e=e.toLowerCase(),t))if(r.hash===e)return r;(0,n.assertArgument)(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw Error("");return{orphan:"drop-block",hash:this.hash,number:this.number}}}t.Block=l;class u{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;let r=Object.freeze(e.topics.slice());(0,n.defineProperties)(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){let{address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:c}=this;return{_type:"log",address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:c}}async getBlock(){let e=await this.provider.getBlock(this.blockHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){let e=await this.provider.getTransaction(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){let e=await this.provider.getTransactionReceipt(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:this.transactionHash,blockHash:this.blockHash,blockNumber:this.blockNumber,address:this.address,data:this.data,topics:Object.freeze(this.topics.slice()),index:this.index}}}}t.Log=u;class d{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#eM;constructor(e,t){this.#eM=Object.freeze(e.logs.map(e=>new u(e,t)));let r=a;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#eM}toJSON(){let{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:a,blockNumber:s,logs
4Bloom:c,logs:l,status:u,root:d}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:s,contractAddress:r,cumulativeGasUsed:o(this.cumulativeGasUsed),from:t,gasPrice:o(this.gasPrice),blobGasUsed:o(this.blobGasUsed),blobGasPrice:o(this.blobGasPrice),gasUsed:o(this.gasUsed),hash:n,index:i,logs:l,logsBloom:c,root:d,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){let e=await this.provider.getBlock(this.blockHash);if(null==e)throw Error("TODO");return e}async getTransaction(){let e=await this.provider.getTransaction(this.hash);if(null==e)throw Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return p(this)}reorderedEvent(e){return(0,n.assert)(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),h(this,e)}}t.TransactionReceipt=d;class f{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;#e_;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.#e_=-1}toJSON(){let{blockNumber:e,blockHash:t,index:r,hash:n,type:i,to:a,from:s,nonce:c,data:l,signature:u,accessList:d,blobVersionedHashes:f}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:e,blockHash:t,blobVersionedHashes:f,chainId:o(this.chainId),data:l,from:s,gasLimit:o(this.gasLimit),gasPrice:o(this.gasPrice),hash:n,maxFeePerGas:o(this.maxFeePerGas),maxPriorityFeePerGas:o(this.maxPriorityFeePerGas),maxFeePerBlobGas:o(this.maxFeePerBlobGas),nonce:c,signature:u,to:a,index:r,type:i,value:o(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){let t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;let t=this.provider.getBlock(e);if(null==t)throw Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){let{tx:e,blockNumber:t}=await (0,n.resolveProperties)({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){let r=null==e?1:e,i=null==t?0:t,s=this.#e_,o=-1,c=-1===s,l=async()=>{if(c)return null;let{blockNumber:e,nonce:t}=await (0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce){s=e;return}if(c)return null;let i=await this.getTransaction();if(!i||null==i.blockNumber)for(-1===o&&(o=s-3)<this.#e_&&(o=this.#e_);o<=e;){if(c)return null;let t=await this.provider.getBlock(o,!0);if(null==t)break;for(let e of t)if(e===this.hash)return;for(let i=0;i<t.length;i++){let o=await t.getTransaction(i);if(o.from===this.from&&o.nonce===this.nonce){if(c)return null;let t=await this.provider.getTransactionReceipt(o.hash);if(null==t||e-t.blockNumber+1<r)return;let i="replaced";o.data===this.data&&o.to===this.to&&o.value===this.value?i="repriced":"0x"===o.data&&o.from===o.to&&o.value===a&&(i="cancelled"),(0,n.assert)(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:o.replaceableTransaction(s),hash:o.hash,receipt:t})}}o++}},u=e=>{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},d=await this.provider.getTransactionReceipt(this.hash);if(0===r)return u(d);if(d){if(await d.confirmations()>=r)return u(d)}else if(await l(),0===r)return null;let f=new Promise((e,t)=>
4{let a=[],o=()=>{a.forEach(e=>e())};if(a.push(()=>{c=!0}),i>0){let e=setTimeout(()=>{o(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))},i);a.push(()=>{clearTimeout(e)})}let d=async n=>{if(await n.confirmations()>=r){o();try{e(u(n))}catch(e){t(e)}}};if(a.push(()=>{this.provider.off(this.hash,d)}),this.provider.on(this.hash,d),s>=0){let e=async()=>{try{await l()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED")){o(),t(e);return}}c||this.provider.once("block",e)};a.push(()=>{this.provider.off("block",e)}),this.provider.once("block",e)}});return await f}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),p(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);let t=new f(this,this.provider);return t.#e_=e,t}}function h(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function p(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},18685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;let n=r(75553),i=r(54509);class a extends i.AbstractSigner{signer;#ej;#eF;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#ej=null,this.#eF=0}async getAddress(){return this.signer.getAddress()}connect(e){return new a(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#ej&&(this.#ej=super.getNonce("pending"));let e=this.#eF;return await this.#ej+e}return super.getNonce(e)}increment(){this.#eF++}reset(){this.#eF=0,this.#ej=null}async sendTransaction(e){let t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=a},21368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;let n=r(75553),i=r(48578);class a{#eO;#eU;#eL;#eD;#ew;#eG;constructor(e){this.#eO=e,this.#eU=null,this.#eL=this.#eH.bind(this),this.#eD=!1,this.#ew=null,this.#eG=!1}_subscribe(e){throw Error("subclasses must override this")}_emitResults(e,t){throw Error("subclasses must override this")}_recover(e){throw Error("subclasses must override this")}async #eH(e){try{null==this.#eU&&(this.#eU=this._subscribe(this.#eO));let e=null;try{e=await this.#eU}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e){this.#eU=null,this.#eO._recoverSubscriber(this,this._recover(this.#eO));return}let t=await this.#eO.getNetwork();if(this.#ew||(this.#ew=t),this.#ew.chainId!==t.chainId)throw Error("chaid changed");if(this.#eG)return;let r=await this.#eO.send("eth_getFilterChanges",[e]);await this._emitResults(this.#eO,r)}catch(e){console.log("@TODO",e)}this.#eO.once("block",this.#eL)}#e$(){let e=this.#eU;e&&(this.#eU=null,e.then(e=>{this.#eO.destroyed||this.#eO.send("eth_uninstallFilter",[e])}))}start(){this.#eD||(this.#eD=!0,this.#eH(-2))}stop(){this.#eD&&(this.#eD=!1,this.#eG=!0,this.#e$(),this.#eO.off("block",this.#eL))}pause(e){e&&this.#e$(),this.#eO.off("block",this.#eL)}resume(){this.start()}}t.FilterIdSubscriber=a;class s extends a{#ez;constructor(e,t){super(e),this.#ez=JSON.parse(JSON.stringify(t))}_recover(e){return new i.PollingEventSubscriber(e,this.#ez)}async _subscribe(e){return await e.send("eth_newFilter",[this.#ez])}async _emitResults(e,t){for(let r of t)e.emit(this.#ez,e._wrapLog(r,e._network))}}t.FilterIdEventSubscriber=s;class o extends a{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(let r of t)e.emit("pending",r)}}t.FilterIdPendingSubscriber=o},48578:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;let n=r(75553);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new a(e):(0,n.isHexString)(t,32)?new l(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class a{#eO;#eL;#eq;#eV;constructor(e){this.#eO=e,this.#eL=null,this.#eq=4e3,this.#eV=-2}get pollingInterval(){return this.#eq}set pollingInterval(e){this.#eq=e}async #eH(){try{let e=await this.#eO.getBlockNumber();if(-2===this.#eV){this.#eV=e;return}if(e!==this.#eV){for(let t=this.#eV+1;t<=e;t++){if(null==this.#eL)return;await this.#eO.emit("block",t)}this.#eV=e}}catch(e){}null!=this.#eL&&(this.#eL=this.#eO._setTimeout(this.#eH.bind(this),this.#eq))}start(){this.#eL||(this.#eL=this.#eO._setTimeout(this.#eH.bind(this),this.#eq),this.#eH())}stop(){this.#eL&&(this.#eO._clearTimeout(this.#eL),this.#eL=null)}pause(e){this.stop(),e&&(this.#eV=-2)}resume(){this.start()}}t.PollingBlockSubscriber=a;class s{#eO;#eH;#eD;constructor(e){this.#eO=e,this.#eD=!1,this.#eH=e=>{this._poll(e,this.#eO)}}async _poll(e,t){throw Error("sub-classes must override this")}start(){this.#eD||(this.#eD=!0,this.#eH(-2),this.#eO.on("block",this.#eH))}stop(){this.#eD&&(this.#eD=!1,this.#eO.off("block",this.#eH))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=s;class o extends s{#eK;#eJ;constructor(e,t){super(e),this.#eK=t,this.#eJ=-2}pause(e){e&&(this.#eJ=-2),super.pause(e)}async _poll(e,t){let r=await t.getBlock(this.#eK);null!=r&&(-2===this.#eJ?this.#eJ=r.number:r.number>this.#eJ&&(t.emit(this.#eK,r.number),this.#eJ=r.number))}}t.PollingBlockTagSubscriber=o;class c extends s{#v;constructor(e,t){super(e),this.#v=i(t)}async _poll(e,t){throw Error("@TODO")}}t.PollingOrphanSubscriber=c;class l extends s{#eW;constructor(e,t){super(e),this.#eW=t}async _poll(e,t){let r=await t.getTransactionReceipt(this.#eW);r&&t.emit(this.#eW,r)}}t.PollingTransactionSubscriber=l;class u{#eO;#v;#eL;#eD;#eV;constructor(e,t){this.#eO=e,this.#v=i(t),this.#eL=this.#eH.bind(this),this.#eD=!1,this.#eV=-2}async #eH(e){if(-2===this.#eV)return;let t=i(this.#v);t.fromBlock=this.#eV+1,t.toBlock=e;let r=await this.#eO.getLogs(t);if(0===r.length){this.#eV<e-60&&(this.#eV=e-60);return}for(let e of r)this.#eO.emit(this.#v,e),this.#eV=e.blockNumber}start(){this.#eD||(this.#eD=!0,-2===this.#eV&&this.#eO.getBlockNumber().then(e=>{this.#eV=e}),this.#eO.on("block",this.#eL))}stop(){this.#eD&&(this.#eD=!1,this.#eO.off("block",this.#eL))}pause(e){this.stop(),e&&(this.#eV=-2)}resume(){this.start()}}t.PollingEventSubscriber=u},16765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;let n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}().WebSocket;t.WebSocket=n}
4,54938:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;let n=r(3052),i=r(75553);function a(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase()))}}t.accessListify=function(e){if(Array.isArray(e))return e.map((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),a(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),a(t.address,t.storageKeys)));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);let t=Object.keys(e).map(t=>{let r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return a(t,Object.keys(r).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}},19860:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;let n=r(3052),i=r(91971);function a(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=a,t.recoverAddress=function(e,t){return a(i.SigningKey.recoverPublicKey(e,t))}},36280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.accessListify=void 0;var n=r(54938);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(19860);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return i.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return i.recoverAddress}});var a=r(69648);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return a.Transaction}})},69648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;let n=r(3052),i=r(12201),a=r(91971),s=r(75553),o=r(54938),c=r(19860),l=BigInt(0),u=BigInt(2),d=BigInt(27),f=BigInt(28),h=BigInt(35),p=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function g(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return"0x"+(r+=(0,a.sha256)(t).substring(4))}function b(e){return"0x"===e?null:(0,n.getAddress)(e)}function m(e,t){try{return(0,o.accessListify)(e)}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function y(e,t){return"0x"===e?0:(0,s.getNumber)(e,t)}function x(e,t){if("0x"===e)return l;let r=(0,s.getBigInt)(e,t);return(0,s.assertArgument)(r<=p,"value exceeds uint size",t,r),r}function w(e,t){let r=(0,s.getBigInt)(e,"value"),n=(0,s.toBeArray)(r);return(0,s.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function v(e){return(0,o.accessListify)(e).map(e=>[e.address,e.storageKeys])}function A(e,t){let r;try{if(r=y(t[0],"yParity"),0!==r&&1!==r)throw Error("bad yParity")}catch(e){(0,s.assertArgument)(!1,"invalid yParity","yParity",t[0])}let n=(0,s.zeroPadValue)(t[1],32),i=(0,s.zeroPadValue)(t[2],32),o=a.Signature.from({r:n,s:i,yParity:r});e.signature=o}class P{#eQ;#eZ;#r;#eY;#eX;#e0;#e1;#e2;#e5;#er;#e6;#e3;#e8;#e4;#e9;#e7;get type(){return this.#eQ}set type(e){switch(e){case null:this.#eQ=null;break;case 0:case"legacy":this.#eQ=0;break;case 1:case"berlin":case"eip-2930":this.#eQ=1;break;case 2:case"london":case"eip-1559":this.#eQ=2;break;case 3:case"cancun":case"eip-4844":this.#eQ=3;break;default:(0,s.assertArgument)(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){let e=this.#eZ;return null==e&&3===this.type?i.ZeroAddress:e}set to(e){this.#eZ=null==e?null:(0,n.getAddress)(e)}get nonce(){return this.#eY}set nonce(e){this.#eY=(0,s.getNumber)(e,"value")}get gasLimit(){return this.#eX}set gasLimit(e){this.#eX=(0,s.getBigInt)(e)}get gasPrice(){let e=this.#e0;return null==e&&(0===this.type||1===this.type)?l:e}set gasPrice(e){this.#e0=null==e?null:(0,s.getBigInt)(e,"gasPrice")}get maxPriorityFeePerGas(){let e=this.#e1;return null==e?2===this.type||3===this.type?l:null:e}set maxPriorityFeePerGas(e){this.#e1=null==e?null:(0,s.getBigInt)(e,"maxPriorityFeePerGas")}get maxFeePerGas(){let e=this.#e2;return null==e?2===this.type||3===this.type?l:null:e}set maxFeePerGas(e){this.#e2=null==e?null:(0,s.getBigInt)(e,"maxFeePerGas")}get data(){return this.#r}set data(e){this.#r=(0,s.hexlify)(e)}get value(){return this.#e5}set value(e){this.#e5=(0,s.getBigInt)(e,"value")}get chainId(){return this.#er}set chainId(e){this.#er=(0,s.getBigInt)(e)}get signature(){return this.#e6||null}set signature(e){this.#e6=null==e?null:a.Signature.from(e)}get accessList(){let e=this.#e3||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#e3=null==e?null:(0,o.accessListify)(e)}get maxFeePerBlobGas(){let e=this.#e8;return null==e&&3===this.type?l:e}set maxFeePerBlobGas(e){this.#e8=null==e?null:(0,s.getBigInt)(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#e4;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){(0,s.assertArgument)(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#e4=e}get blobs(){return null==this.#e7?null:this.#e7.map(e=>Object.assign({},e))}set blobs(e){if(null==e){this.#e7=null;return}let t=[],r=[];for(let n=0;n<e.length;n++){let i=e[n];if((0,s.isBytesLike)(i)){(0,s.assert)(this.#e9,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=(0,s.getBytes)(i);if((0,s.assertArgument)(e.length<=131072,"blob is too large",`blobs[${n}]`,i),131072!==e.length){let t=new Uint8Array(131072);t.set(e),e=t}let a=this.#e9.blobToKzgCommitment(e),o=(0,s.hexlify)(this.#e9.computeBlobKzgProof(e,a));t.push({data:(0,s.hexlify)(e),commitment:(0,s.hexlify)(a),proof:o}),r.push(g(1,a))}else{let e=(0,s.hexlify)(i.commitment);t.push({data:(0,s.hexlify)(i.data),commitment:e,proof:(0,s.hexlify)(i.proof)}),r.push(g(1,e))}}this.#e7=t,this.#e4=r}get kzg(){return this.#e9}set kzg(e){this.#e9=e}constructor(){this.#eQ=null,this.#eZ=null,this.#eY=0,this.#eX=l,this.#e0=null,this.#e1=null,this.#e2=null,this.#r="0x",this.#e5=l,this.#er=l,this.#e6=null,this.#e3=null,this.#e8=null,this.#e4=null,this.#e7=null,this.#e9=null}get hash(){return null==this.signature?null:(0,a.keccak256)(this.#te(!0,!1))}get unsignedHash(){return(0,a.keccak256)(this.unsignedSerialized)}get from(){return null==this.signature?null:(0,c.recoverAddress)(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:a.SigningKey.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#te(e,t){(0,s.assert)(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});let r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){let r=[w(e.nonce,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLim
4it,"gasLimit"),e.to||"0x",w(e.value,"value"),e.data],n=l;if(e.chainId!=l)n=(0,s.getBigInt)(e.chainId,"tx.chainId"),(0,s.assertArgument)(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){let t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==l&&(r.push((0,s.toBeArray)(n)),r.push("0x"),r.push("0x")),(0,s.encodeRlp)(r);let i=BigInt(27+t.yParity);return n!==l?i=a.Signature.getChainIdV(n,t.v):BigInt(t.v)!==i&&(0,s.assertArgument)(!1,"tx.chainId/sig.v mismatch","sig",t),r.push((0,s.toBeArray)(i)),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s)),(0,s.encodeRlp)(r)}(this,r);case 1:return function(e,t){let r=[w(e.chainId,"chainId"),w(e.nonce,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit,"gasLimit"),e.to||"0x",w(e.value,"value"),e.data,v(e.accessList||[])];return t&&(r.push(w(t.yParity,"recoveryParam")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x01",(0,s.encodeRlp)(r)])}(this,r);case 2:return function(e,t){let r=[w(e.chainId,"chainId"),w(e.nonce,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLim
4it,"gasLimit"),e.to||"0x",w(e.value,"value"),e.data,v(e.accessList||[])];return t&&(r.push(w(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x02",(0,s.encodeRlp)(r)])}(this,r);case 3:return function(e,t,r){let n=[w(e.chainId,"chainId"),w(e.nonce,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit,"gasLimit"),e.to||i.ZeroAddress,w(e.value,"value"),e.data,v(e.accessList||[]),w(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),function(e,t){(0,s.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(w(t.yParity,"yParity")),n.push((0,s.toBeArray)(t.r)),n.push((0,s.toBeArray)(t.s)),r)?(0,s.concat)(["0x03",(0,s.encodeRlp)([n,r.map(e=>e.data),r.map(e=>e.commitment),r.map(e=>e.proof)])]):(0,s.concat)(["0x03",(0,s.encodeRlp)(n)])}(this,r,t?this.blobs:null)}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#te(!0,!0)}get unsignedSerialized(){return this.#te(!1,!1)}inferType(){let e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){let e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#e8||this.#e4;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,s.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,s.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,s.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});let i=[];return null!=this.type?i.push(this.type):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return P.from(this)}toJSON(){let e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new P;if("string"==typeof e){let t=(0,s.getBytes)(e);if(t[0]>=127)return P.from(function(e){let t=(0,s.decodeRlp)(e);(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);let r={type:0,nonce:y(t[0],"nonce"),gasPrice:x(t[1],"gasPrice"),gasLimit:x(t[2],"gasLimit"),to:b(t[3]),value:x(t[4],"value"),data:(0,s.hexlify)(t[5]),chainId:l};if(6===t.length)return r;let n=x(t[6],"v"),i=x(t[7],"r"),o=x(t[8],"s");if(i===l&&o===l)r.chainId=n;else{let e=(n-h)/u;e<l&&(e=l),r.chainId=e,(0,s.assertArgument)(e!==l||n===d||n===f,"non-canonical legacy v","v",t[6]),r.signature=a.Signature.from({r:(0,s.zeroPadValue)(t[7],32),s:(0,s.zeroPadValue)(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return P.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",(0,s.hexlify)(e));let r={type:1,chainId:x(t[0],"chainId"),nonce:y(t[1],"nonce"),gasPrice:x(t[2],"gasPrice"),gasLimit:x(t[3],"gasLimit"),to:b(t[4]),value:x(t[5],"value"),data:(0,s.hexlify)(t[6]),accessList:m(t[7],"accessList")};return 8===t.length||A(r,t.slice(8)),r}(t));case 2:return P.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",(0,s.hexlify)(e));let r={type:2,chainId:x(t[0],"chainId"),nonce:y(t[1],"nonce"),maxPriorityFeePerGas:x(t[2],"maxPriorityFeePerGas"),maxFeePerGas:x(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:x(t[4],"gasLim
4it"),to:b(t[5]),value:x(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:m(t[8],"accessList")};return 9===t.length||A(r,t.slice(9)),r}(t));case 3:return P.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1)),r="3",n=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";let e=t[1],i=t[2],a=t[3];(0,s.assertArgument)(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),(0,s.assertArgument)(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),(0,s.assertArgument)(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),(0,s.assertArgument)(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,s.assertArgument)(e.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:i[r],proof:a[r]});t=t[0]}(0,s.assertArgument)(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",(0,s.hexlify)(e));let i={type:3,chainId:x(t[0],"chainId"),nonce:y(t[1],"nonce"),maxPriorityFeePerGas:x(t[2],"maxPriorityFeePerGas"),maxFeePerGas:x(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:x(t[4],"gasLimit"),to:b(t[5]),value:x(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:m(t[8],"accessList"),maxFeePerBlobGas:x(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(i.blobs=n),(0,s.assertArgument)(null!=i.to,`invalid address for transaction type: ${r}`,"data",e),(0,s.assertArgument)(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<i.blobVersionedHashes.length;t++)(0,s.assertArgument)((0,s.isHexString)(i.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||A(i,t.slice(11)),i}(t))}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}let t=new P;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=a.Signature.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),(0,s.assertArgument)(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),(0,s.assertArgument)(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}t.Transaction=P},72159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;let n=r(81127),i=r(99248),a=r(30442),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",o=null,c=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){let t=(0,n.getBytes)(e),r=(0,a.toBigInt)(t),i="";for(;r;)i=s[Number(r%l)]+i,r/=l;for(let e=0;e<t.length&&!t[e];e++)i=s[0]+i;return i},t.decodeBase58=function(e){let t=c;for(let r=0;r<e.length;r++)t*=l,t+=function(e){if(null==o){o={};for(let e=0;e<s.length;e++)o[s[e]]=BigInt(e)}let t=o[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}(e[r]);return t}},2109:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;let n=r(81127);t.decodeBase64=function(e){let t=new Uint8Array((e=atob(e)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return(0,n.getBytes)(t)},t.encodeBase64=function(e){let t=(0,n.getBytes)(e),r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}},81127:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;let n=r(99248);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){let t=new Uint8Array((e.length-2)/2),r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}(0,n.assertArgument)(!1,"invalid BytesLike value",t||"value",e)}function a(e,t){return i(e,t,!1)}function s(e,t){return!!("string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/))&&("number"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0)}t.getBytes=a,t.getBytesCopy=function(e,t){return i(e,t,!0)},t.isHexString=s,t.isBytesLike=function(e){return s(e,!0)||e instanceof Uint8Array};let o="0123456789abcdef";function c(e){let t=a(e),r="0x";for(let e=0;e<t.length;e++){let n=t[e];r+=o[(240&n)>>4]+o[15&n]}return r}function l(e,t,r){let i=a(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});let s=new Uint8Array(t);return s.fill(0),r?s.set(i,t-i.length):s.set(i,0),c(s)}t.hexlify=c,t.concat=function(e){return"0x"+e.map(e=>c(e).substring(2)).join("")},t.dataLength=function(e){return s(e,!0)?(e.length-2)/2:a(e).length},t.dataSlice=function(e,t,r){let i=a(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),c(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=c(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return l(e,t,!0)},t.zeroPadBytes=function(e,t){return l(e,t,!1)}},99248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;let n=r(41202),i=r(58674);function a(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(a).join(", ")+" ]";if(e instanceof Uint8Array){let t="0123456789abcdef",r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return a(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{let t=Object.keys(e);return t.sort(),"{ "+t.map(t=>`${a(t)}: ${a(e[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function s(e,t){return e&&e.code===t}function o(e,t,r){let s,o=e;{let i=[];if(r){if("message"in r||"code"in r||"name"in r)throw Error(`value will overwrite populated values: ${a(r)}`);for(let e in r){if("shortMessage"===e)continue;let t=r[e];i.push(e+"="+a(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":s=TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=RangeError(e);break;default:s=Error(e)}return(0,i.defineProperties)(s,{code:t}),r&&Object.assign(s,r),null==s.shortMessage&&(0,i.defineProperties)(s,{shortMessage:o}),s}function c(e,t,r,n){if(!e)throw o(t,r,n)}t.isError=s,t.isCallException=function(e){return s(e,"CALL_EXCEPTION")},t.makeError=o,t.assert=c,t.assertArgument=function(e,t,r,n){c(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),c(e>=t,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),c(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};let l=["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test"!=="test".normalize(t))throw Error("bad");if("NFD"===t){let e=String.fromCharCode(233).normalize("NFD"),t=String.fromCharCode(101,769);if(e!==t)throw Error("broken")}e.push(t)}catch(e){}return e},[]);t.assertNormalize=function(e){c(l.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),c(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},26042:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;let n=r(58674);class i{filter;emitter;#tt;constructor(e,t,r){this.#tt=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#tt&&await this.emitter.off(this.filter,this.#tt)}}t.EventPayload=i},82649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;let n=r(2109),i=r(81127),a=r(99248),s=r(58674),o=r(26516),c=r(55407),l=(0,c.createGetUrl)(),u=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),d=RegExp("^ipfs://(ipfs/)?(.*)$","i"),f=!1;async function h(e,t){try{var r;let t=e.match(u);if(!t)throw Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,o.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new x(e))}}function p(e){return async function(t,r){try{let r=t.match(d);if(!r)throw Error("invalid link");return new x(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new x(t))}}}let g={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},b=new WeakMap;class m{#tr;#tn;constructor(e){this.#tr=[],this.#tn=!1,b.set(e,()=>{if(!this.#tn){for(let e of(this.#tn=!0,this.#tr))setTimeout(()=>{e()},0);this.#tr=[]}})}addListener(e){(0,a.assert)(!this.#tn,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#tr.push(e)}get cancelled(){return this.#tn}checkSignal(){(0,a.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function y(e){if(null==e)throw Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=m;class x{#ti;#ta;#ts;#to;#tc;#ei;#tl;#tu;#td;#tf;#th;#tp;#tg;#tb;#tm;get url(){return this.#ei}set url(e){this.#ei=String(e)}get body(){return null==this.#tl?null:new Uint8Array(this.#tl)}set body(e){if(null==e)this.#tl=void 0,this.#tu=void 0;else if("string"==typeof e)this.#tl=(0,o.toUtf8Bytes)(e),this.#tu="text/plain";else if(e instanceof Uint8Array)this.#tl=e,this.#tu="application/octet-stream";else if("object"==typeof e)this.#tl=(0,o.toUtf8Bytes)(JSON.stringify(e)),this.#tu="application/json";else throw Error("invalid body")}hasBody(){return null!=this.#tl}get method(){return this.#to?this.#to:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#to=String(e).toUpperCase()}get headers(){let e=Object.assign({},this.#ts);return this.#td&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,o.toUtf8Bytes)(this.#td))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#tu&&(e["content-type"]=this.#tu),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#ts[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#ts={}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),r=0;return{next:()=>{if(r<t.length){let n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#td||null}setCredentials(e,t){(0,a.assertArgument)(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#td=`${e}:${t}`}get allowGzip(){return this.#ta}set allowGzip(e){this.#ta=!!e}get allowInsecureAuthentication(){return!!this.#ti}set allowInsecureAuthentication(e){this.#ti=!!e}get timeout(){return this.#tc}set timeout(e){(0,a.assertArgument)(e>=0,"timeout must be non-zero","timeout",e),this.#tc=e}get preflightFunc(){return this.#tf||null}set preflightFunc(e){this.#tf=e}get processFunc(){return this.#th||null}set processFunc(e){this.#th=e}get retryFunc(){return this.#tp||null}set retryFunc(e){this.#tp=e}get getUrlFunc(){return this.#tm||l}set getUrlFunc(e){this.#tm=e}constructor(e){this.#ei=String(e),this.#ti=!1,this.#ta=!0,this.#ts={},this.#to="",this.#tc=3e5,this.#tb={slotInterval:250,maxAttempts:12},this.#tm=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#tl?(0,i.hexlify)(this.#tl):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#tb.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#tb.maxAttempts=e.maxAttempts)}async #ty(e,t,r,n,i){if(e>=this.#tb.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,a.assert)(v()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await new Promise(e=>setTimeout(e,r));let s=this.clone(),o=(s.url.split(":")[0]||"").toLowerCase();if(o in g){let e=await g[o](s.url,y(n.#tg));if(e instanceof w){let t=e;if(this.processFunc){y(n.#tg);try{t=await this.processFunc(s,t)}catch(e){(null==e.throttle||"number"!=typeof e.stall)&&t.makeServerError("error in post-processing function",e).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));let c=await this.getUrlFunc(s,y(n.#tg)),l=new w(c.statusCode,c.statusMessage,c.headers,c.body,n);if(301===l.statusCode||302===l.statusCode){try{let r=l.headers.location||"";return s.redirect(r).#ty(e+1,t,0,n,l)}catch(e){}return l}if(429===l.statusCode&&(null==this.retryFunc||await this.retryFunc(s,l,e))){let r=l.headers["retry-after"],i=this.#tb.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),s.clone().#ty(e+1,t,i,n,l)}if(this.processFunc){y(n.#tg);try{l=await this.processFunc(s,l)}catch(i){(null==i.throttle||"number"!=typeof i.stall)&&l.makeServerError("error in post-processing function",i).assertOk();let r=this.#tb.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return i.stall>=0&&(r=i.stall),s.clone().#ty(e+1,t,r,n,l)}}return l}send(){return(0,a.assert)(null==this.#tg,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}
4),this.#tg=new m(this),this.#ty(0,v()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,a.assert)(null!=this.#tg,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});let e=b.get(this);if(!e)throw Error("missing signal; should not happen");e()}redirect(e){let t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,a.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});let n=new x(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#ts=Object.assign({},this.#ts),this.#tl&&(n.#tl=new Uint8Array(this.#tl)),n.#tu=this.#tu,n}clone(){let e=new x(this.url);return e.#to=this.#to,this.#tl&&(e.#tl=this.#tl),e.#tu=this.#tu,e.#ts=Object.assign({},this.#ts),e.#td=this.#td,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#tf=this.#tf,e.#th=this.#th,e.#tp=this.#tp,e.#tb=Object.assign({},this.#tb),e.#tm=this.#tm,e}static lockConfig(){f=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw Error(`cannot intercept ${e}; use registerGetUrl`);if(f)throw Error("gateways locked");g[e]=t}static registerGetUrl(e){if(f)throw Error("gateways locked");l=e}static createGetUrlFunc(e){return(0,c.createGetUrl)(e)}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=x;class w{#tx;#tw;#ts;#tl;#es;#tv;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#tl?(0,i.hexlify)(this.#tl):"null"}>`}get statusCode(){return this.#tx}get statusMessage(){return this.#tw}get headers(){return Object.assign({},this.#ts)}get body(){return null==this.#tl?null:new Uint8Array(this.#tl)}get bodyText(){try{return null==this.#tl?"":(0,o.toUtf8String)(this.#tl)}catch(e){(0,a.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,a.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),r=0;return{next:()=>{if(r<t.length){let n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,r,n,i){this.#tx=e,this.#tw=t,this.#ts=Object.keys(r).reduce((e,t)=>(e[t.toLowerCase()]=String(r[t]),e),{}),this.#tl=null==n?null:new Uint8Array(n),this.#es=i||null,this.#tv={message:""}}makeServerError(e,t){let r;e?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${e})`);let n=new w(599,r,this.headers,this.body,this.#es||void 0);return n.#tv={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,a.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);let r=Error(e||"throttling requests");throw(0,s.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#tl}get request(){return this.#es}ok(){return""===this.#tv.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#tv;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#tl&&(n=(0,o.toUtf8String)(this.#tl))}catch(e){}(0,a.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function v(){return new Date().getTime()}t.FetchResponse=w},12666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;let n=r(81127),i=r(99248),a=r(30442),s=r(58674),o=BigInt(-1),c=BigInt(0),l=BigInt(1),u=BigInt(5),d={},f="0000";for(;f.length<80;)f+=f;function h(e){let t=f;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function p(e,t,r){let n=BigInt(t.width);if(t.signed){let t=l<<n-l;
4(0,i.assert)(null==r||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=e>c?(0,a.fromTwos)((0,a.mask)(e,n),n):-(0,a.fromTwos)((0,a.mask)(-e,n),n)}else{let t=l<<n;(0,i.assert)(null==r||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=(e%t+t)%t&t-l}return e}function g(e){"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e){if("fixed"===e);else if("ufixed"===e)t=!1;else{let a=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);(0,i.assertArgument)(a,"invalid fixed format","format",e),t="u"!==a[1],r=parseInt(a[2]),n=parseInt(a[3])}}else if(e){let a=e,s=(e,t,r)=>null==a[e]?r:((0,i.assertArgument)(typeof a[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,a[e]),a[e]);t=s("signed","boolean",t),r=s("width","number",r),n=s("decimals","number",n)}(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);let a=(t?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:t,width:r,decimals:n,name:a}}class b{format;#tA;#tP;#tE;_value;constructor(e,t,r){(0,i.assertPrivate)(e,d,"FixedNumber"),this.#tP=t,this.#tA=r;let n=function(e,t){let r="";e<c&&(r="-",e*=o);let n=e.toString();if(0===t)return r+n;for(;n.length<=t;)n=f+n;let i=n.length-t;for(n=n.substring(0,i)+"."+n.substring(i);"0"===n[0]&&"."!==n[1];)n=n.substring(1);for(;"0"===n[n.length-1]&&"."!==n[n.length-2];)n=n.substring(0,n.length-1);return r+n}(t,r.decimals);(0,s.defineProperties)(this,{format:r.name,_value:n}),this.#tE=h(r.decimals)}get signed(){return this.#tA.signed}get width(){return this.#tA.width}get decimals(){return this.#tA.decimals}get value(){return this.#tP}#tO(e){(0,i.assertArgument)(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#tk(e,t){return new b(d,e=p(e,this.#tA,t),this.#tA)}#tB(e,t){return this.#tO(e),this.#tk(this.#tP+e.#tP,t)}addUnsafe(e){return this.#tB(e)}add(e){return this.#tB(e,"add")}#tS(e,t){return this.#tO(e),this.#tk(this.#tP-e.#tP,t)}subUnsafe(e){return this.#tS(e)}sub(e){return this.#tS(e,"sub")}#tC(e,t){return this.#tO(e),this.#tk(this.#tP*e.#tP/this.#tE,t)}mulUnsafe(e){return this.#tC(e)}mul(e){return this.#tC(e,"mul")}mulSignal(e){this.#tO(e);let t=this.#tP*e.#tP;return(0,i.assert)(t%this.#tE===c,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#tk(t/this.#tE,"mulSignal")}#tT(e,t){return(0,i.assert)(e.#tP!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#tO(e),this.#tk(this.#tP*this.#tE/e.#tP,t)}divUnsafe(e){return this.#tT(e)}div(e){return this.#tT(e,"div")}divSignal(e){(0,i.assert)(e.#tP!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#tO(e);let t=this.#tP*this.#tE;return(0,i.assert)(t%e.#tP===c,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#tk(t/e.#tP,"divSignal")}cmp(e){let t=this.value,r=e.value,n=this.decimals-e.decimals;return(n>0?r*=h(n):n<0&&(t*=h(-n)),t<r)?-1:t>r?1:0}eq(e){return 0===this.cmp(e)}lt(e){return 0>this.cmp(e)}lte(e){return 0>=this.cmp(e)}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#tP;return this.#tP<c&&(e-=this.#tE-l),e=this.#tP/this.#tE*this.#tE,this.#tk(e,"floor")}ceiling(){let e=this.#tP;return this.#tP>c&&(e+=this.#tE-l),e=this.#tP/this.#tE*this.#tE,this.#tk(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;let t=this.decimals-e,r=u*h(t-1),n=this.value+r,i=h(t);return p(n=n/i*i,this.#tA,"round"),new b(d,n,this.#tA)}isZero(){return this.#tP===c}isNegative(){return this.#tP<c}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return b.fromString(this.toString(),e)}static fromValue(e,t,r){let n=null==t?0:(0,a.getNumber)(t),s=g(r),o=(0,a.getBigInt)(e,"value"),l=n-s.decimals;if(l>0){let t=h(l);(0,i.assert)(o%t===c,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=t}else l<0&&(o*=h(-l));return p(o,s,"fromValue"),new b(d,o,s)}static fromString(e,t){let r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);let n=g(t),a=r[2]||"0",s=r[3]||"";for(;s.length<n.decimals;)s+=f;(0,i.assert)(s.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,n.decimals);let o=BigInt(r[1]+a+s);return p(o,n,"fromString"),new b(d,o,n)}static fromBytes(e,t){let r=(0,a.toBigInt)((0,n.getBytes)(e,"value")),i=g(t);return i.signed&&(r=(0,a.fromTwos)(r,i.width)),p(r,i,"fromBytes"),new b(d,r,i)}}t.FixedNumber=b},55407:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;let n=r(99248);function i(e){return async function(e,t){let r;(0,n.assert)(null==t||!t.cancelled,"request cancelled before sending","CANCELLED");let i=e.url.split(":")[0].toLowerCase();(0,n.assert)("http"===i||"https"===i,`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,n.assert)("https"===i||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a=null,s=new AbortController,o=setTimeout(()=>{a=(0,n.makeError)("request timeout","TIMEOUT"),s.abort()},e.timeout);t&&t.addListener(()=>{a=(0,n.makeError)("request cancelled","CANCELLED"),s.abort()});let c={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:s.signal};try{r=await fetch(e.url,c)}catch(e){if(clearTimeout(o),a)throw a;throw e}clearTimeout(o);let l={};r.headers.forEach((e,t)=>{l[t.toLowerCase()]=e});let u=await r.arrayBuffer(),d=null==u?null:new Uint8Array(u);return{statusCode:r.status,statusMessage:r.statusText,headers:l,body:d}}}t.createGetUrl=i;let a=i({});async function s(e,t){return a(e,t)}t.getUrl=s},75553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(72159);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(2109);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var a=r(81127);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return a.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return a.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return a.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return a.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return a.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return a.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return a.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return a.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return a.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return a.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return a.zeroPadBytes}});var s=r(99248);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return s.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return s.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return s.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return s.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return s.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return s.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return s.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return s.makeError}});var o=r(26042);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return o.EventPayload}});var c=r(82649);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return c.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return c.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return c.FetchCancelSignal}});var l=r(12666);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return l.FixedNumber}});var u=r(30442);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return u.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return u.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return u.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return u.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return u.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return u.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return u.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return u.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return u.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return u.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return u.toQuantity}});var d=r(58674);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return d.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return d.defineProperties}});var f=r(24904);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return f.decodeRlp}});var h=r(60096);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}});var p=r(5906);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var g=r(26516);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return g.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return g.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return g.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return g.Utf8ErrorFuncs}});var b=r(62036);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return b.uuidV4}})},30442:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;let n=r(81127),i=r(99248),a=BigInt(0),s=BigInt(1);function o(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw Error("empty string");if("-"===e[0]&&"-"!==e[1])return-BigInt(e.substring(1));return BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function c(e,t){let r=o(e,t);return(0,i.assert)(r>=a,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){let r=c(e,"value"),n=BigInt(d(t,"width"));return((0,i.assert)(r>>n===a,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-s)?-((~r&(s<<n)-s)+s):r},t.toTwos=function(e,t){let r=o(e,"value"),n=BigInt(d(t,"width")),c=s<<n-s;return r<a?(r=-r,(0,i.assert)(r<=c,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),(~r&(s<<n)-s)+s):((0,i.assert)(r<c,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r)},t.mask=function(e,t){return c(e,"value")&(s<<BigInt(d(t,"bits")))-s},t.getBigInt=o,t.getUint=c;let l="0123456789abcdef";function u(e){if(e instanceof Uint8Array){let t="0x0";for(let r of e)t+=l[r>>4],t+=l[15&r];return BigInt(t)}return o(e)}function d(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),e;case"string":try{if(""===e)throw Error("empty string");return d(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function f(e){let t=c(e,"value");if(t===a)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);let n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){let t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}t.toBigInt=u,t.getNumber=d,t.toNumber=function(e){return d(u(e))},t.toBeHex=function(e,t){let r=c(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{let n=d(t,"width");for((0,i.assert)(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=f,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:f(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},58674:(e,t)=>{"use strict";async function r(e){let t=Object.keys(e);return(await Promise.all(t.map(t=>Promise.resolve(e[t])))).reduce((e,r,n)=>(e[t[n]]=r,e),{})}Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=t.resolveProperties=void 0,t.resolveProperties=r,t.defineProperties=function(e,t,r){for(let n in t){let i=t[n],a=r?r[n]:null;a&&function(e,t,r){let n=t.split("|").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}let i=Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}(i,a,n),Object.defineProperty(e,n,{enumerable:!0,value:i,writable:!1})}}},24904:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;let n=r(81127),i=r(99248),a=r(81127);function s(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function o(e,t,r,n){let a=[];for(;r<t+1+n;){let s=c(e,r);a.push(s.result),r+=s.consumed,(0,i.assert)(r<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:a}}function c(e,t){(0,i.assert)(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});let r=t=>{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){let n=e[t]-247;r(t+1+n);let i=s(e,t+1,n);return r(t+1+n+i),o(e,t,t+1+n,n+i)}if(e[t]>=192){let n=e[t]-192;return r(t+1+n),o(e,t,t+1,n)}if(e[t]>=184){let i=e[t]-183;r(t+1+i);let a=s(e,t+1,i);r(t+1+i+a);let o=(0,n.hexlify)(e.slice(t+1+i,t+1+i+a));return{consumed:1+i+a,result:o}}if(e[t]>=128){let i=e[t]-128;r(t+1+i);let a=(0,n.hexlify)(e.slice(t+1,t+1+i));return{consumed:1+i,result:a}}return{consumed:1,result:function(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}(e[t])}}t.decodeRlp=function(e){let t=(0,a.getBytes)(e,"data"),r=c(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},60096:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;let n=r(81127);function i(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}let a="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(let r of function e(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(t){r=r.concat(e(t))}),r.length<=55)return r.unshift(192+r.length),r;let n=i(r.length);return n.unshift(247+n.length),n.concat(r)}let r=Array.prototype.slice.call((0,n.getBytes)(t,"object"));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let a=i(r.length);return a.unshift(183+a.length),a.concat(r)}(e))t+=a[r>>4],t+=a[15&r];return t}},5906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;let n=r(99248),i=r(12666),a=r(30442),s=["wei","kwei","mwei","gwei","szabo","finney","ether"];function o(e,t){let r=18;if("string"==typeof t){let e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,a.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function c(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){let e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,a.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=o,t.parseUnits=c,t.formatEther=function(e){return o(e,18)},t.parseEther=function(e){return c(e,18)}},26516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;let n=r(81127),i=r(99248);function a(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function s(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);let i=(0,n.getBytes)(e,"bytes"),a=[],s=0;for(;s<i.length;){let e=i[s++];if(e>>7==0){a.push(e);continue}let t=null,n=null;if((224&e)==192)t=1,n=127;else if((240&e)==224)t=2,n=2047;else if((248&e)==240)t=3,n=65535;else{(192&e)==128?s+=r("UNEXPECTED_CONTINUE",s-1,i,a):s+=r("BAD_PREFIX",s-1,i,a);continue}if(s-1+t>=i.length){s+=r("OVERRUN",s-1,i,a);continue}let o=e&(1<<8-t-1)-1;for(let e=0;e<t;e++){let e=i[s];if((192&e)!=128){s+=r("MISSING_CONTINUE",s,i,a),o=null;break}o=o<<6|63&e,s++}if(null!==o){if(o>1114111){s+=r("OUT_OF_RANGE",s-1-t,i,a,o);continue}if(o>=55296&&o<=57343){s+=r("UTF16_SURROGATE",s-1-t,i,a,o);continue}if(o<=n){s+=r("OVERLONG",s-1-t,i,a,o);continue}a.push(o)}}return a}function o(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if((64512&n)==55296){t++;let a=e.charCodeAt(t);(0,i.assertArgument)(t<e.length&&(64512&a)==56320,"invalid surrogate pair","str",e);let s=65536+((1023&n)<<10)+(1023&a);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,a){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:a,replace:function(e,t,r,n,s){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),a(e,t,r,n,s))}}),t.toUtf8Bytes=o,t.toUtf8String=function(e,t){return s(e,t).map(e=>e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10&1023)+55296,(1023&e)+56320)).join("")},t.toUtf8CodePoints=function(e,t){return s(o(e,t))}},62036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;let n=r(81127);t.uuidV4=function(e){let t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},70730:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;let n=r(3052),i=r(45826),a=r(74650),s=r(36280),o=r(75553);class c extends a.AbstractSigner{address;#tI;constructor(e,t){super(t),(0,o.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#tI=e;let r=(0,s.computeAddress)(this.signingKey.publicKey);(0,o.defineProperties)(this,{address:r})}get signingKey(){return this.#tI}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new c(this.#tI,e)}async signTransaction(e){e=(0,a.copyRequest)(e);let{to:t,from:r}=await (0,o.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this.provider):void 0,from:e.from?(0,n.resolveAddress)(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,o.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);let i=s.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}async signTypedData(e,t,r){let n=await i.TypedDataEncoder.resolveNames(e,t,r,async e=>{(0,o.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});let t=await this.provider.resolveName(e);return(0,o.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t});return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=c},47440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;let n=r(91971),i=r(74650),a=r(36280),s=r(75553),o=r(87185),c=r(70730),l=r(20849),u=r(60070);t.defaultPath="m/44'/60'/0'/0/0";let d=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function h(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function p(e){let t=(0,s.getBytes)(e),r=(0,s.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,s.concat)([t,r]);return(0,s.encodeBase58)(i)}let g={};function b(e,t,r,i){let a=new Uint8Array(37);0x80000000&e?((0,s.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),a.set((0,s.getBytes)(i),1)):a.set((0,s.getBytes)(r));for(let t=24;t>=0;t-=8)a[33+(t>>3)]=e>>24-t&255;let o=(0,s.getBytes)((0,n.computeHmac)("sha512",t,a));return{IL:o.slice(0,32),IR:o.slice(32)}}function m(e,t){let r=t.split("/");(0,s.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,s.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e<r.length;e++){let t=r[e];if(t.match(/^[0-9]+'$/)){let r=parseInt(t.substring(0,t.length-1));(0,s.assertArgument)(r<0x80000000,"invalid path index",`path[${e}]`,t),n=n.deriveChild(0x80000000+r)}else if(t.match(/^[0-9]+$/)){let r=parseInt(t);(0,s.assertArgument)(r<0x80000000,"invalid path index",`path[${e}]`,t),n=n.deriveChild(r)}else(0,s.assertArgument)(!1,"invalid path component",`path[${e}]`,t)}return n}class y extends c.BaseWallet{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,i,a,o,c,l,u){super(t,u),(0,s.assertPrivate)(e,g,"HDNodeWallet"),(0,s.defineProperties)(this,{publicKey:t.compressedPublicKey});let d=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(this.publicKey)),0,4);(0,s.defineProperties)(this,{parentFingerprint:r,fingerprint:d,chainCode:i,path:a,index:o,depth:c}),(0,s.defineProperties)(this,{mnemonic:l})}connect(e){return new y(g,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#tN(){let e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&"en"===t.wordlist.locale&&""===t.password&&(e.mnemonic={path:this.path,locale:"en",entropy:t.entropy}),e}
4async encrypt(e,t){return await (0,u.encryptKeystoreJson)(this.#tN(),e,{progressCallback:t})}encryptSync(e){return(0,u.encryptKeystoreJsonSync)(this.#tN(),e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),p((0,s.concat)(["0x0488ADE4",h(this.depth,1),this.parentFingerprint,h(this.index,4),this.chainCode,(0,s.concat)(["0x00",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new x(g,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){let t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=0xffffffff,"invalid index","index",t);let r=this.path;r&&(r+="/"+(0x7fffffff&t),0x80000000&t&&(r+="'"));let{IR:i,IL:a}=b(t,this.chainCode,this.publicKey,this.privateKey);return new y(g,new n.SigningKey((0,s.toBeHex)(((0,s.toBigInt)(a)+BigInt(this.privateKey))%f,32)),this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return m(this,e)}static #tR(e,t){(0,s.assertArgument)((0,s.isBytesLike)(e),"invalid seed","seed","[REDACTED]");let r=(0,s.getBytes)(e,"seed");(0,s.assertArgument)(r.length>=16&&r.length<=64,"invalid seed","seed","[REDACTED]");let i=(0,s.getBytes)((0,n.computeHmac)("sha512",d,r));return new y(g,new n.SigningKey((0,s.hexlify)(i.slice(0,32))),"0x00000000",(0,s.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){let t=(0,s.toBeArray)((0,s.decodeBase58)(e));(0,s.assertArgument)(82===t.length||p(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");let r=t[4],i=(0,s.hexlify)(t.slice(5,9)),o=parseInt((0,s.hexlify)(t.slice(9,13)).substring(2),16),c=(0,s.hexlify)(t.slice(13,45)),l=t.slice(45,78);switch((0,s.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{let e=(0,s.hexlify)(l);return new x(g,(0,a.computeAddress)(e),e,i,c,null,o,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==l[0])break;return new y(g,new n.SigningKey(l.slice(1)),i,c,null,o,r,null,null)}(0,s.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=o.LangEn.wordlist());let a=l.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return y.#tR(a.computeSeed(),a).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),y.#tR(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=o.LangEn.wordlist());let a=l.Mnemonic.fromPhrase(e,r,i);return y.#tR(a.computeSeed(),a).derivePath(n)}static fromSeed(e){return y.#tR(e,null)}}t.HDNodeWallet=y;class x extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,a,o,c,l,u){super(t,u),(0,s.assertPrivate)(e,g,"HDNodeVoidWallet"),(0,s.defineProperties)(this,{publicKey:r});let d=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,s.defineProperties)(this,{publicKey:r,fingerprint:d,parentFingerprint:i,chainCode:a,path:o,index:c,depth:l})}connect(e){return new x(g,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),p((0,s.concat)(["0x0488B21E",h(this.depth,1),this.parentFingerprint,h(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){let t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=0xffffffff,"invalid index","index",t);let r=this.path;r&&(r+="/"+(0x7fffffff&t),0x80000000&t&&(r+="'"));let{IR:i,IL:o}=b(t,this.chainCode,this.publicKey,null),c=n.SigningKey.addPoints(o,this.publicKey,!0);return new x(g,(0,a.computeAddress)(c),c,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return m(this,e)}}t.HDNodeVoidWallet=x,t.getAccountPath=function(e){let t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<0x80000000,"invalid account index","index",t),`m/44'/60'/${t}'/0/0`},t.getIndexedAccountPath=function(e){let t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<0x80000000,"invalid account index","index",t),`m/44'/60'/0'/0/${t}`}},86071:(e,t,r)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(70730);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(47440);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var a=r(65108);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return a.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return a.decryptCrowdsaleJson}});var s=r(60070);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return s.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return s.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return s.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.encryptKeystoreJsonSync}});var o=r(20849);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return o.Mnemonic}});var c=r(97564);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.Wallet}})},65108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;let n=r(73853),i=r(3052),a=r(91971),s=r(45826),o=r(75553),c=r(33558);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){let r=JSON.parse(e),l=(0,c.getPassword)(t),u=(0,i.getAddress)((0,c.spelunk)(r,"ethaddr:string!")),d=(0,c.looseArrayify)((0,c.spelunk)(r,"encseed:string!"));(0,o.assertArgument)(d&&d.length%16==0,"invalid encseed","json",e);let f=(0,o.getBytes)((0,a.pbkdf2)(l,l,2e3,32,"sha256")).slice(0,16),h=d.slice(0,16),p=d.slice(16),g=new n.CBC(f,h),b=(0,n.pkcs7Strip)((0,o.getBytes)(g.decrypt(p))),m="";for(let e=0;e<b.length;e++)m+=String.fromCharCode(b[e]);return{address:u,privateKey:(0,s.id)(m)}}},60070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;let n=r(73853),i=r(3052),a=r(91971),s=r(36280),o=r(75553),c=r(33558),l=r(41202),u="m/44'/60'/0'/0/0";function d(e,t){let r=(0,o.getBytes)(t),l=(0,c.spelunk)(e,"crypto.ciphertext:data!"),d=(0,o.hexlify)((0,a.keccak256)((0,o.concat)([r.slice(16,32),l]))).substring(2);(0,o.assertArgument)(d===(0,c.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");let f=function(e,t,r){if("aes-128-ctr"===(0,c.spelunk)(e,"crypto.cipher:string")){let i=(0,c.spelunk)(e,"crypto.cipherparams.iv:data!"),a=new n.CTR(t,i);return(0,o.hexlify)(a.decrypt(r))}(0,o.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),l),h=(0,s.computeAddress)(f);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,o.assertArgument)((0,i.getAddress)(t)===h,"keystore address/privateKey mismatch","address",e.address)}let p={address:h,privateKey:f};if("0.1"===(0,c.spelunk)(e,"x-ethers.version:string")){let t=r.slice(32,64),i=(0,c.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),a=(0,c.spelunk)(e,"x-ethers.mnemonicCounter:data!"),s=new n.CTR(t,a);p.mnemonic={path:(0,c.spelunk)(e,"x-ethers.path:string")||u,locale:(0,c.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,o.hexlify)((0,o.getBytes)(s.decrypt(i)))}}return p}function f(e){let t=(0,c.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){let r=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,c.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,c.spelunk)(e,"crypto.kdfparams.r:int!"),a=(0,c.spelunk)(e,"crypto.kdfparams.p:int!");(0,o.assertArgument)(n>0&&(n&n-1)==0,"invalid kdf.N","kdf.N",n),(0,o.assertArgument)(i>0&&a>0,"invalid kdf","kdf",t);let s=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,o.assertArgument)(32===s,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:r,N:n,r:i,p:a,dkLen:64}}if("pbkdf2"===t.toLowerCase()){let t=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,c.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,o.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);let i=(0,c.spelunk)(e,"crypto.kdfparams.c:int!"),a=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,o.assertArgument)(32===a,"invalid kdf.dklen","kdf.dklen",a),{name:"pb
4kdf2",salt:t,count:i,dkLen:a,algorithm:n}}}(0,o.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function h(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}async function p(e,t,r){let n=JSON.parse(e),i=(0,c.getPassword)(t),s=f(n);if("pbkdf2"===s.name){r&&(r(0),await h(0));let{salt:e,count:t,dkLen:o,algorithm:c}=s,l=(0,a.pbkdf2)(i,e,t,o,c);return r&&(r(1),await h(0)),d(n,l)}(0,o.assert)("scrypt"===s.name,"cannot be reached","UNKNOWN_ERROR",{params:s});let{salt:l,N:u,r:p,p:g,dkLen:b}=s;return d(n,await (0,a.scrypt)(i,l,u,p,g,b,r))}function g(e){let t=null!=e.salt?(0,o.getBytes)(e.salt,"options.salt"):(0,a.randomBytes)(32),r=131072,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,o.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,o.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,o.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function b(e,t,r,i){let s=(0,o.getBytes)(r.privateKey,"privateKey"),d=null!=i.iv?(0,o.getBytes)(i.iv,"options.iv"):(0,a.randomBytes)(16);(0,o.assertArgument)(16===d.length,"invalid options.iv length","options.iv",i.iv);let f=null!=i.uuid?(0,o.getBytes)(i.uuid,"options.uuid"):(0,a.randomBytes)(16);(0,o.assertArgument)(16===f.length,"invalid options.uuid length","options.uuid",i.iv);let h=e.slice(0,16),p=e.slice(16,32),g=new n.CTR(h,d),b=(0,o.getBytes)(g.encrypt(s)),m=(0,a.keccak256)((0,o.concat)([p,b])),y={address:r.address.substring(2).toLowerCase(),id:(0,o.uuidV4)(f),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,o.hexlify)(d).substring(2)},ciphertext:(0,o.hexlify)(b).substring(2),kdf:"scrypt",kdfparams:{salt:(0,o.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:m.substring(2)}};if(r.mnemonic){let t=null!=i.client?i.client:`ethers/${l.version}`,s=r.mnemonic.path||u,d=r.mnemonic.locale||"en",f=e.slice(32,64),h=(0,o.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,a.randomBytes)(16),g=new n.CTR(f,p),b=(0,o.getBytes)(g.encrypt(h)),m=new Date,x="UTC--"+(m.getUTCFullYear()+"-"+(0,c.zpad)(m.getUTCMonth()+1,2)+"-"+(0,c.zpad)(m.getUTCDate(),2)+"T"+(0,c.zpad)(m.getUTCHours(),2)+"-"+(0,c.zpad)(m.getUTCMinutes(),2)+"-")+(0,c.zpad)(m.getUTCSeconds(),2)+".0Z--"+y.address;y["x-ethers"]={client:t,gethFilename:x,path:s,locale:d,mnemonicCounter:(0,o.hexlify)(p).substring(2),mnemonicCiphertext:(0,o.hexlify)(b).substring(2),version:"0.1"}}return JSON.stringify(y)}async function m(e,t,r){null==r&&(r={});let n=(0,c.getPassword)(t),i=g(r),s=await (0,a.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return b((0,o.getBytes)(s),i,e,r)}t.isKeystoreJson=function(e){try{let t=JSON.parse(e),r=null!=t.version?parseInt(t.version):0;if(3===r)return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){let r=JSON.parse(e),n=(0,c.getPassword)(t),i=f(r);if("pbkdf2"===i.name){let{salt:e,count:t,dkLen:s,algorithm:o}=i;return d(r,(0,a.pbkdf2)(n,e,t,s,o))}(0,o.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});let{salt:s,N:l,r:u,p:h,dkLen:p}=i;return d(r,(0,a.scryptSync)(n,s,l,u,h,p))},t.decryptKeystoreJson=p,t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});let n=(0,c.getPassword)(t),i=g(r),s=(0,a.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return b((0,o.getBytes)(s),i,e,r)},t.encryptKeystoreJson=m},20849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;let n=r(91971),i=r(75553),a=r(87185);function s(e){return(1<<e)-1<<8-e&255}function o(e,t){(0,i.assertNormalize)("NFKD"),null==t&&(t=a.LangEn.wordlist());let r=t.split(e);(0,i.assertArgument)(r.length%3==0&&r.length>
4=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");let o=new Uint8Array(Math.ceil(11*r.length/8)),c=0;for(let e=0;e<r.length;e++){let n=t.getWordIndex(r[e].normalize("NFKD"));(0,i.assertArgument)(n>=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(o[c>>3]|=1<<7-c%8),c++}let l=32*r.length/3,u=s(r.length/3),d=(0,i.getBytes)((0,n.sha256)(o.slice(0,l/8)))[0]&u;return(0,i.assertArgument)(d===(o[o.length-1]&u),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(o.slice(0,l/8))}function c(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=a.LangEn.wordlist());let r=[0],o=11;for(let t=0;t<e.length;t++)o>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],o-=8):(r[r.length-1]<<=o,r[r.length-1]|=e[t]>>8-o,r.push(e[t]&((1<<8-o)-1&255)),o+=3);let c=e.length/4,l=parseInt((0,n.sha256)(e).substring(2,4),16)&s(c);return r[r.length-1]<<=c,r[r.length-1]|=l>>8-c,t.join(r.map(e=>t.getWord(e)))}let l={};class u{phrase;password;wordlist;entropy;constructor(e,t,r,n,s){null==n&&(n=""),null==s&&(s=a.LangEn.wordlist()),(0,i.assertPrivate)(e,l,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:s,entropy:t})}computeSeed(){let e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){let n=o(e,r);return e=c((0,i.getBytes)(n),r),new u(l,n,e,t,r)}static fromEntropy(e,t,r){let n=(0,i.getBytes)(e,"entropy"),a=c(n,r);return new u(l,(0,i.hexlify)(n),a,t,r)}static entropyToPhrase(e,t){return c((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return o(e,t)}static isValidMnemonic(e,t){try{return o(e,t),!0}catch(e){}return!1}}t.Mnemonic=u},33558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;let n=r(75553);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length<t;)e="0"+e;return e},t.getPassword=function(e){return"string"==typeof e?(0,n.toUtf8Bytes)(e,"NFKC"):(0,n.getBytesCopy)(e)},t.spelunk=function(e,t){let r=t.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);(0,n.assertArgument)(null!=r,"invalid path","path",t);let a=r[1],s=r[3],o="!"===r[4],c=e;for(let e of a.toLowerCase().split(".")){if(Array.isArray(c)){if(!e.match(/^[0-9]+$/))break;c=c[parseInt(e)]}else if("object"==typeof c){let t=null;for(let r in c)if(r.toLowerCase()===e){t=c[r];break}c=t}else c=null;if(null==c)break}if((0,n.assertArgument)(!o||null!=c,"missing required value","path",a),s&&null!=c){if("int"===s){if("string"==typeof c&&c.match(/^-?[0-9]+$/))return parseInt(c);if(Number.isSafeInteger(c))return c}if("number"===s&&"string"==typeof c&&c.match(/^-?[0-9.]*$/))return parseFloat(c);if("data"===s&&"string"==typeof c)return i(c);if("array"===s&&Array.isArray(c)||s===typeof c)return c;(0,n.assertArgument)(!1,`wrong type found for ${s} `,"path",a)}return c}},97564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;let n=r(91971),i=r(75553),a=r(70730),s=r(47440),o=r(65108),c=r(60070),l=r(20849);function u(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}class d extends a.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new d(this.signingKey,e)}async encrypt(e,t){let r={address:this.address,privateKey:this.privateKey};return await (0,c.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){let t={address:this.address,privateKey:this.privateKey};return(0,c.encryptKeystoreJsonSync)(t,e)}static #tM(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){let t=l.Mnemonic.fromEntropy(e.mnemonic.entropy),r=s.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}let t=new d(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,c.isKeystoreJson)(e)?n=await (0,c.decryptKeystoreJson)(e,t,r):(0,o.isCrowdsaleJson)(e)&&(r&&(r(0),await u(0)),n=(0,o.decryptCrowdsaleJson)(e,t),r&&(r(1),await u(0))),d.#tM(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,c.isKeystoreJson)(e)?r=(0,c.decryptKeystoreJsonSync)(e,t):(0,o.isCrowdsaleJson)(e)?r=(0,o.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),d.#tM(r)}static createRandom(e){let t=s.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){let r=s.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=d},44278:(e,t)=>{"use strict";
4Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0,t.decodeBits=function(e,t){let r=(1<<e)-1,n=[],i=0,a=0,s=0;for(let o=0;o<t.length;o++)for(i=i<<6|")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(t[o]),a+=6;a>=e;){let t=i>>a-e;i&=(1<<a-e)-1,a-=e,0===t?s+=r:(n.push(t+s),s=0)}return n}},4982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;let n=r(75553),i=" !#$%&'()*+,-./<=>?@[]^_`{|}~",a=/^[a-z]*$/i;function s(e,t){let r=97;return e.reduce((e,n)=>(n===t?r++:n.match(a)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e),[])}function o(e,t){for(let r=i.length-1;r>=0;r--)e=e.split(i[r]).join(t.substring(2*r,2*r+2));let r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""});if(n)throw Error(`leftovers: ${JSON.stringify(n)}`);return s(s(r,";"),":")}t.decode=o,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),o(e.substring(1+2*i.length),e.substring(1,1+2*i.length))}},9313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;let n=r(75553),i=r(44278),a=r(4982);t.decodeOwlA=function(e,t){let r=(0,a.decodeOwl)(e).join(",");return t.split(/,/g).forEach(e=>{let a=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==a,"internal error parsing accents","accents",t);let s=0,o=(0,i.decodeBits)(parseInt(a[3]),a[4]),c=parseInt(a[2]),l=RegExp(`([${a[1]}])`,"g");r=r.replace(l,(e,t)=>(0==--o[s]&&(t=String.fromCharCode(t.charCodeAt(0),c),s++),t))}),r.split(",")}},993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
4),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(23155);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(87185);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var a=r(22436);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return a.WordlistOwl}});var s=r(15027);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return s.WordlistOwlA}});var o=r(83737);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return o.wordlists}})},87185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;let n=r(22436),i=null;class a extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>
4Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp [email protected]#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|[email protected])[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new a),i}}t.LangEn=a},22436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;let n=r(45826),i=r(75553),a=r(4982),s=r(23155);class o extends s.Wordlist{#r;#t_;constructor(e,t,r){super(e),this.#r=t,this.#t_=r,this.#tj=null}get _data(){return this.#r}_decodeWords(){return(0,a.decodeOwl)(this.#r)}#tj;#tF(){if(null==this.#tj){let e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#t_)throw Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#tj=e}return this.#tj}getWord(e){let t=this.#tF();return(0,i.assertArgument)(e>=0&&e<t.length,`invalid word index: ${e}`,"index",e),t[e]}getWordIndex(e){return this.#tF().indexOf(e)}}t.WordlistOwl=o},15027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;let n=r(22436),i=r(9313);class a extends n.WordlistOwl{#tU;constructor(e,t,r,n){super(e,t,n),this.#tU=r}get _accent(){return this.#tU}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=a},23155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;let n=r(75553);class i{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}t.Wordlist=i},83737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
4),t.wordlists=void 0;let n=r(87185);t.wordlists={en:n.LangEn.wordlist()}},64330:(e,t,r)=>{"use strict";r.d(t,{secp256k1:()=>ey});var n={};r.r(n),r.d(n,{aK:()=>T,e8:()=>p,DO:()=>h,dJ:()=>I,OG:()=>N,My:()=>b,Ph:()=>A,lX:()=>P,Id:()=>B,fg:()=>_,qj:()=>k,aT:()=>v,r4:()=>C,aY:()=>f,x:()=>U,lq:()=>E,z:()=>O,zW:()=>m,Q5:()=>F});var i=r(20355),a=r(16848),s=r(15565);class o extends s.Vw{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,a.tW)(e);let r=(0,s.ZJ)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return(0,a.t2)(this),this.iHash.update(e),this}digestInto(e){(0,a.t2)(this),(0,a.ee)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=a,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()}}let c=(e,t,r)=>new o(e,t).update(r).digest();c.create=(e,t)=>new o(e,t);let l=BigInt(0),u=BigInt(1),d=BigInt(2);function f(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function h(e){if(!f(e))throw Error("Uint8Array expected")}function p(e,t){if("boolean"!=typeof t)throw Error(`${e} must be valid boolean, got "${t}".`)}let g=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function b(e){h(e);let t="";for(let r=0;r<e.length;r++)t+=g[e[r]];return t}function m(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function y(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}let x={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function w(e){return e>=x._0&&e<=x._9?e-x._0:e>=x._A&&e<=x._F?e-(x._A-10):e>=x._a&&e<=x._f?e-(x._a-10):void 0}function v(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=w(e.charCodeAt(i)),a=w(e.charCodeAt(i+1));if(void 0===r||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+a}return n}function A(e){return y(b(e))}function P(e){return h(e),y(b(Uint8Array.from(e).reverse()))}function E(e,t){return v(e.toString(16).padStart(2*t,"0"))}function O(e,t){return E(e,t).reverse()}function k(e,t,r){let n;if("string"==typeof t)try{n=v(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(f(t))n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n}function B(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];h(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let S=e=>"bigint"==typeof e&&l<=e;function C(e,t,r){return S(e)&&S(t)&&S(r)&&t<=e&&e<r}function T(e,t,r,n){if(!C(t,r,n))throw Error(`expected valid ${e}: ${r} <= n < ${n}, got ${typeof t} ${t}`)}function I(e){let t;for(t=0;e>l;e>>=u,t+=1);return t}let N=e=>(d<<BigInt(e-1))-u,R=e=>new Uint8Array(e),M=e=>Uint8Array.from(e);function _(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=R(e),i=R(e),a=0,s=()=>{n.fill(1),i.fill(0),a=0},o=(...e)=>r(i,n,...e),c=(e=R())=>{i=o(M([0]),e),n=o(),0!==e.length&&(i=o(M([1]),e),n=o())},l=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return B(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(l()));)c();return s(),r}}let j={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||f(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)};function F(e,t,r={}){let n=(t,r,n)=>{let i=j[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let a=e[t];if((!n||void 0!==a)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a}
4 (${typeof a}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}function U(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let a=e(r,...n);return t.set(r,a),a}}let L=BigInt(0),D=BigInt(1),G=BigInt(2),H=BigInt(3),$=BigInt(4),z=BigInt(5),q=BigInt(8);function V(e,t){let r=e%t;return r>=L?r:t+r}function K(e,t,r){let n=e;for(;t-- >L;)n*=n,n%=r;return n}function J(e,t){if(e===L||t<=L)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=V(e,t),n=t,i=L,a=D,s=D,o=L;for(;r!==L;){let e=n/r,t=n%r,c=i-s*e,l=a-o*e;n=r,r=t,i=s,a=o,s=c,o=l}if(n!==D)throw Error("invert: does not exist");return V(i,t)}BigInt(9),BigInt(16);let W=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Q(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Z(e,t,r=!1,n={}){if(e<=L)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=Q(e,t);if(a>2048)throw Error("Field lengths over 2048 bytes are not supported");let s=function(e){if(e%$===H){let t=(e+D)/$;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%q===z){let t=(e-z)/q;return function(e,r){let n=e.mul(r,G),i=e.pow(n,t),a=e.mul(r,i),s=e.mul(e.mul(a,G),i),o=e.mul(a,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),r))throw Error("Cannot find square root");return o}}return function(e){let t,r,n;let i=(e-D)/G;for(t=e-D,r=0;t%G===L;t/=G,r++);for(n=G;n<e&&function(e,t,r){if(r<=L||t<L)throw Error("Expected power/modulo > 0");if(r===D)return L;let n=D;for(;t>L;)t&D&&(n=n*e%r),e=e*e%r,t>>=D;return n}(n,i,e)!==e-D;n++);if(1===r){let t=(e+D)/$;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let a=(t+D)/G;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let o=r,c=e.pow(e.mul(e.ONE,n),t),l=e.pow(s,a),u=e.pow(s,t);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<o&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(c,D<<BigInt(o-t-1));c=e.sqr(r),l=e.mul(l,r),u=e.mul(u,c),o=t}return l}}(e)}(e),o=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:N(i),ZERO:L,ONE:D,create:t=>V(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return L<=t&&t<e},is0:e=>e===L,isOdd:e=>(e&D)===D,neg:t=>V(-t,e),eql:(e,t)=>e===t,sqr:t=>V(t*t,e),add:(t,r)=>V(t+r,e),sub:(t,r)=>V(t-r,e),mul:(t,r)=>V(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<L)throw Error("Expected power > 0");if(r===L)return e.ONE;if(r===D)return t;let n=e.ONE,i=t;for(;r>L;)r&D&&(n=e.mul(n,i)),i=e.sqr(i),r>>=D;return n})(o,e,t),div:(t,r)=>V(t*J(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>J(t,e),sqrt:n.sqrt||(e=>s(o,e)),invertBatch:e=>(function(e,t){let r=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})(o,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?O(e,a):E(e,a),fromBytes:e=>{if(e.length!==a)throw Error(`Fp.fromBytes: expected ${a}, got ${e.length}`);return r?P(e):A(e)}});return Object.freeze(o)}function Y(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function X(e){let t=Y(e);return t+Math.ceil(t/2)}let ee=BigInt(0),et=BigInt(1),er=new WeakMap,en=new WeakMap;function ei(e){return F(e.Fp,W.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),F(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Q(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function ea(e){void 0!==e.lowS&&p("lowS",e.lowS),void 0!==e.prehash&&p("prehash",e.prehash)}let{Ph:es,aT:eo}=n,ec={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{let{Err:r}=ec;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=m(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let a=n>127?m(i.length/2|128):"";return`${m(e)}${a}${i}${t}`},decode(e,t){let{Err:r}=ec,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],a=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(n,n+e);
4if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)a=a<<8|e;if(n+=e,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=i;let s=t.subarray(n,n+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+a)}}},_int:{encode(e){let{Err:t}=ec;if(e<el)throw new t("integer: negative integers are not allowed");let r=m(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected assertion");return r},decode(e){let{Err:t}=ec;if(128&e[0])throw new t("Invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("Invalid signature integer: unnecessary leading zero");return es(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=ec,i="string"==typeof e?eo(e):e;h(i);let{v:a,l:s}=n.decode(48,i);if(s.length)throw new t("Invalid signature: left bytes after parsing");let{v:o,l:c}=n.decode(2,a),{v:l,l:u}=n.decode(2,c);if(u.length)throw new t("Invalid signature: left bytes after parsing");return{r:r.decode(o),s:r.decode(l)}},hexFromSig(e){let{_tlv:t,_int:r}=ec,n=`${t.encode(2,r.encode(e.r))}${t.encode(2,r.encode(e.s))}`;return t.encode(48,n)}},el=BigInt(0),eu=BigInt(1),ed=(BigInt(2),BigInt(3)),ef=(BigInt(4),BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")),eh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ep=BigInt(1),eg=BigInt(2),eb=(e,t)=>(e+t/eg)/t,em=Z(ef,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),o=BigInt(88),c=e*e*e%ef,l=c*c*e%ef,u=K(l,t,ef)*l%ef,d=K(u,t,ef)*l%ef,f=K(d,eg,ef)*c%ef,h=K(f,n,ef)*f%ef,p=K(h,i,ef)*h%ef,g=K(p,s,ef)*p%ef,b=K(g,o,ef)*g%ef,m=K(b,s,ef)*p%ef,y=K(m,t,ef)*l%ef,x=K(y,a,ef)*h%ef,w=K(x,r,ef)*c%ef,v=K(w,eg,ef);if(!em.eql(em.sqr(v),e))throw Error("Cannot find square root");return v}}),ey=function(e,t){let r=t=>(function(e){let t=function(e){let t=ei(e);return F(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,a=2*r.BYTES+1;function s(e){return V(e,n)}let{ProjectivePoint:o,normPrivateKeyToScalar:c,weierstrassEquation:l,isWithinCurveOrder:u}=function(e){let t=function(e){let t=ei(e);F(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw 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 Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=Z(t.n,t.nBitLength),i=t.toBytes||((e,t,n)=>{let i=t.toAffine();return B(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),a=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){let{a:n,b:i}=t,a=r.sqr(e),s=r.mul(a,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw Error("bad generator point: equation left != right");function o(e){let r;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:a,n:s}=t;if(n&&"bigint"!=typeof e){if(f(e)&&(e=b(e)),"string"!=typeof e||!n.includes(e.length))throw Error("Invalid key");e=e.padStart(2*i,"0")}try{r="bigint"==typeof e?e:A(k("private key",e,i))}catch(t){throw Error(`private key must be ${i} bytes, hex or bigint, not ${typeof e}`)}return a&&(r=V(r,s)),T("private key",r,eu,s),r}function c(e){if(!(e instanceof d))throw Error("ProjectivePoint expected")}let l=U((e,t)=>{let{px:n,py:i,pz:a}=e;if(r.eql(a,r.ONE))return{x:n,y:i};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(a));let o=r.mul(n,t),c=r.mul(i,t),l=r.mul(a,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw Error("invZ was invalid");return{x:o,y:c}}),u=U(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw Error("bad point: ZERO")}let{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error("bad point: x or y not FE");let a=r.sqr(i),o=s(n);if(!r.eql(a,o))throw Error("bad point: equation left != right");
4if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");Object.freeze(this)}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof d)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(a(k("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(o(e))}static msm(e,t){return function(e,t,r,n){if(!Array.isArray(r)||!Array.isArray(n)||n.length!==r.length)throw Error("arrays of points and scalars must have equal length");n.forEach((e,r)=>{if(!t.isValid(e))throw Error(`wrong scalar at index ${r}`)}),r.forEach((t,r)=>{if(!(t instanceof e))throw Error(`wrong point at index ${r}`)});let i=I(BigInt(r.length)),a=i>12?i-3:i>4?i-2:i?2:1,s=(1<<a)-1,o=Array(s+1).fill(e.ZERO),c=Math.floor((t.BITS-1)/a)*a,l=e.ZERO;for(let t=c;t>=0;t-=a){o.fill(e.ZERO);for(let e=0;e<n.length;e++){let i=Number(n[e]>>BigInt(t)&BigInt(s));o[i]=o[i].add(r[e])}let i=e.ZERO;for(let t=o.length-1,r=e.ZERO;t>0;t--)r=r.add(o[t]),i=i.add(r);if(l=l.add(i),0!==t)for(let e=0;e<a;e++)l=l.double()}return l}(d,n,e,t)}_setWindowSize(e){g.setWindowSize(this,e)}assertValidity(){u(this)}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){c(e);let{px:t,py:n,pz:i}=this,{px:a,py:s,pz:o}=e,l=r.eql(r.mul(t,o),r.mul(a,i)),u=r.eql(r.mul(n,o),r.mul(s,i));return l&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,ed),{px:a,py:s,pz:o}=this,c=r.ZERO,l=r.ZERO,u=r.ZERO,f=r.mul(a,a),h=r.mul(s,s),p=r.mul(o,o),g=r.mul(a,s);return g=r.add(g,g),u=r.mul(a,o),u=r.add(u,u),c=r.mul(e,u),l=r.mul(i,p),l=r.add(c,l),c=r.sub(h,l),l=r.add(h,l),l=r.mul(c,l),c=r.mul(g,c),u=r.mul(i,u),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,u),u=r.add(f,f),f=r.add(u,f),f=r.add(f,p),f=r.mul(f,g),l=r.add(l,f),p=r.mul(s,o),p=r.add(p,p),f=r.mul(p,g),c=r.sub(c,f),u=r.mul(p,h),u=r.add(u,u),new d(c,l,u=r.add(u,u))}add(e){c(e);let{px:n,py:i,pz:a}=this,{px:s,py:o,pz:l}=e,u=r.ZERO,f=r.ZERO,h=r.ZERO,p=t.a,g=r.mul(t.b,ed),b=r.mul(n,s),m=r.mul(i,o),y=r.mul(a,l),x=r.add(n,i),w=r.add(s,o);x=r.mul(x,w),w=r.add(b,m),x=r.sub(x,w),w=r.add(n,a);let v=r.add(s,l);return w=r.mul(w,v),v=r.add(b,y),w=r.sub(w,v),v=r.add(i,a),u=r.add(o,l),v=r.mul(v,u),u=r.add(m,y),v=r.sub(v,u),h=r.mul(p,w),u=r.mul(g,y),h=r.add(u,h),u=r.sub(m,h),h=r.add(m,h),f=r.mul(u,h),m=r.add(b,b),m=r.add(m,b),y=r.mul(p,y),w=r.mul(g,w),m=r.add(m,y),y=r.sub(b,y),y=r.mul(p,y),w=r.add(w,y),b=r.mul(m,w),f=r.add(f,b),b=r.mul(v,w),u=r.mul(x,u),u=r.sub(u,b),b=r.mul(x,m),h=r.mul(v,h),new d(u,f,h=r.add(h,b))}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return g.wNAFCached(this,e,d.normalizeZ)}multiplyUnsafe(e){T("scalar",e,el,t.n);let n=d.ZERO;if(e===el)return n;if(e===eu)return this;let{endo:i}=t;if(!i)return g.unsafeLadder(this,e);let{k1neg:a,k1:s,k2neg:o,k2:c}=i.splitScalar(e),l=n,u=n,f=this;for(;s>el||c>el;)s&eu&&(l=l.add(f)),c&eu&&(u=u.add(f)),f=f.double(),s>>=eu,c>>=eu;return a&&(l=l.negate()),o&&(u=u.negate()),u=new d(r.mul(u.px,i.beta),u.py,u.pz),l.add(u)}multiply(e){let n,i;let{endo:a,n:s}=t;if(T("scalar",e,eu,s),a){let{k1neg:t,k1:s,k2neg:o,k2:c}=a.splitScalar(e),{p:l,f:u}=this.wNAF(s),{p:f,f:h}=this.wNAF(c);l=g.constTimeNegate(t,l),f=g.constTimeNegate(o,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=l.add(f),i=u.add(h)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=d.BASE,i=(e,t)=>t!==el&&t!==eu&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),a=i(this,t).add(i(e,r));return a.is0()?void 0:a}toAffine(e){return l(this,e)}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===eu)return!0;
4if(r)return r(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===eu?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return p("isCompressed",e),this.assertValidity(),i(d,this,e)}toHex(e=!0){return p("isCompressed",e),b(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);let h=t.nBitLength,g=function(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},n=e=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error(`Wrong window size=${e}, should be [1..${t}]`)},i=e=>(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>ee;)r&et&&(n=n.add(i)),i=i.double(),r>>=et;return n},precomputeWindow(e,t){let{windows:r,windowSize:n}=i(t),a=[],s=e,o=s;for(let e=0;e<r;e++){o=s,a.push(o);for(let e=1;e<n;e++)o=o.add(s),a.push(o);s=o.double()}return a},wNAF(t,n,a){let{windows:s,windowSize:o}=i(t),c=e.ZERO,l=e.BASE,u=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<s;e++){let t=e*o,i=Number(a&u);a>>=f,i>o&&(i-=d,a+=et);let s=t+Math.abs(i)-1,h=e%2!=0,p=i<0;0===i?l=l.add(r(h,n[t])):c=c.add(r(p,n[s]))}return{p:c,f:l}},wNAFCached(e,t,r){let n=en.get(e)||1,i=er.get(e);return i||(i=this.precomputeWindow(e,n),1!==n&&er.set(e,r(i))),this.wNAF(n,i,t)},setWindowSize(e,t){n(t),en.set(e,t),er.delete(e)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:o,weierstrassEquation:s,isWithinCurveOrder:function(e){return C(e,eu,t.n)}}}({...t,toBytes(e,t,n){let i=t.toAffine(),a=r.toBytes(i.x),s=B;return(p("isCompressed",n),n)?s(Uint8Array.from([t.hasEvenY()?2:3]),a):s(Uint8Array.from([4]),a,r.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],s=e.subarray(1);if(t===i&&(2===n||3===n)){let e;let t=A(s);if(!C(t,eu,r.ORDER))throw Error("Point is not on curve");let i=l(t);try{e=r.sqrt(i)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&n)==1!=((e&eu)===eu)&&(e=r.neg(e)),{x:t,y:e}}if(t===a&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),d=e=>b(E(e,t.nByteLength)),h=(e,t,r)=>A(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new g(h(e=k("compactSignature",e,2*r),0,r),h(e,r,2*r))}static fromDER(e){let{r:t,s:r}=ec.toSig(k("DER",e));return new g(t,r)}assertValidity(){T("r",this.r,eu,n),T("s",this.s,eu,n)}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:a,recovery:c}=this,l=x(k("msgHash",e));if(null==c||![0,1,2,3].includes(c))throw Error("recovery id invalid");let u=2===c||3===c?i+t.n:i;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let f=(1&c)==0?"02":"03",h=o.fromHex(f+d(u)),p=J(u,n),g=s(-l*p),b=s(a*p),m=o.BASE.multiplyAndAddUnsafe(h,g,b);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>eu}normalizeS(){return this.hasHighS()?new g(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return v(this.toDERHex())}toDERHex(){return ec.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return v(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function m(e){let t=f(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===a:r?n===2*i||n===2*a:e instanceof o}let y=t.bits2int||function(e){let r=A(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},x=t.bits2int_modN||function(e){return s(y(e))},w=N(t.nBitLength);function S(e){return T(`num < 2^${t.nBitLength}`,e,el,w),E(e,t.nByteLength)}let R={lowS:t.lowS,prehash:!1},M={lowS:t.lowS,prehash:!1};return o.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return o.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw Error("first arg must be private key");if(!m(t))throw Error("second arg must be public key");return o.fromHex(t).multiply(c(e)).toRawBytes(r)},sign:function(e,i,a=R){let{seed:l,k2sig:d}=function(e,i,a=R){if(["recovered","canonical"].some(e=>e in a))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:d}=t,{lowS:f,prehash:h,extraEntropy:p}=a;null==f&&(f=!0),e=k("msgHash",e),ea(a),h&&(e=k("prehashed msgHash",l(e)));let b=x(e),m=c(i),w=[S(m),S(b)];if(null!=p&&!1!==p){let e=!0===p?d(r.BYTES):p;w.push(k("extraEntropy",e))}return{seed:B(...w),k2sig:function(e){let t=y(e);if(!u(t))return;let r=J(t,n),i=o.BASE.multiply(t).toAffine(),a=s(i.x);if(a===el)return;let c=s(r*s(b+a*m));if(c===el)return;let l=(i.x===a?0:2)|Number(i.y&eu),d=c;if(f&&c>n>>eu)d=c>n>>eu?s(-c):c,l^=1;return new g(a,d,l)}}}(e,i,a);return _(t.hash.outputLen,t.nByteLength,t.hmac)(l,d)},verify:function(e,r,i,a=M){let c,l;if(r=k("msgHash",r),i=k("publicKey",i),"strict"in a)throw Error("options.strict was renamed to lowS");ea(a);let{lowS:u,prehash:d}=a;try{if("string"==typeof e||f(e))try{l=g.fromDER(e)}catch(t){if(!(t instanceof ec.Err))throw t;l=g.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;l=new g(t,r)}else throw Error("PARSE");c=o.fromHex(i)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;d&&(r=t.hash(r));let{r:h,s:p}=l,b=x(r),m=J(p,n),y=s(b*m),w=s(h*m),v=o.BASE.multiplyAndAddUnsafe(c,y,w)?.toAffine();return!!v&&s(v.x)===h},ProjectivePoint:o,Signature:g,utils:{isValidPrivateKey(e){try{return c(e),!0}catch(e){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{let e=X(t.n);return function(e,t,r=!1){let n=e.length,i=Y(t),a=X(t);if(n<16||n<a||n>1024)throw Error(`expected ${a}-1024 bytes of input, got ${n}`);let s=V(r?A(e):P(e),t-D)+D;return r?O(s,i):E(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=o.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>c(t,e,(0,s.Id)(...r)),randomBytes:s.po});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:em,n:eh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-ep*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=eb(t*e,eh),s=eb(-r*e,eh),o=V(e-a*t-s*n,eh),c=V(-a*r-s*t,eh),l=o>i,u=c>i;if(l&&(o=eh-o),u&&(c=eh-c),o>i||c>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:o,k2neg:u,k2:c}}}},i.sc);BigInt(0),ey.ProjectivePoint},16848:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(t,{CG:()=>o,ai:()=>n,ee:()=>i,t2:()=>s,tW:()=>a})},20355:(e,t,r)=>{"use strict";r.d(t,{sc:()=>f});var n=r(16848),i=r(15565);let a=(e,t,r)=>e&t^~e&r,s=(e,t,r)=>e&t^e&r^t&r;class o extends i.Vw{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.O8)(this.buffer)}update(e){(0,n.t2)(this);let{view:t,buffer:r,blockLen:a}=this,s=(e=(0,i.ZJ)(e)).length;for(let n=0;n<s;){let o=Math.min(a-this.pos,s-n);if(o===a){let t=(0,i.O8)(e);for(;a<=s-n;n+=a)this.process(t,n);continue}r.set(e.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===a&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.t2)(this),(0,n.CG)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:a,isLE:s}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>a-o&&(this.process(r,0),o=0);for(let e=o;e<a;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),c=n?4:0,l=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+l,o,n)}(r,a-8,BigInt(8*this.length),s),this.process(r,0);let c=(0,i.O8)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=l/4,d=this.get();if(u>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)c.setUint32(4*e,d[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:a,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=a,n%t&&e.buffer.set(r),e}}let c=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
476c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),l=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),u=new Uint32Array(64);class d extends o{constructor(){super(64,32,8,!1),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:s,H:o}=this;return[e,t,r,n,i,a,s,o]}set(e,t,r,n,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],r=u[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,a=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;u[e]=a+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:o,D:l,E:d,F:f,G:h,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.Ow)(d,6)^(0,i.Ow)(d,11)^(0,i.Ow)(d,25))+a(d,f,h)+c[e]+u[e]|0,g=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+s(r,n,o)|0;p=h,h=f,f=d,d=l+t|0,l=o,o=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,l=l+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,o,l,d,f,h,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let f=(0,i.ld)(()=>new d)},15565:(e,t,r)=>{"use strict";r.d(t,{Vw:()=>h,Fc:()=>u,Id:()=>f,O8:()=>s,qv:()=>c,po:()=>g,Ow:()=>o,ZJ:()=>d,DH:()=>a,ld:()=>p});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=r(16848);let a=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),o=(e,t)=>e<<32-t|e>>>t,c=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],l=e=>e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255;function u(e){for(let t=0;t<e.length;t++)e[t]=l(e[t])}function d(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,i.ee)(e),e}function f(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];(0,i.ee)(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}class h{clone(){return this._cloneInto()}}function p(e){let t=t=>e().update(d(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function g(e=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(e));if(n&&"function"==typeof n.randomBytes)return n.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}},6930:(e,t,r)=>{"use strict";function n(e,t){let r=e.exec(t);return r?.groups}r.d(t,{BD:()=>i,Ge:()=>a,Yv:()=>n,wj:()=>s});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,a=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,s=/^\(.+?\).*?$/},8853:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>M,__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>E,__asyncValues:()=>k,__await:()=>P,__awaiter:()=>p,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>N,__createBinding:()=>b,__decorate:()=>o,__disposeResources:()=>j,__esDecorate:()=>l,__exportStar:()=>m,__extends:()=>i,__generator:()=>g,__importDefault:()=>T,__importStar:()=>
4C,__makeTemplateObject:()=>B,__metadata:()=>h,__param:()=>c,__propKey:()=>d,__read:()=>x,__rest:()=>s,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>A,__spreadArrays:()=>v,__values:()=>y,default:()=>F});var n=function(e,t){return(n=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])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,i,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,h=r.length-1;h>=0;h--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var b=(0,r[h])("accessor"===c?{get:d.get,set:d.set}:d[l],p);if("accessor"===c){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(o=s(b.get))&&(d.get=o),(o=s(b.set))&&(d.set=o),(o=s(b.init))&&i.unshift(o)}else(o=s(b))&&("field"===c?i.unshift(o):d[l]=o)}u&&Object.defineProperty(u,n.name,d),f=!0}function u(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function o(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}c((n=n.apply(e,t||[])).next())})}function g(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(c){return function(o){if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
vendor: 4,131 bytes, line 4
4(!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]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(x(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function A(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var r;(r=i[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,l):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function c(e){o("next",e)}function l(e){o("throw",e)}function u(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function B(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(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)&&b(t,e,r);return S(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw 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)}function N(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw 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}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function M(e,t,r){if(null!=t){var n,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");
4if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var _="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function j(e){function t(t){e.error=e.hasError?new _(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}let F={__extends:i,__assign:a,__rest:s,__decorate:o,__param:c,__metadata:h,__awaiter:p,__generator:g,__createBinding:b,__exportStar:m,__values:y,__read:x,__spread:w,__spreadArrays:v,__spreadArray:A,__await:P,__asyncGenerator:E,__asyncDelegator:O,__asyncValues:k,__makeTemplateOb
vendor: 7,382 bytes, line 4
4ject:B,__importStar:C,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:N,__classPrivateFieldIn:R,__addDisposableResource:M,__disposeResources:j}},22538:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{J:()=>n})},21779:(e,t,r)=>{"use strict";r.d(t,{T:()=>ee});var n=r(6930);let i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,s=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,o=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,c=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,l=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,u=/^receive\(\) external payable$/,d=new Set(["indexed"]),f=new Set(["calldata","memory","storage"]);class h extends Error{constructor(e,t={}){let r=t.cause instanceof h?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof h&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...r?[`Details: ${r}`]:[],"Version: [email protected]"].join("\n")),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:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}}class p extends h{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class g extends h{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class b extends h{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class m extends h{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class y extends h{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class x extends h{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class w extends h{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class v extends h{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class A extends h{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class P extends h{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class E extends h{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class O extends h{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let k=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),B=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,S=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,C=/^u?int$/;function T(e,t){var r,i,a;let s;let o=(r=t?.type)?`${r}:${e}`:e;if(k.has(o))return k.get(o);let c=n.wj.test(e),l=(0,n.Yv)(c?S:B,e);if(!l)throw new b({param:e});if(l.name&&("address"===(i=l.name)||"bool"===i||"function"===i||"string"===i||"tuple"===i||n.BD.test(i)||n.Ge.test(i)||R.test(i)))throw new m
vendor: 4,564 bytes, line 4
4({param:e,name:l.name});let u=l.name?{name:l.name}:{},d="indexed"===l.modifier?{indexed:!0}:{},h=t?.structs??{},p={};if(c){s="tuple";let e=I(l.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(T(e[n],{structs:h}));p={components:t}}else if(l.type in h)s="tuple",p={components:h[l.type]};else if(C.test(l.type))s=`${l.type}256`;else if(s=l.type,t?.type!=="struct"&&!N(s))throw new g({type:s});if(l.modifier){if(!t?.modifiers?.has?.(l.modifier))throw new y({param:e,type:t?.type,modifier:l.modifier});if(f.has(l.modifier)&&(a=s,!l.array&&"bytes"!==a&&"string"!==a&&"tuple"!==a))throw new x({param:e,type:t?.type,modifier:l.modifier})}let w={type:`${s}${l.array??""}`,...u,...d,...p};return k.set(o,w),w}function I(e,t=[],r="",n=0){let i=e.trim().length;for(let a=0;a<i;a++){let i=e[a],s=e.slice(a+1);switch(i){case",":return 0===n?I(s,[...t,r.trim()]):I(s,t,`${r}${i}`,n);case"(":return I(s,t,`${r}${i}`,n+1);case")":return I(s,t,`${r}${i}`,n-1);default:return I(s,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new O({current:r,depth:n});return t.push(r.trim()),t}function N(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.BD.test(e)||n.Ge.test(e)}let R=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/,M=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function _(e){let t=function(e){let t={},r=e.length;for(let i=0;i<r;i++){let r=e[i];if(!o.test(r))continue;let a=(0,n.Yv)(o,r);if(!a)throw new v({signature:r,type:"struct"});let s=a.properties.split(";"),c=[],l=s.length;for(let e=0;e<l;e++){let t=s[e].trim();if(!t)continue;let r=T(t,{type:"struct"});c.push(r)}if(!c.length)throw new P({signature:r});t[a.name]=c}let i={},a=Object.entries(t),s=a.length;for(let e=0;e<s;e++){let[r,s]=a[e];i[r]=function e(t,r,i=new Set){let a=[],s=t.length;for(let o=0;o<s;o++){let s=t[o];if(n.wj.test(s.type))a.push(s);else{let t=(0,n.Yv)(M,s.type);if(!t?.type)throw new w({abiParameter:s});let{array:o,type:c}=t;if(c in r){if(i.has(c))throw new E({type:c});a.push({...s,type:`tuple${o??""}`,components:e(r[c]??[],r,new Set([...i,c]))})}else if(N(c))a.push(s);else throw new p({type:c})}}return a}(s,t)}return i}(e),r=[],h=e.length;for(let p=0;p<h;p++){let h=e[p];o.test(h)||r.push(function(e,t={}){if(s.test(e)){let r=(0,n.Yv)(s,e);if(!r)throw new v({signature:e,type:"function"});let i=I(r.parameters),a=[],o=i.length;for(let e=0;e<o;e++)a.push(T(i[e],{modifiers:f,structs:t,type:"function"}));let c=[];if(r.returns){let e=I(r.returns),n=e.length;for(let r=0;r<n;r++)c.push(T(e[r],{modifiers:f,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:a,outputs:c}}if(a.test(e)){let r=(0,n.Yv)(a,e);if(!r)throw new v({signature:e,type:"event"});let i=I(r.parameters),s=[],o=i.length;for(let e=0;e<o;e++)s.push(T(i[e],{modifiers:d,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:s}}if(i.test(e)){let r=(0,n.Yv)(i,e);if(!r)throw new v({signature:e,type:"error"});let a=I(r.parameters),s=[],o=a.length;for(let e=0;e<o;e++)s.push(T(a[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:s}}if(c.test(e)){let r=(0,n.Yv)(c,e);if(!r)throw new v({signature:e,type:"constructor"});let i=I(r.parameters),a=[],s=i.length;for(let e=0;e<s;e++)a.push(T(i[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:a}}if(l.test(e))return{type:"fallback"};if(u.test(e))return{type:"receive",stateMutability:"payable"};throw new A({signature:e})}(h,t))}return r}var j=r(22538),F=r(56464),U=r(52966),L=r(91347),D=r(76476),G=r(54775),H=r(57455),$=r(28369),z=r(41568),q=r(76530),V=r(96395),K=r(56107),J=r(52203),W=r(45122),Q=r(80464),Z=r(28328),Y=r(87272),X=r(78699);async function ee(e,t){let{account:n=e.account,batch:i=!!e.batch?.multicall,blockNumber:a,blockTag:s="latest",accessList:o,blobs:c,code:l,data:u,factory:d,factoryData:f,gas:h,gasPrice:p,maxFeePerBlobGas:g,maxFeePerGas:b,maxPriorityFeePerGas:m,nonce:y,to:x,value:w,stateOverride:v,...A}=t,P=n?(0,j.J)(n):void 0;if(l&&(d||f))throw new L.C("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&x)throw new L.C("Cannot provide both `code` & `to` as parameters.");
4let E=l&&u,O=d&&f&&x&&u,k=E||O,B=E?function(e){let{code:t,data:r}=e;return(0,$.m)({abi:_(["constructor(bytes, bytes)"]),bytecode:U.LX,args:[t,r]})}({code:l,data:u}):O?function(e){let{data:t,factory:r,factoryData:n,to:i}=e;return(0,$.m)({abi:_(["constructor(address, bytes, address, bytes)"]),bytecode:U.WN,args:[i,t,r,n]})}({data:u,factory:d,factoryData:f,to:x}):u;try{(0,X.c)(t);let r=(a?(0,V.cK)(a):void 0)||s,n=(0,Y.yH)(v),l=e.chain?.formatters?.transactionRequest?.format,u=(l||Q.Bv)({...(0,W.o)(A,{format:l}),from:P?.address,accessList:o,blobs:c,data:B,gas:h,gasPrice:p,maxFeePerBlobGas:g,maxFeePerGas:b,maxPriorityFeePerGas:m,nonce:y,to:k?void 0:x,value:w});if(i&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:u})&&!n)try{return await et(e,{...u,blockNumber:a,blockTag:s})}catch(e){if(!(e instanceof D.YE)&&!(e instanceof D.rj))throw e}let d=await e.request({method:"eth_call",params:n?[u,r,n]:[u,r]});if("0x"===d)return{data:void 0};return{data:d}}catch(s){let n=function(e){if(!(e instanceof L.C))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(s),{offchainLookup:i,offchainLookupSignature:a}=await r.e(193).then(r.bind(r,71193));if(!1!==e.ccipRead&&n?.slice(0,10)===a&&x)return{data:await i(e,{data:n,to:x})};if(k&&n?.slice(0,10)==="0x101bb98d")throw new G.Po({factory:d});throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,J.l)(e,r);return t instanceof K.RM?e:t})();return new G.zX(n,{docsPath:t,...r})}(s,{...t,account:P,chain:e.chain})}}async function et(e,t){let{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:a="latest",data:s,multicallAddress:o,to:c}=t,l=o;if(!l){if(!e.chain)throw new D.YE;l=(0,q.M)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let u=(i?(0,V.cK)(i):void 0)||a,{schedule:d}=(0,Z.u)({id:`${e.uid}.${u}`,wait:n,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,z.p)({abi:F.v2,args:[r],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:n,to:l},u]});return(0,H.e)({abi:F.v2,args:[r],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:f,success:h}]=await d({data:s,to:c});if(!h)throw new G.$S({data:f});return"0x"===f?{data:void 0}:{data:f}}},96350:(e,t,r)=>{"use strict";r.d(t,{O:()=>l,_:()=>c});var n=r(11093),i=r(67591),a=r(95081),s=r(81982),o=r(12389);async function c(e,t){return l(e,t)}async function l(e,t){let{block:r,chain:c=e.chain,request:l,type:u="eip1559"}=t||{},d=await (async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:r,client:e,request:l}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new n.sM;let f=d.toString().split(".")[1]?.length??0,h=10**f,p=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),g=r||await (0,i.T)(e,s.g,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas){let t=await c.fees.estimateFeesPerGas({block:r,client:e,multiply:p,request:l,type:u});if(null!==t)return t}if("eip1559"===u){if("bigint"!=typeof g.baseFeePerGas)throw new n.pw;let t="bigint"==typeof l?.maxPriorityFeePerGas?l.maxPriorityFeePerGas:await (0,a.N)(e,{block:g,chain:c,request:l}),r=p(g.baseFeePerGas);return{maxFeePerGas:l?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:l?.gasPrice??p(await (0,i.T)(e,o.L,"getGasPrice")({}))}}},78954:(e,t,r)=>{"use strict";r.d(t,{Q:()=>x});var n=r(22538),i=r(91347),a=r(82661),s=r(96395),o=r(56643),c=r(56813),l=r(72981);class u extends i.C{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:a,gasPrice:s,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,l.aO)({from:t?.address,to:h,value:void 0!==p&&`${(0,o.c)(p)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:void 0!==s&&`${(0,c.Q)(s)} gwei`,maxFeePerGas:void 0!==u&&`${(0,c.Q)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,c.Q)(d)} gwei`,nonce:f}
4)].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var d=r(56107),f=r(52203),h=r(45122),p=r(80464),g=r(87272),b=r(78699),m=r(63537),y=r(41405);async function x(e,t){let{account:r=e.account}=t,o=r?(0,n.J)(r):void 0;try{let{accessList:r,authorizationList:n,blobs:l,blobVersionedHashes:u,blockNumber:d,blockTag:f,data:x,gas:w,gasPrice:v,maxFeePerBlobGas:A,maxFeePerGas:P,maxPriorityFeePerGas:E,nonce:O,value:k,stateOverride:B,...S}=await (0,m.f)(e,{...t,parameters:o?.type==="local"?void 0:["blobVersionedHashes"]}),C=(d?(0,s.cK)(d):void 0)||f,T=(0,g.yH)(B),I=await (async()=>S.to?S.to:n&&n.length>0?await (0,a.g)({authorization:n[0]}).catch(()=>{throw new i.C("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,b.c)(t);let N=e.chain?.formatters?.transactionRequest?.format,R=(N||p.Bv)({...(0,h.o)(S,{format:N}),from:o?.address,accessList:r,authorizationList:n,blobs:l,blobVersionedHashes:u,data:x,gas:w,gasPrice:v,maxFeePerBlobGas:A,maxFeePerGas:P,maxPriorityFeePerGas:E,nonce:O,to:I,value:k});function c(t){let{block:r,request:n,rpcStateOverride:i}=t;return e.request({method:"eth_estimateGas",params:i?[n,r??"latest",i]:r?[n,r]:[n]})}let M=BigInt(await c({block:C,request:R,rpcStateOverride:T}));if(n){let t=await (0,y.r)(e,{address:R.from}),r=await Promise.all(n.map(async e=>{let{contractAddress:r}=e,n=await c({block:C,request:{authorizationList:void 0,data:x,from:o?.address,to:r,value:(0,s.cK)(t)},rpcStateOverride:T}).catch(()=>100000n);return 2n*BigInt(n)}));M+=r.reduce((e,t)=>e+t,0n)}return M}catch(r){throw function(e,{docsPath:t,...r}){return new u((()=>{let t=(0,f.l)(e,r);return t instanceof d.RM?e:t})(),{docsPath:t,...r})}(r,{...t,account:o,chain:e.chain})}}},95081:(e,t,r)=>{"use strict";r.d(t,{N:()=>l,b:()=>c});var n=r(11093),i=r(90812),a=r(67591),s=r(81982),o=r(12389);async function c(e,t){return l(e,t)}async function l(e,t){let{block:r,chain:c=e.chain,request:l}=t||{};try{let t=c?.fees?.maxPriorityFeePerGas??c?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await (0,a.T)(e,s.g,"getBlock")({}),i=await t({block:n,client:e,request:l});if(null===i)throw Error();return i}if(void 0!==t)return t;let n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.uU)(n)}catch{let[t,i]=await Promise.all([r?Promise.resolve(r):(0,a.T)(e,s.g,"getBlock")({}),(0,a.T)(e,o.L,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.pw;let c=i-t.baseFeePerGas;if(c<0n)return 0n;return c}}},41405:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(96395);async function i(e,{address:t,blockNumber:r,blockTag:i="latest"}){let a=r?(0,n.cK)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,a||i]}))}},81982:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(7912),i=r(96395),a=r(36491);async function s(e,{blockHash:t,blockNumber:r,blockTag:o,includeTransactions:c}={}){let l=c??!1,u=void 0!==r?(0,i.cK)(r):void 0,d=null;if(!(d=t?await e.request({method:"eth_getBlockByHash",params:[t,l]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[u||(o??"latest"),l]},{dedupe:!!u})))throw new n.l({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||function(e){let t=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,a.uP)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):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}})(d)}},29701:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(90812);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.ME)(t)}},12389:(e,t,r)=>{"use strict";async function n(e){return BigInt(await e.request({method:"eth_gasPrice"}))}r.d(t,{L:()=>n})}
4,60744:(e,t,r)=>{"use strict";r.d(t,{y:()=>a});var n=r(90812),i=r(96395);async function a(e,{address:t,blockTag:r="latest",blockNumber:a}){let s=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,i.cK)(a):r]},{dedupe:!!a});return(0,n.ME)(s)}},63537:(e,t,r)=>{"use strict";r.d(t,{M:()=>E,f:()=>O});var n=r(22538),i=r(96350),a=r(78954),s=r(81982),o=r(60744),c=r(11093),l=r(47365),u=r(96395);function d(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,l.aT)(e)):e.blobs,i=[];for(let e of n)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?i:i.map(e=>(0,u.My)(e))}function f(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,l.aT)(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,l.aT)(e)):e.commitments,a=[];for(let e=0;e<n.length;e++){let r=n[e],s=i[e];a.push(Uint8Array.from(t.computeBlobKzgProof(r,s)))}return"bytes"===r?a:a.map(e=>(0,u.My)(e))}var h=r(20355),p=r(1561),g=r(91347);class b extends g.C{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class m extends g.C{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}var y=r(4885),x=r(35125),w=r(67591),v=r(78699),A=r(72981),P=r(29701);let E=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function O(e,t){let r,g;let{account:O=e.account,blobs:k,chain:B,gas:S,kzg:C,nonce:T,nonceManager:I,parameters:N=E,type:R}=t,M=O?(0,n.J)(O):O,_={...t,...M?{from:M?.address}:{}};async function j(){return r||(r=await (0,w.T)(e,s.g,"getBlock")({blockTag:"latest"}))}async function F(){return g||(B?B.id:void 0!==t.chainId?t.chainId:g=await (0,w.T)(e,P.T,"getChainId")({}))}if((N.includes("blobVersionedHashes")||N.includes("sidecars"))&&k&&C){let e=d({blobs:k,kzg:C});if(N.includes("blobVersionedHashes")){let t=function(e){let{commitments:t,version:r}=e,n=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(let e of t)i.push(function(e){let{commitment:t,version:r=1}=e,n=e.to??("string"==typeof t?"hex":"bytes"),i=function(e,t){let r=(0,h.sc)((0,p.q)(e,{strict:!1})?(0,l.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,u.nj)(r)}(t,"bytes");return i.set([r],0),"bytes"===n?i:(0,u.My)(i)}({commitment:e,to:n,version:r}));return i}({commitments:e,to:"hex"});_.blobVersionedHashes=t}if(N.includes("sidecars")){let t=f({blobs:k,commitments:e,kzg:C}),r=function(e){let{data:t,kzg:r,to:n}=e,i=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,l.aT)(e.data):e.data,n=(0,x.E)(r);if(!n)throw new m;if(n>761855)throw new b({maxSize:761855,size:n});let i=[],a=!0,s=0;for(;a;){let e=(0,y.l)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(s,s+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),a=!1;break}t++,s+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,u.My)(e.bytes))}({data:t,to:n}),a=e.commitments??d({blobs:i,kzg:r,to:n}),s=e.proofs??f({blobs:i,commitments:a,kzg:r,to:n}),o=[];for(let e=0;e<i.length;e++)o.push({blob:i[e],commitment:a[e],proof:s[e]});return o}({blobs:k,commitments:e,proofs:t,to:"hex"});_.sidecars=r}}if(N.includes("chainId")&&(_.chainId=await F()),N.includes("nonce")&&void 0===T&&M){if(I){let t=await F();_.nonce=await I.consume({address:M.address,chainId:t,client:e})}else _.nonce=await (0,w.T)(e,o.y,"getTransactionCount")({address:M.address,blockTag:"pending"})}if((N.includes("fees")||N.includes("type"))&&void 0===R)try{_.type=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";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 A.Vg({transaction:e})}(_)}catch{let e=await j();_.type="bigint"==typeof e?.baseFeePerGas?"eip1559":"legacy"}if(N.includes("fees")){if("legacy"!==_.type&&"eip2930"!==_.type){if(void 0===_.maxFeePerGas||void 0===_.maxPriorityFeePerGas){let r=await j(),{maxFeePerGas:n,maxPriorityFeePerGas:a}=await (0,i.O)(e,{block:r,chain:B,request:_});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<a)throw new c.RR({maxPriorityFeePerGas:a});_.maxPriorityFeePerGas=a,_.maxFeePerGas=n}}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new c.pw;let r=await j(),{gasPrice:n}=await (0,i.O)(e,{block:r,chain:B,request:_,type:"legacy"});_.gasPrice=n}}return N.includes("gas")&&void 0===S&&(_.gas=await (0,w.T)(e,a.Q,"estimateGas")({..._,account:M?{address:M.address,type:"json-rpc"}:M})),(0,v.c)(_),delete _.parameters,_}},3433:(e,t,r)=>{"use strict";async function n(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}r.d(t,{L:()=>n})},84164:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});let n={formatters:void 0,fees:void 0,serializers:void 0,id:0xaa36a7,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol
4:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}},12367:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});var n=r(22538),i=r(7015);function a(e){let{batch:t,cacheTime:r=e.pollingInterval??4e3,ccipRead:a,key:s="base",name:o="Base Client",pollingInterval:c=4e3,type:l="base"}=e,u=e.chain,d=e.account?(0,n.J)(e.account):void 0,{config:f,request:h,value:p}=e.transport({chain:u,pollingInterval:c}),g={account:d,batch:t,cacheTime:r,ccipRead:a,chain:u,key:s,name:o,pollingInterval:c,request:h,transport:{...f,...p},type:l,uid:(0,i.L)()};return Object.assign(g,{extend:function e(t){return r=>{let n=r(t);for(let e in g)delete n[e];let i={...t,...n};return Object.assign(i,{extend:e(i)})}}(g)})}},70551:(e,t,r)=>{"use strict";r.d(t,{l:()=>tv});var n=r(12367),i=r(56464),a=r(57455),s=r(41568),o=r(76530),c=r(33968),l=r(96395),u=r(2758),d=r(91347),f=r(54775);function h(e,t){if(!(e instanceof d.C))return!1;let r=e.walk(e=>e instanceof f.M);return r instanceof f.M&&(!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&r.reason===u.fD[50])}var p=r(5864),g=r(47365),b=r(11625),m=r(1561);function y(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,m.q)(t)?t:null}function x(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,l.My)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let n=y(r[e]),i=n?(0,g.ZJ)(n):(0,b.S)((0,g.Af)(r[e]),"bytes");t=(0,b.S)((0,p.xW)([t,i]),"bytes")}return(0,l.My)(t)}function w(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,g.Af)(t).byteLength+2),n=0,i=t.split(".");for(let e=0;e<i.length;e++){let t=(0,g.Af)(i[e]);if(t.byteLength>255){var a;t=(0,g.Af)((a=function(e){let t=new Uint8Array(32).fill(0);return e?y(e)||(0,b.S)((0,g.Af)(e)):(0,l.My)(t)}(i[e]),`[${a.slice(2)}]`))}r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var v=r(67591),A=r(68281),P=r(21779);async function E(e,t){let{abi:r,address:n,args:i,functionName:o,...c}=t,l=(0,s.p)({abi:r,args:i,functionName:o});try{let{data:t}=await (0,v.T)(e,P.T,"call")({...c,data:l,to:n});return(0,a.e)({abi:r,args:i,functionName:o,data:t||"0x"})}catch(e){throw(0,A.j)(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function O(e,{blockNumber:t,blockTag:r,coinType:n,name:u,gatewayUrls:d,str
4ict:f,universalResolverAddress:p}){let g=p;if(!g){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");g=(0,o.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let o=(0,s.p)({abi:i.Rm,functionName:"addr",...null!=n?{args:[x(u),BigInt(n)]}:{args:[x(u)]}}),f={address:g,abi:i.Ag,functionName:"resolve",args:[(0,l.nj)(w(u)),o],blockNumber:t,blockTag:r},h=(0,v.T)(e,E,"readContract"),p=d?await h({...f,args:[...f.args,d]}):await h(f);if("0x"===p[0])return null;let b=(0,a.e)({abi:i.Rm,args:null!=n?[x(u),BigInt(n)]:void 0,functionName:"addr",data:p[0]});if("0x"===b||"0x00"===(0,c.B)(b))return null;return b}catch(e){if(f)throw e;if(h(e,"resolve"))return null;throw e}}class k extends d.C{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class B extends d.C{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class S extends d.C{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class C extends d.C{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}let T=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,I=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,N=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,R=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function M(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function _(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function j({uri:e,gatewayUrls:t}){let r=N.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=_(t?.ipfs,"https://ipfs.io"),i=_(t?.arweave,"https://arweave.net"),a=e.match(T),{protocol:s,subpath:o,target:c,subtarget:l=""}=a?.groups||{},u="ipns:/"===s||"ipns/"===o,d="ipfs:/"===s||"ipfs/"===o||I.test(e);if(e.startsWith("http")&&!u&&!d){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(R,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new S({uri:e})}function F(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new k({data:e});return e.image||e.image_url||e.image_data}async function U({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await L({gatewayUrls:e,uri:F(r)})}catch{throw new S({uri:t})}}async function L({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=j({uri:t,gatewayUrls:e});if(n||await M(r))return r;throw new S({uri:t})}async function D(e,{nft:t}){if("erc721"===t.namespace)return E(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return E(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}
4],functionName:"uri",args:[BigInt(t.tokenID)]});throw new C({namespace:t.namespace})}async function G(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?H(e,{gatewayUrls:t,record:r}):L({uri:r,gatewayUrls:t})}async function H(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[a,s]=r.split(":"),[o,c]=n.split(":");if(!a||"eip155"!==a.toLowerCase())throw new B({reason:"Only EIP-155 supported"});if(!s)throw new B({reason:"Chain ID not found"});if(!c)throw new B({reason:"Contract address not found"});if(!i)throw new B({reason:"Token ID not found"});if(!o)throw new B({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:o.toLowerCase(),contractAddress:c,tokenID:i}}(r),{uri:i,isOnChain:a,isEncoded:s}=j({uri:await D(e,{nft:n}),gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return L({uri:F(JSON.parse(s?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let o=n.tokenID;return"erc1155"===n.namespace&&(o=o.replace("0x","").padStart(64,"0")),U({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,o)})}async function $(e,{blockNumber:t,blockTag:r,name:n,key:c,gatewayUrls:u,strict:d,universalResolverAddress:f}){let p=f;if(!p){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");p=(0,o.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let o={address:p,abi:i.Ag,functionName:"resolve",args:[(0,l.nj)(w(n)),(0,s.p)({abi:i.SJ,functionName:"text",args:[x(n),c]})],blockNumber:t,blockTag:r},d=(0,v.T)(e,E,"readContract"),f=u?await d({...o,args:[...o.args,u]}):await d(o);if("0x"===f[0])return null;let h=(0,a.e)({abi:i.SJ,functionName:"text",data:f[0]});return""===h?null:h}catch(e){if(d)throw e;if(h(e,"resolve"))return null;throw e}}async function z(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:a,strict:s,universalResolverAddress:o}){let c=await (0,v.T)(e,$,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:a,strict:s});if(!c)return null;try{return await G(e,{record:c,gatewayUrls:n})}catch{return null}}async function q(e,{address:t,blockNumber:r,blockTag:n,gatewayUrls:a,strict:s,universalResolverAddress:c}){let u=c;if(!u){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");u=(0,o.M)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let d=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let s={address:u,abi:i.oX,functionName:"reverse",args:[(0,l.nj)(w(d))],blockNumber:r,blockTag:n},o=(0,v.T)(e,E,"readContract"),[c,f]=a?await o({...s,args:[...s.args,a]}):await o(s);if(t.toLowerCase()!==f.toLowerCase())return null;return c}catch(e){if(s)throw e;if(h(e,"reverse"))return null;throw e}}async function V(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");a=(0,o.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[s]=await (0,v.T)(e,E,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,l.nj)(w(n))],blockNumber:t,blockTag:r});return s}function K(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:a})=>{"success"===i&&t===e&&(r[n]=a.request)}),t=>r[t]||e.request}async function J(e){let t=K(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}var W=r(90535);class Q extends d.C{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var Z=r(79986),Y=r(68312),X=r(97760),ee=r(5249);let et="/docs/contract/encodeEventTopics";function er(e){let{abi:t,eventName:r,args:n}=e,i=t[0];if(r){let e=(0,ee.iY)({abi:t,name:r});if(!e)throw new W.M_(r,{docsPath:et});i=e}if("event"!==i.type)throw new W.M_(void 0,{docsPath:et});let a=(0,X.B)(i),s=(0,Z.h)(a),o=[];
4if(n&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(o=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>en({param:e,value:t[r][i]})):t[r]?en({param:e,value:t[r]}):null)??[])}return[s,...o]}function en({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,b.S)((0,g.ZJ)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Q(e.type);return(0,Y.h)([e],[t])}async function ei(e,t){let{address:r,abi:n,args:i,eventName:a,fromBlock:s,strict:o,toBlock:c}=t,u=K(e,{method:"eth_newFilter"}),d=a?er({abi:n,args:i,eventName:a}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof s?(0,l.cK)(s):s,toBlock:"bigint"==typeof c?(0,l.cK)(c):c,topics:d}]});return{abi:n,args:i,eventName:a,id:f,request:u(f),strict:!!o,type:"event"}}async function ea(e,{address:t,args:r,event:n,events:i,fromBlock:a,strict:s,toBlock:o}={}){let c=i??(n?[n]:void 0),u=K(e,{method:"eth_newFilter"}),d=[];c&&(d=[c.flatMap(e=>er({abi:[e],eventName:e.name,args:r}))],n&&(d=d[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,l.cK)(a):a,toBlock:"bigint"==typeof o?(0,l.cK)(o):o,...d.length?{topics:d}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:f,request:u(f),strict:!!s,toBlock:o,type:"event"}}async function es(e){let t=K(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}var eo=r(22538),ec=r(78954);async function el(e,t){let{abi:r,address:n,args:i,functionName:a,...o}=t,c=(0,s.p)({abi:r,args:i,functionName:a});try{return await (0,v.T)(e,ec.Q,"estimateGas")({data:c,to:n,...o})}catch(t){let e=o.account?(0,eo.J)(o.account):void 0;throw(0,A.j)(t,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:e?.address})}}var eu=r(96350),ed=r(95081),ef=r(41405);async function eh(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var ep=r(81982);let eg=new Map,eb=new Map;async function em(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let n=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,eg),n=t(e,eb);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}(t),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()<r)return i.data;let a=n.promise.get();a||(a=e(),n.promise.set(a));try{let e=await a;return n.response.set({created:new Date,data:e}),e}finally{n.promise.clear()}}let ey=e=>`blockNumber.${e}`;async function ex(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await em(()=>e.request({method:"eth_blockNumber"}),{cacheKey:ey(e.uid),cacheTime:t}))}var ew=r(90812);async function ev(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i;let a=void 0!==r?(0,l.cK)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[a||n]},{dedupe:!!a}),(0,ew.ME)(i)}var eA=r(29701);async function eP(e,{address:t,blockNumber:r,blockTag:n="latest"}){let i=void 0!==r?(0,l.cK)(r):void 0,a=await e.request({method:"eth_getCode",params:[t,i||n]},{dedupe:!!i});if("0x"!==a)return a}var eE=r(28066),eO=r(35125),ek=r(35129),eB=r(21978);let eS="/docs/contract/decodeEventLog";function eC(e){let{abi:t,data:r,strict:n,topics:i}=e,a=n??!0,[s,...o]=i;if(!s)throw new W._z({docsPath:eS});let c=1===t.length?t[0]:t.find(e=>"event"===e.type&&s===(0,Z.h)((0,X.B)(e)));if(!(c&&"name"in c)||"event"!==c.type)throw new W.kE(s,{docsPath:eS});let{name:l,inputs:u}=c,d=u?.some(e=>!("name"in e&&e.name)),f=d?[]:{},h=u.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e<h.length;e++){let t=h[e],r=o[e];if(!r)throw new W.l3({abiItem:c,param:t});f[d?e:t.name||e]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,eB.n)([e],t)||[])[0]}({param:t,value:r})}let p=u.filter(e=>
vendor: 5,022 bytes, line 4
4!("indexed"in e&&e.indexed));if(p.length>0){if(r&&"0x"!==r)try{let e=(0,eB.n)(p,r);if(e){if(d)f=[...f,...e];else for(let t=0;t<p.length;t++)f[p[t].name]=e[t]}}catch(e){if(a){if(e instanceof W.Iy||e instanceof ek.SK)throw new W.fo({abiItem:c,data:r,params:p,size:(0,eO.E)(r)});throw e}}else if(a)throw new W.fo({abiItem:c,data:"0x",params:p,size:0})}return{eventName:l,args:Object.values(f).length>0?f:void 0}}function eT(e){let{abi:t,args:r,logs:n,strict:i=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(e=>{try{let n=t.find(t=>"event"===t.type&&e.topics[0]===(0,Z.h)(t));if(!n)return null;let s=eC({...e,abi:[n],strict:i});if(a&&!a.includes(s.eventName)||!function(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function i(e,t,r){try{if("address"===e.type)return(0,eE.h)(t,r);if("string"===e.type||"bytes"===e.type)return(0,b.S)((0,g.ZJ)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null==e)return!0;let a=r[n];return!!a&&(Array.isArray(e)?e:[e]).some(e=>i(a,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof n||Array.isArray(n))&&Object.entries(n).every(([e,n])=>{if(null==n)return!0;let a=r.find(t=>t.name===e);return!!a&&(Array.isArray(n)?n:[n]).some(r=>i(a,r,t[e]))})}({args:s.args,inputs:n.inputs,matchArgs:r}))return null;return{...s,...e}}catch(n){let t,r;if(n instanceof W.kE)return null;if(n instanceof W.fo||n instanceof W.l3){if(i)return null;t=n.abiItem.name,r=n.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:r?[]:{},eventName:t}}}).filter(Boolean)}function eI(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}:{}}}async function eN(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:a,events:s,args:o,strict:c}={}){let u=s??(a?[a]:void 0),d=[];u&&(d=[u.flatMap(e=>er({abi:[e],eventName:e.name,args:s?void 0:o}))],a&&(d=d[0]));let f=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:"bigint"==typeof n?(0,l.cK)(n):n,toBlock:"bigint"==typeof i?(0,l.cK)(i):i}]})).map(e=>eI(e));return u?eT({abi:u,args:o,logs:f,strict:c??!1}):f}async function eR(e,t){let{abi:r,address:n,args:i,blockHash:a,eventName:s,fromBlock:o,toBlock:c,strict:l}=t,u=s?(0,ee.iY)({abi:r,name:s}):void 0,d=u?void 0:r.filter(e=>"event"===e.type);return(0,v.T)(e,eN,"getLogs")({address:n,args:i,blockHash:a,event:u,events:d,fromBlock:o,toBlock:c,strict:l})}class eM extends d.C{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function e_(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,a,s,o,c,l,u]=await (0,v.T)(e,E,"readContract")({abi:ej,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:a,version:s,chainId:Number(o),verifyingContract:c,salt:l},extensions:u,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new eM({address:r});throw e}}let ej=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function eF(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var a;let s=r?(0,l.cK)(r):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,l.cK)(t),s||n,i]},{dedupe:!!s})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map(e=>e.map(e=>BigInt(e)))}}async function eU(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof n[0])return n;let i=n.map(e=>eI(e));return"abi"in t&&t.abi?eT({abi:t.abi,logs:i,strict:r}):i}async function eL(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>eI(e));return t.abi?eT({abi:t.abi,logs:n,strict:r}):n}var eD=r(12389);async function eG(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){var a;let s=void 0!==r?(0,l.cK)(r):void 0;return{...a=await e.request({method:"eth_getProof",params:[t,i,s||(n??"latest")]}),balance:a.balance?BigInt(a.balance):void 0,nonce:a.nonce?(0,ew.ME)(a.nonce):void 0,storageProof:a.storageProof?a.storageProof.map(e=>
4({...e,value:BigInt(e.value)})):void 0}}async function eH(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let a=void 0!==r?(0,l.cK)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,a||n]})}var e$=r(72981),ez=r(36491);async function eq(e,{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:a}){let s=n||"latest",o=void 0!==r?(0,l.cK)(r):void 0,c=null;if(i?c=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,l.cK)(a)]},{dedupe:!0}):(o||s)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[o||s,(0,l.cK)(a)]},{dedupe:!!o})),!c)throw new e$.Kz({blockHash:t,blockNumber:r,blockTag:s,hash:i,index:a});return(e.chain?.formatters?.transaction?.format||ez.uP)(c)}async function eV(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([(0,v.T)(e,ex,"getBlockNumber")({}),t?(0,v.T)(e,eq,"getTransaction")({hash:t}):void 0]),a=r?.blockNumber||i?.blockNumber;return a?n-a+1n:0n}var eK=r(60744);let eJ={"0x0":"reverted","0x1":"success"};async function eW(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new e$.Kc({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||function(e){let t={...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=>eI(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,ew.ME)(e.transactionIndex):null,status:e.status?eJ[e.status]:null,type:e.type?ez.b4[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t})(r)}async function eQ(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:c,blockTag:l,multicallAddress:u,stateOverride:h}=t,p=t.contracts,g=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),b=u;if(!b){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");b=(0,o.M)({blockNumber:c,chain:e.chain,contract:"multicall3"})}let m=[[]],y=0,x=0;for(let e=0;e<p.length;e++){let{abi:t,address:n,args:i,functionName:a}=p[e];try{let e=(0,s.p)({abi:t,args:i,functionName:a});x+=(e.length-2)/2,g>0&&x>g&&m[y].length>0&&(y++,x=(e.length-2)/2,m[y]=[]),m[y]=[...m[y],{allowFailure:!0,callData:e,target:n}]}catch(s){let e=(0,A.j)(s,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!r)throw e;m[y]=[...m[y],{allowFailure:!0,callData:"0x",target:n}]}}let w=await Promise.allSettled(m.map(t=>(0,v.T)(e,E,"readContract")({abi:i.v2,address:b,args:[t],blockNumber:c,blockTag:l,functionName:"aggregate3",stateOverride:h}))),P=[];for(let e=0;e<w.length;e++){let t=w[e];if("rejected"===t.status){if(!r)throw t.reason;for(let r=0;r<m[e].length;r++)P.push({status:"failure",error:t.reason,result:void 0});continue}let n=t.value;for(let t=0;t<n.length;t++){let{returnData:i,success:s}=n[t],{callData:o}=m[e][t],{abi:c,address:l,functionName:u,args:d}=p[P.length];try{if("0x"===o)throw new W.O;if(!s)throw new f.$S({data:i});let e=(0,a.e)({abi:c,args:d,data:i,functionName:u});P.push(r?{result:e,status:"success"}:e)}catch(t){let e=(0,A.j)(t,{abi:c,address:l,args:d,docsPath:"/docs/contract/multicall",functionName:u});if(!r)throw e;P.push({error:e,result:void 0,status:"failure"})}}}if(P.length!==p.length)throw new d.C("multicall results mismatch");return P}async function eZ(e,t){let{abi:r,address:n,args:i,dataSuffix:o,functionName:c,...l}=t,u=l.account?(0,eo.J)(l.account):e.account,d=(0,s.p)({abi:r,args:i,functionName:c});try{let{data:s}=await (0,v.T)(e,P.T,"call")({batch:!1,data:`${d}${o?o.replace("0x",""):""}`,to:n,...l,account:u}),f=(0,a.e)({abi:r,args:i,functionName:c,data:s||"0x"}),h=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:f,request:{abi:h,address:n,args:i,dataSuffix:o,functionName:c,...l,account:u}}}catch(e){throw(0,A.j)(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:c,sender:u?.address})}}async function eY(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function eX(e,t){return(0,b.S)(function(e){let t="string"==typeof e?(0,l.i3)(e):"string"==typeof e.raw?e.raw:(0,l.My)(e.raw),r=(0,l.i3)(`\x19Ethereum Signed Message:
5${(0,eO.E)(t)}`);return(0,p.xW)([r,t])}(e),t)}var e0=r(52966),e1=r(28369),e2=r(55782);let e5="0x6492649264926492649264926492649264926492649264926492649264926492";var e6=r(98282),e3=r(91409),e8=r(64330);async function e4(e,t){let{address:r,factory:n,factoryData:a,hash:o,signature:c,universalSignatureVerifierAddress:u=e.chain?.contracts?.universalSignatureVerifier?.address,...d}=t,h=(0,m.q)(c)?c:"object"==typeof c&&"r"in c&&"s"in c?function({r:e,s:t,to:r="hex",v:n,yParity:i}){let a=(()=>
5{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return n%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),s=`0x${new e8.secp256k1.Signature((0,ew.uU)(e),(0,ew.uU)(t)).toCompactHex()}${0===a?"1b":"1c"}`;return"hex"===r?s:(0,g.aT)(s)}(c):(0,l.My)(c),b=await (async()=>n||a?(0,e6.iN)(h,-32)===e5?h:function(e){let{address:t,data:r,signature:n,to:i="hex"}=e,a=(0,p.aP)([(0,Y.h)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),e5]);return"hex"===i?a:(0,g.aT)(a)}({address:n,data:a,signature:h}):h)();try{let t=u?{to:u,data:(0,s.p)({abi:i._,functionName:"isValidSig",args:[r,o,b]}),...d}:{data:(0,e1.m)({abi:i._,args:[r,o,b],bytecode:e0.nP}),...d},{data:n}=await (0,v.T)(e,P.T,"call")(t);return(0,ew.Nx)(n??"0x0")}catch(e){try{if((0,eE.h)((0,e2.b)(r),await (0,e3.x)({hash:o,signature:c})))return!0}catch{}if(e instanceof f.zX)return!1;throw e}}async function e9(e,{address:t,message:r,factory:n,factoryData:i,signature:a,...s}){return e4(e,{address:t,factory:n,factoryData:i,hash:eX(r),signature:a,...s})}var e7=r(88885);function te({data:e,primaryType:t,types:r}){let n=function e({data:t,primaryType:r,types:n}){let i=[{type:"bytes32"}],a=[function({primaryType:e,types:t}){let r=(0,l.nj)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(n.has(a)||void 0===r[a])return n;for(let t of(n.add(a),r[a]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,b.S)(r)}({primaryType:r,types:n})];for(let s of n[r]){let[r,o]=function t({types:r,name:n,type:i,value:a}){if(void 0!==r[i])return[{type:"bytes32"},(0,b.S)(e({data:a,primaryType:i,types:r}))];if("bytes"===i){let e=a.length%2?"0":"";return a=`0x${e+a.slice(2)}`,[{type:"bytes32"},(0,b.S)(a)]}if("string"===i)return[{type:"bytes32"},(0,b.S)((0,l.nj)(a))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),s=a.map(i=>t({name:n,type:e,types:r,value:i}));return[{type:"bytes32"},(0,b.S)((0,Y.h)(s.map(([e])=>e),s.map(([,e])=>e)))]}return[{type:i},a]}({types:n,name:s.name,type:s.type,value:t[s.name]});i.push(r),a.push(o)}return(0,Y.h)(i,a)}({data:e,primaryType:t,types:r});return(0,b.S)(n)}async function tt(e,t){let{address:r,factory:n,factoryData:i,signature:a,message:s,primaryType:o,types:c,domain:l,...u}=t;return e4(e,{address:r,factory:n,factoryData:i,hash:function(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:(0,e7.H4)({domain:t}),...e.types};(0,e7.$$)({domain:t,message:r,primaryType:n,types:i});let a=["0x1901"];return t&&a.push(function({domain:e,types:t}){return te({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==n&&a.push(te({data:r,primaryType:n,types:i})),(0,b.S)((0,p.xW)(a))}({message:s,primaryType:o,types:c,domain:l}),signature:a,...u})}var tr=r(7912);let tn=new Map,ti=new Map,ta=0;function ts(e,t,r){let n=++ta,i=()=>tn.get(e)||[],a=()=>{let t=i();tn.set(e,t.filter(e=>e.id!==n))},s=()=>{let t=ti.get(e);1===i().length&&t&&t(),a()},o=i();if(tn.set(e,[...o,{id:n,fns:t}]),o&&o.length>0)return s;let c={};for(let e in t)c[e]=(...t)=>{let r=i();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let l=r(c);return"function"==typeof l&&ti.set(e,l),s}var to=r(59960),tc=r(90805),tl=r(27900),tu=r(1942);function td(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let i=!0,a=()=>i=!1;return(async()=>{let s;t&&(s=await e({unpoll:a}));let o=await r?.(s)??n;await (0,tu.u)(o);let c=async()=>{i&&(await e({unpoll:a}),await (0,tu.u)(n),c())};c()})(),a}function tf(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:a,pollingInterval:s=e.pollingInterval}){let o;return(void 0!==a?a:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
5onfig.type))?ts((0,tl.A)(["watchBlockNumber",e.uid,t,r,s]),{onBlockNumber:n,onError:i},n=>td(async()=>{try{let t=await (0,v.T)(e,ex,"getBlockNumber")({cacheTime:0});if(o){if(t===o)return;if(t-o>1&&r)for(let e=o+1n;e<t;e++)n.onBlockNumber(e,o),o=e}(!o||t>o)&&(n.onBlockNumber(t,o),o=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:s})):ts((0,tl.A)(["watchBlockNumber",e.uid,t,r]),{onBlockNumber:n,onError:i},t=>{let r=!0,n=()=>r=!1;return(async()=>{try{let i=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await i.subscribe({params:["newHeads"],onData(e){if(!r)return;let n=(0,ew.uU)(e.result?.number);t.onBlockNumber(n,o),o=n},onError(e){t.onError?.(e)}});n=a,r||n()}catch(e){i?.(e)}})(),()=>n()})}async function th(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,retryCount:a=6,retryDelay:s=({count:e})=>200*~~(1<<e),timeout:o=18e4}){let c,l,u;let d=(0,tl.A)(["waitForTransactionReceipt",e.uid,r]),f=!1,{promise:h,resolve:p,reject:g}=(0,to.Y)(),b=o?setTimeout(()=>g(new e$.WA({hash:r})),o):void 0,m=ts(d,{onReplaced:n,resolve:p,reject:g},n=>{let o=(0,v.T)(e,tf,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){let d=e=>{clearTimeout(b),o(),e(),m()},h=i;if(!f)try{if(u){if(t>1&&(!u.blockNumber||h-u.blockNumber+1n<t))return;d(()=>n.resolve(u));return}if(c||(f=!0,await (0,tc.b)(async()=>{(c=await (0,v.T)(e,eq,"getTransaction")({hash:r})).blockNumber&&(h=c.blockNumber)},{delay:s,retryCount:a}),f=!1),u=await (0,v.T)(e,eW,"getTransactionReceipt")({hash:r}),t>1&&(!u.blockNumber||h-u.blockNumber+1n<t))return;d(()=>n.resolve(u))}catch(r){if(r instanceof e$.Kz||r instanceof e$.Kc){if(!c){f=!1;return}try{l=c,f=!0;let r=await (0,tc.b)(()=>(0,v.T)(e,ep.g,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:s,retryCount:a,shouldRetry:({error:e})=>e instanceof tr.l});f=!1;let i=r.transactions.find(({from:e,nonce:t})=>e===l.from&&t===l.nonce);if(!i||(u=await (0,v.T)(e,eW,"getTransactionReceipt")({hash:i.hash}),t>1&&(!u.blockNumber||h-u.blockNumber+1n<t)))return;let o="replaced";i.to===l.to&&i.value===l.value?o="repriced":i.from===i.to&&0n===i.value&&(o="cancelled"),d(()=>{n.onReplaced?.({reason:o,replacedTransaction:l,transaction:i,transactionReceipt:u}),n.resolve(u)})}catch(e){d(()=>n.reject(e))}}else d(()=>n.reject(r))}}})});return h}var tp=r(25518);let tg=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,tb=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;async function tm(e,t){let{address:r,domain:n,message:i,nonce:a,scheme:s,signature:o,time:c=new Date,...l}=t,u=function(e){let{scheme:t,statement:r,...n}=e.match(tg)?.groups??{},{chainId:i,expirationTime:a,issuedAt:s,notBefore:o,requestId:c,...l}=e.match(tb)?.groups??{},u=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...l,...i?{chainId:Number(i)}:{},...a?{expirationTime:new Date(a)}:{},...s?{issuedAt:new Date(s)}:{},...o?{notBefore:new Date(o)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!u.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:a,time:s=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||a&&n.scheme!==a||n.expirationTime&&s>=n.expirationTime||n.notBefore&&s<n.notBefore)return!1;try{if(!n.address||t&&!(0,eE.h)(n.address,t))return!1}catch{return!1}return!0}({address:r,domain:n,message:u,nonce:a,scheme:s,time:c}))return!1;let d=eX(i);return e4(e,{address:u.address,hash:d,signature:o,...l})}var ty=r(63537),tx=r(3433);function tw(e){return{call:t=>(0,P.T)(e,t),createBlockFilter:()=>J(e),createContractEventFilter:t=>ei(e,t),createEventFilter:t=>ea(e,t),createPendingTransactionFilter:()=>es(e),estimateContractGas:t=>el(e,t),estimateGas:t=>(0,ec.Q)(e,t),getBalance:t=>(0,ef.r)(e,t),getBlobBaseFee:()=>eh(e),getBlock:t=>(0,ep.g)(e,t),getBlockNumber:t=>ex(e,t),getBlockTransactionCount:t=>ev(e,t),getBytecode:t=>eP(e,t),getChainId:()=>(0,eA.T)(e),getCode:t=>eP(e,t),getContractEvents:t=>eR(e,t),getEip712Domain:t=>e_(e,t),getEnsAddress:t=>O(e,t),getEnsAvatar:t=>z(e,t),getEnsName:t=>q(e,t),getEnsResolver:t=>V(e,t),getEnsText:t=>$(e,t),getFeeHistory:t=>eF(e,t),estimateFeesPerGas:t=>(0,eu._)(e,t),getFilterChanges:t=>eU(e,t),getFilterLogs:t=>eL(e,t),getGasPrice:()=>(0,eD.L)(e),getLogs:t=>eN(e,t),getProof:t=>eG(e,t),estimateMaxPriorityFeePerGas:t=>(0,ed.b)(e,t),getStorageAt:t=>eH(e,t),getTransaction:t=>eq(e,t),getTransactionConfirmations:t=>eV(e,t),getTransactionCount:t=>(0,eK.y)(e,t),getTransactionReceipt:t=>eW(e,t),multicall:t=>eQ(e,t),prepareTransactionRequest:t=>(0,ty.f)(e,t),readContract:t=>E(e,t),sendRawTransaction:t=>(0,tx.L)(e,t),simulateContract:t=>eZ(e,t),verifyMessage:t=>e9(e,t),verifySiweMessage:t=>tm(e,t),verifyTypedData:t=>tt(e,t),uninstallFilter:t=>eY(e,t),waitForTransactionReceipt:t=>th(e,t),watchBlocks:t=>(function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:a,includeTransactions:s,poll:o,pollingInterval:c=e.pollingInterval}){let l,u,d,f;let h=void 0!==o?o:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
5onfig.type),p=s??!1;return h?ts((0,tl.A)(["watchBlocks",e.uid,t,r,n,p,c]),{onBlock:i,onError:a},i=>td(async()=>{try{let n=await (0,v.T)(e,ep.g,"getBlock")({blockTag:t,includeTransactions:p});if(n.number&&l?.number){if(n.number===l.number)return;if(n.number-l.number>1&&r)for(let t=l?.number+1n;t<n.number;t++){let r=await (0,v.T)(e,ep.g,"getBlock")({blockNumber:t,includeTransactions:p});i.onBlock(r,l),l=r}}(!l?.number||"pending"===t&&!n?.number||n.number&&n.number>l.number)&&(i.onBlock(n,l),l=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:c})):(u=!0,d=!0,f=()=>u=!1,(async()=>{try{n&&(0,v.T)(e,ep.g,"getBlock")({blockTag:t,includeTransactions:p}).then(e=>{u&&d&&(i(e,void 0),d=!1)});let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await r.subscribe({params:["newHeads"],async onData(t){if(!u)return;let r=await (0,v.T)(e,ep.g,"getBlock")({blockNumber:t.blockNumber,includeTransactions:p}).catch(()=>{});u&&(i(r,l),d=!1,l=r)},onError(e){a?.(e)}});f=s,u||f()}catch(e){a?.(e)}})(),()=>f())})(e,t),watchBlockNumber:t=>tf(e,t),watchContractEvent:t=>(function(e,t){let{abi:r,address:n,args:i,batch:a=!0,eventName:s,fromBlock:o,onError:c,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:f}=t;return(void 0!==u?u:"bigint"==typeof o||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
5onfig.type))?(()=>{let t=f??!1;return ts((0,tl.A)(["watchContractEvent",n,i,a,e.uid,s,d,t,o]),{onLogs:l,onError:c},c=>{let l,u;void 0!==o&&(l=o-1n);let f=!1,h=td(async()=>{if(!f){try{u=await (0,v.T)(e,ei,"createContractEventFilter")({abi:r,address:n,args:i,eventName:s,strict:t,fromBlock:o})}catch{}f=!0;return}try{let o;if(u)o=await (0,v.T)(e,eU,"getFilterChanges")({filter:u});else{let a=await (0,v.T)(e,ex,"getBlockNumber")({});o=l&&l<a?await (0,v.T)(e,eR,"getContractEvents")({abi:r,address:n,args:i,eventName:s,fromBlock:l+1n,toBlock:a,strict:t}):[],l=a}if(0===o.length)return;if(a)c.onLogs(o);else for(let e of o)c.onLogs([e])}catch(e){u&&e instanceof tp.Di&&(f=!1),c.onError?.(e)}},{emitOnBegin:!0,interval:d});return async()=>{u&&await (0,v.T)(e,eY,"uninstallFilter")({filter:u}),h()}})})():(()=>{let t=(0,tl.A)(["watchContractEvent",n,i,a,e.uid,s,d,f??!1]),o=!0,u=()=>o=!1;return ts(t,{onLogs:l,onError:c},t=>((async()=>{try{let a=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),c=s?er({abi:r,eventName:s,args:i}):[],{unsubscribe:l}=await a.subscribe({params:["logs",{address:n,topics:c}],onData(e){if(!o)return;let n=e.result;try{let{eventName:e,args:i}=eC({abi:r,data:n.data,topics:n.topics,strict:f}),a=eI(n,{args:i,eventName:e});t.onLogs([a])}catch(a){let e,r;if(a instanceof W.fo||a instanceof W.l3){if(f)return;e=a.abiItem.name,r=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=eI(n,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});u=l,o||u()}catch(e){c?.(e)}})(),()=>u()))})()})(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:a,fromBlock:s,onError:o,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:d}){let f,h;let p=void 0!==l?l:"bigint"==typeof s||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
5onfig.type),g=d??!1;return p?ts((0,tl.A)(["watchEvent",t,r,n,e.uid,i,u,s]),{onLogs:c,onError:o},o=>{let c,l;void 0!==s&&(c=s-1n);let d=!1,f=td(async()=>{if(!d){try{l=await (0,v.T)(e,ea,"createEventFilter")({address:t,args:r,event:i,events:a,strict:g,fromBlock:s})}catch{}d=!0;return}try{let s;if(l)s=await (0,v.T)(e,eU,"getFilterChanges")({filter:l});else{let n=await (0,v.T)(e,ex,"getBlockNumber")({});s=c&&c!==n?await (0,v.T)(e,eN,"getLogs")({address:t,args:r,event:i,events:a,fromBlock:c+1n,toBlock:n}):[],c=n}if(0===s.length)return;if(n)o.onLogs(s);else for(let e of s)o.onLogs([e])}catch(e){l&&e instanceof tp.Di&&(d=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:u});return async()=>{l&&await (0,v.T)(e,eY,"uninstallFilter")({filter:l}),f()}}):(f=!0,h=()=>f=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),s=a??(i?[i]:void 0),l=[];s&&(l=[s.flatMap(e=>er({abi:[e],eventName:e.name,args:r}))],i&&(l=l[0]));let{unsubscribe:u}=await n.subscribe({params:["logs",{address:t,topics:l}],onData(e){if(!f)return;let t=e.result;try{let{eventName:e,args:r}=eC({abi:s??[],data:t.data,topics:t.topics,strict:g}),n=eI(t,{args:r,eventName:e});c([n])}catch(i){let e,r;if(i instanceof W.fo||i instanceof W.l3){if(d)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=eI(t,{args:r?[]:{},eventName:e});c([n])}},onError(e){o?.(e)}});h=u,f||h()}catch(e){o?.(e)}})(),()=>h())})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:a=e.pollingInterval}){let s,o;return(void 0!==i?i:"webSocket"!==e.transport.type)?ts((0,tl.A)(["watchPendingTransactions",e.uid,t,a]),{onTransactions:n,onError:r},r=>{let n;let i=td(async()=>{try{if(!n)try{n=await (0,v.T)(e,es,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let a=await (0,v.T)(e,eU,"getFilterChanges")({filter:n});if(0===a.length)return;if(t)r.onTransactions(a);else for(let e of a)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:a});return async()=>{n&&await (0,v.T)(e,eY,"uninstallFilter")({filter:n}),i()}}):(s=!0,o=()=>s=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!s)return;let t=e.result;n([t])},onError(e){r?.(e)}});o=t,s||o()}catch(e){r?.(e)}})(),()=>o())})(e,t)}}function tv(e){let{key:t="public",name:r="Public Client"}=e;return(0,n.U)({...e,key:t,name:r,type:"publicClient"}).extend(tw)}},39393:(e,t,r)=>{"use strict";r.d(t,{F:()=>H});var n=r(12367),i=r(29701),a=r(96395);async function s(e,{chain:t}){let{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,a.cK)(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}var o=r(28369),c=r(22538),l=r(91347);class u extends l.C{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class d extends l.C{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}var f=r(82661),h=r(76476);function p({chain:e,currentChainId:t}){if(!e)throw new h.jF;if(t!==e.id)throw new h.EH({chain:e,currentChainId:t})}var g=r(56107),b=r(72981),m=r(52203),y=r(45122),x=r(80464),w=r(67591),v=r(11876),A=r(78699),P=r(63537),E=r(3433);let O=new v.A(128);async function k(e,t){let{account:r=e.account,chain:n=e.chain,accessList:a,authorizationList:s,blobs:o,data:h,gas:v,gasPrice:k,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:C,nonce:T,value:I,...N}=t;if(void 0===r)throw new u({docsPath:"/docs/actions/wallet/sendTransaction"});let R=r?(0,c.J)(r):null;try{(0,A.c)(t);let r=await (async()=>t.to?t.to:s&&s.length>0?await (0,f.g)({authorization:s[0]}).catch(()=>{throw new l.C("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(R?.type==="json-rpc"||null===R){let t;null!==n&&(t=await (0,w.T)(e,i.T,"getChainId")({}),p({currentChainId:t,chain:n}));let c=e.chain?.formatters?.transactionRequest?.format,l=(c||x.Bv)({...(0,y.o)(N,{format:c}),accessList:a,authorizationList:s,blobs:o,chainId:t,data:h,from:R?.address,gas:v,gasPrice:k,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:C,nonce:T,to:r,value:I}),u=O.get(e.uid);try{return await e.request({method:u?"wallet_sendTransaction":"eth_sendTransaction",params:[l]},{retryCount:0})}catch(t){if(!1===u)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[l]},{retryCount:0}).then(t=>(O.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw O.set(e.uid,!1),t;throw r});throw t}}if(R?.type==="local"){let t=await (0,w.T)(e,P.f,"prepareTransactionRequest")({account:R,accessList:a,authorizationList:s,blobs:o,chain:n,data:h,gas:v,gasPrice:k,maxFeePerBlobGas:B,maxFeePerGas:S,maxPriorityFeePerGas:C,nonce:T,nonceManager:R.nonceManager,parameters:[...P.M,"sidecars"],value:
5I,...N,to:r}),i=n?.serializers?.transaction,c=await R.signTransaction(t,{serializer:i});return await (0,w.T)(e,E.L,"sendRawTransaction")({serializedTransaction:c})}if(R?.type==="smart")throw new d({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new d({docsPath:"/docs/actions/wallet/sendTransaction",type:R?.type})}catch(e){if(e instanceof d)throw e;throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,m.l)(e,r);return t instanceof g.RM?e:t})();return new b.$s(n,{docsPath:t,...r})}(e,{...t,account:R,chain:t.chain||void 0})}}var B=r(55782);async function S(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,B.o)(e))}async function C(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function T(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,B.b)(e))}async function I(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function N(e,{account:t=e.account,message:r}){if(!t)throw new u({docsPath:"/docs/actions/wallet/signMessage"});let n=(0,c.J)(t);if(n.signMessage)return n.signMessage({message:r});let i="string"==typeof r?(0,a.i3)(r):r.raw instanceof Uint8Array?(0,a.nj)(r.raw):r.raw;return e.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}async function R(e,t){let{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new u({docsPath:"/docs/actions/wallet/signTransaction"});let o=(0,c.J)(r);(0,A.c)({account:o,...t});let l=await (0,w.T)(e,i.T,"getChainId")({});null!==n&&p({currentChainId:l,chain:n});let d=n?.formatters||e.chain?.formatters,f=d?.transactionRequest?.format||x.Bv;return o.signTransaction?o.signTransaction({...s,chainId:l},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...f(s),chainId:(0,a.cK)(l),from:o.address}]},{retryCount:0})}var M=r(88885);async function _(e,t){let{account:r=e.account,domain:n,message:i,primaryType:a}=t;if(!r)throw new u({docsPath:"/docs/actions/wallet/signTypedData"});let s=(0,c.J)(r),o={EIP712Domain:(0,M.H4)({domain:n}),...t.types};if((0,M.$$)({domain:n,message:i,primaryType:a,types:o}),s.signTypedData)return s.signTypedData({domain:n,message:i,primaryType:a,types:o});let l=(0,M.v8)({domain:n,message:i,primaryType:a,types:o});return e.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function j(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.cK)(t)}]},{retryCount:0})}async function F(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}var U=r(41568),L=r(68281);async function D(e,t){let{abi:r,account:n=e.account,address:i,args:a,dataSuffix:s,functionName:o,...l}=t;if(void 0===n)throw new u({docsPath:"/docs/contract/writeContract"});let d=n?(0,c.J)(n):null,f=(0,U.p)({abi:r,args:a,functionName:o});try{return await (0,w.T)(e,k,"sendTransaction")({data:`${f}${s?s.replace("0x",""):""}`,to:i,account:d,...l})}catch(e){throw(0,L.j)(e,{abi:r,address:i,args:a,docsPath:"/docs/contract/writeContract",functionName:o,sender:d?.address})}}function G(e){return{addChain:t=>s(e,t),deployContract:t=>(function(e,t){let{abi:r,args:n,bytecode:i,...a}=t,s=(0,o.m)({abi:r,args:n,bytecode:i});return k(e,{...a,data:s})})(e,t),getAddresses:()=>S(e),getChainId:()=>(0,i.T)(e),getPermissions:()=>C(e),prepareTransactionRequest:t=>(0,P.f)(e,t),requestAddresses:()=>T(e),requestPermissions:t=>I(e,t),sendRawTransaction:t=>(0,E.L)(e,t),sendTransaction:t=>k(e,t),signMessage:t=>N(e,t),signTransaction:t=>R(e,t),signTypedData:t=>_(e,t),switchChain:t=>j(e,t),watchAsset:t=>F(e,t),writeContract:t=>D(e,t)}}function H(e){let{key:t="wallet",name:r="Wallet Client",transport:i}=e;return(0,n.U)({...e,key:t,name:r,transport:i,type:"walletClient"}).extend(G)}},34571:(e,t,r)=>{"use strict";r.d(t,{o:()=>f});var n=r(91347),i=r(35256),a=r(25518),s=r(96395),o=r(11625);let c=new(r(11876)).A(8192);var l=r(90805),u=r(27900),d=r(7015);function f({key:e,name:t,request:r,retryCount:f=3,retryDelay:h=150,timeout:p,type:g},b){return{config:{key:e,name:t,request:r,retryCount:f,retryDelay:h,timeout:p,type:g},request:function(e,t={}){return async(r,d={})=>{let{dedupe:f=!1,retryDelay:h=150,retryCount:p=3,uid:g}={...t,...d},b=f?(0,o.S)((0,s.i3)(`${g}.${(0,u.A)(r)}
5`)):void 0;return function(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(c.get(r))return c.get(r);let n=e().finally(()=>c.delete(r));return c.set(r,n),n}(()=>(0,l.b)(async()=>{try{return await e(r)}catch(e){switch(e.code){case a.XU.code:throw new a.XU(e);case a.CL.code:throw new a.CL(e);case a.Gi.code:throw new a.Gi(e,{method:r.method});case a.D5.code:throw new a.D5(e);case a.bq.code:throw new a.bq(e);case a.Di.code:throw new a.Di(e);case a.hA.code:throw new a.hA(e);case a.qZ.code:throw new a.qZ(e);case a.YW.code:throw new a.YW(e);case a.ab.code:throw new a.ab(e,{method:r.method});case a.s0.code:throw new a.s0(e);case a.xQ.code:throw new a.xQ(e);case a.vx.code:throw new a.vx(e);case a.sV.code:throw new a.sV(e);case a.Sf.code:throw new a.Sf(e);case a.RV.code:throw new a.RV(e);case a.xq.code:throw new a.xq(e);case a.ch.code:throw new a.ch(e);case 5e3:throw new a.vx(e);default:if(e instanceof n.C)throw e;throw new a.MI(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Ci){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<<e)*h},retryCount:p,shouldRetry:({error:e})=>"code"in e&&"number"==typeof e.code?-1===e.code||e.code===a.s0.code||e.code===a.bq.code:!(e instanceof i.Ci)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}),{enabled:f,id:b})}}(r,{retryCount:f,retryDelay:h,uid:(0,d.L)()}),value:b}}},28:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=r(34571);function i(e,t={}){let{key:r="custom",name:a="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>(0,n.o)({key:r,name:a,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}},10271:(e,t,r)=>{"use strict";r.d(t,{L:()=>u});var n=r(35256),i=r(91347);class a extends i.C{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var s=r(28328),o=r(27900);let c={current:0,take(){return this.current++},reset(){this.current=0}};var l=r(34571);function u(e,t={}){let{batch:r,fetchOptions:i,key:d="http",name:f="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:p,retryDelay:g}=t;return({chain:u,retryCount:b,timeout:m})=>{let{batchSize:y=1e3,wait:x=0}="object"==typeof r?r:{},w=t.retryCount??b,v=m??t.timeout??1e4,A=e||u?.rpcUrls.default.http[0];if(!A)throw new a;let P=function(e,t={}){return{async request(r){let{body:i,onRequest:a=t.onRequest,onResponse:s=t.onResponse,timeout:l=t.timeout??1e4}=r,u={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:d,method:f,signal:h}=u;try{let t;let r=await function(e,{errorInstance:t=Error("timed out"),timeout:r,signal:n}){return new Promise((i,a)=>{(async()=>{let s;try{let o=new AbortController;r>0&&(s=setTimeout(()=>{n?o.abort():a(t)},r)),i(await e({signal:o?.signal||null}))}catch(e){e?.name==="AbortError"&&a(t),a(e)}finally{clearTimeout(s)}})()})}(async({signal:t})=>{let r={...u,body:Array.isArray(i)?(0,o.A)(i.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,o.A)({jsonrpc:"2.0",id:i.id??c.take(),...i}),headers:{"Content-Type":"application/json",...d},method:f||"POST",signal:h||(l>0?t:null)},n=new Request(e,r),s=await a?.(n,r)??{...r,url:e};return await fetch(s.url??e,s)},{errorInstance:new n.MU({body:i,url:e}),timeout:l,signal:!0});if(s&&await s(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new n.Ci({body:i,details:(0,o.A)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof n.Ci||t instanceof n.MU)throw t;throw new n.Ci({body:i,cause:t,url:e})}}}}(A,{fetchOptions:i,onRequest:h,onResponse:p,timeout:v});return(0,l.o)({key:d,name:f,async request({method:e,params:t}){let i={method:e,params:t},{schedule:a}=(0,s.u)({id:A,wait:x,shouldSplitBatch:e=>e.length>y,fn:e=>P.request({body:e}),sort:(e,t)=>e.id-t.id}),o=async e=>r?a(e):[await P.request({body:e})],[{error:c,result:l}]=await o(i);if(c)throw new n.J8({body:i,error:c,url:A});return l},retryCount:w,retryDelay:g,timeout:v,type:"http"},{fetchOptions:i,url:A})}}},56464:(e,t,r)=>{"use strict";r.d(t,{Ag:()=>a,Rm:()=>c,SJ:()=>o,_:()=>l,oX:()=>s,v2:()=>n});let n=[{inputs:[{components:[{name:"target",type:"address"}
5,{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],a=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],l=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}]},52966:(e,t,r)=>{"use strict";r.d(t,{LX:()=>n,WN:()=>i,nP:()=>a});let n="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de82602083
50160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",a="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
5603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},2758:(e,t,r)=>{"use strict";r.d(t,{J9:()=>a,Mc:()=>i,fD:()=>n});let n={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},50077:(e,t,r)=>{"use strict";r.d(t,{eL:()=>n,sz:()=>i});let n={gwei:9,wei:18},i={ether:-9,wei:9}},90535:(e,t,r)=>{"use strict";r.d(t,{BI:()=>w,Iy:()=>c,Iz:()=>m,MR:()=>y,M_:()=>b,Nc:()=>u,O:()=>l,Wq:()=>h,YE:()=>f,YF:()=>o,YW:()=>s,_z:()=>p,d_:()=>k,dm:()=>O,fo:()=>v,gH:()=>d,j:()=>E,kE:()=>g,l3:()=>A,nK:()=>P,nM:()=>x});var n=r(97760),i=r(35125),a=r(91347);class s extends a.C{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class o extends a.C{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class c extends a.C{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.A)(t,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class l extends a.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class u extends a.C{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}.
6Expected length: ${e}
7Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.C{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.E)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class f extends a.C{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch.
8Expected length (params): ${e}
9Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class h extends a.C{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI.
10Make sure you are using the correct ABI and that the error exists on it.
11You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends a.C{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class g extends a.C{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI.
12Make sure you are using the correct ABI and that the event exists on it.
13You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class b extends a.C{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI.
14Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}class m extends a.C{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI.
15Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class y extends a.C{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI.
16Cannot decode function result without knowing what the parameter types are.
17Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class x extends a.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.B)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.B)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class w extends a.C{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}class v extends a.C{constructor({abiItem:e,data:t,params:r,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.A)(r,{includeName:!0})})`,`Data:   ${t} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class A extends a.C{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.B)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class P extends a.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type.
18Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class E extends a.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type.
19Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class O extends a.C{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class k extends a.C{constructor(e){super(`"${e}" is not a valid definition type.
20Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}},11317:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(91347);class i extends n.C{constructor({address:e}){super(`Address "${e}
20" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},91347:(e,t,r)=>{"use strict";r.d(t,{C:()=>a});let n="2.21.51",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};class a extends Error{constructor(e,t={}){let r=t.cause instanceof a?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof a&&t.cause.docsPath||t.docsPath,o=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},7912:(e,t,r)=>{"use strict";r.d(t,{l:()=>i});var n=r(91347);class i extends n.C{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}},76476:(e,t,r)=>{"use strict";r.d(t,{EH:()=>a,YE:()=>o,jF:()=>s,rj:()=>i});var n=r(91347);class i extends n.C{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class a extends n.C{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class s extends n.C{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends n.C{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}},54775:(e,t,r)=>{"use strict";r.d(t,{zX:()=>m,bG:()=>y,M:()=>x,rR:()=>w,Po:()=>v,$S:()=>A});var n=r(22538),i=r(2758),a=r(1113),s=r(97760),o=r(27900);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,o.A)(t[r]):t[r]}`).join(", ")})`}var l=r(5249),u=r(56643),d=r(56813),f=r(90535),h=r(91347),p=r(39652),g=r(72981),b=r(74532);class m extends h.C{constructor(e,{account:t,docsPath:r,chain:i,data:a,gas:s,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:h,value:b,stateOverride:m}){let y=t?(0,n.J)(t):void 0,x=(0,g.aO)({from:y?.address,to:h,value:void 0!==b&&`${(0,u.c)(b)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:s,gasPrice:void 0!==o&&`${(0,d.Q)(o)} gwei`,maxFeePerGas:void 0!==c&&`${(0,d.Q)(c)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,d.Q)(l)} gwei`,nonce:f});m&&(x+=`
21${(0,p.uj)(m)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",x].filter(
vendor: 5,376 bytes, line 21
21Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class y extends h.C{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:a,sender:o}){let u=(0,l.iY)({abi:t,args:r,name:a}),d=u?c({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=u?(0,s.B)(u,{includeName:!0}):void 0,h=(0,g.aO)({address:n&&(0,b.R)(n),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],h&&"Contract Call:",h].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=a,this.sender=o}}class x extends h.C{constructor({abi:e,data:t,functionName:r,message:n}){let o,l,u,d,h;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:o}=h=(0,a.W)({abi:e,data:t});if("Error"===n)u=o[0];else if("Panic"===n){let[e]=o;u=i.fD[e]}else{let e=r?(0,s.B)(r,{includeName:!0}):void 0,t=r&&o?c({abiItem:r,args:o,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else n&&(u=n);o instanceof f.Wq&&(d=o.signature,l=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(u&&"execution reverted"!==u||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,u||d].join("\n"):`The contract function "${r}" reverted.`,{cause:o,metaMessages:l,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=h,this.reason=u,this.signature=d}}class w extends h.C{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class v extends h.C{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class A extends h.C{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},35129:(e,t,r)=>{"use strict";r.d(t,{B4:()=>i,SK:()=>a,hX:()=>s});var n=r(91347);class i extends n.C{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class a extends n.C{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class s extends n.C{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},59731:(e,t,r)=>{"use strict";r.d(t,{Fl:()=>a,NV:()=>s,ii:()=>i});var n=r(91347);class i extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class a extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class s extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}},63546:(e,t,r)=>{"use strict";r.d(t,{H2:()=>s,Ty:()=>i,u:()=>o,xO:()=>a});var n=r(91347);class i extends n.C{constructor({max:e,min:t,signed:r,size:n,value:i}
21){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class a extends n.C{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class s extends n.C{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class o extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},11093:(e,t,r)=>{"use strict";r.d(t,{RR:()=>o,pw:()=>s,sM:()=>a});var n=r(56813),i=r(91347);class a extends i.C{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class s extends i.C{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class o extends i.C{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.Q)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}},56107:(e,t,r)=>{"use strict";r.d(t,{A7:()=>a,BG:()=>s,Fo:()=>h,K0:()=>c,Oh:()=>l,RM:()=>b,jj:()=>o,k5:()=>d,lN:()=>g,lY:()=>f,uC:()=>p,vW:()=>u});var n=r(56813),i=r(91347);class a extends i.C{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(o,"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/});class c extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
22Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{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."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends i.C{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,name:"IntrinsicGasTooHighError"})}}
vendor: 4,908 bytes, line 22
22Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class g extends i.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class b extends i.C{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},35256:(e,t,r)=>{"use strict";r.d(t,{Ci:()=>s,J8:()=>o,MU:()=>c});var n=r(27900),i=r(91347),a=r(74532);class s extends i.C{constructor({body:e,cause:t,details:r,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${(0,a.I)(o)}`,e&&`Request body: ${(0,n.A)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=o}}class o extends i.C{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.I)(r)}`,`Request body: ${(0,n.A)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class c extends i.C{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.I)(t)}`,`Request body: ${(0,n.A)(e)}`],name:"TimeoutError"})}}},25518:(e,t,r)=>{"use strict";r.d(t,{CL:()=>c,D5:()=>u,Di:()=>f,Gi:()=>l,MI:()=>O,RV:()=>A,Sf:()=>v,XU:()=>o,YW:()=>g,ab:()=>b,bq:()=>d,ch:()=>E,hA:()=>h,qZ:()=>p,s0:()=>m,sV:()=>w,vx:()=>x,xQ:()=>y,xq:()=>P});var n=r(91347),i=r(35256);class a extends n.C{constructor(e,{code:t,docsPath:r,metaMessages:n,name:a,shortMessage:s}){super(s,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||e.name,this.code=e instanceof i.J8?e.code:t??-1}}class s extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends a{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class l extends a{constructor(e,{method:t}={}){super(e,{code:l.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends a{constructor(e){super(e,{code:u.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends a{constructor(e){super(e,{code:f.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});
22class h extends a{constructor(e){super(e,{code:h.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends a{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class g extends a{constructor(e){super(e,{code:g.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends a{constructor(e,{method:t}={}){super(e,{code:b.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not implemented.`})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class m extends a{constructor(e){super(e,{code:m.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends a{constructor(e){super(e,{code:y.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class x extends s{constructor(e){super(e,{code:x.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class v extends s{constructor(e,{method:t}={}){super(e,{code:v.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class A extends s{constructor(e){super(e,{code:A.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class P extends s{constructor(e){super(e,{code:P.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends s{constructor(e){super(e,{code:E.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class O extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},39652:(e,t,r)=>{"use strict";r.d(t,{Hi:()=>i,ft:()=>a,uj:()=>o});var n=r(91347);class i extends n.C{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class a extends n.C{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function s(e){return e.reduce((e,{slot:t,value:r})=>`${e}        ${t}: ${r}
23`,"")}function o(e){return e.reduce((e,{address:t,...r})=>{let n=`${e}    ${t}:
24`;return r.nonce&&(n+=`      nonce: ${r.nonce}
25`),r.balance&&(n+=`      balance: ${r.balance}
26`),r.code&&(n+=`      code: ${r.code}
27`),r.state&&(n+="      state:\n",n+=s(r.state)),r.stateDiff&&(n+="      stateDiff:\n",n+=s(r.stateDiff)),n},"  State Override:\n").slice(0,-1)}},72981:(e,t,r)=>{"use strict";r.d(t,{$s:()=>l,Kc:()=>d,Kz:()=>u,Vg:()=>c,WA:()=>f,aO:()=>s,n3:()=>o});var n=r(56643),i=r(56813),a=r(91347);function s(e){let t=Object.entries(e).map(([e,t])=>
27void 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 o extends a.C{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class c extends a.C{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(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","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class l extends a.C{constructor(e,{account:t,docsPath:r,chain:a,data:o,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",s({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:void 0!==p&&`${(0,n.c)(p)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:c,gasPrice:void 0!==l&&`${(0,i.Q)(l)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.Q)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.Q)(d)} gwei`,nonce:f})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class u extends a.C{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let a="Transaction";r&&void 0!==i&&(a=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(a=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(a=`Transaction at block number "${t}" at index "${i}"`),n&&(a=`Transaction with hash "${n}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}class d extends a.C{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class f extends a.C{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},74532:(e,t,r)=>{"use strict";r.d(t,{I:()=>i,R:()=>n});let n=e=>e,i=e=>e},82661:(e,t,r)=>{"use strict";r.d(t,{g:()=>d});var n=r(91409),i=r(5864),a=r(47365),s=r(96395),o=r(91347),c=r(4885);function l(e){if(e<256)return 1;if(e<65536)return 2;if(e<0x1000000)return 3;if(e<0x100000000)return 4;throw new o.C("Length is too large.")}var u=r(11625);async function d(e){let{authorization:t,signature:r}=e;return(0,n.x)({hash:function(e){let{chainId:t,contractAddress:r,nonce:n,to:o}=e,d=(0,u.S)((0,i.aP)(["0x05",function(e,t="hex"){let r=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=l(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(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)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,a.aT)(e):e,r=l(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||(t.length<=55?e.pushByte(128+t.length):(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)}}}(t)}(e),n=(0,c.l)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,s.My)(n.bytes):n.bytes}([t?(0,s.cK)(t):"0x",r,n?(0,s.cK)(n):"0x"])]));return"bytes"===o?(0,a.aT)(d):d}(t),signature:r??t})}},21978:(e,t,r)=>{"use strict";r.d(t,{n:()=>g});var n=r(90535),i=r(55782),a=r(4885),s=r(35125),o=r(98282),c=r(33968),l=r(63546),u=r(90812),d=r(96395);function f(e,t={}){void 0!==t.size&&(0,u.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,u.ME)(r,t)}var h=r(47365),p=r(68312);function g(e,t){let r="string"==typeof t?(0,h.aT)(t):t,g=(0,a.l)(r);if(0===(0,s.E)(r)&&e.length>0)throw new n.O;if((0,s.E)(t)&&32>(0,s.E)(t))throw new n.Iy({data:"string"==typeof t?t:(0,d.My)(t),params:e,size:(0,s.E)(t)});let m=0,y=[];for(let t=0;t<e.length;++t){let r=e[t];g.setPosition(m);let[a,s]=function e(t,r,{staticPosition:a}){let s=(0,p.k)(r.type);if(s){let[n,i]=s;return function(t,r,{length:n,staticPosition:i}){if(!n){let n=i+f(t.readBytes(32)),a=n+32;t.setPosition(n);let s=f(t.readBytes(32)),o=b(r),c=0,l=[];for(let n=0;n<s;++n){t.setPosition(a+(o?32*n:c));let[i,s]=e(t,r,{staticPosition:a});c+=s,l.push(i)}return t.setPosition(i+32),[l,32]}if(b(r)){let a=i+f(t.readBytes(32)),s=[];for(let i=0;i<n;++i){t.setPosition(a+32*i);let[n]=e(t,r,{staticPosition:a});s.push(n)}return t.setPosition(i+32),[s,32]}let a=0,s=[];for(let o=0;o<n;++o){let[n,o]=e(t,r,{staticPosition:i+a});a+=o,s.push(n)}return[s,a]}(t,{...r,type:i},{length:n,staticPosition:a})}if("tuple"===r.type)return function(t,r,{staticPosition:n}){let i=0===r.components.length||r.components.some(({name:e})=>!e),a=i?[]:{},s=0;if(b(r)){let o=n+f(t.readBytes(32));for(let n=0;n<r.components.length;++n){let c=r.components[n];t.setPosition(o+s);let[l,u]=e(t,c,{staticPosition:o});s+=u,a[i?n:c?.name]=l}return t.setPosition(n+32),[a,32]}for(let o=0;o<r.components.length;++o){let c=r.components[o],[l,u]=e(t,c,{staticPosition:n});a[i?o:c?.name]=l,s+=u}return[a,s]}(t,r,{staticPosition:a});if("address"===r.type)return function(e){let t=e.readBytes(32);return[(0,i.o)((0,d.My)((0,o.A1)(t,-20))),32]}(t);if("bool"===r.type)return[function(e,t={}){let r=e;if(void 0!==t.size&&((0,u.Sl)(r,{size:t.size}),r=(0,c.B)(r)),r.length>1||r[0]>1)throw new l.xO(r);return!!r[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=f(e.readBytes(32));e.setPosition(r+t);let n=f(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.My)(i),32]}return[(0,d.My)(e.readBytes(Number.parseInt(i),32)),32]}(t,r,{staticPosition:a});if(r.type.startsWith("uint")||r.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[n>48?function(e,t={}){void 0!==t.size&&(0,u.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,u.uU)(r,t)}(i,{signed:r}):f(i,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=f(e.readBytes(32));e.setPosition(t+r);let n=f(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),a=function(e,t={}){let r=e;return void 0!==t.size&&((0,u.Sl)(r,{size:t.size}),r=(0,c.B)(r,{dir:"right"})),new TextDecoder().decode(r)}((0,c.B)(i));return e.setPosition(t+32),[a,32]}(t,{staticPosition:a});throw new n.j(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(g,r,{staticPosition:0});m+=s,y.push(a)}return y}function b(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;
27if("tuple"===t)return e.components?.some(b);let r=(0,p.k)(e.type);return!!(r&&b({...e,type:r[1]}))}},1113:(e,t,r)=>{"use strict";r.d(t,{W:()=>l});var n=r(2758),i=r(90535),a=r(98282),s=r(85704),o=r(21978),c=r(97760);function l(e){let{abi:t,data:r}=e,l=(0,a.di)(r,0,4);if("0x"===l)throw new i.O;let u=[...t||[],n.Mc,n.J9].find(e=>"error"===e.type&&l===(0,s.V)((0,c.B)(e)));if(!u)throw new i.Wq(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,o.n)(u.inputs,(0,a.di)(r,4)):void 0,errorName:u.name}}},57455:(e,t,r)=>{"use strict";r.d(t,{e:()=>o});var n=r(90535),i=r(21978),a=r(5249);let s="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:r,functionName:o,data:c}=e,l=t[0];if(o){let e=(0,a.iY)({abi:t,args:r,name:o});if(!e)throw new n.Iz(o,{docsPath:s});l=e}if("function"!==l.type)throw new n.Iz(void 0,{docsPath:s});if(!l.outputs)throw new n.MR(l.name,{docsPath:s});let u=(0,i.n)(l.outputs,c);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},68312:(e,t,r)=>{"use strict";r.d(t,{h:()=>f,k:()=>p});var n=r(90535),i=r(11317),a=r(91347),s=r(37514),o=r(5864),c=r(79541),l=r(35125),u=r(98282),d=r(96395);function f(e,t){if(e.length!==t.length)throw new n.YE({expectedLength:e.length,givenLength:t.length});let r=h(function({params:e,values:t}){let r=[];for(let f=0;f<e.length;f++)r.push(function e({param:t,value:r}){let f=p(t.type);if(f){let[i,a]=f;return function(t,{length:r,param:i}){let a=null===r;if(!Array.isArray(t))throw new n.dm(t);if(!a&&t.length!==r)throw new n.Nc({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let s=!1,c=[];for(let r=0;r<t.length;r++){let n=e({param:i,value:t[r]});n.dynamic&&(s=!0),c.push(n)}if(a||s){let e=h(c);if(a){let t=(0,d.cK)(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?(0,o.xW)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,o.xW)(c.map(({encoded:e})=>e))}}(r,{length:i,param:{...t,type:a}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,i=[];for(let a=0;a<r.components.length;a++){let s=r.components[a],o=Array.isArray(t)?a:s.name,c=e({param:s,value:t[o]});i.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?h(i):(0,o.xW)(i.map(({encoded:e})=>e))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,s.P)(e))throw new i.M({address:e});return{dynamic:!1,encoded:(0,c.db)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new a.C(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,c.db)((0,d.$P)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,d.cK)(e,{size:32,signed:t})}}(r,{signed:t.type.startsWith("int")});if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=(0,l.E)(e);if(!r){let t=e;return i%32!=0&&(t=(0,c.db)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,o.xW)([(0,c.db)((0,d.cK)(i,{size:32})),t])}}if(i!==Number.parseInt(r))throw new n.gH({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:(0,c.db)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type)return function(e){let t=(0,d.i3)(e),r=Math.ceil((0,l.E)(t)/32),n=[];for(let e=0;e<r;e++)n.push((0,c.db)((0,u.di)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,o.xW)([(0,c.db)((0,d.cK)((0,l.E)(t),{size:32})),...n])}}(r);throw new n.nK(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[f],value:t[f]}));return r}({params:e,values:t}));return 0===r.length?"0x":r}function h(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=(0,l.E)(i)}let r=[],n=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:o}=e[a];s?(r.push((0,d.cK)(t+i,{size:32})),n.push(o),i+=(0,l.E)(o)):r.push(o)}return(0,o.xW)([...r,...n])}function p(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},28369:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(90535),i=r(5864),a=r(68312);let s="/docs/contract/encodeDeployData";function o(e){let{abi:t,args:r,bytecode:o}=e;if(!r||0===r.length)return o;let c=t.find(e=>"type"in e&&"constructor"===e.type);if(!c)throw new n.YW({docsPath:s});if(!("inputs"in c)||!c.inputs||0===c.inputs.length)throw new n.YF({docsPath:s});let l=(0,a.h)(c.inputs,r);return(0,i.aP)([o,l])}},41568:(e,t,r)=>{"use strict";r.d(t,{p:()=>u});
27var n=r(5864),i=r(68312),a=r(90535),s=r(85704),o=r(97760),c=r(5249);let l="/docs/contract/encodeFunctionData";function u(e){let{args:t}=e,{abi:r,functionName:u}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:r,functionName:n}=e,i=t[0];if(n){let e=(0,c.iY)({abi:t,args:r,name:n});if(!e)throw new a.Iz(n,{docsPath:l});i=e}if("function"!==i.type)throw new a.Iz(void 0,{docsPath:l});return{abi:[i],functionName:(0,s.V)((0,o.B)(i))}}(e),d=r[0],f="inputs"in d&&d.inputs?(0,i.h)(d.inputs,t??[]):void 0;return(0,n.aP)([u,f??"0x"])}},97760:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r(90535);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.d_(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${a(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},5249:(e,t,r)=>{"use strict";r.d(t,{iY:()=>c});
vendor: 1,063 bytes, line 27
27var n=r(90535),i=r(1561),a=r(37514),s=r(79986),o=r(85704);function c(e){let t;let{abi:r,args:c=[],name:l}=e,u=(0,i.q)(l,{strict:!1}),d=r.filter(e=>u?"function"===e.type?(0,o.V)(e)===l:"event"===e.type&&(0,s.h)(e)===l:"name"in e&&e.name===l);if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e){if(!c||0===c.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===c.length&&c.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return(0,a.P)(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;
vendor: 5,435 bytes, line 27
27if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=function e(t,r,n){for(let i in t){let s=t[i],o=r[i];if("tuple"===s.type&&"tuple"===o.type&&"components"in s&&"components"in o)return e(s.components,o.components,n[i]);let c=[s.type,o.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,a.P)(n[i],{strict:!1}))return c}}(e.inputs,t.inputs,c);if(r)throw new n.nM({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}return t||d[0]}}},55782:(e,t,r)=>{"use strict";r.d(t,{b:()=>u,o:()=>l});var n=r(11317),i=r(47365),a=r(11625),s=r(11876),o=r(37514);let c=new s.A(8192);function l(e,t){if(c.has(`${e}.${t}`))return c.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,a.S)((0,i.Af)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());let o=`0x${s.join("")}`;return c.set(`${e}.${t}`,o),o}function u(e,t){if(!(0,o.P)(e,{strict:!1}))throw new n.M({address:e});return l(e,t)}},37514:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(11876),i=r(55782);let a=/^0x[a-fA-F0-9]{40}$/,s=new n.A(8192);function o(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(s.has(n))return s.get(n);let o=!!a.test(e)&&(e.toLowerCase()===e||!r||(0,i.o)(e)===e);return s.set(n,o),o}},28066:(e,t,r)=>{"use strict";r.d(t,{h:()=>a});var n=r(11317),i=r(37514);function a(e,t){if(!(0,i.P)(e,{strict:!1}))throw new n.M({address:e});if(!(0,i.P)(t,{strict:!1}))throw new n.M({address:t});return e.toLowerCase()===t.toLowerCase()}},76530:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(76476);function i({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new n.rj({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.rj({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},4885:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var n=r(35129);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.hX({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.SK({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.B4({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.B4({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let 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(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function a(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}},5864:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;
27for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}r.d(t,{aP:()=>i,xW:()=>n})},1561:(e,t,r)=>{"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{q:()=>n})},79541:(e,t,r)=>{"use strict";r.d(t,{db:()=>a,eV:()=>i});var n=r(59731);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?a(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.Fl({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let a="right"===t;i[a?n:r-n-1]=e[a?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function a(e,{dir:t,size:r=32}={}){if(null===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new n.Fl({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},35125:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(1561);function i(e){return(0,n.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},98282:(e,t,r)=>{"use strict";r.d(t,{A1:()=>l,di:()=>s,iN:()=>u});var n=r(59731),i=r(1561),a=r(35125);function s(e,t,r,{strict:n}={}){return(0,i.q)(e,{strict:!1})?u(e,t,r,{strict:n}):l(e,t,r,{strict:n})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,a.E)(e)-1)throw new n.ii({offset:t,position:"start",size:(0,a.E)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,a.E)(e)!==r-t)throw new n.ii({offset:r,position:"end",size:(0,a.E)(e)})}function l(e,t,r,{strict:n}={}){o(e,t);let i=e.slice(t,r);return n&&c(i,t,r),i}function u(e,t,r,{strict:n}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&c(i,t,r),i}},33968:(e,t,r)=>{"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)i++;return(r="left"===t?r.slice(i):r.slice(0,r.length-i),"string"==typeof e)?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}r.d(t,{B:()=>n})},90812:(e,t,r)=>{"use strict";r.d(t,{ME:()=>l,Nx:()=>c,Sl:()=>s,uU:()=>o});var n=r(63546),i=r(35125),a=r(33968);function s(e,{size:t}){if((0,i.E)(e)>t)throw new n.u({givenSize:(0,i.E)(e),maxSize:t})}function o(e,t={}){let{signed:r}=t;t.size&&s(e,{size:t.size});let n=BigInt(e);if(!r)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){let r=e;if(t.size&&(s(r,{size:t.size}),r=(0,a.B)(r)),"0x00"===(0,a.B)(r))return!1;if("0x01"===(0,a.B)(r))return!0;throw new n.H2(r)}function l(e,t={}){return Number(o(e,t))}},47365:(e,t,r)=>{"use strict";r.d(t,{Af:()=>h,ZJ:()=>l,aT:()=>f});var n=r(91347),i=r(1561),a=r(79541),s=r(90812),o=r(96395);let c=new TextEncoder;function l(e,t={}){return"number"==typeof e||"bigint"==typeof e?f((0,o.cK)(e,t)):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,s.Sl)(r,{size:t.size}),(0,a.eV)(r,{size:t.size})):r}(e,t):(0,i.q)(e)?f(e,t):h(e,t)}let u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function f(e,t={}){let r=e;t.size&&((0,s.Sl)(r,{size:t.size}),r=(0,a.eV)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,c=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let r=d(i.charCodeAt(t++)),a=d(i.charCodeAt(t++));if(void 0===r||void 0===a)throw new n.C(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);c[e]=16*r+a}return c}function h(e,t={}){let r=c.encode(e);return"number"==typeof t.size?((0,s.Sl)(r,{size:t.size}),(0,a.eV)(r,{dir:"right",size:t.size})):r}},96395:(e,t,r)=>{"use strict";r.d(t,{$P:()=>c,My:()=>l,cK:()=>u,i3:()=>f,nj:()=>o});var n=r(63546),i=r(79541),a=r(90812);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?f(e,t):"boolean"==typeof e?c(e,t):l(e,t)}function c(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.Sl)(r,{size:t.size}),(0,i.eV)(r,{size:t.size})):r}function l(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=s[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,a.Sl)(n,{size:t.size}),(0,i.eV)(n,{dir:"right",size:t.size})):n}function u(e,t={}){let r;let{signed:a,size:s}=t,o=BigInt(e);s?r=a?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let c="bigint"==typeof r&&a?-r-1n:0;if(r&&o>r||o<c){let t="bigint"==typeof e?"n":"";throw new n.Ty({max:r?`${r}${t}`:void 0,min:`${c}${t}`,signed:a,size:s,value:`${e}${t}`})}let l=`0x${(a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16)}`;return s?(0,i.eV)(l,{size:s}):l}let d=new TextEncoder;function f(e,t={}){return l(d.encode(e),t)}},68281:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(90535),i=r(91347),a=r(54775),s=r(25518);function o(e,{abi:t,address:r,args:o,docsPath:c,functionName:l,sender:u}){let{code:d,data:f,message:h,shortMessage:p}=e instanceof a.$S?e:e instanceof i.C?e.walk(e=>"data"in e)||e.walk():{},g=e instanceof n.O?new a.rR({functionName:l}):[3,s.bq.code].includes(d)&&(f||h||p)?new a.M({abi:t,data:"object"==typeof f?f.data:f,functionName:l,message:p??h}):e;return new a.bG(g,{abi:t,args:o,contractAddress:r,docsPath:c,functionName:l,sender:u})}},52203:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var n=r(91347),i=r(56107);function a(e,t){let r=(e.details||"").toLowerCase(),a=e instanceof n.C?e.walk(e=>e?.code===i.A7.code):e;return a instanceof n.C?new i.A7({cause:e,message:a.details}):i.A7.nodeMessage.test(r)?new i.A7({cause:e,message:e.details}):i.BG.nodeMessage.test(r)?new i.BG({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.jj.nodeMessage.test(r)?new i.jj({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.K0.nodeMessage.test(r)?new i.K0({cause:e,nonce:t?.nonce}):i.Oh.nodeMessage.test(r)?new i.Oh({cause:e,nonce:t?.nonce}):i.vW.nodeMessage.test(r)?new i.vW({cause:e,nonce:t?.nonce}):i.k5.nodeMessage.test(r)?new i.k5({cause:e}):i.lY.nodeMessage.test(r)?new i.lY({cause:e,gas:t?.gas}):i.Fo.nodeMessage.test(r)?new i.Fo({cause:e,gas:t?.gas}):i.uC.nodeMessage.test(r)?new i.uC({cause:e}):i.lN.nodeMessage.test(r)?new i.lN({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.RM({cause:e})}},45122:(e,t,r)=>{"use strict";function n(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(t(e||{})),r}r.d(t,{o:()=>n})},36491:(e,t,r)=>{"use strict";r.d(t,{b4:()=>i,uP:()=>a});var n=r(90812);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.ME)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,n.ME)(e.n
27once):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[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 e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),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.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}},80464:(e,t,r)=>{"use strict";r.d(t,{Bv:()=>a});var n=r(96395);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:(0,n.cK)(e.chainId),nonce:(0,n.cK)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.cK)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.cK)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,n.My)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,n.cK)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,n.cK)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,n.cK)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,n.cK)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,n.cK)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,n.cK)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,n.cK)(e.value)),t}},67591:(e,t,r)=>{"use strict";function n(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let i=e[r];return"function"==typeof i?i:r=>t(e,r)}r.d(t,{T:()=>n})},11625:(e,t,r)=>{"use strict";r.d(t,{S:()=>C});var n=r(16848);let i=BigInt(0x100000000-1),a=BigInt(32),s=(e,t,r)=>e<<r|t>>>32-r,o=(e,t,r)=>t<<r|e>>>32-r,c=(e,t,r)=>t<<r-32|e>>>64-r,l=(e,t,r)=>e<<r-32|t>>>64-r;var u=r(15565);let d=[],f=[],h=[],p=BigInt(0),g=BigInt(1),b=BigInt(2),m=BigInt(7),y=BigInt(256),x=BigInt(113);for(let e=0,t=g,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],d.push(2*(5*n+r)),f.push((e+1)*(e+2)/2%64);let i=p;for(let e=0;e<7;e++)(t=(t<<g^(t>>m)*x)%y)&b&&(i^=g<<(g<<BigInt(e))-g);h.push(i)}let[w,v]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){let{h:o,l:c}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>a&i)}:{h:0|Number(e>>a&i),l:0|Number(e&i)}}(e[s],t);[r[s],n[s]]=[o,c]}return[r,n]}(h,!0),A=(e,t,r)=>r>32?c(e,t,r):s(e,t,r),P=(e,t,r)=>r>32?l(e,t,r):o(e,t,r);class E extends u.Vw{constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.ai)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,u.DH)(this.state)}keccak(){u.qv||(0,u.Fc)(this.state32),function(e,t=24){let 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){let n=(t+8)%10,i=(t+2)%10,a=r[i],s=r[i+1],o=A(a,s,1)^r[n],c=P(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=f[r],a=A(t,i,n),s=P(t,i,n),o=d[r];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}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]^=w[n],e[1]^=v[n]}r.fill(0)}(this.state32,this.rounds),u.qv||(0,u.Fc)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.t2)(this);let{blockLen:t,state:r}=this,i=(e=(0,u.ZJ)(e)).length;for(let n=0;n<i;){let a=Math.min(t-this.pos,i-n);for(let t=0;t<a;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.t2)(this,!1),(0,n.ee)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.CG)(e,this),this.finished)throw 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){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:a}=this;return e||(e=new E(t,r,n,a,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=a,e.destroyed=this.destroyed,e}}let O=(0,u.ld)(()=>new E(136,1,32));
27var k=r(1561),B=r(47365),S=r(96395);function C(e,t){let r=O((0,k.q)(e,{strict:!1})?(0,B.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,S.nj)(r)}},79986:(e,t,r)=>{"use strict";r.d(t,{h:()=>n});let n=r(52909).k},85704:(e,t,r)=>{"use strict";r.d(t,{V:()=>a});var n=r(98282),i=r(52909);let a=e=>(0,n.di)((0,i.k)(e),0,4)},52909:(e,t,r)=>{"use strict";r.d(t,{k:()=>d});var n=r(47365),i=r(11625);let a=e=>(0,i.S)((0,n.ZJ)(e));var s=r(6930);let o=/^tuple(?<array>(\[(\d*)\])*)$/;function c(e){let t="",r=e.length;for(let n=0;n<r;n++)t+=function e(t){let r=t.type;if(o.test(t.type)&&"components"in t){r="(";let n=t.components.length;for(let i=0;i<n;i++)r+=e(t.components[i]),i<n-1&&(r+=", ");let i=(0,s.Yv)(o,t.type);return r+=`)${i?.array??""}`,e({...t,type:r})}return("indexed"in t&&t.indexed&&(r=`${r} indexed`),t.name)?`${r} ${t.name}`:r}(e[n]),n!==r-1&&(t+=", ");return t}var l=r(91347);let u=e=>(function(e){let t=!0,r="",n=0,i="",a=!1;for(let s=0;s<e.length;s++){let o=e[s];if(["(",")",","].includes(o)&&(t=!0),"("===o&&n++,")"===o&&n--,t){if(0===n){if(" "===o&&["event","function",""].includes(i))i="";else if(i+=o,")"===o){a=!0;break}continue}if(" "===o){","!==e[s-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=o,r+=o}}if(!a)throw new l.C("Unable to normalize signature.");return i})("string"==typeof e?e:function(e){return"function"===e.type?`function ${e.name}(${c(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs.length?` returns (${c(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${c(e.inputs)})`:"error"===e.type?`error ${e.name}(${c(e.inputs)})`:"constructor"===e.type?`constructor(${c(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback()":"receive() external payable"}(e));function d(e){return a(u(e))}},11876:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},28328:(e,t,r)=>{"use strict";r.d(t,{u:()=>a});var n=r(59960);let i=new Map;function a({fn:e,id:t,shouldSplitBatch:r,wait:a=0,sort:s}){let o=async()=>{let t=u();c();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},c=()=>i.delete(t),l=()=>u().map(({args:e})=>e),u=()=>i.get(t)||[],d=e=>i.set(t,[...u(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:i,reject:s}=(0,n.Y)();return(r?.([...l(),e])&&o(),u().length>0)?d({args:e,resolve:i,reject:s}):(d({args:e,resolve:i,reject:s}),setTimeout(o,a)),t}}}},59960:(e,t,r)=>{"use strict";function n(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}r.d(t,{Y:()=>n})},90805:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(1942);function i(e,{delay:t=100,retryCount:r=2,shouldRetry:a=()=>!0}={}){return new Promise((i,s)=>{let o=async({count:c=0}={})=>{let l=async({error:e})=>{let r="function"==typeof t?t({count:c,error:e}):t;r&&await (0,n.u)(r),o({count:c+1})};try{let t=await e();i(t)}catch(e){if(c<r&&await a({count:c,error:e}))return l({error:e});s(e)}};o()})}},91409:(e,t,r)=>{"use strict";r.d(t,{x:()=>u});var n=r(55782),i=r(11625),a=r(1561),s=r(90812),o=r(96395);async function c({hash:e,signature:t}){let n=(0,a.q)(e)?e:(0,o.nj)(e),{secp256k1:i}=await Promise.resolve().then(r.bind(r,64330)),c=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:a}=t,o=l(Number(a??n));return new i.Signature((0,s.uU)(e),(0,s.uU)(r)).addRecoveryBit(o)}let e=(0,a.q)(t)?t:(0,o.nj)(t),r=l((0,s.ME)(`0x${e.slice(130)}`));return i.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(n.substring(2)).toHex(!1);return`0x${c}`}function l(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function u({hash:e,signature:t}){return function(e){let t=(0,i.S)(`0x${e.substring(4)}`).substring(26);return(0,n.o)(`0x${t}`)}(await c({hash:e,signature:t}))}},87272:(e,t,r)=>{"use strict";r.d(t,{yH:()=>l});var n=r(11317),i=r(59731),a=r(39652),s=r(37514),o=r(96395);function c(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new i.NV({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.NV({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function l(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!(0,s.P)(r,{strict:!1}))throw new n.M({address:r});if(t[r])throw new a.Hi({address:r});
27t[r]=function(e){let{balance:t,nonce:r,state:n,stateDiff:i,code:s}=e,l={};if(void 0!==s&&(l.code=s),void 0!==t&&(l.balance=(0,o.cK)(t)),void 0!==r&&(l.nonce=(0,o.cK)(r)),void 0!==n&&(l.state=c(n)),void 0!==i){if(l.state)throw new a.ft;l.stateDiff=c(i)}return l}(i)}return t}},27900:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},78699:(e,t,r)=>{"use strict";r.d(t,{c:()=>l});var n=r(22538);let i=2n**256n-1n;var a=r(11317),s=r(56107),o=r(72981),c=r(37514);function l(e){let{account:t,gasPrice:r,maxFeePerGas:l,maxPriorityFeePerGas:u,to:d}=e,f=t?(0,n.J)(t):void 0;if(f&&!(0,c.P)(f.address))throw new a.M({address:f.address});if(d&&!(0,c.P)(d))throw new a.M({address:d});if(void 0!==r&&(void 0!==l||void 0!==u))throw new o.n3;if(l&&l>i)throw new s.BG({maxFeePerGas:l});if(u&&l&&u>l)throw new s.lN({maxFeePerGas:l,maxPriorityFeePerGas:u})}},88885:(e,t,r)=>{"use strict";r.d(t,{H4:()=>m,v8:()=>g,$$:()=>b});var n=r(90535),i=r(11317),a=r(27900),s=r(91347);class o extends s.C{constructor({domain:e}){super(`Invalid domain "${(0,a.A)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class c extends s.C{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class l extends s.C{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}var u=r(37514),d=r(35125),f=r(96395);let h=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,p=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function g(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},o=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},c=(()=>{if("EIP712Domain"!==n)return s(i[n],r)})();return(0,a.A)({domain:o,message:c,primaryType:n,types:i})}function b(e){let{domain:t,message:r,primaryType:a,types:s}=e,g=(e,t)=>{for(let r of e){let{name:e,type:a}=r,o=t[e],c=a.match(p);if(c&&("number"==typeof o||"bigint"==typeof o)){let[e,t,r]=c;(0,f.cK)(o,{signed:"int"===t,size:Number.parseInt(r)/8})}if("address"===a&&"string"==typeof o&&!(0,u.P)(o))throw new i.M({address:o});let b=a.match(h);if(b){let[e,t]=b;if(t&&(0,d.E)(o)!==Number.parseInt(t))throw new n.BI({expectedSize:Number.parseInt(t),givenSize:(0,d.E)(o)})}let m=s[a];m&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new l({type:e})}(a),g(m,o))}};if(s.EIP712Domain&&t){if("object"!=typeof t)throw new o({domain:t});g(s.EIP712Domain,t)}if("EIP712Domain"!==a){if(s[a])g(s[a],r);else throw new c({primaryType:a,types:s})}}function m({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},7015:(e,t,r)=>{"use strict";let n;r.d(t,{L:()=>a});let i=256;function a(e=11){if(!n||i+e>512){n="",i=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(i,i+++e)}},56643:(e,t,r)=>{"use strict";r.d(t,{c:()=>a});var n=r(50077),i=r(65240);function a(e,t="wei"){return(0,i.J)(e,n.eL[t])}},56813:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var n=r(50077),i=r(65240);function a(e,t="wei"){return(0,i.J)(e,n.sz[t])}},65240:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,a]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${a?`.${a}`:""}`}r.d(t,{J:()=>n})},1942:(e,t,r)=>{"use strict";async function n(e){return new Promise(t=>setTimeout(t,e))}r.d(t,{u:()=>n})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.