@ututrust/web-components 3.6.10 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -343,7 +343,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
|
343
343
|
*
|
|
344
344
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
345
345
|
* @license MIT
|
|
346
|
-
*/(function(N){const T=a,j=w,C=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;N.Buffer=H,N.SlowBuffer=b0,N.INSPECT_MAX_BYTES=50;const G=2147483647;N.kMaxLength=G;const{Uint8Array:W,ArrayBuffer:Z,SharedArrayBuffer:d0}=globalThis;H.TYPED_ARRAY_SUPPORT=n0(),!H.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n0(){try{const t0=new W(1),_={foo:function(){return 42}};return Object.setPrototypeOf(_,W.prototype),Object.setPrototypeOf(t0,_),t0.foo()===42}catch{return!1}}Object.defineProperty(H.prototype,"parent",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.buffer}}),Object.defineProperty(H.prototype,"offset",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.byteOffset}});function y0(t0){if(t0>G)throw new RangeError('The value "'+t0+'" is invalid for option "size"');const _=new W(t0);return Object.setPrototypeOf(_,H.prototype),_}function H(t0,_,Y){if(typeof t0=="number"){if(typeof _=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(t0)}return F(t0,_,Y)}H.poolSize=8192;function F(t0,_,Y){if(typeof t0=="string")return R(t0,_);if(Z.isView(t0))return q(t0);if(t0==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t0);if(C6(t0,Z)||t0&&C6(t0.buffer,Z)||typeof d0<"u"&&(C6(t0,d0)||t0&&C6(t0.buffer,d0)))return e0(t0,_,Y);if(typeof t0=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const p0=t0.valueOf&&t0.valueOf();if(p0!=null&&p0!==t0)return H.from(p0,_,Y);const E0=V(t0);if(E0)return E0;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t0[Symbol.toPrimitive]=="function")return H.from(t0[Symbol.toPrimitive]("string"),_,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t0)}H.from=function(t0,_,Y){return F(t0,_,Y)},Object.setPrototypeOf(H.prototype,W.prototype),Object.setPrototypeOf(H,W);function h(t0){if(typeof t0!="number")throw new TypeError('"size" argument must be of type number');if(t0<0)throw new RangeError('The value "'+t0+'" is invalid for option "size"')}function I(t0,_,Y){return h(t0),t0<=0?y0(t0):_!==void 0?typeof Y=="string"?y0(t0).fill(_,Y):y0(t0).fill(_):y0(t0)}H.alloc=function(t0,_,Y){return I(t0,_,Y)};function k(t0){return h(t0),y0(t0<0?0:S(t0)|0)}H.allocUnsafe=function(t0){return k(t0)},H.allocUnsafeSlow=function(t0){return k(t0)};function R(t0,_){if((typeof _!="string"||_==="")&&(_="utf8"),!H.isEncoding(_))throw new TypeError("Unknown encoding: "+_);const Y=x0(t0,_)|0;let p0=y0(Y);const E0=p0.write(t0,_);return E0!==Y&&(p0=p0.slice(0,E0)),p0}function z(t0){const _=t0.length<0?0:S(t0.length)|0,Y=y0(_);for(let p0=0;p0<_;p0+=1)Y[p0]=t0[p0]&255;return Y}function q(t0){if(C6(t0,W)){const _=new W(t0);return e0(_.buffer,_.byteOffset,_.byteLength)}return z(t0)}function e0(t0,_,Y){if(_<0||t0.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(t0.byteLength<_+(Y||0))throw new RangeError('"length" is outside of buffer bounds');let p0;return _===void 0&&Y===void 0?p0=new W(t0):Y===void 0?p0=new W(t0,_):p0=new W(t0,_,Y),Object.setPrototypeOf(p0,H.prototype),p0}function V(t0){if(H.isBuffer(t0)){const _=S(t0.length)|0,Y=y0(_);return Y.length===0||t0.copy(Y,0,0,_),Y}if(t0.length!==void 0)return typeof t0.length!="number"||F1(t0.length)?y0(0):z(t0);if(t0.type==="Buffer"&&Array.isArray(t0.data))return z(t0.data)}function S(t0){if(t0>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return t0|0}function b0(t0){return+t0!=t0&&(t0=0),H.alloc(+t0)}H.isBuffer=function(_){return _!=null&&_._isBuffer===!0&&_!==H.prototype},H.compare=function(_,Y){if(C6(_,W)&&(_=H.from(_,_.offset,_.byteLength)),C6(Y,W)&&(Y=H.from(Y,Y.offset,Y.byteLength)),!H.isBuffer(_)||!H.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===Y)return 0;let p0=_.length,E0=Y.length;for(let z0=0,W0=Math.min(p0,E0);z0<W0;++z0)if(_[z0]!==Y[z0]){p0=_[z0],E0=Y[z0];break}return p0<E0?-1:E0<p0?1:0},H.isEncoding=function(_){switch(String(_).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},H.concat=function(_,Y){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(_.length===0)return H.alloc(0);let p0;if(Y===void 0)for(Y=0,p0=0;p0<_.length;++p0)Y+=_[p0].length;const E0=H.allocUnsafe(Y);let z0=0;for(p0=0;p0<_.length;++p0){let W0=_[p0];if(C6(W0,W))z0+W0.length>E0.length?(H.isBuffer(W0)||(W0=H.from(W0)),W0.copy(E0,z0)):W.prototype.set.call(E0,W0,z0);else if(H.isBuffer(W0))W0.copy(E0,z0);else throw new TypeError('"list" argument must be an Array of Buffers');z0+=W0.length}return E0};function x0(t0,_){if(H.isBuffer(t0))return t0.length;if(Z.isView(t0)||C6(t0,Z))return t0.byteLength;if(typeof t0!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t0);const Y=t0.length,p0=arguments.length>2&&arguments[2]===!0;if(!p0&&Y===0)return 0;let E0=!1;for(;;)switch(_){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return o1(t0).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return d1(t0).length;default:if(E0)return p0?-1:o1(t0).length;_=(""+_).toLowerCase(),E0=!0}}H.byteLength=x0;function O(t0,_,Y){let p0=!1;if((_===void 0||_<0)&&(_=0),_>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,_>>>=0,Y<=_))return"";for(t0||(t0="utf8");;)switch(t0){case"hex":return a1(this,_,Y);case"utf8":case"utf-8":return N0(this,_,Y);case"ascii":return t1(this,_,Y);case"latin1":case"binary":return i1(this,_,Y);case"base64":return F0(this,_,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c0(this,_,Y);default:if(p0)throw new TypeError("Unknown encoding: "+t0);t0=(t0+"").toLowerCase(),p0=!0}}H.prototype._isBuffer=!0;function l0(t0,_,Y){const p0=t0[_];t0[_]=t0[Y],t0[Y]=p0}H.prototype.swap16=function(){const _=this.length;if(_%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<_;Y+=2)l0(this,Y,Y+1);return this},H.prototype.swap32=function(){const _=this.length;if(_%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<_;Y+=4)l0(this,Y,Y+3),l0(this,Y+1,Y+2);return this},H.prototype.swap64=function(){const _=this.length;if(_%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<_;Y+=8)l0(this,Y,Y+7),l0(this,Y+1,Y+6),l0(this,Y+2,Y+5),l0(this,Y+3,Y+4);return this},H.prototype.toString=function(){const _=this.length;return _===0?"":arguments.length===0?N0(this,0,_):O.apply(this,arguments)},H.prototype.toLocaleString=H.prototype.toString,H.prototype.equals=function(_){if(!H.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_?!0:H.compare(this,_)===0},H.prototype.inspect=function(){let _="";const Y=N.INSPECT_MAX_BYTES;return _=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(_+=" ... "),"<Buffer "+_+">"},C&&(H.prototype[C]=H.prototype.inspect),H.prototype.compare=function(_,Y,p0,E0,z0){if(C6(_,W)&&(_=H.from(_,_.offset,_.byteLength)),!H.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(Y===void 0&&(Y=0),p0===void 0&&(p0=_?_.length:0),E0===void 0&&(E0=0),z0===void 0&&(z0=this.length),Y<0||p0>_.length||E0<0||z0>this.length)throw new RangeError("out of range index");if(E0>=z0&&Y>=p0)return 0;if(E0>=z0)return-1;if(Y>=p0)return 1;if(Y>>>=0,p0>>>=0,E0>>>=0,z0>>>=0,this===_)return 0;let W0=z0-E0,O1=p0-Y;const L1=Math.min(W0,O1),D1=this.slice(E0,z0),c6=_.slice(Y,p0);for(let N1=0;N1<L1;++N1)if(D1[N1]!==c6[N1]){W0=D1[N1],O1=c6[N1];break}return W0<O1?-1:O1<W0?1:0};function f0(t0,_,Y,p0,E0){if(t0.length===0)return-1;if(typeof Y=="string"?(p0=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,F1(Y)&&(Y=E0?0:t0.length-1),Y<0&&(Y=t0.length+Y),Y>=t0.length){if(E0)return-1;Y=t0.length-1}else if(Y<0)if(E0)Y=0;else return-1;if(typeof _=="string"&&(_=H.from(_,p0)),H.isBuffer(_))return _.length===0?-1:K(t0,_,Y,p0,E0);if(typeof _=="number")return _=_&255,typeof W.prototype.indexOf=="function"?E0?W.prototype.indexOf.call(t0,_,Y):W.prototype.lastIndexOf.call(t0,_,Y):K(t0,[_],Y,p0,E0);throw new TypeError("val must be string, number or Buffer")}function K(t0,_,Y,p0,E0){let z0=1,W0=t0.length,O1=_.length;if(p0!==void 0&&(p0=String(p0).toLowerCase(),p0==="ucs2"||p0==="ucs-2"||p0==="utf16le"||p0==="utf-16le")){if(t0.length<2||_.length<2)return-1;z0=2,W0/=2,O1/=2,Y/=2}function L1(c6,N1){return z0===1?c6[N1]:c6.readUInt16BE(N1*z0)}let D1;if(E0){let c6=-1;for(D1=Y;D1<W0;D1++)if(L1(t0,D1)===L1(_,c6===-1?0:D1-c6)){if(c6===-1&&(c6=D1),D1-c6+1===O1)return c6*z0}else c6!==-1&&(D1-=D1-c6),c6=-1}else for(Y+O1>W0&&(Y=W0-O1),D1=Y;D1>=0;D1--){let c6=!0;for(let N1=0;N1<O1;N1++)if(L1(t0,D1+N1)!==L1(_,N1)){c6=!1;break}if(c6)return D1}return-1}H.prototype.includes=function(_,Y,p0){return this.indexOf(_,Y,p0)!==-1},H.prototype.indexOf=function(_,Y,p0){return f0(this,_,Y,p0,!0)},H.prototype.lastIndexOf=function(_,Y,p0){return f0(this,_,Y,p0,!1)};function h0(t0,_,Y,p0){Y=Number(Y)||0;const E0=t0.length-Y;p0?(p0=Number(p0),p0>E0&&(p0=E0)):p0=E0;const z0=_.length;p0>z0/2&&(p0=z0/2);let W0;for(W0=0;W0<p0;++W0){const O1=parseInt(_.substr(W0*2,2),16);if(F1(O1))return W0;t0[Y+W0]=O1}return W0}function g0(t0,_,Y,p0){return Q1(o1(_,t0.length-Y),t0,Y,p0)}function T0(t0,_,Y,p0){return Q1(s1(_),t0,Y,p0)}function m0(t0,_,Y,p0){return Q1(d1(_),t0,Y,p0)}function q0(t0,_,Y,p0){return Q1(v1(_,t0.length-Y),t0,Y,p0)}H.prototype.write=function(_,Y,p0,E0){if(Y===void 0)E0="utf8",p0=this.length,Y=0;else if(p0===void 0&&typeof Y=="string")E0=Y,p0=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(p0)?(p0=p0>>>0,E0===void 0&&(E0="utf8")):(E0=p0,p0=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z0=this.length-Y;if((p0===void 0||p0>z0)&&(p0=z0),_.length>0&&(p0<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");E0||(E0="utf8");let W0=!1;for(;;)switch(E0){case"hex":return h0(this,_,Y,p0);case"utf8":case"utf-8":return g0(this,_,Y,p0);case"ascii":case"latin1":case"binary":return T0(this,_,Y,p0);case"base64":return m0(this,_,Y,p0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q0(this,_,Y,p0);default:if(W0)throw new TypeError("Unknown encoding: "+E0);E0=(""+E0).toLowerCase(),W0=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F0(t0,_,Y){return _===0&&Y===t0.length?T.fromByteArray(t0):T.fromByteArray(t0.slice(_,Y))}function N0(t0,_,Y){Y=Math.min(t0.length,Y);const p0=[];let E0=_;for(;E0<Y;){const z0=t0[E0];let W0=null,O1=z0>239?4:z0>223?3:z0>191?2:1;if(E0+O1<=Y){let L1,D1,c6,N1;switch(O1){case 1:z0<128&&(W0=z0);break;case 2:L1=t0[E0+1],(L1&192)===128&&(N1=(z0&31)<<6|L1&63,N1>127&&(W0=N1));break;case 3:L1=t0[E0+1],D1=t0[E0+2],(L1&192)===128&&(D1&192)===128&&(N1=(z0&15)<<12|(L1&63)<<6|D1&63,N1>2047&&(N1<55296||N1>57343)&&(W0=N1));break;case 4:L1=t0[E0+1],D1=t0[E0+2],c6=t0[E0+3],(L1&192)===128&&(D1&192)===128&&(c6&192)===128&&(N1=(z0&15)<<18|(L1&63)<<12|(D1&63)<<6|c6&63,N1>65535&&N1<1114112&&(W0=N1))}}W0===null?(W0=65533,O1=1):W0>65535&&(W0-=65536,p0.push(W0>>>10&1023|55296),W0=56320|W0&1023),p0.push(W0),E0+=O1}return J0(p0)}const O0=4096;function J0(t0){const _=t0.length;if(_<=O0)return String.fromCharCode.apply(String,t0);let Y="",p0=0;for(;p0<_;)Y+=String.fromCharCode.apply(String,t0.slice(p0,p0+=O0));return Y}function t1(t0,_,Y){let p0="";Y=Math.min(t0.length,Y);for(let E0=_;E0<Y;++E0)p0+=String.fromCharCode(t0[E0]&127);return p0}function i1(t0,_,Y){let p0="";Y=Math.min(t0.length,Y);for(let E0=_;E0<Y;++E0)p0+=String.fromCharCode(t0[E0]);return p0}function a1(t0,_,Y){const p0=t0.length;(!_||_<0)&&(_=0),(!Y||Y<0||Y>p0)&&(Y=p0);let E0="";for(let z0=_;z0<Y;++z0)E0+=X1[t0[z0]];return E0}function c0(t0,_,Y){const p0=t0.slice(_,Y);let E0="";for(let z0=0;z0<p0.length-1;z0+=2)E0+=String.fromCharCode(p0[z0]+p0[z0+1]*256);return E0}H.prototype.slice=function(_,Y){const p0=this.length;_=~~_,Y=Y===void 0?p0:~~Y,_<0?(_+=p0,_<0&&(_=0)):_>p0&&(_=p0),Y<0?(Y+=p0,Y<0&&(Y=0)):Y>p0&&(Y=p0),Y<_&&(Y=_);const E0=this.subarray(_,Y);return Object.setPrototypeOf(E0,H.prototype),E0};function A0(t0,_,Y){if(t0%1!==0||t0<0)throw new RangeError("offset is not uint");if(t0+_>Y)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_],z0=1,W0=0;for(;++W0<Y&&(z0*=256);)E0+=this[_+W0]*z0;return E0},H.prototype.readUintBE=H.prototype.readUIntBE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_+--Y],z0=1;for(;Y>0&&(z0*=256);)E0+=this[_+--Y]*z0;return E0},H.prototype.readUint8=H.prototype.readUInt8=function(_,Y){return _=_>>>0,Y||A0(_,1,this.length),this[_]},H.prototype.readUint16LE=H.prototype.readUInt16LE=function(_,Y){return _=_>>>0,Y||A0(_,2,this.length),this[_]|this[_+1]<<8},H.prototype.readUint16BE=H.prototype.readUInt16BE=function(_,Y){return _=_>>>0,Y||A0(_,2,this.length),this[_]<<8|this[_+1]},H.prototype.readUint32LE=H.prototype.readUInt32LE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+this[_+3]*16777216},H.prototype.readUint32BE=H.prototype.readUInt32BE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]*16777216+(this[_+1]<<16|this[_+2]<<8|this[_+3])},H.prototype.readBigUInt64LE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=Y+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24,z0=this[++_]+this[++_]*2**8+this[++_]*2**16+p0*2**24;return BigInt(E0)+(BigInt(z0)<<BigInt(32))}),H.prototype.readBigUInt64BE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=Y*2**24+this[++_]*2**16+this[++_]*2**8+this[++_],z0=this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+p0;return(BigInt(E0)<<BigInt(32))+BigInt(z0)}),H.prototype.readIntLE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_],z0=1,W0=0;for(;++W0<Y&&(z0*=256);)E0+=this[_+W0]*z0;return z0*=128,E0>=z0&&(E0-=Math.pow(2,8*Y)),E0},H.prototype.readIntBE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=Y,z0=1,W0=this[_+--E0];for(;E0>0&&(z0*=256);)W0+=this[_+--E0]*z0;return z0*=128,W0>=z0&&(W0-=Math.pow(2,8*Y)),W0},H.prototype.readInt8=function(_,Y){return _=_>>>0,Y||A0(_,1,this.length),this[_]&128?(255-this[_]+1)*-1:this[_]},H.prototype.readInt16LE=function(_,Y){_=_>>>0,Y||A0(_,2,this.length);const p0=this[_]|this[_+1]<<8;return p0&32768?p0|4294901760:p0},H.prototype.readInt16BE=function(_,Y){_=_>>>0,Y||A0(_,2,this.length);const p0=this[_+1]|this[_]<<8;return p0&32768?p0|4294901760:p0},H.prototype.readInt32LE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},H.prototype.readInt32BE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},H.prototype.readBigInt64LE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=this[_+4]+this[_+5]*2**8+this[_+6]*2**16+(p0<<24);return(BigInt(E0)<<BigInt(32))+BigInt(Y+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24)}),H.prototype.readBigInt64BE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=(Y<<24)+this[++_]*2**16+this[++_]*2**8+this[++_];return(BigInt(E0)<<BigInt(32))+BigInt(this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+p0)}),H.prototype.readFloatLE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),j.read(this,_,!0,23,4)},H.prototype.readFloatBE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),j.read(this,_,!1,23,4)},H.prototype.readDoubleLE=function(_,Y){return _=_>>>0,Y||A0(_,8,this.length),j.read(this,_,!0,52,8)},H.prototype.readDoubleBE=function(_,Y){return _=_>>>0,Y||A0(_,8,this.length),j.read(this,_,!1,52,8)};function I0(t0,_,Y,p0,E0,z0){if(!H.isBuffer(t0))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>E0||_<z0)throw new RangeError('"value" argument is out of bounds');if(Y+p0>t0.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,p0=p0>>>0,!E0){const O1=Math.pow(2,8*p0)-1;I0(this,_,Y,p0,O1,0)}let z0=1,W0=0;for(this[Y]=_&255;++W0<p0&&(z0*=256);)this[Y+W0]=_/z0&255;return Y+p0},H.prototype.writeUintBE=H.prototype.writeUIntBE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,p0=p0>>>0,!E0){const O1=Math.pow(2,8*p0)-1;I0(this,_,Y,p0,O1,0)}let z0=p0-1,W0=1;for(this[Y+z0]=_&255;--z0>=0&&(W0*=256);)this[Y+z0]=_/W0&255;return Y+p0},H.prototype.writeUint8=H.prototype.writeUInt8=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,1,255,0),this[Y]=_&255,Y+1},H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,65535,0),this[Y]=_&255,this[Y+1]=_>>>8,Y+2},H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,65535,0),this[Y]=_>>>8,this[Y+1]=_&255,Y+2},H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,4294967295,0),this[Y+3]=_>>>24,this[Y+2]=_>>>16,this[Y+1]=_>>>8,this[Y]=_&255,Y+4},H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,4294967295,0),this[Y]=_>>>24,this[Y+1]=_>>>16,this[Y+2]=_>>>8,this[Y+3]=_&255,Y+4};function H0(t0,_,Y,p0,E0){r0(_,p0,E0,t0,Y,7);let z0=Number(_&BigInt(4294967295));t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0;let W0=Number(_>>BigInt(32)&BigInt(4294967295));return t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,Y}function X0(t0,_,Y,p0,E0){r0(_,p0,E0,t0,Y,7);let z0=Number(_&BigInt(4294967295));t0[Y+7]=z0,z0=z0>>8,t0[Y+6]=z0,z0=z0>>8,t0[Y+5]=z0,z0=z0>>8,t0[Y+4]=z0;let W0=Number(_>>BigInt(32)&BigInt(4294967295));return t0[Y+3]=W0,W0=W0>>8,t0[Y+2]=W0,W0=W0>>8,t0[Y+1]=W0,W0=W0>>8,t0[Y]=W0,Y+8}H.prototype.writeBigUInt64LE=F6(function(_,Y=0){return H0(this,_,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeBigUInt64BE=F6(function(_,Y=0){return X0(this,_,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeIntLE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,!E0){const L1=Math.pow(2,8*p0-1);I0(this,_,Y,p0,L1-1,-L1)}let z0=0,W0=1,O1=0;for(this[Y]=_&255;++z0<p0&&(W0*=256);)_<0&&O1===0&&this[Y+z0-1]!==0&&(O1=1),this[Y+z0]=(_/W0>>0)-O1&255;return Y+p0},H.prototype.writeIntBE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,!E0){const L1=Math.pow(2,8*p0-1);I0(this,_,Y,p0,L1-1,-L1)}let z0=p0-1,W0=1,O1=0;for(this[Y+z0]=_&255;--z0>=0&&(W0*=256);)_<0&&O1===0&&this[Y+z0+1]!==0&&(O1=1),this[Y+z0]=(_/W0>>0)-O1&255;return Y+p0},H.prototype.writeInt8=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,1,127,-128),_<0&&(_=255+_+1),this[Y]=_&255,Y+1},H.prototype.writeInt16LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,32767,-32768),this[Y]=_&255,this[Y+1]=_>>>8,Y+2},H.prototype.writeInt16BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,32767,-32768),this[Y]=_>>>8,this[Y+1]=_&255,Y+2},H.prototype.writeInt32LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,2147483647,-2147483648),this[Y]=_&255,this[Y+1]=_>>>8,this[Y+2]=_>>>16,this[Y+3]=_>>>24,Y+4},H.prototype.writeInt32BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[Y]=_>>>24,this[Y+1]=_>>>16,this[Y+2]=_>>>8,this[Y+3]=_&255,Y+4},H.prototype.writeBigInt64LE=F6(function(_,Y=0){return H0(this,_,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),H.prototype.writeBigInt64BE=F6(function(_,Y=0){return X0(this,_,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y0(t0,_,Y,p0,E0,z0){if(Y+p0>t0.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function K0(t0,_,Y,p0,E0){return _=+_,Y=Y>>>0,E0||Y0(t0,_,Y,4),j.write(t0,_,Y,p0,23,4),Y+4}H.prototype.writeFloatLE=function(_,Y,p0){return K0(this,_,Y,!0,p0)},H.prototype.writeFloatBE=function(_,Y,p0){return K0(this,_,Y,!1,p0)};function y1(t0,_,Y,p0,E0){return _=+_,Y=Y>>>0,E0||Y0(t0,_,Y,8),j.write(t0,_,Y,p0,52,8),Y+8}H.prototype.writeDoubleLE=function(_,Y,p0){return y1(this,_,Y,!0,p0)},H.prototype.writeDoubleBE=function(_,Y,p0){return y1(this,_,Y,!1,p0)},H.prototype.copy=function(_,Y,p0,E0){if(!H.isBuffer(_))throw new TypeError("argument should be a Buffer");if(p0||(p0=0),!E0&&E0!==0&&(E0=this.length),Y>=_.length&&(Y=_.length),Y||(Y=0),E0>0&&E0<p0&&(E0=p0),E0===p0||_.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(p0<0||p0>=this.length)throw new RangeError("Index out of range");if(E0<0)throw new RangeError("sourceEnd out of bounds");E0>this.length&&(E0=this.length),_.length-Y<E0-p0&&(E0=_.length-Y+p0);const z0=E0-p0;return this===_&&typeof W.prototype.copyWithin=="function"?this.copyWithin(Y,p0,E0):W.prototype.set.call(_,this.subarray(p0,E0),Y),z0},H.prototype.fill=function(_,Y,p0,E0){if(typeof _=="string"){if(typeof Y=="string"?(E0=Y,Y=0,p0=this.length):typeof p0=="string"&&(E0=p0,p0=this.length),E0!==void 0&&typeof E0!="string")throw new TypeError("encoding must be a string");if(typeof E0=="string"&&!H.isEncoding(E0))throw new TypeError("Unknown encoding: "+E0);if(_.length===1){const W0=_.charCodeAt(0);(E0==="utf8"&&W0<128||E0==="latin1")&&(_=W0)}}else typeof _=="number"?_=_&255:typeof _=="boolean"&&(_=Number(_));if(Y<0||this.length<Y||this.length<p0)throw new RangeError("Out of range index");if(p0<=Y)return this;Y=Y>>>0,p0=p0===void 0?this.length:p0>>>0,_||(_=0);let z0;if(typeof _=="number")for(z0=Y;z0<p0;++z0)this[z0]=_;else{const W0=H.isBuffer(_)?_:H.from(_,E0),O1=W0.length;if(O1===0)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(z0=0;z0<p0-Y;++z0)this[z0+Y]=W0[z0%O1]}return this};const u1={};function X(t0,_,Y){u1[t0]=class extends Y{constructor(){super(),Object.defineProperty(this,"message",{value:_.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t0}]`,this.stack,delete this.name}get code(){return t0}set code(E0){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:E0,writable:!0})}toString(){return`${this.name} [${t0}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(t0){return t0?`${t0} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(t0,_){return`The "${t0}" argument must be of type number. Received type ${typeof _}`},TypeError),X("ERR_OUT_OF_RANGE",function(t0,_,Y){let p0=`The value of "${t0}" is out of range.`,E0=Y;return Number.isInteger(Y)&&Math.abs(Y)>2**32?E0=L(String(Y)):typeof Y=="bigint"&&(E0=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(E0=L(E0)),E0+="n"),p0+=` It must be ${_}. Received ${E0}`,p0},RangeError);function L(t0){let _="",Y=t0.length;const p0=t0[0]==="-"?1:0;for(;Y>=p0+4;Y-=3)_=`_${t0.slice(Y-3,Y)}${_}`;return`${t0.slice(0,Y)}${_}`}function Q(t0,_,Y){M0(_,"offset"),(t0[_]===void 0||t0[_+Y]===void 0)&&j0(_,t0.length-(Y+1))}function r0(t0,_,Y,p0,E0,z0){if(t0>Y||t0<_){const W0=typeof _=="bigint"?"n":"";let O1;throw _===0||_===BigInt(0)?O1=`>= 0${W0} and < 2${W0} ** ${(z0+1)*8}${W0}`:O1=`>= -(2${W0} ** ${(z0+1)*8-1}${W0}) and < 2 ** ${(z0+1)*8-1}${W0}`,new u1.ERR_OUT_OF_RANGE("value",O1,t0)}Q(p0,E0,z0)}function M0(t0,_){if(typeof t0!="number")throw new u1.ERR_INVALID_ARG_TYPE(_,"number",t0)}function j0(t0,_,Y){throw Math.floor(t0)!==t0?(M0(t0,Y),new u1.ERR_OUT_OF_RANGE("offset","an integer",t0)):_<0?new u1.ERR_BUFFER_OUT_OF_BOUNDS:new u1.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${_}`,t0)}const s0=/[^+/0-9A-Za-z-_]/g;function k0(t0){if(t0=t0.split("=")[0],t0=t0.trim().replace(s0,""),t0.length<2)return"";for(;t0.length%4!==0;)t0=t0+"=";return t0}function o1(t0,_){_=_||1/0;let Y;const p0=t0.length;let E0=null;const z0=[];for(let W0=0;W0<p0;++W0){if(Y=t0.charCodeAt(W0),Y>55295&&Y<57344){if(!E0){if(Y>56319){(_-=3)>-1&&z0.push(239,191,189);continue}else if(W0+1===p0){(_-=3)>-1&&z0.push(239,191,189);continue}E0=Y;continue}if(Y<56320){(_-=3)>-1&&z0.push(239,191,189),E0=Y;continue}Y=(E0-55296<<10|Y-56320)+65536}else E0&&(_-=3)>-1&&z0.push(239,191,189);if(E0=null,Y<128){if((_-=1)<0)break;z0.push(Y)}else if(Y<2048){if((_-=2)<0)break;z0.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((_-=3)<0)break;z0.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((_-=4)<0)break;z0.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return z0}function s1(t0){const _=[];for(let Y=0;Y<t0.length;++Y)_.push(t0.charCodeAt(Y)&255);return _}function v1(t0,_){let Y,p0,E0;const z0=[];for(let W0=0;W0<t0.length&&!((_-=2)<0);++W0)Y=t0.charCodeAt(W0),p0=Y>>8,E0=Y%256,z0.push(E0),z0.push(p0);return z0}function d1(t0){return T.toByteArray(k0(t0))}function Q1(t0,_,Y,p0){let E0;for(E0=0;E0<p0&&!(E0+Y>=_.length||E0>=t0.length);++E0)_[E0+Y]=t0[E0];return E0}function C6(t0,_){return t0 instanceof _||t0!=null&&t0.constructor!=null&&t0.constructor.name!=null&&t0.constructor.name===_.name}function F1(t0){return t0!==t0}const X1=(function(){const t0="0123456789abcdef",_=new Array(256);for(let Y=0;Y<16;++Y){const p0=Y*16;for(let E0=0;E0<16;++E0)_[p0+E0]=t0[Y]+t0[E0]}return _})();function F6(t0){return typeof BigInt>"u"?$1:t0}function $1(){throw new Error("BigInt not supported")}})(e);const D=e.Buffer;t.Blob=e.Blob,t.BlobOptions=e.BlobOptions,t.Buffer=e.Buffer,t.File=e.File,t.FileOptions=e.FileOptions,t.INSPECT_MAX_BYTES=e.INSPECT_MAX_BYTES,t.SlowBuffer=e.SlowBuffer,t.TranscodeEncoding=e.TranscodeEncoding,t.atob=e.atob,t.btoa=e.btoa,t.constants=e.constants,t.default=D,t.isAscii=e.isAscii,t.isUtf8=e.isUtf8,t.kMaxLength=e.kMaxLength,t.kStringMaxLength=e.kStringMaxLength,t.resolveObjectURL=e.resolveObjectURL,t.transcode=e.transcode})($c)),$c}var _C=Wr.exports,sp;function BC(){return sp||(sp=1,(function(t){(function(e,a){function n(F,h){if(!F)throw new Error(h||"Assertion failed")}function b(F,h){F.super_=h;var I=function(){};I.prototype=h.prototype,F.prototype=new I,F.prototype.constructor=F}function f(F,h,I){if(f.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((h==="le"||h==="be")&&(I=h,h=10),this._init(F||0,h||10,I||"be"))}typeof e=="object"?e.exports=f:a.BN=f,f.BN=f,f.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=OC().Buffer}catch{}f.isBN=function(h){return h instanceof f?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===f.wordSize&&Array.isArray(h.words)},f.max=function(h,I){return h.cmp(I)>0?h:I},f.min=function(h,I){return h.cmp(I)<0?h:I},f.prototype._init=function(h,I,k){if(typeof h=="number")return this._initNumber(h,I,k);if(typeof h=="object")return this._initArray(h,I,k);I==="hex"&&(I=16),n(I===(I|0)&&I>=2&&I<=36),h=h.toString().replace(/\s+/g,"");var R=0;h[0]==="-"&&(R++,this.negative=1),R<h.length&&(I===16?this._parseHex(h,R,k):(this._parseBase(h,I,R),k==="le"&&this._initArray(this.toArray(),I,k)))},f.prototype._initNumber=function(h,I,k){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),k==="le"&&this._initArray(this.toArray(),I,k)},f.prototype._initArray=function(h,I,k){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var z,q,e0=0;if(k==="be")for(R=h.length-1,z=0;R>=0;R-=3)q=h[R]|h[R-1]<<8|h[R-2]<<16,this.words[z]|=q<<e0&67108863,this.words[z+1]=q>>>26-e0&67108863,e0+=24,e0>=26&&(e0-=26,z++);else if(k==="le")for(R=0,z=0;R<h.length;R+=3)q=h[R]|h[R+1]<<8|h[R+2]<<16,this.words[z]|=q<<e0&67108863,this.words[z+1]=q>>>26-e0&67108863,e0+=24,e0>=26&&(e0-=26,z++);return this._strip()};function c(F,h){var I=F.charCodeAt(h);if(I>=48&&I<=57)return I-48;if(I>=65&&I<=70)return I-55;if(I>=97&&I<=102)return I-87;n(!1,"Invalid character in "+F)}function u(F,h,I){var k=c(F,I);return I-1>=h&&(k|=c(F,I-1)<<4),k}f.prototype._parseHex=function(h,I,k){this.length=Math.ceil((h.length-I)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var z=0,q=0,e0;if(k==="be")for(R=h.length-1;R>=I;R-=2)e0=u(h,I,R)<<z,this.words[q]|=e0&67108863,z>=18?(z-=18,q+=1,this.words[q]|=e0>>>26):z+=8;else{var V=h.length-I;for(R=V%2===0?I+1:I;R<h.length;R+=2)e0=u(h,I,R)<<z,this.words[q]|=e0&67108863,z>=18?(z-=18,q+=1,this.words[q]|=e0>>>26):z+=8}this._strip()};function l(F,h,I,k){for(var R=0,z=0,q=Math.min(F.length,I),e0=h;e0<q;e0++){var V=F.charCodeAt(e0)-48;R*=k,V>=49?z=V-49+10:V>=17?z=V-17+10:z=V,n(V>=0&&z<k,"Invalid character"),R+=z}return R}f.prototype._parseBase=function(h,I,k){this.words=[0],this.length=1;for(var R=0,z=1;z<=67108863;z*=I)R++;R--,z=z/I|0;for(var q=h.length-k,e0=q%R,V=Math.min(q,q-e0)+k,S=0,b0=k;b0<V;b0+=R)S=l(h,b0,b0+R,I),this.imuln(z),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S);if(e0!==0){var x0=1;for(S=l(h,b0,h.length,I),b0=0;b0<e0;b0++)x0*=I;this.imuln(x0),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S)}this._strip()},f.prototype.copy=function(h){h.words=new Array(this.length);for(var I=0;I<this.length;I++)h.words[I]=this.words[I];h.length=this.length,h.negative=this.negative,h.red=this.red};function y(F,h){F.words=h.words,F.length=h.length,F.negative=h.negative,F.red=h.red}if(f.prototype._move=function(h){y(h,this)},f.prototype.clone=function(){var h=new f(null);return this.copy(h),h},f.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch{f.prototype.inspect=m}else f.prototype.inspect=m;function m(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(h,I){h=h||10,I=I|0||1;var k;if(h===16||h==="hex"){k="";for(var R=0,z=0,q=0;q<this.length;q++){var e0=this.words[q],V=((e0<<R|z)&16777215).toString(16);z=e0>>>24-R&16777215,R+=2,R>=26&&(R-=26,q--),z!==0||q!==this.length-1?k=x[6-V.length]+V+k:k=V+k}for(z!==0&&(k=z.toString(16)+k);k.length%I!==0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}if(h===(h|0)&&h>=2&&h<=36){var S=A[h],b0=M[h];k="";var x0=this.clone();for(x0.negative=0;!x0.isZero();){var O=x0.modrn(b0).toString(h);x0=x0.idivn(b0),x0.isZero()?k=O+k:k=x[S-O.length]+O+k}for(this.isZero()&&(k="0"+k);k.length%I!==0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}n(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},f.prototype.toJSON=function(){return this.toString(16,2)},r&&(f.prototype.toBuffer=function(h,I){return this.toArrayLike(r,h,I)}),f.prototype.toArray=function(h,I){return this.toArrayLike(Array,h,I)};var v=function(h,I){return h.allocUnsafe?h.allocUnsafe(I):new h(I)};f.prototype.toArrayLike=function(h,I,k){this._strip();var R=this.byteLength(),z=k||Math.max(1,R);n(R<=z,"byte array longer than desired length"),n(z>0,"Requested array length <= 0");var q=v(h,z),e0=I==="le"?"LE":"BE";return this["_toArrayLike"+e0](q,R),q},f.prototype._toArrayLikeLE=function(h,I){for(var k=0,R=0,z=0,q=0;z<this.length;z++){var e0=this.words[z]<<q|R;h[k++]=e0&255,k<h.length&&(h[k++]=e0>>8&255),k<h.length&&(h[k++]=e0>>16&255),q===6?(k<h.length&&(h[k++]=e0>>24&255),R=0,q=0):(R=e0>>>24,q+=2)}if(k<h.length)for(h[k++]=R;k<h.length;)h[k++]=0},f.prototype._toArrayLikeBE=function(h,I){for(var k=h.length-1,R=0,z=0,q=0;z<this.length;z++){var e0=this.words[z]<<q|R;h[k--]=e0&255,k>=0&&(h[k--]=e0>>8&255),k>=0&&(h[k--]=e0>>16&255),q===6?(k>=0&&(h[k--]=e0>>24&255),R=0,q=0):(R=e0>>>24,q+=2)}if(k>=0)for(h[k--]=R;k>=0;)h[k--]=0},Math.clz32?f.prototype._countBits=function(h){return 32-Math.clz32(h)}:f.prototype._countBits=function(h){var I=h,k=0;return I>=4096&&(k+=13,I>>>=13),I>=64&&(k+=7,I>>>=7),I>=8&&(k+=4,I>>>=4),I>=2&&(k+=2,I>>>=2),k+I},f.prototype._zeroBits=function(h){if(h===0)return 26;var I=h,k=0;return(I&8191)===0&&(k+=13,I>>>=13),(I&127)===0&&(k+=7,I>>>=7),(I&15)===0&&(k+=4,I>>>=4),(I&3)===0&&(k+=2,I>>>=2),(I&1)===0&&k++,k},f.prototype.bitLength=function(){var h=this.words[this.length-1],I=this._countBits(h);return(this.length-1)*26+I};function w(F){for(var h=new Array(F.bitLength()),I=0;I<h.length;I++){var k=I/26|0,R=I%26;h[I]=F.words[k]>>>R&1}return h}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,I=0;I<this.length;I++){var k=this._zeroBits(this.words[I]);if(h+=k,k!==26)break}return h},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},f.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var I=0;I<h.length;I++)this.words[I]=this.words[I]|h.words[I];return this._strip()},f.prototype.ior=function(h){return n((this.negative|h.negative)===0),this.iuor(h)},f.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},f.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},f.prototype.iuand=function(h){var I;this.length>h.length?I=h:I=this;for(var k=0;k<I.length;k++)this.words[k]=this.words[k]&h.words[k];return this.length=I.length,this._strip()},f.prototype.iand=function(h){return n((this.negative|h.negative)===0),this.iuand(h)},f.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},f.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},f.prototype.iuxor=function(h){var I,k;this.length>h.length?(I=this,k=h):(I=h,k=this);for(var R=0;R<k.length;R++)this.words[R]=I.words[R]^k.words[R];if(this!==I)for(;R<I.length;R++)this.words[R]=I.words[R];return this.length=I.length,this._strip()},f.prototype.ixor=function(h){return n((this.negative|h.negative)===0),this.iuxor(h)},f.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},f.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},f.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var I=Math.ceil(h/26)|0,k=h%26;this._expand(I),k>0&&I--;for(var R=0;R<I;R++)this.words[R]=~this.words[R]&67108863;return k>0&&(this.words[R]=~this.words[R]&67108863>>26-k),this._strip()},f.prototype.notn=function(h){return this.clone().inotn(h)},f.prototype.setn=function(h,I){n(typeof h=="number"&&h>=0);var k=h/26|0,R=h%26;return this._expand(k+1),I?this.words[k]=this.words[k]|1<<R:this.words[k]=this.words[k]&~(1<<R),this._strip()},f.prototype.iadd=function(h){var I;if(this.negative!==0&&h.negative===0)return this.negative=0,I=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,I=this.isub(h),h.negative=1,I._normSign();var k,R;this.length>h.length?(k=this,R=h):(k=h,R=this);for(var z=0,q=0;q<R.length;q++)I=(k.words[q]|0)+(R.words[q]|0)+z,this.words[q]=I&67108863,z=I>>>26;for(;z!==0&&q<k.length;q++)I=(k.words[q]|0)+z,this.words[q]=I&67108863,z=I>>>26;if(this.length=k.length,z!==0)this.words[this.length]=z,this.length++;else if(k!==this)for(;q<k.length;q++)this.words[q]=k.words[q];return this},f.prototype.add=function(h){var I;return h.negative!==0&&this.negative===0?(h.negative=0,I=this.sub(h),h.negative^=1,I):h.negative===0&&this.negative!==0?(this.negative=0,I=h.sub(this),this.negative=1,I):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},f.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var I=this.iadd(h);return h.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var k=this.cmp(h);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,z;k>0?(R=this,z=h):(R=h,z=this);for(var q=0,e0=0;e0<z.length;e0++)I=(R.words[e0]|0)-(z.words[e0]|0)+q,q=I>>26,this.words[e0]=I&67108863;for(;q!==0&&e0<R.length;e0++)I=(R.words[e0]|0)+q,q=I>>26,this.words[e0]=I&67108863;if(q===0&&e0<R.length&&R!==this)for(;e0<R.length;e0++)this.words[e0]=R.words[e0];return this.length=Math.max(this.length,e0),R!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(h){return this.clone().isub(h)};function D(F,h,I){I.negative=h.negative^F.negative;var k=F.length+h.length|0;I.length=k,k=k-1|0;var R=F.words[0]|0,z=h.words[0]|0,q=R*z,e0=q&67108863,V=q/67108864|0;I.words[0]=e0;for(var S=1;S<k;S++){for(var b0=V>>>26,x0=V&67108863,O=Math.min(S,h.length-1),l0=Math.max(0,S-F.length+1);l0<=O;l0++){var f0=S-l0|0;R=F.words[f0]|0,z=h.words[l0]|0,q=R*z+x0,b0+=q/67108864|0,x0=q&67108863}I.words[S]=x0|0,V=b0|0}return V!==0?I.words[S]=V|0:I.length--,I._strip()}var N=function(h,I,k){var R=h.words,z=I.words,q=k.words,e0=0,V,S,b0,x0=R[0]|0,O=x0&8191,l0=x0>>>13,f0=R[1]|0,K=f0&8191,h0=f0>>>13,g0=R[2]|0,T0=g0&8191,m0=g0>>>13,q0=R[3]|0,F0=q0&8191,N0=q0>>>13,O0=R[4]|0,J0=O0&8191,t1=O0>>>13,i1=R[5]|0,a1=i1&8191,c0=i1>>>13,A0=R[6]|0,I0=A0&8191,H0=A0>>>13,X0=R[7]|0,Y0=X0&8191,K0=X0>>>13,y1=R[8]|0,u1=y1&8191,X=y1>>>13,L=R[9]|0,Q=L&8191,r0=L>>>13,M0=z[0]|0,j0=M0&8191,s0=M0>>>13,k0=z[1]|0,o1=k0&8191,s1=k0>>>13,v1=z[2]|0,d1=v1&8191,Q1=v1>>>13,C6=z[3]|0,F1=C6&8191,X1=C6>>>13,F6=z[4]|0,$1=F6&8191,t0=F6>>>13,_=z[5]|0,Y=_&8191,p0=_>>>13,E0=z[6]|0,z0=E0&8191,W0=E0>>>13,O1=z[7]|0,L1=O1&8191,D1=O1>>>13,c6=z[8]|0,N1=c6&8191,y6=c6>>>13,v5=z[9]|0,u6=v5&8191,x6=v5>>>13;k.negative=h.negative^I.negative,k.length=19,V=Math.imul(O,j0),S=Math.imul(O,s0),S=S+Math.imul(l0,j0)|0,b0=Math.imul(l0,s0);var O5=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(O5>>>26)|0,O5&=67108863,V=Math.imul(K,j0),S=Math.imul(K,s0),S=S+Math.imul(h0,j0)|0,b0=Math.imul(h0,s0),V=V+Math.imul(O,o1)|0,S=S+Math.imul(O,s1)|0,S=S+Math.imul(l0,o1)|0,b0=b0+Math.imul(l0,s1)|0;var v0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(v0>>>26)|0,v0&=67108863,V=Math.imul(T0,j0),S=Math.imul(T0,s0),S=S+Math.imul(m0,j0)|0,b0=Math.imul(m0,s0),V=V+Math.imul(K,o1)|0,S=S+Math.imul(K,s1)|0,S=S+Math.imul(h0,o1)|0,b0=b0+Math.imul(h0,s1)|0,V=V+Math.imul(O,d1)|0,S=S+Math.imul(O,Q1)|0,S=S+Math.imul(l0,d1)|0,b0=b0+Math.imul(l0,Q1)|0;var U0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(U0>>>26)|0,U0&=67108863,V=Math.imul(F0,j0),S=Math.imul(F0,s0),S=S+Math.imul(N0,j0)|0,b0=Math.imul(N0,s0),V=V+Math.imul(T0,o1)|0,S=S+Math.imul(T0,s1)|0,S=S+Math.imul(m0,o1)|0,b0=b0+Math.imul(m0,s1)|0,V=V+Math.imul(K,d1)|0,S=S+Math.imul(K,Q1)|0,S=S+Math.imul(h0,d1)|0,b0=b0+Math.imul(h0,Q1)|0,V=V+Math.imul(O,F1)|0,S=S+Math.imul(O,X1)|0,S=S+Math.imul(l0,F1)|0,b0=b0+Math.imul(l0,X1)|0;var D0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(D0>>>26)|0,D0&=67108863,V=Math.imul(J0,j0),S=Math.imul(J0,s0),S=S+Math.imul(t1,j0)|0,b0=Math.imul(t1,s0),V=V+Math.imul(F0,o1)|0,S=S+Math.imul(F0,s1)|0,S=S+Math.imul(N0,o1)|0,b0=b0+Math.imul(N0,s1)|0,V=V+Math.imul(T0,d1)|0,S=S+Math.imul(T0,Q1)|0,S=S+Math.imul(m0,d1)|0,b0=b0+Math.imul(m0,Q1)|0,V=V+Math.imul(K,F1)|0,S=S+Math.imul(K,X1)|0,S=S+Math.imul(h0,F1)|0,b0=b0+Math.imul(h0,X1)|0,V=V+Math.imul(O,$1)|0,S=S+Math.imul(O,t0)|0,S=S+Math.imul(l0,$1)|0,b0=b0+Math.imul(l0,t0)|0;var L0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(L0>>>26)|0,L0&=67108863,V=Math.imul(a1,j0),S=Math.imul(a1,s0),S=S+Math.imul(c0,j0)|0,b0=Math.imul(c0,s0),V=V+Math.imul(J0,o1)|0,S=S+Math.imul(J0,s1)|0,S=S+Math.imul(t1,o1)|0,b0=b0+Math.imul(t1,s1)|0,V=V+Math.imul(F0,d1)|0,S=S+Math.imul(F0,Q1)|0,S=S+Math.imul(N0,d1)|0,b0=b0+Math.imul(N0,Q1)|0,V=V+Math.imul(T0,F1)|0,S=S+Math.imul(T0,X1)|0,S=S+Math.imul(m0,F1)|0,b0=b0+Math.imul(m0,X1)|0,V=V+Math.imul(K,$1)|0,S=S+Math.imul(K,t0)|0,S=S+Math.imul(h0,$1)|0,b0=b0+Math.imul(h0,t0)|0,V=V+Math.imul(O,Y)|0,S=S+Math.imul(O,p0)|0,S=S+Math.imul(l0,Y)|0,b0=b0+Math.imul(l0,p0)|0;var f1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(f1>>>26)|0,f1&=67108863,V=Math.imul(I0,j0),S=Math.imul(I0,s0),S=S+Math.imul(H0,j0)|0,b0=Math.imul(H0,s0),V=V+Math.imul(a1,o1)|0,S=S+Math.imul(a1,s1)|0,S=S+Math.imul(c0,o1)|0,b0=b0+Math.imul(c0,s1)|0,V=V+Math.imul(J0,d1)|0,S=S+Math.imul(J0,Q1)|0,S=S+Math.imul(t1,d1)|0,b0=b0+Math.imul(t1,Q1)|0,V=V+Math.imul(F0,F1)|0,S=S+Math.imul(F0,X1)|0,S=S+Math.imul(N0,F1)|0,b0=b0+Math.imul(N0,X1)|0,V=V+Math.imul(T0,$1)|0,S=S+Math.imul(T0,t0)|0,S=S+Math.imul(m0,$1)|0,b0=b0+Math.imul(m0,t0)|0,V=V+Math.imul(K,Y)|0,S=S+Math.imul(K,p0)|0,S=S+Math.imul(h0,Y)|0,b0=b0+Math.imul(h0,p0)|0,V=V+Math.imul(O,z0)|0,S=S+Math.imul(O,W0)|0,S=S+Math.imul(l0,z0)|0,b0=b0+Math.imul(l0,W0)|0;var m1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(m1>>>26)|0,m1&=67108863,V=Math.imul(Y0,j0),S=Math.imul(Y0,s0),S=S+Math.imul(K0,j0)|0,b0=Math.imul(K0,s0),V=V+Math.imul(I0,o1)|0,S=S+Math.imul(I0,s1)|0,S=S+Math.imul(H0,o1)|0,b0=b0+Math.imul(H0,s1)|0,V=V+Math.imul(a1,d1)|0,S=S+Math.imul(a1,Q1)|0,S=S+Math.imul(c0,d1)|0,b0=b0+Math.imul(c0,Q1)|0,V=V+Math.imul(J0,F1)|0,S=S+Math.imul(J0,X1)|0,S=S+Math.imul(t1,F1)|0,b0=b0+Math.imul(t1,X1)|0,V=V+Math.imul(F0,$1)|0,S=S+Math.imul(F0,t0)|0,S=S+Math.imul(N0,$1)|0,b0=b0+Math.imul(N0,t0)|0,V=V+Math.imul(T0,Y)|0,S=S+Math.imul(T0,p0)|0,S=S+Math.imul(m0,Y)|0,b0=b0+Math.imul(m0,p0)|0,V=V+Math.imul(K,z0)|0,S=S+Math.imul(K,W0)|0,S=S+Math.imul(h0,z0)|0,b0=b0+Math.imul(h0,W0)|0,V=V+Math.imul(O,L1)|0,S=S+Math.imul(O,D1)|0,S=S+Math.imul(l0,L1)|0,b0=b0+Math.imul(l0,D1)|0;var h1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(h1>>>26)|0,h1&=67108863,V=Math.imul(u1,j0),S=Math.imul(u1,s0),S=S+Math.imul(X,j0)|0,b0=Math.imul(X,s0),V=V+Math.imul(Y0,o1)|0,S=S+Math.imul(Y0,s1)|0,S=S+Math.imul(K0,o1)|0,b0=b0+Math.imul(K0,s1)|0,V=V+Math.imul(I0,d1)|0,S=S+Math.imul(I0,Q1)|0,S=S+Math.imul(H0,d1)|0,b0=b0+Math.imul(H0,Q1)|0,V=V+Math.imul(a1,F1)|0,S=S+Math.imul(a1,X1)|0,S=S+Math.imul(c0,F1)|0,b0=b0+Math.imul(c0,X1)|0,V=V+Math.imul(J0,$1)|0,S=S+Math.imul(J0,t0)|0,S=S+Math.imul(t1,$1)|0,b0=b0+Math.imul(t1,t0)|0,V=V+Math.imul(F0,Y)|0,S=S+Math.imul(F0,p0)|0,S=S+Math.imul(N0,Y)|0,b0=b0+Math.imul(N0,p0)|0,V=V+Math.imul(T0,z0)|0,S=S+Math.imul(T0,W0)|0,S=S+Math.imul(m0,z0)|0,b0=b0+Math.imul(m0,W0)|0,V=V+Math.imul(K,L1)|0,S=S+Math.imul(K,D1)|0,S=S+Math.imul(h0,L1)|0,b0=b0+Math.imul(h0,D1)|0,V=V+Math.imul(O,N1)|0,S=S+Math.imul(O,y6)|0,S=S+Math.imul(l0,N1)|0,b0=b0+Math.imul(l0,y6)|0;var E1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(E1>>>26)|0,E1&=67108863,V=Math.imul(Q,j0),S=Math.imul(Q,s0),S=S+Math.imul(r0,j0)|0,b0=Math.imul(r0,s0),V=V+Math.imul(u1,o1)|0,S=S+Math.imul(u1,s1)|0,S=S+Math.imul(X,o1)|0,b0=b0+Math.imul(X,s1)|0,V=V+Math.imul(Y0,d1)|0,S=S+Math.imul(Y0,Q1)|0,S=S+Math.imul(K0,d1)|0,b0=b0+Math.imul(K0,Q1)|0,V=V+Math.imul(I0,F1)|0,S=S+Math.imul(I0,X1)|0,S=S+Math.imul(H0,F1)|0,b0=b0+Math.imul(H0,X1)|0,V=V+Math.imul(a1,$1)|0,S=S+Math.imul(a1,t0)|0,S=S+Math.imul(c0,$1)|0,b0=b0+Math.imul(c0,t0)|0,V=V+Math.imul(J0,Y)|0,S=S+Math.imul(J0,p0)|0,S=S+Math.imul(t1,Y)|0,b0=b0+Math.imul(t1,p0)|0,V=V+Math.imul(F0,z0)|0,S=S+Math.imul(F0,W0)|0,S=S+Math.imul(N0,z0)|0,b0=b0+Math.imul(N0,W0)|0,V=V+Math.imul(T0,L1)|0,S=S+Math.imul(T0,D1)|0,S=S+Math.imul(m0,L1)|0,b0=b0+Math.imul(m0,D1)|0,V=V+Math.imul(K,N1)|0,S=S+Math.imul(K,y6)|0,S=S+Math.imul(h0,N1)|0,b0=b0+Math.imul(h0,y6)|0,V=V+Math.imul(O,u6)|0,S=S+Math.imul(O,x6)|0,S=S+Math.imul(l0,u6)|0,b0=b0+Math.imul(l0,x6)|0;var Z1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(Z1>>>26)|0,Z1&=67108863,V=Math.imul(Q,o1),S=Math.imul(Q,s1),S=S+Math.imul(r0,o1)|0,b0=Math.imul(r0,s1),V=V+Math.imul(u1,d1)|0,S=S+Math.imul(u1,Q1)|0,S=S+Math.imul(X,d1)|0,b0=b0+Math.imul(X,Q1)|0,V=V+Math.imul(Y0,F1)|0,S=S+Math.imul(Y0,X1)|0,S=S+Math.imul(K0,F1)|0,b0=b0+Math.imul(K0,X1)|0,V=V+Math.imul(I0,$1)|0,S=S+Math.imul(I0,t0)|0,S=S+Math.imul(H0,$1)|0,b0=b0+Math.imul(H0,t0)|0,V=V+Math.imul(a1,Y)|0,S=S+Math.imul(a1,p0)|0,S=S+Math.imul(c0,Y)|0,b0=b0+Math.imul(c0,p0)|0,V=V+Math.imul(J0,z0)|0,S=S+Math.imul(J0,W0)|0,S=S+Math.imul(t1,z0)|0,b0=b0+Math.imul(t1,W0)|0,V=V+Math.imul(F0,L1)|0,S=S+Math.imul(F0,D1)|0,S=S+Math.imul(N0,L1)|0,b0=b0+Math.imul(N0,D1)|0,V=V+Math.imul(T0,N1)|0,S=S+Math.imul(T0,y6)|0,S=S+Math.imul(m0,N1)|0,b0=b0+Math.imul(m0,y6)|0,V=V+Math.imul(K,u6)|0,S=S+Math.imul(K,x6)|0,S=S+Math.imul(h0,u6)|0,b0=b0+Math.imul(h0,x6)|0;var K1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(K1>>>26)|0,K1&=67108863,V=Math.imul(Q,d1),S=Math.imul(Q,Q1),S=S+Math.imul(r0,d1)|0,b0=Math.imul(r0,Q1),V=V+Math.imul(u1,F1)|0,S=S+Math.imul(u1,X1)|0,S=S+Math.imul(X,F1)|0,b0=b0+Math.imul(X,X1)|0,V=V+Math.imul(Y0,$1)|0,S=S+Math.imul(Y0,t0)|0,S=S+Math.imul(K0,$1)|0,b0=b0+Math.imul(K0,t0)|0,V=V+Math.imul(I0,Y)|0,S=S+Math.imul(I0,p0)|0,S=S+Math.imul(H0,Y)|0,b0=b0+Math.imul(H0,p0)|0,V=V+Math.imul(a1,z0)|0,S=S+Math.imul(a1,W0)|0,S=S+Math.imul(c0,z0)|0,b0=b0+Math.imul(c0,W0)|0,V=V+Math.imul(J0,L1)|0,S=S+Math.imul(J0,D1)|0,S=S+Math.imul(t1,L1)|0,b0=b0+Math.imul(t1,D1)|0,V=V+Math.imul(F0,N1)|0,S=S+Math.imul(F0,y6)|0,S=S+Math.imul(N0,N1)|0,b0=b0+Math.imul(N0,y6)|0,V=V+Math.imul(T0,u6)|0,S=S+Math.imul(T0,x6)|0,S=S+Math.imul(m0,u6)|0,b0=b0+Math.imul(m0,x6)|0;var Y1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(Y1>>>26)|0,Y1&=67108863,V=Math.imul(Q,F1),S=Math.imul(Q,X1),S=S+Math.imul(r0,F1)|0,b0=Math.imul(r0,X1),V=V+Math.imul(u1,$1)|0,S=S+Math.imul(u1,t0)|0,S=S+Math.imul(X,$1)|0,b0=b0+Math.imul(X,t0)|0,V=V+Math.imul(Y0,Y)|0,S=S+Math.imul(Y0,p0)|0,S=S+Math.imul(K0,Y)|0,b0=b0+Math.imul(K0,p0)|0,V=V+Math.imul(I0,z0)|0,S=S+Math.imul(I0,W0)|0,S=S+Math.imul(H0,z0)|0,b0=b0+Math.imul(H0,W0)|0,V=V+Math.imul(a1,L1)|0,S=S+Math.imul(a1,D1)|0,S=S+Math.imul(c0,L1)|0,b0=b0+Math.imul(c0,D1)|0,V=V+Math.imul(J0,N1)|0,S=S+Math.imul(J0,y6)|0,S=S+Math.imul(t1,N1)|0,b0=b0+Math.imul(t1,y6)|0,V=V+Math.imul(F0,u6)|0,S=S+Math.imul(F0,x6)|0,S=S+Math.imul(N0,u6)|0,b0=b0+Math.imul(N0,x6)|0;var E6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(E6>>>26)|0,E6&=67108863,V=Math.imul(Q,$1),S=Math.imul(Q,t0),S=S+Math.imul(r0,$1)|0,b0=Math.imul(r0,t0),V=V+Math.imul(u1,Y)|0,S=S+Math.imul(u1,p0)|0,S=S+Math.imul(X,Y)|0,b0=b0+Math.imul(X,p0)|0,V=V+Math.imul(Y0,z0)|0,S=S+Math.imul(Y0,W0)|0,S=S+Math.imul(K0,z0)|0,b0=b0+Math.imul(K0,W0)|0,V=V+Math.imul(I0,L1)|0,S=S+Math.imul(I0,D1)|0,S=S+Math.imul(H0,L1)|0,b0=b0+Math.imul(H0,D1)|0,V=V+Math.imul(a1,N1)|0,S=S+Math.imul(a1,y6)|0,S=S+Math.imul(c0,N1)|0,b0=b0+Math.imul(c0,y6)|0,V=V+Math.imul(J0,u6)|0,S=S+Math.imul(J0,x6)|0,S=S+Math.imul(t1,u6)|0,b0=b0+Math.imul(t1,x6)|0;var I6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(I6>>>26)|0,I6&=67108863,V=Math.imul(Q,Y),S=Math.imul(Q,p0),S=S+Math.imul(r0,Y)|0,b0=Math.imul(r0,p0),V=V+Math.imul(u1,z0)|0,S=S+Math.imul(u1,W0)|0,S=S+Math.imul(X,z0)|0,b0=b0+Math.imul(X,W0)|0,V=V+Math.imul(Y0,L1)|0,S=S+Math.imul(Y0,D1)|0,S=S+Math.imul(K0,L1)|0,b0=b0+Math.imul(K0,D1)|0,V=V+Math.imul(I0,N1)|0,S=S+Math.imul(I0,y6)|0,S=S+Math.imul(H0,N1)|0,b0=b0+Math.imul(H0,y6)|0,V=V+Math.imul(a1,u6)|0,S=S+Math.imul(a1,x6)|0,S=S+Math.imul(c0,u6)|0,b0=b0+Math.imul(c0,x6)|0;var v6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(v6>>>26)|0,v6&=67108863,V=Math.imul(Q,z0),S=Math.imul(Q,W0),S=S+Math.imul(r0,z0)|0,b0=Math.imul(r0,W0),V=V+Math.imul(u1,L1)|0,S=S+Math.imul(u1,D1)|0,S=S+Math.imul(X,L1)|0,b0=b0+Math.imul(X,D1)|0,V=V+Math.imul(Y0,N1)|0,S=S+Math.imul(Y0,y6)|0,S=S+Math.imul(K0,N1)|0,b0=b0+Math.imul(K0,y6)|0,V=V+Math.imul(I0,u6)|0,S=S+Math.imul(I0,x6)|0,S=S+Math.imul(H0,u6)|0,b0=b0+Math.imul(H0,x6)|0;var r6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(r6>>>26)|0,r6&=67108863,V=Math.imul(Q,L1),S=Math.imul(Q,D1),S=S+Math.imul(r0,L1)|0,b0=Math.imul(r0,D1),V=V+Math.imul(u1,N1)|0,S=S+Math.imul(u1,y6)|0,S=S+Math.imul(X,N1)|0,b0=b0+Math.imul(X,y6)|0,V=V+Math.imul(Y0,u6)|0,S=S+Math.imul(Y0,x6)|0,S=S+Math.imul(K0,u6)|0,b0=b0+Math.imul(K0,x6)|0;var b6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(b6>>>26)|0,b6&=67108863,V=Math.imul(Q,N1),S=Math.imul(Q,y6),S=S+Math.imul(r0,N1)|0,b0=Math.imul(r0,y6),V=V+Math.imul(u1,u6)|0,S=S+Math.imul(u1,x6)|0,S=S+Math.imul(X,u6)|0,b0=b0+Math.imul(X,x6)|0;var k6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(k6>>>26)|0,k6&=67108863,V=Math.imul(Q,u6),S=Math.imul(Q,x6),S=S+Math.imul(r0,u6)|0,b0=Math.imul(r0,x6);var S6=(e0+V|0)+((S&8191)<<13)|0;return e0=(b0+(S>>>13)|0)+(S6>>>26)|0,S6&=67108863,q[0]=O5,q[1]=v0,q[2]=U0,q[3]=D0,q[4]=L0,q[5]=f1,q[6]=m1,q[7]=h1,q[8]=E1,q[9]=Z1,q[10]=K1,q[11]=Y1,q[12]=E6,q[13]=I6,q[14]=v6,q[15]=r6,q[16]=b6,q[17]=k6,q[18]=S6,e0!==0&&(q[19]=e0,k.length++),k};Math.imul||(N=D);function T(F,h,I){I.negative=h.negative^F.negative,I.length=F.length+h.length;for(var k=0,R=0,z=0;z<I.length-1;z++){var q=R;R=0;for(var e0=k&67108863,V=Math.min(z,h.length-1),S=Math.max(0,z-F.length+1);S<=V;S++){var b0=z-S,x0=F.words[b0]|0,O=h.words[S]|0,l0=x0*O,f0=l0&67108863;q=q+(l0/67108864|0)|0,f0=f0+e0|0,e0=f0&67108863,q=q+(f0>>>26)|0,R+=q>>>26,q&=67108863}I.words[z]=e0,k=q,q=R}return k!==0?I.words[z]=k:I.length--,I._strip()}function j(F,h,I){return T(F,h,I)}f.prototype.mulTo=function(h,I){var k,R=this.length+h.length;return this.length===10&&h.length===10?k=N(this,h,I):R<63?k=D(this,h,I):R<1024?k=T(this,h,I):k=j(this,h,I),k},f.prototype.mul=function(h){var I=new f(null);return I.words=new Array(this.length+h.length),this.mulTo(h,I)},f.prototype.mulf=function(h){var I=new f(null);return I.words=new Array(this.length+h.length),j(this,h,I)},f.prototype.imul=function(h){return this.clone().mulTo(h,this)},f.prototype.imuln=function(h){var I=h<0;I&&(h=-h),n(typeof h=="number"),n(h<67108864);for(var k=0,R=0;R<this.length;R++){var z=(this.words[R]|0)*h,q=(z&67108863)+(k&67108863);k>>=26,k+=z/67108864|0,k+=q>>>26,this.words[R]=q&67108863}return k!==0&&(this.words[R]=k,this.length++),this.length=h===0?1:this.length,I?this.ineg():this},f.prototype.muln=function(h){return this.clone().imuln(h)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(h){var I=w(h);if(I.length===0)return new f(1);for(var k=this,R=0;R<I.length&&I[R]===0;R++,k=k.sqr());if(++R<I.length)for(var z=k.sqr();R<I.length;R++,z=z.sqr())I[R]!==0&&(k=k.mul(z));return k},f.prototype.iushln=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26,R=67108863>>>26-I<<26-I,z;if(I!==0){var q=0;for(z=0;z<this.length;z++){var e0=this.words[z]&R,V=(this.words[z]|0)-e0<<I;this.words[z]=V|q,q=e0>>>26-I}q&&(this.words[z]=q,this.length++)}if(k!==0){for(z=this.length-1;z>=0;z--)this.words[z+k]=this.words[z];for(z=0;z<k;z++)this.words[z]=0;this.length+=k}return this._strip()},f.prototype.ishln=function(h){return n(this.negative===0),this.iushln(h)},f.prototype.iushrn=function(h,I,k){n(typeof h=="number"&&h>=0);var R;I?R=(I-I%26)/26:R=0;var z=h%26,q=Math.min((h-z)/26,this.length),e0=67108863^67108863>>>z<<z,V=k;if(R-=q,R=Math.max(0,R),V){for(var S=0;S<q;S++)V.words[S]=this.words[S];V.length=q}if(q!==0)if(this.length>q)for(this.length-=q,S=0;S<this.length;S++)this.words[S]=this.words[S+q];else this.words[0]=0,this.length=1;var b0=0;for(S=this.length-1;S>=0&&(b0!==0||S>=R);S--){var x0=this.words[S]|0;this.words[S]=b0<<26-z|x0>>>z,b0=x0&e0}return V&&b0!==0&&(V.words[V.length++]=b0),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(h,I,k){return n(this.negative===0),this.iushrn(h,I,k)},f.prototype.shln=function(h){return this.clone().ishln(h)},f.prototype.ushln=function(h){return this.clone().iushln(h)},f.prototype.shrn=function(h){return this.clone().ishrn(h)},f.prototype.ushrn=function(h){return this.clone().iushrn(h)},f.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26,R=1<<I;if(this.length<=k)return!1;var z=this.words[k];return!!(z&R)},f.prototype.imaskn=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=k)return this;if(I!==0&&k++,this.length=Math.min(k,this.length),I!==0){var R=67108863^67108863>>>I<<I;this.words[this.length-1]&=R}return this._strip()},f.prototype.maskn=function(h){return this.clone().imaskn(h)},f.prototype.iaddn=function(h){return n(typeof h=="number"),n(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<=h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},f.prototype._iaddn=function(h){this.words[0]+=h;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},f.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this._strip()},f.prototype.addn=function(h){return this.clone().iaddn(h)},f.prototype.subn=function(h){return this.clone().isubn(h)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(h,I,k){var R=h.length+k,z;this._expand(R);var q,e0=0;for(z=0;z<h.length;z++){q=(this.words[z+k]|0)+e0;var V=(h.words[z]|0)*I;q-=V&67108863,e0=(q>>26)-(V/67108864|0),this.words[z+k]=q&67108863}for(;z<this.length-k;z++)q=(this.words[z+k]|0)+e0,e0=q>>26,this.words[z+k]=q&67108863;if(e0===0)return this._strip();for(n(e0===-1),e0=0,z=0;z<this.length;z++)q=-(this.words[z]|0)+e0,e0=q>>26,this.words[z]=q&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(h,I){var k=this.length-h.length,R=this.clone(),z=h,q=z.words[z.length-1]|0,e0=this._countBits(q);k=26-e0,k!==0&&(z=z.ushln(k),R.iushln(k),q=z.words[z.length-1]|0);var V=R.length-z.length,S;if(I!=="mod"){S=new f(null),S.length=V+1,S.words=new Array(S.length);for(var b0=0;b0<S.length;b0++)S.words[b0]=0}var x0=R.clone()._ishlnsubmul(z,1,V);x0.negative===0&&(R=x0,S&&(S.words[V]=1));for(var O=V-1;O>=0;O--){var l0=(R.words[z.length+O]|0)*67108864+(R.words[z.length+O-1]|0);for(l0=Math.min(l0/q|0,67108863),R._ishlnsubmul(z,l0,O);R.negative!==0;)l0--,R.negative=0,R._ishlnsubmul(z,1,O),R.isZero()||(R.negative^=1);S&&(S.words[O]=l0)}return S&&S._strip(),R._strip(),I!=="div"&&k!==0&&R.iushrn(k),{div:S||null,mod:R}},f.prototype.divmod=function(h,I,k){if(n(!h.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var R,z,q;return this.negative!==0&&h.negative===0?(q=this.neg().divmod(h,I),I!=="mod"&&(R=q.div.neg()),I!=="div"&&(z=q.mod.neg(),k&&z.negative!==0&&z.iadd(h)),{div:R,mod:z}):this.negative===0&&h.negative!==0?(q=this.divmod(h.neg(),I),I!=="mod"&&(R=q.div.neg()),{div:R,mod:q.mod}):(this.negative&h.negative)!==0?(q=this.neg().divmod(h.neg(),I),I!=="div"&&(z=q.mod.neg(),k&&z.negative!==0&&z.isub(h)),{div:q.div,mod:z}):h.length>this.length||this.cmp(h)<0?{div:new f(0),mod:this}:h.length===1?I==="div"?{div:this.divn(h.words[0]),mod:null}:I==="mod"?{div:null,mod:new f(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new f(this.modrn(h.words[0]))}:this._wordDiv(h,I)},f.prototype.div=function(h){return this.divmod(h,"div",!1).div},f.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},f.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},f.prototype.divRound=function(h){var I=this.divmod(h);if(I.mod.isZero())return I.div;var k=I.div.negative!==0?I.mod.isub(h):I.mod,R=h.ushrn(1),z=h.andln(1),q=k.cmp(R);return q<0||z===1&&q===0?I.div:I.div.negative!==0?I.div.isubn(1):I.div.iaddn(1)},f.prototype.modrn=function(h){var I=h<0;I&&(h=-h),n(h<=67108863);for(var k=(1<<26)%h,R=0,z=this.length-1;z>=0;z--)R=(k*R+(this.words[z]|0))%h;return I?-R:R},f.prototype.modn=function(h){return this.modrn(h)},f.prototype.idivn=function(h){var I=h<0;I&&(h=-h),n(h<=67108863);for(var k=0,R=this.length-1;R>=0;R--){var z=(this.words[R]|0)+k*67108864;this.words[R]=z/h|0,k=z%h}return this._strip(),I?this.ineg():this},f.prototype.divn=function(h){return this.clone().idivn(h)},f.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var I=this,k=h.clone();I.negative!==0?I=I.umod(h):I=I.clone();for(var R=new f(1),z=new f(0),q=new f(0),e0=new f(1),V=0;I.isEven()&&k.isEven();)I.iushrn(1),k.iushrn(1),++V;for(var S=k.clone(),b0=I.clone();!I.isZero();){for(var x0=0,O=1;(I.words[0]&O)===0&&x0<26;++x0,O<<=1);if(x0>0)for(I.iushrn(x0);x0-- >0;)(R.isOdd()||z.isOdd())&&(R.iadd(S),z.isub(b0)),R.iushrn(1),z.iushrn(1);for(var l0=0,f0=1;(k.words[0]&f0)===0&&l0<26;++l0,f0<<=1);if(l0>0)for(k.iushrn(l0);l0-- >0;)(q.isOdd()||e0.isOdd())&&(q.iadd(S),e0.isub(b0)),q.iushrn(1),e0.iushrn(1);I.cmp(k)>=0?(I.isub(k),R.isub(q),z.isub(e0)):(k.isub(I),q.isub(R),e0.isub(z))}return{a:q,b:e0,gcd:k.iushln(V)}},f.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var I=this,k=h.clone();I.negative!==0?I=I.umod(h):I=I.clone();for(var R=new f(1),z=new f(0),q=k.clone();I.cmpn(1)>0&&k.cmpn(1)>0;){for(var e0=0,V=1;(I.words[0]&V)===0&&e0<26;++e0,V<<=1);if(e0>0)for(I.iushrn(e0);e0-- >0;)R.isOdd()&&R.iadd(q),R.iushrn(1);for(var S=0,b0=1;(k.words[0]&b0)===0&&S<26;++S,b0<<=1);if(S>0)for(k.iushrn(S);S-- >0;)z.isOdd()&&z.iadd(q),z.iushrn(1);I.cmp(k)>=0?(I.isub(k),R.isub(z)):(k.isub(I),z.isub(R))}var x0;return I.cmpn(1)===0?x0=R:x0=z,x0.cmpn(0)<0&&x0.iadd(h),x0},f.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var I=this.clone(),k=h.clone();I.negative=0,k.negative=0;for(var R=0;I.isEven()&&k.isEven();R++)I.iushrn(1),k.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;k.isEven();)k.iushrn(1);var z=I.cmp(k);if(z<0){var q=I;I=k,k=q}else if(z===0||k.cmpn(1)===0)break;I.isub(k)}while(!0);return k.iushln(R)},f.prototype.invm=function(h){return this.egcd(h).a.umod(h)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(h){return this.words[0]&h},f.prototype.bincn=function(h){n(typeof h=="number");var I=h%26,k=(h-I)/26,R=1<<I;if(this.length<=k)return this._expand(k+1),this.words[k]|=R,this;for(var z=R,q=k;z!==0&&q<this.length;q++){var e0=this.words[q]|0;e0+=z,z=e0>>>26,e0&=67108863,this.words[q]=e0}return z!==0&&(this.words[q]=z,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(h){var I=h<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this._strip();var k;if(this.length>1)k=1;else{I&&(h=-h),n(h<=67108863,"Number is too big");var R=this.words[0]|0;k=R===h?0:R<h?-1:1}return this.negative!==0?-k|0:k},f.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var I=this.ucmp(h);return this.negative!==0?-I|0:I},f.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var I=0,k=this.length-1;k>=0;k--){var R=this.words[k]|0,z=h.words[k]|0;if(R!==z){R<z?I=-1:R>z&&(I=1);break}}return I},f.prototype.gtn=function(h){return this.cmpn(h)===1},f.prototype.gt=function(h){return this.cmp(h)===1},f.prototype.gten=function(h){return this.cmpn(h)>=0},f.prototype.gte=function(h){return this.cmp(h)>=0},f.prototype.ltn=function(h){return this.cmpn(h)===-1},f.prototype.lt=function(h){return this.cmp(h)===-1},f.prototype.lten=function(h){return this.cmpn(h)<=0},f.prototype.lte=function(h){return this.cmp(h)<=0},f.prototype.eqn=function(h){return this.cmpn(h)===0},f.prototype.eq=function(h){return this.cmp(h)===0},f.red=function(h){return new y0(h)},f.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},f.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(h){return this.red=h,this},f.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},f.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},f.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},f.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},f.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},f.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},f.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},f.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},f.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var C={k256:null,p224:null,p192:null,p25519:null};function G(F,h){this.name=F,this.p=new f(h,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var h=new f(null);return h.words=new Array(Math.ceil(this.n/13)),h},G.prototype.ireduce=function(h){var I=h,k;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),k=I.bitLength();while(k>this.n);var R=k<this.n?-1:I.ucmp(this.p);return R===0?(I.words[0]=0,I.length=1):R>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},G.prototype.split=function(h,I){h.iushrn(this.n,0,I)},G.prototype.imulK=function(h){return h.imul(this.k)};function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(W,G),W.prototype.split=function(h,I){for(var k=4194303,R=Math.min(h.length,9),z=0;z<R;z++)I.words[z]=h.words[z];if(I.length=R,h.length<=9){h.words[0]=0,h.length=1;return}var q=h.words[9];for(I.words[I.length++]=q&k,z=10;z<h.length;z++){var e0=h.words[z]|0;h.words[z-10]=(e0&k)<<4|q>>>22,q=e0}q>>>=22,h.words[z-10]=q,q===0&&h.length>10?h.length-=10:h.length-=9},W.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var I=0,k=0;k<h.length;k++){var R=h.words[k]|0;I+=R*977,h.words[k]=I&67108863,I=R*64+(I/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function Z(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Z,G);function d0(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(d0,G);function n0(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(n0,G),n0.prototype.imulK=function(h){for(var I=0,k=0;k<h.length;k++){var R=(h.words[k]|0)*19+I,z=R&67108863;R>>>=26,h.words[k]=z,I=R}return I!==0&&(h.words[h.length++]=I),h},f._prime=function(h){if(C[h])return C[h];var I;if(h==="k256")I=new W;else if(h==="p224")I=new Z;else if(h==="p192")I=new d0;else if(h==="p25519")I=new n0;else throw new Error("Unknown prime "+h);return C[h]=I,I};function y0(F){if(typeof F=="string"){var h=f._prime(F);this.m=h.p,this.prime=h}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}y0.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},y0.prototype._verify2=function(h,I){n((h.negative|I.negative)===0,"red works only with positives"),n(h.red&&h.red===I.red,"red works only with red numbers")},y0.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(y(h,h.umod(this.m)._forceRed(this)),h)},y0.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},y0.prototype.add=function(h,I){this._verify2(h,I);var k=h.add(I);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},y0.prototype.iadd=function(h,I){this._verify2(h,I);var k=h.iadd(I);return k.cmp(this.m)>=0&&k.isub(this.m),k},y0.prototype.sub=function(h,I){this._verify2(h,I);var k=h.sub(I);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},y0.prototype.isub=function(h,I){this._verify2(h,I);var k=h.isub(I);return k.cmpn(0)<0&&k.iadd(this.m),k},y0.prototype.shl=function(h,I){return this._verify1(h),this.imod(h.ushln(I))},y0.prototype.imul=function(h,I){return this._verify2(h,I),this.imod(h.imul(I))},y0.prototype.mul=function(h,I){return this._verify2(h,I),this.imod(h.mul(I))},y0.prototype.isqr=function(h){return this.imul(h,h.clone())},y0.prototype.sqr=function(h){return this.mul(h,h)},y0.prototype.sqrt=function(h){if(h.isZero())return h.clone();var I=this.m.andln(3);if(n(I%2===1),I===3){var k=this.m.add(new f(1)).iushrn(2);return this.pow(h,k)}for(var R=this.m.subn(1),z=0;!R.isZero()&&R.andln(1)===0;)z++,R.iushrn(1);n(!R.isZero());var q=new f(1).toRed(this),e0=q.redNeg(),V=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new f(2*S*S).toRed(this);this.pow(S,V).cmp(e0)!==0;)S.redIAdd(e0);for(var b0=this.pow(S,R),x0=this.pow(h,R.addn(1).iushrn(1)),O=this.pow(h,R),l0=z;O.cmp(q)!==0;){for(var f0=O,K=0;f0.cmp(q)!==0;K++)f0=f0.redSqr();n(K<l0);var h0=this.pow(b0,new f(1).iushln(l0-K-1));x0=x0.redMul(h0),b0=h0.redSqr(),O=O.redMul(b0),l0=K}return x0},y0.prototype.invm=function(h){var I=h._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},y0.prototype.pow=function(h,I){if(I.isZero())return new f(1).toRed(this);if(I.cmpn(1)===0)return h.clone();var k=4,R=new Array(1<<k);R[0]=new f(1).toRed(this),R[1]=h;for(var z=2;z<R.length;z++)R[z]=this.mul(R[z-1],h);var q=R[0],e0=0,V=0,S=I.bitLength()%26;for(S===0&&(S=26),z=I.length-1;z>=0;z--){for(var b0=I.words[z],x0=S-1;x0>=0;x0--){var O=b0>>x0&1;if(q!==R[0]&&(q=this.sqr(q)),O===0&&e0===0){V=0;continue}e0<<=1,e0|=O,V++,!(V!==k&&(z!==0||x0!==0))&&(q=this.mul(q,R[e0]),V=0,e0=0)}S=26}return q},y0.prototype.convertTo=function(h){var I=h.umod(this.m);return I===h?I.clone():I},y0.prototype.convertFrom=function(h){var I=h.clone();return I.red=null,I},f.mont=function(h){return new H(h)};function H(F){y0.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b(H,y0),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var I=this.imod(h.mul(this.rinv));return I.red=null,I},H.prototype.imul=function(h,I){if(h.isZero()||I.isZero())return h.words[0]=0,h.length=1,h;var k=h.imul(I),R=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=k.isub(R).iushrn(this.shift),q=z;return z.cmp(this.m)>=0?q=z.isub(this.m):z.cmpn(0)<0&&(q=z.iadd(this.m)),q._forceRed(this)},H.prototype.mul=function(h,I){if(h.isZero()||I.isZero())return new f(0)._forceRed(this);var k=h.mul(I),R=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=k.isub(R).iushrn(this.shift),q=z;return z.cmp(this.m)>=0?q=z.isub(this.m):z.cmpn(0)<0&&(q=z.iadd(this.m)),q._forceRed(this)},H.prototype.invm=function(h){var I=this.imod(h._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(t,_C)})(Wr)),Wr.exports}var PC=BC();const q1=Y8(PC),UC="logger/5.8.0";let up=!1,lp=!1;const Hr={debug:1,default:2,info:2,warning:3,error:4,off:5};let pp=Hr.default,eo=null;function RC(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const yp=RC();var s7;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(s7||(s7={}));var p2;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(p2||(p2={}));const mp="0123456789abcdef";class R0{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,a){const n=e.toLowerCase();Hr[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(pp>Hr[n])&&console.log.apply(console,a)}debug(...e){this._log(R0.levels.DEBUG,e)}info(...e){this._log(R0.levels.INFO,e)}warn(...e){this._log(R0.levels.WARNING,e)}makeError(e,a,n){if(lp)return this.makeError("censored error",a,{});a||(a=R0.errors.UNKNOWN_ERROR),n||(n={});const b=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let y="";for(let m=0;m<l.length;m++)y+=mp[l[m]>>4],y+=mp[l[m]&15];b.push(u+"=Uint8Array(0x"+y+")")}else b.push(u+"="+JSON.stringify(l))}catch{b.push(u+"="+JSON.stringify(n[u].toString()))}}),b.push(`code=${a}`),b.push(`version=${this.version}`);const f=e;let r="";switch(a){case p2.NUMERIC_FAULT:{r="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":r+="-"+u;break;case"negative-power":case"negative-width":r+="-unsupported";break;case"unbound-bitwise-result":r+="-unbound-result";break}break}case p2.CALL_EXCEPTION:case p2.INSUFFICIENT_FUNDS:case p2.MISSING_NEW:case p2.NONCE_EXPIRED:case p2.REPLACEMENT_UNDERPRICED:case p2.TRANSACTION_REPLACED:case p2.UNPREDICTABLE_GAS_LIMIT:r=a;break}r&&(e+=" [ See: https://links.ethers.org/v5-errors-"+r+" ]"),b.length&&(e+=" ("+b.join(", ")+")");const c=new Error(e);return c.reason=f,c.code=a,Object.keys(n).forEach(function(u){c[u]=n[u]}),c}throwError(e,a,n){throw this.makeError(e,a,n)}throwArgumentError(e,a,n){return this.throwError(e,R0.errors.INVALID_ARGUMENT,{argument:a,value:n})}assert(e,a,n,b){e||this.throwError(a,n,b)}assertArgument(e,a,n,b){e||this.throwArgumentError(a,n,b)}checkNormalize(e){yp&&this.throwError("platform missing String.prototype.normalize",R0.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:yp})}checkSafeUint53(e,a){typeof e=="number"&&(a==null&&(a="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(a,R0.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(a,R0.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,a,n){n?n=": "+n:n="",e<a&&this.throwError("missing argument"+n,R0.errors.MISSING_ARGUMENT,{count:e,expectedCount:a}),e>a&&this.throwError("too many arguments"+n,R0.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:a})}checkNew(e,a){(e===Object||e==null)&&this.throwError("missing new",R0.errors.MISSING_NEW,{name:a.name})}checkAbstract(e,a){e===a?this.throwError("cannot instantiate abstract class "+JSON.stringify(a.name)+" directly; use a sub-class",R0.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",R0.errors.MISSING_NEW,{name:a.name})}static globalLogger(){return eo||(eo=new R0(UC)),eo}static setCensorship(e,a){if(!e&&a&&this.globalLogger().throwError("cannot permanently disable censorship",R0.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),up){if(!e)return;this.globalLogger().throwError("error censorship permanent",R0.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}lp=!!e,up=!!a}static setLogLevel(e){const a=Hr[e.toLowerCase()];if(a==null){R0.globalLogger().warn("invalid log level - "+e);return}pp=a}static from(e){return new R0(e)}}R0.errors=p2;R0.levels=s7;const QC="bytes/5.8.0",y5=new R0(QC);function hg(t){return!!t.toHexString}function O9(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return O9(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ds(t){return z6(t)&&!(t.length%2)||Z9(t)}function hp(t){return typeof t=="number"&&t==t&&t%1===0}function Z9(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!hp(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const a=t[e];if(!hp(a)||a<0||a>=256)return!1}return!0}function R1(t,e){if(e||(e={}),typeof t=="number"){y5.checkSafeUint53(t,"invalid arrayify value");const a=[];for(;t;)a.unshift(t&255),t=parseInt(String(t/256));return a.length===0&&a.push(0),O9(new Uint8Array(a))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),hg(t)&&(t=t.toHexString()),z6(t)){let a=t.substring(2);a.length%2&&(e.hexPad==="left"?a="0"+a:e.hexPad==="right"?a+="0":y5.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let b=0;b<a.length;b+=2)n.push(parseInt(a.substring(b,b+2),16));return O9(new Uint8Array(n))}return Z9(t)?O9(new Uint8Array(t)):y5.throwArgumentError("invalid arrayify value","value",t)}function I8(t){const e=t.map(b=>R1(b)),a=e.reduce((b,f)=>b+f.length,0),n=new Uint8Array(a);return e.reduce((b,f)=>(n.set(f,b),b+f.length),0),O9(n)}function Q9(t){let e=R1(t);if(e.length===0)return e;let a=0;for(;a<e.length&&e[a]===0;)a++;return a&&(e=e.slice(a)),e}function FC(t,e){t=R1(t),t.length>e&&y5.throwArgumentError("value out of range","value",arguments[0]);const a=new Uint8Array(e);return a.set(t,e-t.length),O9(a)}function z6(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const to="0123456789abcdef";function _1(t,e){if(e||(e={}),typeof t=="number"){y5.checkSafeUint53(t,"invalid hexlify value");let a="";for(;t;)a=to[t&15]+a,t=Math.floor(t/16);return a.length?(a.length%2&&(a="0"+a),"0x"+a):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),hg(t))return t.toHexString();if(z6(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":y5.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Z9(t)){let a="0x";for(let n=0;n<t.length;n++){let b=t[n];a+=to[(b&240)>>4]+to[b&15]}return a}return y5.throwArgumentError("invalid hexlify value","value",t)}function $t(t){if(typeof t!="string")t=_1(t);else if(!z6(t)||t.length%2)return null;return(t.length-2)/2}function ye(t,e,a){return typeof t!="string"?t=_1(t):(!z6(t)||t.length%2)&&y5.throwArgumentError("invalid hexData","value",t),e=2+2*e,a!=null?"0x"+t.substring(e,2+2*a):"0x"+t.substring(e)}function Xe(t){let e="0x";return t.forEach(a=>{e+=_1(a).substring(2)}),e}function is(t){const e=gg(_1(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function gg(t){typeof t!="string"&&(t=_1(t)),z6(t)||y5.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e<t.length&&t[e]==="0";)e++;return"0x"+t.substring(e)}function e5(t,e){for(typeof t!="string"?t=_1(t):z6(t)||y5.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&y5.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Fd(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ds(t)){let a=R1(t);a.length===64?(e.v=27+(a[32]>>7),a[32]&=127,e.r=_1(a.slice(0,32)),e.s=_1(a.slice(32,64))):a.length===65?(e.r=_1(a.slice(0,32)),e.s=_1(a.slice(32,64)),e.v=a[64]):y5.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:y5.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(a[32]|=128),e._vs=_1(a.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const b=FC(R1(e._vs),32);e._vs=_1(b);const f=b[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=f:e.recoveryParam!==f&&y5.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),b[0]&=127;const r=_1(b);e.s==null?e.s=r:e.s!==r&&y5.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?y5.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const b=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==b&&y5.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!z6(e.r)?y5.throwArgumentError("signature missing or invalid r","signature",t):e.r=e5(e.r,32),e.s==null||!z6(e.s)?y5.throwArgumentError("signature missing or invalid s","signature",t):e.s=e5(e.s,32);const a=R1(e.s);a[0]>=128&&y5.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(a[0]|=128);const n=_1(a);e._vs&&(z6(e._vs)||y5.throwArgumentError("signature invalid _vs","signature",t),e._vs=e5(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&y5.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}const Ag="bignumber/5.8.0";var cd=q1.BN;const K4=new R0(Ag),ao={},gp=9007199254740991;function YC(t){return t!=null&&(g1.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||z6(t)||typeof t=="bigint"||Z9(t))}let Ap=!1;class g1{constructor(e,a){e!==ao&&K4.throwError("cannot call constructor directly; use BigNumber.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=a,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Je(w6(this).fromTwos(e))}toTwos(e){return Je(w6(this).toTwos(e))}abs(){return this._hex[0]==="-"?g1.from(this._hex.substring(1)):this}add(e){return Je(w6(this).add(w6(e)))}sub(e){return Je(w6(this).sub(w6(e)))}div(e){return g1.from(e).isZero()&&P8("division-by-zero","div"),Je(w6(this).div(w6(e)))}mul(e){return Je(w6(this).mul(w6(e)))}mod(e){const a=w6(e);return a.isNeg()&&P8("division-by-zero","mod"),Je(w6(this).umod(a))}pow(e){const a=w6(e);return a.isNeg()&&P8("negative-power","pow"),Je(w6(this).pow(a))}and(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","and"),Je(w6(this).and(a))}or(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","or"),Je(w6(this).or(a))}xor(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","xor"),Je(w6(this).xor(a))}mask(e){return(this.isNegative()||e<0)&&P8("negative-width","mask"),Je(w6(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&P8("negative-width","shl"),Je(w6(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&P8("negative-width","shr"),Je(w6(this).shrn(e))}eq(e){return w6(this).eq(w6(e))}lt(e){return w6(this).lt(w6(e))}lte(e){return w6(this).lte(w6(e))}gt(e){return w6(this).gt(w6(e))}gte(e){return w6(this).gte(w6(e))}isNegative(){return this._hex[0]==="-"}isZero(){return w6(this).isZero()}toNumber(){try{return w6(this).toNumber()}catch{P8("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return K4.throwError("this platform does not support BigInt",R0.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Ap||(Ap=!0,K4.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?K4.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",R0.errors.UNEXPECTED_ARGUMENT,{}):K4.throwError("BigNumber.toString does not accept parameters",R0.errors.UNEXPECTED_ARGUMENT,{})),w6(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof g1)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new g1(ao,mb(e)):e.match(/^-?[0-9]+$/)?new g1(ao,mb(new cd(e))):K4.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&P8("underflow","BigNumber.from",e),(e>=gp||e<=-gp)&&P8("overflow","BigNumber.from",e),g1.from(String(e));const a=e;if(typeof a=="bigint")return g1.from(a.toString());if(Z9(a))return g1.from(_1(a));if(a)if(a.toHexString){const n=a.toHexString();if(typeof n=="string")return g1.from(n)}else{let n=a._hex;if(n==null&&a.type==="BigNumber"&&(n=a.hex),typeof n=="string"&&(z6(n)||n[0]==="-"&&z6(n.substring(1))))return g1.from(n)}return K4.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function mb(t){if(typeof t!="string")return mb(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&K4.throwArgumentError("invalid hex","value",t),t=mb(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Je(t){return g1.from(mb(t))}function w6(t){const e=g1.from(t).toHexString();return e[0]==="-"?new cd("-"+e.substring(3),16):new cd(e.substring(2),16)}function P8(t,e,a){const n={fault:t,operation:e};return a!=null&&(n.value=a),K4.throwError(t,R0.errors.NUMERIC_FAULT,n)}function GC(t){return new cd(t,36).toString(16)}const ze=new R0(Ag),db={},Mg=g1.from(0),wg=g1.from(-1);function xg(t,e,a,n){const b={fault:e,operation:a};return n!==void 0&&(b.value=n),ze.throwError(t,R0.errors.NUMERIC_FAULT,b)}let ib="0";for(;ib.length<256;)ib+=ib;function cs(t){if(typeof t!="number")try{t=g1.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+ib.substring(0,t):ze.throwArgumentError("invalid decimal size","decimals",t)}function Vr(t,e){e==null&&(e=0);const a=cs(e);t=g1.from(t);const n=t.lt(Mg);n&&(t=t.mul(wg));let b=t.mod(a).toString();for(;b.length<a.length-1;)b="0"+b;b=b.match(/^([0-9]*[1-9]|0)(0*)/)[1];const f=t.div(a).toString();return a.length===1?t=f:t=f+"."+b,n&&(t="-"+t),t}function W4(t,e){e==null&&(e=0);const a=cs(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&ze.throwArgumentError("invalid decimal value","value",t);const n=t.substring(0,1)==="-";n&&(t=t.substring(1)),t==="."&&ze.throwArgumentError("missing value","value",t);const b=t.split(".");b.length>2&&ze.throwArgumentError("too many decimal points","value",t);let f=b[0],r=b[1];for(f||(f="0"),r||(r="0");r[r.length-1]==="0";)r=r.substring(0,r.length-1);for(r.length>a.length-1&&xg("fractional component exceeds decimals","underflow","parseFixed"),r===""&&(r="0");r.length<a.length-1;)r+="0";const c=g1.from(f),u=g1.from(r);let l=c.mul(a).add(u);return n&&(l=l.mul(wg)),l}class _9{constructor(e,a,n,b){e!==db&&ze.throwError("cannot use FixedFormat constructor; use FixedFormat.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=a,this.width=n,this.decimals=b,this.name=(a?"":"u")+"fixed"+String(n)+"x"+String(b),this._multiplier=cs(b),Object.freeze(this)}static from(e){if(e instanceof _9)return e;typeof e=="number"&&(e=`fixed128x${e}`);let a=!0,n=128,b=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")a=!1;else{const f=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);f||ze.throwArgumentError("invalid fixed format","format",e),a=f[1]!=="u",n=parseInt(f[2]),b=parseInt(f[3])}}else if(e){const f=(r,c,u)=>e[r]==null?u:(typeof e[r]!==c&&ze.throwArgumentError("invalid fixed format ("+r+" not "+c+")","format."+r,e[r]),e[r]);a=f("signed","boolean",a),n=f("width","number",n),b=f("decimals","number",b)}return n%8&&ze.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),b>80&&ze.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",b),new _9(db,a,n,b)}}class ne{constructor(e,a,n,b){e!==db&&ze.throwError("cannot use FixedNumber constructor; use FixedNumber.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=b,this._hex=a,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&ze.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let a=ne.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(a=a.subUnsafe(Mp.toFormat(a.format))),a}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let a=ne.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(a=a.addUnsafe(Mp.toFormat(a.format))),a}round(e){e==null&&(e=0);const a=this.toString().split(".");if(a.length===1&&a.push("0"),(e<0||e>80||e%1)&&ze.throwArgumentError("invalid decimal count","decimals",e),a[1].length<=e)return this;const n=ne.from("1"+ib.substring(0,e),this.format),b=WC.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(b).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&ze.throwArgumentError("invalid byte width","width",e);const a=g1.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return e5(a,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ne.fromString(this._value,e)}static fromValue(e,a,n){return n==null&&a!=null&&!YC(a)&&(n=a,a=null),a==null&&(a=0),n==null&&(n="fixed"),ne.fromString(Vr(e,a),_9.from(n))}static fromString(e,a){a==null&&(a="fixed");const n=_9.from(a),b=W4(e,n.decimals);!n.signed&&b.lt(Mg)&&xg("unsigned value cannot be negative","overflow","value",e);let f=null;n.signed?f=b.toTwos(n.width).toHexString():(f=b.toHexString(),f=e5(f,n.width/8));const r=Vr(b,n.decimals);return new ne(db,f,r,n)}static fromBytes(e,a){a==null&&(a="fixed");const n=_9.from(a);if(R1(e).length>n.width/8)throw new Error("overflow");let b=g1.from(e);n.signed&&(b=b.fromTwos(n.width));const f=b.toTwos((n.signed?0:1)+n.width).toHexString(),r=Vr(b,n.decimals);return new ne(db,f,r,n)}static from(e,a){if(typeof e=="string")return ne.fromString(e,a);if(Z9(e))return ne.fromBytes(e,a);try{return ne.fromValue(e,0,a)}catch(n){if(n.code!==R0.errors.INVALID_ARGUMENT)throw n}return ze.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Mp=ne.from(1),WC=ne.from("0.5"),HC="properties/5.8.0";var VC=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const od=new R0(HC);function p1(t,e,a){Object.defineProperty(t,e,{enumerable:!0,value:a,writable:!1})}function f4(t,e){for(let a=0;a<32;a++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function j5(t){return VC(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const b=t[n];return Promise.resolve(b).then(f=>({key:n,value:f}))});return(yield Promise.all(e)).reduce((n,b)=>(n[b.key]=b.value,n),{})})}function ZC(t,e){(!t||typeof t!="object")&&od.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(a=>{e[a]||od.throwArgumentError("invalid object key - "+a,"transaction:"+a,t)})}function R5(t){const e={};for(const a in t)e[a]=t[a];return e}const KC={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Ig(t){if(t==null||KC[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let a=0;a<e.length;a++){let n=null;try{n=t[e[a]]}catch{continue}if(!Ig(n))return!1}return!0}return od.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function JC(t){if(Ig(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>nt(e)));if(typeof t=="object"){const e={};for(const a in t){const n=t[a];n!==void 0&&p1(e,a,nt(n))}return e}return od.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function nt(t){return JC(t)}class _b{constructor(e){for(const a in e)this[a]=nt(e[a])}}const Bb="abi/5.8.0",N6=new R0(Bb),ca={};let wp={calldata:!0,memory:!0,storage:!0},qC={calldata:!0,memory:!0};function lr(t,e){if(t==="bytes"||t==="string"){if(wp[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&qC[e])return!0;return(wp[e]||e==="payable")&&N6.throwArgumentError("invalid modifier","name",e),!1}function XC(t,e){let a=t;function n(c){N6.throwArgumentError(`unexpected character at position ${c}`,"param",t)}t=t.replace(/\s/g," ");function b(c){let u={type:"",name:"",parent:c,state:{allowType:!0}};return e&&(u.indexed=!1),u}let f={type:"",name:"",state:{allowType:!0}},r=f;for(let c=0;c<t.length;c++){let u=t[c];switch(u){case"(":r.state.allowType&&r.type===""?r.type="tuple":r.state.allowParams||n(c),r.state.allowType=!1,r.type=E9(r.type),r.components=[b(r)],r=r.components[0];break;case")":delete r.state,r.name==="indexed"&&(e||n(c),r.indexed=!0,r.name=""),lr(r.type,r.name)&&(r.name=""),r.type=E9(r.type);let l=r;r=r.parent,r||n(c),delete l.parent,r.state.allowParams=!1,r.state.allowName=!0,r.state.allowArray=!0;break;case",":delete r.state,r.name==="indexed"&&(e||n(c),r.indexed=!0,r.name=""),lr(r.type,r.name)&&(r.name=""),r.type=E9(r.type);let y=b(r.parent);r.parent.components.push(y),delete r.parent,r=y;break;case" ":r.state.allowType&&r.type!==""&&(r.type=E9(r.type),delete r.state.allowType,r.state.allowName=!0,r.state.allowParams=!0),r.state.allowName&&r.name!==""&&(r.name==="indexed"?(e||n(c),r.indexed&&n(c),r.indexed=!0,r.name=""):lr(r.type,r.name)?r.name="":r.state.allowName=!1);break;case"[":r.state.allowArray||n(c),r.type+=u,r.state.allowArray=!1,r.state.allowName=!1,r.state.readArray=!0;break;case"]":r.state.readArray||n(c),r.type+=u,r.state.readArray=!1,r.state.allowArray=!0,r.state.allowName=!0;break;default:r.state.allowType?(r.type+=u,r.state.allowParams=!0,r.state.allowArray=!0):r.state.allowName?(r.name+=u,delete r.state.allowArray):r.state.readArray?r.type+=u:n(c)}}return r.parent&&N6.throwArgumentError("unexpected eof","param",t),delete f.state,r.name==="indexed"?(e||n(a.length-7),r.indexed&&n(a.length-7),r.indexed=!0,r.name=""):lr(r.type,r.name)&&(r.name=""),f.type=E9(f.type),f}function Zr(t,e){for(let a in e)p1(t,a,e[a])}const L6=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),$C=new RegExp(/^(.*)\[([0-9]*)\]$/);class H5{constructor(e,a){e!==ca&&N6.throwError("use fromString",R0.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Zr(this,a);let n=this.type.match($C);n?Zr(this,{arrayLength:parseInt(n[2]||"-1"),arrayChildren:H5.fromObject({type:n[1],components:this.components}),baseType:"array"}):Zr(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json){let n={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(n.indexed=this.indexed),this.components&&(n.components=this.components.map(b=>JSON.parse(b.format(e)))),JSON.stringify(n)}let a="";return this.baseType==="array"?(a+=this.arrayChildren.format(e),a+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==L6.sighash&&(a+=this.type),a+="("+this.components.map(n=>n.format(e)).join(e===L6.full?", ":",")+")"):a+=this.type,e!==L6.sighash&&(this.indexed===!0&&(a+=" indexed"),e===L6.full&&this.name&&(a+=" "+this.name)),a}static from(e,a){return typeof e=="string"?H5.fromString(e,a):H5.fromObject(e)}static fromObject(e){return H5.isParamType(e)?e:new H5(ca,{name:e.name||null,type:E9(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(H5.fromObject):null})}static fromString(e,a){function n(b){return H5.fromObject({name:b.name,type:b.type,indexed:b.indexed,components:b.components})}return n(XC(e,!!a))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function hb(t,e){return tk(t).map(a=>H5.fromString(a,e))}class et{constructor(e,a){e!==ca&&N6.throwError("use a static from method",R0.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Zr(this,a),this._isFragment=!0,Object.freeze(this)}static from(e){return et.isFragment(e)?e:typeof e=="string"?et.fromString(e):et.fromObject(e)}static fromObject(e){if(et.isFragment(e))return e;switch(e.type){case"function":return n4.fromObject(e);case"event":return X4.fromObject(e);case"constructor":return a4.fromObject(e);case"error":return Zt.fromObject(e);case"fallback":case"receive":return null}return N6.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?X4.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?n4.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?a4.fromString(e.trim()):e.split(" ")[0]==="error"?Zt.fromString(e.substring(5).trim()):N6.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class X4 extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="event "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",e!==L6.sighash&&this.anonymous&&(a+="anonymous "),a.trim()}static from(e){return typeof e=="string"?X4.fromString(e):X4.fromObject(e)}static fromObject(e){if(X4.isEventFragment(e))return e;e.type!=="event"&&N6.throwArgumentError("invalid event object","value",e);const a={name:gb(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(H5.fromObject):[],type:"event"};return new X4(ca,a)}static fromString(e){let a=e.match(Ab);a||N6.throwArgumentError("invalid event string","value",e);let n=!1;return a[3].split(" ").forEach(b=>{switch(b.trim()){case"anonymous":n=!0;break;case"":break;default:N6.warn("unknown modifier: "+b)}}),X4.fromObject({name:a[1].trim(),anonymous:n,inputs:hb(a[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function vg(t,e){e.gas=null;let a=t.split("@");return a.length!==1?(a.length>2&&N6.throwArgumentError("invalid human-readable ABI signature","value",t),a[1].match(/^[0-9]+$/)||N6.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=g1.from(a[1]),a[0]):t}function Tg(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(a=>{switch(a.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+a)}})}function Ng(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&N6.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&N6.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&N6.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&N6.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&N6.throwArgumentError("unable to determine stateMutability","value",t),e}class a4 extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===L6.sighash&&N6.throwError("cannot format a constructor for sighash",R0.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let a="constructor("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(a+=this.stateMutability+" "),a.trim()}static from(e){return typeof e=="string"?a4.fromString(e):a4.fromObject(e)}static fromObject(e){if(a4.isConstructorFragment(e))return e;e.type!=="constructor"&&N6.throwArgumentError("invalid constructor object","value",e);let a=Ng(e);a.constant&&N6.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(H5.fromObject):[],payable:a.payable,stateMutability:a.stateMutability,gas:e.gas?g1.from(e.gas):null};return new a4(ca,n)}static fromString(e){let a={type:"constructor"};e=vg(e,a);let n=e.match(Ab);return(!n||n[1].trim()!=="constructor")&&N6.throwArgumentError("invalid constructor string","value",e),a.inputs=hb(n[2].trim(),!1),Tg(n[3].trim(),a),a4.fromObject(a)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class n4 extends a4{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="function "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",e!==L6.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(a+=this.stateMutability+" "):this.constant&&(a+="view "),this.outputs&&this.outputs.length&&(a+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(a+="@"+this.gas.toString()+" ")),a.trim()}static from(e){return typeof e=="string"?n4.fromString(e):n4.fromObject(e)}static fromObject(e){if(n4.isFunctionFragment(e))return e;e.type!=="function"&&N6.throwArgumentError("invalid function object","value",e);let a=Ng(e);const n={type:e.type,name:gb(e.name),constant:a.constant,inputs:e.inputs?e.inputs.map(H5.fromObject):[],outputs:e.outputs?e.outputs.map(H5.fromObject):[],payable:a.payable,stateMutability:a.stateMutability,gas:e.gas?g1.from(e.gas):null};return new n4(ca,n)}static fromString(e){let a={type:"function"};e=vg(e,a);let n=e.split(" returns ");n.length>2&&N6.throwArgumentError("invalid function string","value",e);let b=n[0].match(Ab);if(b||N6.throwArgumentError("invalid function signature","value",e),a.name=b[1].trim(),a.name&&gb(a.name),a.inputs=hb(b[2],!1),Tg(b[3].trim(),a),n.length>1){let f=n[1].match(Ab);(f[1].trim()!=""||f[3].trim()!="")&&N6.throwArgumentError("unexpected tokens","value",e),a.outputs=hb(f[2],!1)}else a.outputs=[];return n4.fromObject(a)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function xp(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&N6.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Zt extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="error "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",a.trim()}static from(e){return typeof e=="string"?Zt.fromString(e):Zt.fromObject(e)}static fromObject(e){if(Zt.isErrorFragment(e))return e;e.type!=="error"&&N6.throwArgumentError("invalid error object","value",e);const a={type:e.type,name:gb(e.name),inputs:e.inputs?e.inputs.map(H5.fromObject):[]};return xp(new Zt(ca,a))}static fromString(e){let a={type:"error"},n=e.match(Ab);return n||N6.throwArgumentError("invalid error signature","value",e),a.name=n[1].trim(),a.name&&gb(a.name),a.inputs=hb(n[2],!1),xp(Zt.fromObject(a))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function E9(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const ek=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function gb(t){return(!t||!t.match(ek))&&N6.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Ab=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function tk(t){t=t.trim();let e=[],a="",n=0;for(let b=0;b<t.length;b++){let f=t[b];f===","&&n===0?(e.push(a),a=""):(a+=f,f==="("?n++:f===")"&&(n--,n===-1&&N6.throwArgumentError("unbalanced parenthesis","value",t)))}return a&&e.push(a),e}const os=new R0(Bb);function ak(t){const e=[],a=function(n,b){if(Array.isArray(b))for(let f in b){const r=n.slice();r.push(f);try{a(r,b[f])}catch(c){e.push({path:r,error:c})}}};return a([],t),e}class ft{constructor(e,a,n,b){this.name=e,this.type=a,this.localName=n,this.dynamic=b}_throwError(e,a){os.throwArgumentError(e,this.localName,a)}}class u7{constructor(e){p1(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Xe(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(I8(e._data))}writeBytes(e){let a=R1(e);const n=a.length%this.wordSize;return n&&(a=I8([a,this._padding.slice(n)])),this._writeData(a)}_getValue(e){let a=R1(g1.from(e));return a.length>this.wordSize&&os.throwError("value out-of-bounds",R0.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:a.length}),a.length%this.wordSize&&(a=I8([this._padding.slice(a.length%this.wordSize),a])),a}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,a=>{this._data[e]=this._getValue(a)}}}class sd{constructor(e,a,n,b){p1(this,"_data",R1(e)),p1(this,"wordSize",a||32),p1(this,"_coerceFunc",n),p1(this,"allowLoose",b),this._offset=0}get data(){return _1(this._data)}get consumed(){return this._offset}static coerce(e,a){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(a=a.toNumber()),a}coerce(e,a){return this._coerceFunc?this._coerceFunc(e,a):sd.coerce(e,a)}_peekBytes(e,a,n){let b=Math.ceil(a/this.wordSize)*this.wordSize;return this._offset+b>this._data.length&&(this.allowLoose&&n&&this._offset+a<=this._data.length?b=a:os.throwError("data out-of-bounds",R0.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+b})),this._data.slice(this._offset,this._offset+b)}subReader(e){return new sd(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,a){let n=this._peekBytes(0,e,!!a);return this._offset+=n.length,n.slice(0,e)}readValue(){return g1.from(this.readBytes(this.wordSize))}}var no={exports:{}},Ip;function nk(){return Ip||(Ip=1,(function(t){(function(){var e="input is invalid type",a="finalize already called",n=typeof window=="object",b=n?window:{};b.JS_SHA3_NO_WINDOW&&(n=!1);var f=!n&&typeof self=="object",r=!b.JS_SHA3_NO_NODE_JS&&typeof V5=="object"&&V5.versions&&V5.versions.node;r?b=g2:f&&(b=self);var c=!b.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,u=!b.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],m=[4,1024,262144,67108864],x=[1,256,65536,16777216],A=[6,1536,393216,100663296],M=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],w=[224,256,384,512],D=[128,256],N=["hex","buffer","arrayBuffer","array","digest"],T={128:168,256:136};(b.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return Object.prototype.toString.call(O)==="[object Array]"}),u&&(b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var j=function(O,l0,f0){return function(K){return new S(O,l0,O).update(K)[f0]()}},C=function(O,l0,f0){return function(K,h0){return new S(O,l0,h0).update(K)[f0]()}},G=function(O,l0,f0){return function(K,h0,g0,T0){return h["cshake"+O].update(K,h0,g0,T0)[f0]()}},W=function(O,l0,f0){return function(K,h0,g0,T0){return h["kmac"+O].update(K,h0,g0,T0)[f0]()}},Z=function(O,l0,f0,K){for(var h0=0;h0<N.length;++h0){var g0=N[h0];O[g0]=l0(f0,K,g0)}return O},d0=function(O,l0){var f0=j(O,l0,"hex");return f0.create=function(){return new S(O,l0,O)},f0.update=function(K){return f0.create().update(K)},Z(f0,j,O,l0)},n0=function(O,l0){var f0=C(O,l0,"hex");return f0.create=function(K){return new S(O,l0,K)},f0.update=function(K,h0){return f0.create(h0).update(K)},Z(f0,C,O,l0)},y0=function(O,l0){var f0=T[O],K=G(O,l0,"hex");return K.create=function(h0,g0,T0){return!g0&&!T0?h["shake"+O].create(h0):new S(O,l0,h0).bytepad([g0,T0],f0)},K.update=function(h0,g0,T0,m0){return K.create(g0,T0,m0).update(h0)},Z(K,G,O,l0)},H=function(O,l0){var f0=T[O],K=W(O,l0,"hex");return K.create=function(h0,g0,T0){return new b0(O,l0,g0).bytepad(["KMAC",T0],f0).bytepad([h0],f0)},K.update=function(h0,g0,T0,m0){return K.create(h0,T0,m0).update(g0)},Z(K,W,O,l0)},F=[{name:"keccak",padding:x,bits:w,createMethod:d0},{name:"sha3",padding:A,bits:w,createMethod:d0},{name:"shake",padding:y,bits:D,createMethod:n0},{name:"cshake",padding:m,bits:D,createMethod:y0},{name:"kmac",padding:m,bits:D,createMethod:H}],h={},I=[],k=0;k<F.length;++k)for(var R=F[k],z=R.bits,q=0;q<z.length;++q){var e0=R.name+"_"+z[q];if(I.push(e0),h[e0]=R.createMethod(z[q],R.padding),R.name!=="sha3"){var V=R.name+z[q];I.push(V),h[V]=h[e0]}}function S(O,l0,f0){this.blocks=[],this.s=[],this.padding=l0,this.outputBits=f0,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(O<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=f0>>5,this.extraBytes=(f0&31)>>3;for(var K=0;K<50;++K)this.s[K]=0}S.prototype.update=function(O){if(this.finalized)throw new Error(a);var l0,f0=typeof O;if(f0!=="string"){if(f0==="object"){if(O===null)throw new Error(e);if(u&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!u||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);l0=!0}for(var K=this.blocks,h0=this.byteCount,g0=O.length,T0=this.blockCount,m0=0,q0=this.s,F0,N0;m0<g0;){if(this.reset)for(this.reset=!1,K[0]=this.block,F0=1;F0<T0+1;++F0)K[F0]=0;if(l0)for(F0=this.start;m0<g0&&F0<h0;++m0)K[F0>>2]|=O[m0]<<M[F0++&3];else for(F0=this.start;m0<g0&&F0<h0;++m0)N0=O.charCodeAt(m0),N0<128?K[F0>>2]|=N0<<M[F0++&3]:N0<2048?(K[F0>>2]|=(192|N0>>6)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]):N0<55296||N0>=57344?(K[F0>>2]|=(224|N0>>12)<<M[F0++&3],K[F0>>2]|=(128|N0>>6&63)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]):(N0=65536+((N0&1023)<<10|O.charCodeAt(++m0)&1023),K[F0>>2]|=(240|N0>>18)<<M[F0++&3],K[F0>>2]|=(128|N0>>12&63)<<M[F0++&3],K[F0>>2]|=(128|N0>>6&63)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]);if(this.lastByteIndex=F0,F0>=h0){for(this.start=F0-h0,this.block=K[T0],F0=0;F0<T0;++F0)q0[F0]^=K[F0];x0(q0),this.reset=!0}else this.start=F0}return this},S.prototype.encode=function(O,l0){var f0=O&255,K=1,h0=[f0];for(O=O>>8,f0=O&255;f0>0;)h0.unshift(f0),O=O>>8,f0=O&255,++K;return l0?h0.push(K):h0.unshift(K),this.update(h0),h0.length},S.prototype.encodeString=function(O){var l0,f0=typeof O;if(f0!=="string"){if(f0==="object"){if(O===null)throw new Error(e);if(u&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!u||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);l0=!0}var K=0,h0=O.length;if(l0)K=h0;else for(var g0=0;g0<O.length;++g0){var T0=O.charCodeAt(g0);T0<128?K+=1:T0<2048?K+=2:T0<55296||T0>=57344?K+=3:(T0=65536+((T0&1023)<<10|O.charCodeAt(++g0)&1023),K+=4)}return K+=this.encode(K*8),this.update(O),K},S.prototype.bytepad=function(O,l0){for(var f0=this.encode(l0),K=0;K<O.length;++K)f0+=this.encodeString(O[K]);var h0=l0-f0%l0,g0=[];return g0.length=h0,this.update(g0),this},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var O=this.blocks,l0=this.lastByteIndex,f0=this.blockCount,K=this.s;if(O[l0>>2]|=this.padding[l0&3],this.lastByteIndex===this.byteCount)for(O[0]=O[f0],l0=1;l0<f0+1;++l0)O[l0]=0;for(O[f0-1]|=2147483648,l0=0;l0<f0;++l0)K[l0]^=O[l0];x0(K)}},S.prototype.toString=S.prototype.hex=function(){this.finalize();for(var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0="",m0;g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)m0=l0[h0],T0+=l[m0>>4&15]+l[m0&15]+l[m0>>12&15]+l[m0>>8&15]+l[m0>>20&15]+l[m0>>16&15]+l[m0>>28&15]+l[m0>>24&15];g0%O===0&&(x0(l0),h0=0)}return K&&(m0=l0[h0],T0+=l[m0>>4&15]+l[m0&15],K>1&&(T0+=l[m0>>12&15]+l[m0>>8&15]),K>2&&(T0+=l[m0>>20&15]+l[m0>>16&15])),T0},S.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0=this.outputBits>>3,m0;K?m0=new ArrayBuffer(f0+1<<2):m0=new ArrayBuffer(T0);for(var q0=new Uint32Array(m0);g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)q0[g0]=l0[h0];g0%O===0&&x0(l0)}return K&&(q0[h0]=l0[h0],m0=m0.slice(0,T0)),m0},S.prototype.buffer=S.prototype.arrayBuffer,S.prototype.digest=S.prototype.array=function(){this.finalize();for(var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0=[],m0,q0;g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)m0=g0<<2,q0=l0[h0],T0[m0]=q0&255,T0[m0+1]=q0>>8&255,T0[m0+2]=q0>>16&255,T0[m0+3]=q0>>24&255;g0%O===0&&x0(l0)}return K&&(m0=g0<<2,q0=l0[h0],T0[m0]=q0&255,K>1&&(T0[m0+1]=q0>>8&255),K>2&&(T0[m0+2]=q0>>16&255)),T0};function b0(O,l0,f0){S.call(this,O,l0,f0)}b0.prototype=new S,b0.prototype.finalize=function(){return this.encode(this.outputBits,!0),S.prototype.finalize.call(this)};var x0=function(O){var l0,f0,K,h0,g0,T0,m0,q0,F0,N0,O0,J0,t1,i1,a1,c0,A0,I0,H0,X0,Y0,K0,y1,u1,X,L,Q,r0,M0,j0,s0,k0,o1,s1,v1,d1,Q1,C6,F1,X1,F6,$1,t0,_,Y,p0,E0,z0,W0,O1,L1,D1,c6,N1,y6,v5,u6,x6,O5,v0,U0,D0,L0;for(K=0;K<48;K+=2)h0=O[0]^O[10]^O[20]^O[30]^O[40],g0=O[1]^O[11]^O[21]^O[31]^O[41],T0=O[2]^O[12]^O[22]^O[32]^O[42],m0=O[3]^O[13]^O[23]^O[33]^O[43],q0=O[4]^O[14]^O[24]^O[34]^O[44],F0=O[5]^O[15]^O[25]^O[35]^O[45],N0=O[6]^O[16]^O[26]^O[36]^O[46],O0=O[7]^O[17]^O[27]^O[37]^O[47],J0=O[8]^O[18]^O[28]^O[38]^O[48],t1=O[9]^O[19]^O[29]^O[39]^O[49],l0=J0^(T0<<1|m0>>>31),f0=t1^(m0<<1|T0>>>31),O[0]^=l0,O[1]^=f0,O[10]^=l0,O[11]^=f0,O[20]^=l0,O[21]^=f0,O[30]^=l0,O[31]^=f0,O[40]^=l0,O[41]^=f0,l0=h0^(q0<<1|F0>>>31),f0=g0^(F0<<1|q0>>>31),O[2]^=l0,O[3]^=f0,O[12]^=l0,O[13]^=f0,O[22]^=l0,O[23]^=f0,O[32]^=l0,O[33]^=f0,O[42]^=l0,O[43]^=f0,l0=T0^(N0<<1|O0>>>31),f0=m0^(O0<<1|N0>>>31),O[4]^=l0,O[5]^=f0,O[14]^=l0,O[15]^=f0,O[24]^=l0,O[25]^=f0,O[34]^=l0,O[35]^=f0,O[44]^=l0,O[45]^=f0,l0=q0^(J0<<1|t1>>>31),f0=F0^(t1<<1|J0>>>31),O[6]^=l0,O[7]^=f0,O[16]^=l0,O[17]^=f0,O[26]^=l0,O[27]^=f0,O[36]^=l0,O[37]^=f0,O[46]^=l0,O[47]^=f0,l0=N0^(h0<<1|g0>>>31),f0=O0^(g0<<1|h0>>>31),O[8]^=l0,O[9]^=f0,O[18]^=l0,O[19]^=f0,O[28]^=l0,O[29]^=f0,O[38]^=l0,O[39]^=f0,O[48]^=l0,O[49]^=f0,i1=O[0],a1=O[1],p0=O[11]<<4|O[10]>>>28,E0=O[10]<<4|O[11]>>>28,r0=O[20]<<3|O[21]>>>29,M0=O[21]<<3|O[20]>>>29,v0=O[31]<<9|O[30]>>>23,U0=O[30]<<9|O[31]>>>23,$1=O[40]<<18|O[41]>>>14,t0=O[41]<<18|O[40]>>>14,s1=O[2]<<1|O[3]>>>31,v1=O[3]<<1|O[2]>>>31,c0=O[13]<<12|O[12]>>>20,A0=O[12]<<12|O[13]>>>20,z0=O[22]<<10|O[23]>>>22,W0=O[23]<<10|O[22]>>>22,j0=O[33]<<13|O[32]>>>19,s0=O[32]<<13|O[33]>>>19,D0=O[42]<<2|O[43]>>>30,L0=O[43]<<2|O[42]>>>30,N1=O[5]<<30|O[4]>>>2,y6=O[4]<<30|O[5]>>>2,d1=O[14]<<6|O[15]>>>26,Q1=O[15]<<6|O[14]>>>26,I0=O[25]<<11|O[24]>>>21,H0=O[24]<<11|O[25]>>>21,O1=O[34]<<15|O[35]>>>17,L1=O[35]<<15|O[34]>>>17,k0=O[45]<<29|O[44]>>>3,o1=O[44]<<29|O[45]>>>3,u1=O[6]<<28|O[7]>>>4,X=O[7]<<28|O[6]>>>4,v5=O[17]<<23|O[16]>>>9,u6=O[16]<<23|O[17]>>>9,C6=O[26]<<25|O[27]>>>7,F1=O[27]<<25|O[26]>>>7,X0=O[36]<<21|O[37]>>>11,Y0=O[37]<<21|O[36]>>>11,D1=O[47]<<24|O[46]>>>8,c6=O[46]<<24|O[47]>>>8,_=O[8]<<27|O[9]>>>5,Y=O[9]<<27|O[8]>>>5,L=O[18]<<20|O[19]>>>12,Q=O[19]<<20|O[18]>>>12,x6=O[29]<<7|O[28]>>>25,O5=O[28]<<7|O[29]>>>25,X1=O[38]<<8|O[39]>>>24,F6=O[39]<<8|O[38]>>>24,K0=O[48]<<14|O[49]>>>18,y1=O[49]<<14|O[48]>>>18,O[0]=i1^~c0&I0,O[1]=a1^~A0&H0,O[10]=u1^~L&r0,O[11]=X^~Q&M0,O[20]=s1^~d1&C6,O[21]=v1^~Q1&F1,O[30]=_^~p0&z0,O[31]=Y^~E0&W0,O[40]=N1^~v5&x6,O[41]=y6^~u6&O5,O[2]=c0^~I0&X0,O[3]=A0^~H0&Y0,O[12]=L^~r0&j0,O[13]=Q^~M0&s0,O[22]=d1^~C6&X1,O[23]=Q1^~F1&F6,O[32]=p0^~z0&O1,O[33]=E0^~W0&L1,O[42]=v5^~x6&v0,O[43]=u6^~O5&U0,O[4]=I0^~X0&K0,O[5]=H0^~Y0&y1,O[14]=r0^~j0&k0,O[15]=M0^~s0&o1,O[24]=C6^~X1&$1,O[25]=F1^~F6&t0,O[34]=z0^~O1&D1,O[35]=W0^~L1&c6,O[44]=x6^~v0&D0,O[45]=O5^~U0&L0,O[6]=X0^~K0&i1,O[7]=Y0^~y1&a1,O[16]=j0^~k0&u1,O[17]=s0^~o1&X,O[26]=X1^~$1&s1,O[27]=F6^~t0&v1,O[36]=O1^~D1&_,O[37]=L1^~c6&Y,O[46]=v0^~D0&N1,O[47]=U0^~L0&y6,O[8]=K0^~i1&c0,O[9]=y1^~a1&A0,O[18]=k0^~u1&L,O[19]=o1^~X&Q,O[28]=$1^~s1&d1,O[29]=t0^~v1&Q1,O[38]=D1^~_&p0,O[39]=c6^~Y&E0,O[48]=D0^~N1&v5,O[49]=L0^~y6&u6,O[0]^=v[K],O[1]^=v[K+1]};if(c)t.exports=h;else for(k=0;k<I.length;++k)b[I[k]]=h[I[k]]})()})(no)),no.exports}var bk=nk();const fk=Y8(bk);function U5(t){return"0x"+fk.keccak_256(R1(t))}const rk="rlp/5.8.0",X2=new R0(rk);function vp(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function Tp(t,e,a){let n=0;for(let b=0;b<a;b++)n=n*256+t[e+b];return n}function Eg(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(f){n=n.concat(Eg(f))}),n.length<=55)return n.unshift(192+n.length),n;const b=vp(n.length);return b.unshift(247+b.length),b.concat(n)}ds(t)||X2.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(R1(t));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const a=vp(e.length);return a.unshift(183+a.length),a.concat(e)}function Yd(t){return _1(Eg(t))}function Np(t,e,a,n){const b=[];for(;a<e+1+n;){const f=Dg(t,a);b.push(f.result),a+=f.consumed,a>e+1+n&&X2.throwError("child data too short",R0.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:b}}function Dg(t,e){if(t.length===0&&X2.throwError("data too short",R0.errors.BUFFER_OVERRUN,{}),t[e]>=248){const a=t[e]-247;e+1+a>t.length&&X2.throwError("data short segment too short",R0.errors.BUFFER_OVERRUN,{});const n=Tp(t,e+1,a);return e+1+a+n>t.length&&X2.throwError("data long segment too short",R0.errors.BUFFER_OVERRUN,{}),Np(t,e,e+1+a,a+n)}else if(t[e]>=192){const a=t[e]-192;return e+1+a>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{}),Np(t,e,e+1,a)}else if(t[e]>=184){const a=t[e]-183;e+1+a>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{});const n=Tp(t,e+1,a);e+1+a+n>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{});const b=_1(t.slice(e+1+a,e+1+a+n));return{consumed:1+a+n,result:b}}else if(t[e]>=128){const a=t[e]-128;e+1+a>t.length&&X2.throwError("data too short",R0.errors.BUFFER_OVERRUN,{});const n=_1(t.slice(e+1,e+1+a));return{consumed:1+a,result:n}}return{consumed:1,result:_1(t[e])}}function ss(t){const e=R1(t),a=Dg(e,0);return a.consumed!==e.length&&X2.throwArgumentError("invalid rlp data","data",t),a.result}const dk="address/5.8.0",k9=new R0(dk);function Ep(t){z6(t,20)||k9.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),a=new Uint8Array(40);for(let b=0;b<40;b++)a[b]=e[b].charCodeAt(0);const n=R1(U5(a));for(let b=0;b<40;b+=2)n[b>>1]>>4>=8&&(e[b]=e[b].toUpperCase()),(n[b>>1]&15)>=8&&(e[b+1]=e[b+1].toUpperCase());return"0x"+e.join("")}const ik=9007199254740991;function ck(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const us={};for(let t=0;t<10;t++)us[String(t)]=String(t);for(let t=0;t<26;t++)us[String.fromCharCode(65+t)]=String(10+t);const Dp=Math.floor(ck(ik));function ok(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>us[n]).join("");for(;e.length>=Dp;){let n=e.substring(0,Dp);e=parseInt(n,10)%97+e.substring(n.length)}let a=String(98-parseInt(e,10)%97);for(;a.length<2;)a="0"+a;return a}function Q5(t){let e=null;if(typeof t!="string"&&k9.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Ep(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&k9.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ok(t)&&k9.throwArgumentError("bad icap checksum","address",t),e=GC(t.substring(4));e.length<40;)e="0"+e;e=Ep("0x"+e)}else k9.throwArgumentError("invalid address","address",t);return e}function bo(t){try{return Q5(t),!0}catch{}return!1}function Cg(t){let e=null;try{e=Q5(t.from)}catch{k9.throwArgumentError("missing from address","transaction",t)}const a=Q9(R1(g1.from(t.nonce).toHexString()));return Q5(ye(U5(Yd([e,a])),12))}class sk extends ft{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,a){try{a=Q5(a)}catch(n){this._throwError(n.message,a)}return e.writeValue(a)}decode(e){return Q5(e5(e.readValue().toHexString(),20))}}class uk extends ft{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,a){return this.coder.encode(e,a)}decode(e){return this.coder.decode(e)}}const j9=new R0(Bb);function kg(t,e,a){let n=null;if(Array.isArray(a))n=a;else if(a&&typeof a=="object"){let u={};n=e.map(l=>{const y=l.localName;return y||j9.throwError("cannot encode object for signature with missing names",R0.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:a}),u[y]&&j9.throwError("cannot encode object for signature with duplicate names",R0.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:a}),u[y]=!0,a[y]})}else j9.throwArgumentError("invalid tuple value","tuple",a);e.length!==n.length&&j9.throwArgumentError("types/value length mismatch","tuple",a);let b=new u7(t.wordSize),f=new u7(t.wordSize),r=[];e.forEach((u,l)=>{let y=n[l];if(u.dynamic){let m=f.length;u.encode(f,y);let x=b.writeUpdatableValue();r.push(A=>{x(A+m)})}else u.encode(b,y)}),r.forEach(u=>{u(b.length)});let c=t.appendWriter(b);return c+=t.appendWriter(f),c}function jg(t,e){let a=[],n=t.subReader(0);e.forEach(f=>{let r=null;if(f.dynamic){let c=t.readValue(),u=n.subReader(c.toNumber());try{r=f.decode(u)}catch(l){if(l.code===R0.errors.BUFFER_OVERRUN)throw l;r=l,r.baseType=f.name,r.name=f.localName,r.type=f.type}}else try{r=f.decode(t)}catch(c){if(c.code===R0.errors.BUFFER_OVERRUN)throw c;r=c,r.baseType=f.name,r.name=f.localName,r.type=f.type}r!=null&&a.push(r)});const b=e.reduce((f,r)=>{const c=r.localName;return c&&(f[c]||(f[c]=0),f[c]++),f},{});e.forEach((f,r)=>{let c=f.localName;if(!c||b[c]!==1||(c==="length"&&(c="_length"),a[c]!=null))return;const u=a[r];u instanceof Error?Object.defineProperty(a,c,{enumerable:!0,get:()=>{throw u}}):a[c]=u});for(let f=0;f<a.length;f++){const r=a[f];r instanceof Error&&Object.defineProperty(a,f,{enumerable:!0,get:()=>{throw r}})}return Object.freeze(a)}class lk extends ft{constructor(e,a,n){const b=e.type+"["+(a>=0?a:"")+"]",f=a===-1||e.dynamic;super("array",b,n,f),this.coder=e,this.length=a}defaultValue(){const e=this.coder.defaultValue(),a=[];for(let n=0;n<this.length;n++)a.push(e);return a}encode(e,a){Array.isArray(a)||this._throwError("expected array value",a);let n=this.length;n===-1&&(n=a.length,e.writeValue(a.length)),j9.checkArgumentCount(a.length,n,"coder array"+(this.localName?" "+this.localName:""));let b=[];for(let f=0;f<a.length;f++)b.push(this.coder);return kg(e,b,a)}decode(e){let a=this.length;a===-1&&(a=e.readValue().toNumber(),a*32>e._data.length&&j9.throwError("insufficient data length",R0.errors.BUFFER_OVERRUN,{length:e._data.length,count:a}));let n=[];for(let b=0;b<a;b++)n.push(new uk(this.coder));return e.coerce(this.name,jg(e,n))}}class pk extends ft{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,a){return e.writeValue(a?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Sg extends ft{constructor(e,a){super(e,e,a,!0)}defaultValue(){return"0x"}encode(e,a){a=R1(a);let n=e.writeValue(a.length);return n+=e.writeBytes(a),n}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class yk extends Sg{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,_1(super.decode(e)))}}class mk extends ft{constructor(e,a){let n="bytes"+String(e);super(n,n,a,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,a){let n=R1(a);return n.length!==this.size&&this._throwError("incorrect data length",a),e.writeBytes(n)}decode(e){return e.coerce(this.name,_1(e.readBytes(this.size)))}}class hk extends ft{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,a){return a!=null&&this._throwError("not null",a),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}const gk="0x0000000000000000000000000000000000000000",Ak=g1.from(-1),Lg=g1.from(0),Mk=g1.from(1),wk=g1.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),xk="0x0000000000000000000000000000000000000000000000000000000000000000";class Ik extends ft{constructor(e,a,n){const b=(a?"int":"uint")+e*8;super(b,b,n,!1),this.size=e,this.signed=a}defaultValue(){return 0}encode(e,a){let n=g1.from(a),b=wk.mask(e.wordSize*8);if(this.signed){let f=b.mask(this.size*8-1);(n.gt(f)||n.lt(f.add(Mk).mul(Ak)))&&this._throwError("value out-of-bounds",a)}else(n.lt(Lg)||n.gt(b.mask(this.size*8)))&&this._throwError("value out-of-bounds",a);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let a=e.readValue().mask(this.size*8);return this.signed&&(a=a.fromTwos(this.size*8)),e.coerce(this.name,a)}}const vk="strings/5.8.0",zg=new R0(vk);var Mb;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(Mb||(Mb={}));var M8;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(M8||(M8={}));function Tk(t,e,a,n,b){return zg.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",a)}function Og(t,e,a,n,b){if(t===M8.BAD_PREFIX||t===M8.UNEXPECTED_CONTINUE){let f=0;for(let r=e+1;r<a.length&&a[r]>>6===2;r++)f++;return f}return t===M8.OVERRUN?a.length-e-1:0}function Nk(t,e,a,n,b){return t===M8.OVERLONG?(n.push(b),0):(n.push(65533),Og(t,e,a))}const Ek=Object.freeze({error:Tk,ignore:Og,replace:Nk});function _g(t,e){e==null&&(e=Ek.error),t=R1(t);const a=[];let n=0;for(;n<t.length;){const b=t[n++];if(b>>7===0){a.push(b);continue}let f=null,r=null;if((b&224)===192)f=1,r=127;else if((b&240)===224)f=2,r=2047;else if((b&248)===240)f=3,r=65535;else{(b&192)===128?n+=e(M8.UNEXPECTED_CONTINUE,n-1,t,a):n+=e(M8.BAD_PREFIX,n-1,t,a);continue}if(n-1+f>=t.length){n+=e(M8.OVERRUN,n-1,t,a);continue}let c=b&(1<<8-f-1)-1;for(let u=0;u<f;u++){let l=t[n];if((l&192)!=128){n+=e(M8.MISSING_CONTINUE,n,t,a),c=null;break}c=c<<6|l&63,n++}if(c!==null){if(c>1114111){n+=e(M8.OUT_OF_RANGE,n-1-f,t,a,c);continue}if(c>=55296&&c<=57343){n+=e(M8.UTF16_SURROGATE,n-1-f,t,a,c);continue}if(c<=r){n+=e(M8.OVERLONG,n-1-f,t,a,c);continue}a.push(c)}}return a}function d4(t,e=Mb.current){e!=Mb.current&&(zg.checkNormalize(),t=t.normalize(e));let a=[];for(let n=0;n<t.length;n++){const b=t.charCodeAt(n);if(b<128)a.push(b);else if(b<2048)a.push(b>>6|192),a.push(b&63|128);else if((b&64512)==55296){n++;const f=t.charCodeAt(n);if(n>=t.length||(f&64512)!==56320)throw new Error("invalid utf-8 string");const r=65536+((b&1023)<<10)+(f&1023);a.push(r>>18|240),a.push(r>>12&63|128),a.push(r>>6&63|128),a.push(r&63|128)}else a.push(b>>12|224),a.push(b>>6&63|128),a.push(b&63|128)}return R1(a)}function Dk(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Pb(t,e){return Dk(_g(t,e))}function Ck(t,e=Mb.current){return _g(d4(t,e))}class kk extends Sg{constructor(e){super("string",e)}defaultValue(){return""}encode(e,a){return super.encode(e,d4(a))}decode(e){return Pb(super.decode(e))}}class pr extends ft{constructor(e,a){let n=!1;const b=[];e.forEach(r=>{r.dynamic&&(n=!0),b.push(r.type)});const f="tuple("+b.join(",")+")";super("tuple",f,a,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const a=this.coders.reduce((n,b)=>{const f=b.localName;return f&&(n[f]||(n[f]=0),n[f]++),n},{});return this.coders.forEach((n,b)=>{let f=n.localName;!f||a[f]!==1||(f==="length"&&(f="_length"),e[f]==null&&(e[f]=e[b]))}),Object.freeze(e)}encode(e,a){return kg(e,this.coders,a)}decode(e){return e.coerce(this.name,jg(e,this.coders))}}const yr=new R0(Bb),jk=new RegExp(/^bytes([0-9]*)$/),Sk=new RegExp(/^(u?int)([0-9]*)$/);class Lk{constructor(e){p1(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new sk(e.name);case"bool":return new pk(e.name);case"string":return new kk(e.name);case"bytes":return new yk(e.name);case"array":return new lk(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new pr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new hk(e.name)}let a=e.type.match(Sk);if(a){let n=parseInt(a[2]||"256");return(n===0||n>256||n%8!==0)&&yr.throwArgumentError("invalid "+a[1]+" bit length","param",e),new Ik(n/8,a[1]==="int",e.name)}if(a=e.type.match(jk),a){let n=parseInt(a[1]);return(n===0||n>32)&&yr.throwArgumentError("invalid bytes length","param",e),new mk(n,e.name)}return yr.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,a){return new sd(e,this._getWordSize(),this.coerceFunc,a)}_getWriter(){return new u7(this._getWordSize())}getDefaultValue(e){const a=e.map(b=>this._getCoder(H5.from(b)));return new pr(a,"_").defaultValue()}encode(e,a){e.length!==a.length&&yr.throwError("types/values length mismatch",R0.errors.INVALID_ARGUMENT,{count:{types:e.length,values:a.length},value:{types:e,values:a}});const n=e.map(r=>this._getCoder(H5.from(r))),b=new pr(n,"_"),f=this._getWriter();return b.encode(f,a),f.data}decode(e,a,n){const b=e.map(r=>this._getCoder(H5.from(r)));return new pr(b,"_").decode(this._getReader(R1(a),n))}}const zk=new Lk;function na(t){return U5(d4(t))}const Bg="hash/5.8.0";function Pg(t){t=atob(t);const e=[];for(let a=0;a<t.length;a++)e.push(t.charCodeAt(a));return R1(e)}function Ug(t){t=R1(t);let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function Rg(t,e){e==null&&(e=1);const a=[],n=a.forEach,b=function(f,r){n.call(f,function(c){r>0&&Array.isArray(c)?b(c,r-1):a.push(c)})};return b(t,e),a}function Ok(t){const e={};for(let a=0;a<t.length;a++){const n=t[a];e[n[0]]=n[1]}return e}function _k(t){let e=0;function a(){return t[e++]<<8|t[e++]}let n=a(),b=1,f=[0,1];for(let C=1;C<n;C++)f.push(b+=a());let r=a(),c=e;e+=r;let u=0,l=0;function y(){return u==0&&(l=l<<8|t[e++],u=8),l>>--u&1}const m=31,x=Math.pow(2,m),A=x>>>1,M=A>>1,v=x-1;let w=0;for(let C=0;C<m;C++)w=w<<1|y();let D=[],N=0,T=x;for(;;){let C=Math.floor(((w-N+1)*b-1)/T),G=0,W=n;for(;W-G>1;){let n0=G+W>>>1;C<f[n0]?W=n0:G=n0}if(G==0)break;D.push(G);let Z=N+Math.floor(T*f[G]/b),d0=N+Math.floor(T*f[G+1]/b)-1;for(;((Z^d0)&A)==0;)w=w<<1&v|y(),Z=Z<<1&v,d0=d0<<1&v|1;for(;Z&~d0&M;)w=w&A|w<<1&v>>>1|y(),Z=Z<<1^A,d0=(d0^A)<<1|A|1;N=Z,T=1+d0-Z}let j=n-4;return D.map(C=>{switch(C-j){case 3:return j+65792+(t[c++]<<16|t[c++]<<8|t[c++]);case 2:return j+256+(t[c++]<<8|t[c++]);case 1:return j+t[c++];default:return C-1}})}function Bk(t){let e=0;return()=>t[e++]}function Pk(t){return Bk(_k(t))}function Uk(t){return t&1?~t>>1:t>>1}function Rk(t,e){let a=Array(t);for(let n=0;n<t;n++)a[n]=1+e();return a}function Cp(t,e){let a=Array(t);for(let n=0,b=-1;n<t;n++)a[n]=b+=1+e();return a}function Qk(t,e){let a=Array(t);for(let n=0,b=0;n<t;n++)a[n]=b+=Uk(e());return a}function ud(t,e){let a=Cp(t(),t),n=t(),b=Cp(n,t),f=Rk(n,t);for(let r=0;r<n;r++)for(let c=0;c<f[r];c++)a.push(b[r]+c);return e?a.map(r=>e[r]):a}function Fk(t){let e=[];for(;;){let a=t();if(a==0)break;e.push(Gk(a,t))}for(;;){let a=t()-1;if(a<0)break;e.push(Wk(a,t))}return Ok(Rg(e))}function Yk(t){let e=[];for(;;){let a=t();if(a==0)break;e.push(a)}return e}function Qg(t,e,a){let n=Array(t).fill(void 0).map(()=>[]);for(let b=0;b<e;b++)Qk(t,a).forEach((f,r)=>n[r].push(f));return n}function Gk(t,e){let a=1+e(),n=e(),b=Yk(e),f=Qg(b.length,1+t,e);return Rg(f.map((r,c)=>{const u=r[0],l=r.slice(1);return Array(b[c]).fill(void 0).map((y,m)=>{let x=m*n;return[u+m*a,l.map(A=>A+x)]})}))}function Wk(t,e){let a=1+e();return Qg(a,1+t,e).map(b=>[b[0],b.slice(1)])}function Hk(t){let e=ud(t).sort((n,b)=>n-b);return a();function a(){let n=[];for(;;){let l=ud(t,e);if(l.length==0)break;n.push({set:new Set(l),node:a()})}n.sort((l,y)=>y.set.size-l.set.size);let b=t(),f=b%3;b=b/3|0;let r=!!(b&1);b>>=1;let c=b==1,u=b==2;return{branches:n,valid:f,fe0f:r,save:c,check:u}}}function Vk(){return Pk(Pg("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Gd=Vk(),Zk=new Set(ud(Gd)),Kk=new Set(ud(Gd)),Jk=Fk(Gd),qk=Hk(Gd),kp=45,jp=95;function Fg(t){return Ck(t)}function Xk(t){return t.filter(e=>e!=65039)}function Yg(t){for(let e of t.split(".")){let a=Fg(e);try{for(let n=a.lastIndexOf(jp)-1;n>=0;n--)if(a[n]!==jp)throw new Error("underscore only allowed at start");if(a.length>=4&&a.every(n=>n<128)&&a[2]===kp&&a[3]===kp)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function $k(t){return Yg(ej(t,Xk))}function ej(t,e){let a=Fg(t).reverse(),n=[];for(;a.length;){let b=aj(a);if(b){n.push(...e(b));continue}let f=a.pop();if(Zk.has(f)){n.push(f);continue}if(Kk.has(f))continue;let r=Jk[f];if(r){n.push(...r);continue}throw new Error(`Disallowed codepoint: 0x${f.toString(16).toUpperCase()}`)}return Yg(tj(String.fromCodePoint(...n)))}function tj(t){return t.normalize("NFC")}function aj(t,e){var a;let n=qk,b,f,r=[],c=t.length;for(;c;){let u=t[--c];if(n=(a=n.branches.find(l=>l.set.has(u)))===null||a===void 0?void 0:a.node,!n)break;if(n.save)f=u;else if(n.check&&u===f)break;r.push(u),n.fe0f&&(r.push(65039),c>0&&t[c-1]==65039&&c--),n.valid&&(b=r.slice(),n.valid==2&&b.splice(1,1),t.length=c)}return b}const nj=new R0(Bg),Gg=new Uint8Array(32);Gg.fill(0);function Sp(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Wg(t){const e=d4($k(t)),a=[];if(t.length===0)return a;let n=0;for(let b=0;b<e.length;b++)e[b]===46&&(a.push(Sp(e.slice(n,b))),n=b+1);if(n>=e.length)throw new Error("invalid ENS name; empty component");return a.push(Sp(e.slice(n))),a}function Kr(t){typeof t!="string"&&nj.throwArgumentError("invalid ENS name; not a string","name",t);let e=Gg;const a=Wg(t);for(;a.length;)e=U5(I8([e,U5(a.pop())]));return _1(e)}function bj(t){return _1(I8(Wg(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const a=new Uint8Array(e.length+1);return a.set(e,1),a[0]=a.length-1,a})))+"00"}var fj=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const d5=new R0(Bg),Hg=new Uint8Array(32);Hg.fill(0);const rj=g1.from(-1),Vg=g1.from(0),Zg=g1.from(1),dj=g1.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ij(t){const e=R1(t),a=e.length%32;return a?Xe([e,Hg.slice(a)]):_1(e)}const cj=e5(Zg.toHexString(),32),oj=e5(Vg.toHexString(),32),Lp={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},fo=["name","version","chainId","verifyingContract","salt"];function zp(t){return function(e){return typeof e!="string"&&d5.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const sj={name:zp("name"),version:zp("version"),chainId:function(t){try{return g1.from(t).toString()}catch{}return d5.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Q5(t).toLowerCase()}catch{}return d5.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=R1(t);if(e.length!==32)throw new Error("bad length");return _1(e)}catch{}return d5.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function ro(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const a=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&d5.throwArgumentError("invalid numeric width","type",t);const b=dj.mask(a?n-1:n),f=a?b.add(Zg).mul(rj):Vg;return function(r){const c=g1.from(r);return(c.lt(f)||c.gt(b))&&d5.throwArgumentError(`value out-of-bounds for ${t}`,"value",r),e5(c.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const a=parseInt(e[1]);return(a===0||a>32||e[1]!==String(a))&&d5.throwArgumentError("invalid bytes width","type",t),function(n){return R1(n).length!==a&&d5.throwArgumentError(`invalid length for ${t}`,"value",n),ij(n)}}}switch(t){case"address":return function(e){return e5(Q5(e),32)};case"bool":return function(e){return e?cj:oj};case"bytes":return function(e){return U5(e)};case"string":return function(e){return na(e)}}return null}function Op(t,e){return`${t}(${e.map(({name:a,type:n})=>n+" "+a).join(",")})`}class A8{constructor(e){p1(this,"types",Object.freeze(nt(e))),p1(this,"_encoderCache",{}),p1(this,"_types",{});const a={},n={},b={};Object.keys(e).forEach(c=>{a[c]={},n[c]=[],b[c]={}});for(const c in e){const u={};e[c].forEach(l=>{u[l.name]&&d5.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(c)}`,"types",e),u[l.name]=!0;const y=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];y===c&&d5.throwArgumentError(`circular type reference to ${JSON.stringify(y)}`,"types",e),!ro(y)&&(n[y]||d5.throwArgumentError(`unknown type ${JSON.stringify(y)}`,"types",e),n[y].push(c),a[c][y]=!0)})}const f=Object.keys(n).filter(c=>n[c].length===0);f.length===0?d5.throwArgumentError("missing primary type","types",e):f.length>1&&d5.throwArgumentError(`ambiguous primary types or unused types: ${f.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),p1(this,"primaryType",f[0]);function r(c,u){u[c]&&d5.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),u[c]=!0,Object.keys(a[c]).forEach(l=>{n[l]&&(r(l,u),Object.keys(u).forEach(y=>{b[y][l]=!0}))}),delete u[c]}r(this.primaryType,{});for(const c in b){const u=Object.keys(b[c]);u.sort(),this._types[c]=Op(c,e[c])+u.map(l=>Op(l,e[l])).join("")}}getEncoder(e){let a=this._encoderCache[e];return a||(a=this._encoderCache[e]=this._getEncoder(e)),a}_getEncoder(e){{const b=ro(e);if(b)return b}const a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){const b=a[1],f=this.getEncoder(b),r=parseInt(a[3]);return c=>{r>=0&&c.length!==r&&d5.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",c);let u=c.map(f);return this._types[b]&&(u=u.map(U5)),U5(Xe(u))}}const n=this.types[e];if(n){const b=na(this._types[e]);return f=>{const r=n.map(({name:c,type:u})=>{const l=this.getEncoder(u)(f[c]);return this._types[u]?U5(l):l});return r.unshift(b),Xe(r)}}return d5.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const a=this._types[e];return a||d5.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),a}encodeData(e,a){return this.getEncoder(e)(a)}hashStruct(e,a){return U5(this.encodeData(e,a))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,a,n){if(ro(e))return n(e,a);const b=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(b){const r=b[1],c=parseInt(b[3]);return c>=0&&a.length!==c&&d5.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a),a.map(u=>this._visit(r,u,n))}const f=this.types[e];return f?f.reduce((r,{name:c,type:u})=>(r[c]=this._visit(u,a[c],n),r),{}):d5.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,a){return this._visit(this.primaryType,e,a)}static from(e){return new A8(e)}static getPrimaryType(e){return A8.from(e).primaryType}static hashStruct(e,a,n){return A8.from(a).hashStruct(e,n)}static hashDomain(e){const a=[];for(const n in e){const b=Lp[n];b||d5.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),a.push({name:n,type:b})}return a.sort((n,b)=>fo.indexOf(n.name)-fo.indexOf(b.name)),A8.hashStruct("EIP712Domain",{EIP712Domain:a},e)}static encode(e,a,n){return Xe(["0x1901",A8.hashDomain(e),A8.from(a).hash(n)])}static hash(e,a,n){return U5(A8.encode(e,a,n))}static resolveNames(e,a,n,b){return fj(this,void 0,void 0,function*(){e=R5(e);const f={};e.verifyingContract&&!z6(e.verifyingContract,20)&&(f[e.verifyingContract]="0x");const r=A8.from(a);r.visit(n,(c,u)=>(c==="address"&&!z6(u,20)&&(f[u]="0x"),u));for(const c in f)f[c]=yield b(c);return e.verifyingContract&&f[e.verifyingContract]&&(e.verifyingContract=f[e.verifyingContract]),n=r.visit(n,(c,u)=>c==="address"&&f[u]?f[u]:u),{domain:e,value:n}})}static getPayload(e,a,n){A8.hashDomain(e);const b={},f=[];fo.forEach(u=>{const l=e[u];l!=null&&(b[u]=sj[u](l),f.push({name:u,type:Lp[u]}))});const r=A8.from(a),c=R5(a);return c.EIP712Domain?d5.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",a):c.EIP712Domain=f,r.encode(n),{types:c,domain:b,primaryType:r.primaryType,message:r.visit(n,(u,l)=>{if(u.match(/^bytes(\d*)/))return _1(R1(l));if(u.match(/^u?int/))return g1.from(l).toString();switch(u){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&d5.throwArgumentError("invalid string","value",l),l}return d5.throwArgumentError("unsupported type","type",u)})}}}const f5=new R0(Bb);class uj extends _b{}class lj extends _b{}class pj extends _b{}class l7 extends _b{static isIndexed(e){return!!(e&&e._isIndexed)}}const yj={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function _p(t,e){const a=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return a.error=e,a}class Bp{constructor(e){let a=[];typeof e=="string"?a=JSON.parse(e):a=e,p1(this,"fragments",a.map(n=>et.from(n)).filter(n=>n!=null)),p1(this,"_abiCoder",f4(new.target,"getAbiCoder")()),p1(this,"functions",{}),p1(this,"errors",{}),p1(this,"events",{}),p1(this,"structs",{}),this.fragments.forEach(n=>{let b=null;switch(n.type){case"constructor":if(this.deploy){f5.warn("duplicate definition - constructor");return}p1(this,"deploy",n);return;case"function":b=this.functions;break;case"event":b=this.events;break;case"error":b=this.errors;break;default:return}let f=n.format();if(b[f]){f5.warn("duplicate definition - "+f);return}b[f]=n}),this.deploy||p1(this,"deploy",a4.from({payable:!1,type:"constructor"})),p1(this,"_isInterface",!0)}format(e){e||(e=L6.full),e===L6.sighash&&f5.throwArgumentError("interface does not support formatting sighash","format",e);const a=this.fragments.map(n=>n.format(e));return e===L6.json?JSON.stringify(a.map(n=>JSON.parse(n))):a}static getAbiCoder(){return zk}static getAddress(e){return Q5(e)}static getSighash(e){return ye(na(e.format()),0,4)}static getEventTopic(e){return na(e.format())}getFunction(e){if(z6(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];f5.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.functions).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching function","name",n):b.length>1&&f5.throwArgumentError("multiple matching functions","name",n),this.functions[b[0]]}const a=this.functions[n4.fromString(e).format()];return a||f5.throwArgumentError("no matching function","signature",e),a}getEvent(e){if(z6(e)){const n=e.toLowerCase();for(const b in this.events)if(n===this.getEventTopic(b))return this.events[b];f5.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.events).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching event","name",n):b.length>1&&f5.throwArgumentError("multiple matching events","name",n),this.events[b[0]]}const a=this.events[X4.fromString(e).format()];return a||f5.throwArgumentError("no matching event","signature",e),a}getError(e){if(z6(e)){const n=f4(this.constructor,"getSighash");for(const b in this.errors){const f=this.errors[b];if(e===n(f))return this.errors[b]}f5.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.errors).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching error","name",n):b.length>1&&f5.throwArgumentError("multiple matching errors","name",n),this.errors[b[0]]}const a=this.errors[n4.fromString(e).format()];return a||f5.throwArgumentError("no matching error","signature",e),a}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(a){try{e=this.getError(e)}catch{throw a}}return f4(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),f4(this.constructor,"getEventTopic")(e)}_decodeParams(e,a){return this._abiCoder.decode(e,a)}_encodeParams(e,a){return this._abiCoder.encode(e,a)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,a){typeof e=="string"&&(e=this.getError(e));const n=R1(a);return _1(n.slice(0,4))!==this.getSighash(e)&&f5.throwArgumentError(`data signature does not match error ${e.name}.`,"data",_1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,a){return typeof e=="string"&&(e=this.getError(e)),_1(I8([this.getSighash(e),this._encodeParams(e.inputs,a||[])]))}decodeFunctionData(e,a){typeof e=="string"&&(e=this.getFunction(e));const n=R1(a);return _1(n.slice(0,4))!==this.getSighash(e)&&f5.throwArgumentError(`data signature does not match function ${e.name}.`,"data",_1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,a){return typeof e=="string"&&(e=this.getFunction(e)),_1(I8([this.getSighash(e),this._encodeParams(e.inputs,a||[])]))}decodeFunctionResult(e,a){typeof e=="string"&&(e=this.getFunction(e));let n=R1(a),b=null,f="",r=null,c=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=_1(n.slice(0,4)),y=yj[l];if(y)r=this._abiCoder.decode(y.inputs,n.slice(4)),c=y.name,u=y.signature,y.reason&&(b=r[0]),c==="Error"?f=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(r[0])}`:c==="Panic"&&(f=`; VM Exception while processing transaction: reverted with panic code ${r[0]}`);else try{const m=this.getError(l);r=this._abiCoder.decode(m.inputs,n.slice(4)),c=m.name,u=m.format()}catch{}break}}return f5.throwError("call revert exception"+f,R0.errors.CALL_EXCEPTION,{method:e.format(),data:_1(a),errorArgs:r,errorName:c,errorSignature:u,reason:b})}encodeFunctionResult(e,a){return typeof e=="string"&&(e=this.getFunction(e)),_1(this._abiCoder.encode(e.outputs,a||[]))}encodeFilterTopics(e,a){typeof e=="string"&&(e=this.getEvent(e)),a.length>e.inputs.length&&f5.throwError("too many arguments for "+e.format(),R0.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:a});let n=[];e.anonymous||n.push(this.getEventTopic(e));const b=(f,r)=>f.type==="string"?na(r):f.type==="bytes"?U5(_1(r)):(f.type==="bool"&&typeof r=="boolean"&&(r=r?"0x01":"0x00"),f.type.match(/^u?int/)&&(r=g1.from(r).toHexString()),f.type==="address"&&this._abiCoder.encode(["address"],[r]),e5(_1(r),32));for(a.forEach((f,r)=>{let c=e.inputs[r];if(!c.indexed){f!=null&&f5.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+c.name,f);return}f==null?n.push(null):c.baseType==="array"||c.baseType==="tuple"?f5.throwArgumentError("filtering with tuples or arrays not supported","contract."+c.name,f):Array.isArray(f)?n.push(f.map(u=>b(c,u))):n.push(b(c,f))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,a){typeof e=="string"&&(e=this.getEvent(e));const n=[],b=[],f=[];return e.anonymous||n.push(this.getEventTopic(e)),a.length!==e.inputs.length&&f5.throwArgumentError("event arguments/values mismatch","values",a),e.inputs.forEach((r,c)=>{const u=a[c];if(r.indexed)if(r.type==="string")n.push(na(u));else if(r.type==="bytes")n.push(U5(u));else{if(r.baseType==="tuple"||r.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([r.type],[u]))}else b.push(r),f.push(u)}),{data:this._abiCoder.encode(b,f),topics:n}}decodeEventLog(e,a,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let x=this.getEventTopic(e);(!z6(n[0],32)||n[0].toLowerCase()!==x)&&f5.throwError("fragment/topic mismatch",R0.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:x,value:n[0]}),n=n.slice(1)}let b=[],f=[],r=[];e.inputs.forEach((x,A)=>{x.indexed?x.type==="string"||x.type==="bytes"||x.baseType==="tuple"||x.baseType==="array"?(b.push(H5.fromObject({type:"bytes32",name:x.name})),r.push(!0)):(b.push(x),r.push(!1)):(f.push(x),r.push(!1))});let c=n!=null?this._abiCoder.decode(b,I8(n)):null,u=this._abiCoder.decode(f,a,!0),l=[],y=0,m=0;e.inputs.forEach((x,A)=>{if(x.indexed)if(c==null)l[A]=new l7({_isIndexed:!0,hash:null});else if(r[A])l[A]=new l7({_isIndexed:!0,hash:c[m++]});else try{l[A]=c[m++]}catch(M){l[A]=M}else try{l[A]=u[y++]}catch(M){l[A]=M}if(x.name&&l[x.name]==null){const M=l[A];M instanceof Error?Object.defineProperty(l,x.name,{enumerable:!0,get:()=>{throw _p(`property ${JSON.stringify(x.name)}`,M)}}):l[x.name]=M}});for(let x=0;x<l.length;x++){const A=l[x];A instanceof Error&&Object.defineProperty(l,x,{enumerable:!0,get:()=>{throw _p(`index ${x}`,A)}})}return Object.freeze(l)}parseTransaction(e){let a=this.getFunction(e.data.substring(0,10).toLowerCase());return a?new lj({args:this._abiCoder.decode(a.inputs,"0x"+e.data.substring(10)),functionFragment:a,name:a.name,signature:a.format(),sighash:this.getSighash(a),value:g1.from(e.value||"0")}):null}parseLog(e){let a=this.getEvent(e.topics[0]);return!a||a.anonymous?null:new uj({eventFragment:a,name:a.name,signature:a.format(),topic:this.getEventTopic(a),args:this.decodeEventLog(a,e.data,e.topics)})}parseError(e){const a=_1(e);let n=this.getError(a.substring(0,10).toLowerCase());return n?new pj({args:this._abiCoder.decode(n.inputs,"0x"+a.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const mj="abstract-provider/5.8.0";var hj=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const gj=new R0(mj);class Aj extends _b{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Wd{constructor(){gj.checkAbstract(new.target,Wd),p1(this,"_isProvider",!0)}getFeeData(){return hj(this,void 0,void 0,function*(){const{block:e,gasPrice:a}=yield j5({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(r=>null)});let n=null,b=null,f=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,f=g1.from("1500000000"),b=e.baseFeePerGas.mul(2).add(f)),{lastBaseFeePerGas:n,maxFeePerGas:b,maxPriorityFeePerGas:f,gasPrice:a}})}addListener(e,a){return this.on(e,a)}removeListener(e,a){return this.off(e,a)}static isProvider(e){return!!(e&&e._isProvider)}}const Mj="abstract-signer/5.8.0";var u2=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const U8=new R0(Mj),wj=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],xj=[R0.errors.INSUFFICIENT_FUNDS,R0.errors.NONCE_EXPIRED,R0.errors.REPLACEMENT_UNDERPRICED];class Ub{constructor(){U8.checkAbstract(new.target,Ub),p1(this,"_isSigner",!0)}getBalance(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return u2(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const a=yield j5(this.checkTransaction(e));return yield this.provider.estimateGas(a)})}call(e,a){return u2(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield j5(this.checkTransaction(e));return yield this.provider.call(n,a)})}sendTransaction(e){return u2(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const a=yield this.populateTransaction(e),n=yield this.signTransaction(a);return yield this.provider.sendTransaction(n)})}getChainId(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)wj.indexOf(n)===-1&&U8.throwArgumentError("invalid transaction key: "+n,"transaction",e);const a=R5(e);return a.from==null?a.from=this.getAddress():a.from=Promise.all([Promise.resolve(a.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&U8.throwArgumentError("from address mismatch","transaction",e),n[0])),a}populateTransaction(e){return u2(this,void 0,void 0,function*(){const a=yield j5(this.checkTransaction(e));a.to!=null&&(a.to=Promise.resolve(a.to).then(b=>u2(this,void 0,void 0,function*(){if(b==null)return null;const f=yield this.resolveName(b);return f==null&&U8.throwArgumentError("provided ENS name resolves to null","tx.to",b),f})),a.to.catch(b=>{}));const n=a.maxFeePerGas!=null||a.maxPriorityFeePerGas!=null;if(a.gasPrice!=null&&(a.type===2||n)?U8.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(a.type===0||a.type===1)&&n&&U8.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(a.type===2||a.type==null)&&a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)a.type=2;else if(a.type===0||a.type===1)a.gasPrice==null&&(a.gasPrice=this.getGasPrice());else{const b=yield this.getFeeData();if(a.type==null)if(b.maxFeePerGas!=null&&b.maxPriorityFeePerGas!=null)if(a.type=2,a.gasPrice!=null){const f=a.gasPrice;delete a.gasPrice,a.maxFeePerGas=f,a.maxPriorityFeePerGas=f}else a.maxFeePerGas==null&&(a.maxFeePerGas=b.maxFeePerGas),a.maxPriorityFeePerGas==null&&(a.maxPriorityFeePerGas=b.maxPriorityFeePerGas);else b.gasPrice!=null?(n&&U8.throwError("network does not support EIP-1559",R0.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),a.gasPrice==null&&(a.gasPrice=b.gasPrice),a.type=0):U8.throwError("failed to get consistent fee data",R0.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else a.type===2&&(a.maxFeePerGas==null&&(a.maxFeePerGas=b.maxFeePerGas),a.maxPriorityFeePerGas==null&&(a.maxPriorityFeePerGas=b.maxPriorityFeePerGas))}return a.nonce==null&&(a.nonce=this.getTransactionCount("pending")),a.gasLimit==null&&(a.gasLimit=this.estimateGas(a).catch(b=>{if(xj.indexOf(b.code)>=0)throw b;return U8.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{error:b,tx:a})})),a.chainId==null?a.chainId=this.getChainId():a.chainId=Promise.all([Promise.resolve(a.chainId),this.getChainId()]).then(b=>(b[1]!==0&&b[0]!==b[1]&&U8.throwArgumentError("chainId address mismatch","transaction",e),b[0])),yield j5(a)})}_checkProvider(e){this.provider||U8.throwError("missing provider",R0.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class ls extends Ub{constructor(e,a){super(),p1(this,"address",e),p1(this,"provider",a||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,a){return Promise.resolve().then(()=>{U8.throwError(e,R0.errors.UNSUPPORTED_OPERATION,{operation:a})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,a,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ls(this.address,e)}}var io={},H6={},co,Pp;function Rb(){if(Pp)return co;Pp=1,co=t;function t(e,a){if(!e)throw new Error(a||"Assertion failed")}return t.equal=function(a,n,b){if(a!=n)throw new Error(b||"Assertion failed: "+a+" != "+n)},co}var mr={exports:{}},Up;function Ij(){return Up||(Up=1,typeof Object.create=="function"?mr.exports=function(e,a){a&&(e.super_=a,e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mr.exports=function(e,a){if(a){e.super_=a;var n=function(){};n.prototype=a.prototype,e.prototype=new n,e.prototype.constructor=e}}),mr.exports}var Rp;function o4(){if(Rp)return H6;Rp=1;var t=Rb(),e=Ij();H6.inherits=e;function a(H,F){return(H.charCodeAt(F)&64512)!==55296||F<0||F+1>=H.length?!1:(H.charCodeAt(F+1)&64512)===56320}function n(H,F){if(Array.isArray(H))return H.slice();if(!H)return[];var h=[];if(typeof H=="string")if(F){if(F==="hex")for(H=H.replace(/[^a-z0-9]+/ig,""),H.length%2!==0&&(H="0"+H),k=0;k<H.length;k+=2)h.push(parseInt(H[k]+H[k+1],16))}else for(var I=0,k=0;k<H.length;k++){var R=H.charCodeAt(k);R<128?h[I++]=R:R<2048?(h[I++]=R>>6|192,h[I++]=R&63|128):a(H,k)?(R=65536+((R&1023)<<10)+(H.charCodeAt(++k)&1023),h[I++]=R>>18|240,h[I++]=R>>12&63|128,h[I++]=R>>6&63|128,h[I++]=R&63|128):(h[I++]=R>>12|224,h[I++]=R>>6&63|128,h[I++]=R&63|128)}else for(k=0;k<H.length;k++)h[k]=H[k]|0;return h}H6.toArray=n;function b(H){for(var F="",h=0;h<H.length;h++)F+=c(H[h].toString(16));return F}H6.toHex=b;function f(H){var F=H>>>24|H>>>8&65280|H<<8&16711680|(H&255)<<24;return F>>>0}H6.htonl=f;function r(H,F){for(var h="",I=0;I<H.length;I++){var k=H[I];F==="little"&&(k=f(k)),h+=u(k.toString(16))}return h}H6.toHex32=r;function c(H){return H.length===1?"0"+H:H}H6.zero2=c;function u(H){return H.length===7?"0"+H:H.length===6?"00"+H:H.length===5?"000"+H:H.length===4?"0000"+H:H.length===3?"00000"+H:H.length===2?"000000"+H:H.length===1?"0000000"+H:H}H6.zero8=u;function l(H,F,h,I){var k=h-F;t(k%4===0);for(var R=new Array(k/4),z=0,q=F;z<R.length;z++,q+=4){var e0;I==="big"?e0=H[q]<<24|H[q+1]<<16|H[q+2]<<8|H[q+3]:e0=H[q+3]<<24|H[q+2]<<16|H[q+1]<<8|H[q],R[z]=e0>>>0}return R}H6.join32=l;function y(H,F){for(var h=new Array(H.length*4),I=0,k=0;I<H.length;I++,k+=4){var R=H[I];F==="big"?(h[k]=R>>>24,h[k+1]=R>>>16&255,h[k+2]=R>>>8&255,h[k+3]=R&255):(h[k+3]=R>>>24,h[k+2]=R>>>16&255,h[k+1]=R>>>8&255,h[k]=R&255)}return h}H6.split32=y;function m(H,F){return H>>>F|H<<32-F}H6.rotr32=m;function x(H,F){return H<<F|H>>>32-F}H6.rotl32=x;function A(H,F){return H+F>>>0}H6.sum32=A;function M(H,F,h){return H+F+h>>>0}H6.sum32_3=M;function v(H,F,h,I){return H+F+h+I>>>0}H6.sum32_4=v;function w(H,F,h,I,k){return H+F+h+I+k>>>0}H6.sum32_5=w;function D(H,F,h,I){var k=H[F],R=H[F+1],z=I+R>>>0,q=(z<I?1:0)+h+k;H[F]=q>>>0,H[F+1]=z}H6.sum64=D;function N(H,F,h,I){var k=F+I>>>0,R=(k<F?1:0)+H+h;return R>>>0}H6.sum64_hi=N;function T(H,F,h,I){var k=F+I;return k>>>0}H6.sum64_lo=T;function j(H,F,h,I,k,R,z,q){var e0=0,V=F;V=V+I>>>0,e0+=V<F?1:0,V=V+R>>>0,e0+=V<R?1:0,V=V+q>>>0,e0+=V<q?1:0;var S=H+h+k+z+e0;return S>>>0}H6.sum64_4_hi=j;function C(H,F,h,I,k,R,z,q){var e0=F+I+R+q;return e0>>>0}H6.sum64_4_lo=C;function G(H,F,h,I,k,R,z,q,e0,V){var S=0,b0=F;b0=b0+I>>>0,S+=b0<F?1:0,b0=b0+R>>>0,S+=b0<R?1:0,b0=b0+q>>>0,S+=b0<q?1:0,b0=b0+V>>>0,S+=b0<V?1:0;var x0=H+h+k+z+e0+S;return x0>>>0}H6.sum64_5_hi=G;function W(H,F,h,I,k,R,z,q,e0,V){var S=F+I+R+q+V;return S>>>0}H6.sum64_5_lo=W;function Z(H,F,h){var I=F<<32-h|H>>>h;return I>>>0}H6.rotr64_hi=Z;function d0(H,F,h){var I=H<<32-h|F>>>h;return I>>>0}H6.rotr64_lo=d0;function n0(H,F,h){return H>>>h}H6.shr64_hi=n0;function y0(H,F,h){var I=H<<32-h|F>>>h;return I>>>0}return H6.shr64_lo=y0,H6}var oo={},Qp;function Qb(){if(Qp)return oo;Qp=1;var t=o4(),e=Rb();function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return oo.BlockHash=a,a.prototype.update=function(b,f){if(b=t.toArray(b,f),this.pending?this.pending=this.pending.concat(b):this.pending=b,this.pendingTotal+=b.length,this.pending.length>=this._delta8){b=this.pending;var r=b.length%this._delta8;this.pending=b.slice(b.length-r,b.length),this.pending.length===0&&(this.pending=null),b=t.join32(b,0,b.length-r,this.endian);for(var c=0;c<b.length;c+=this._delta32)this._update(b,c,c+this._delta32)}return this},a.prototype.digest=function(b){return this.update(this._pad()),e(this.pending===null),this._digest(b)},a.prototype._pad=function(){var b=this.pendingTotal,f=this._delta8,r=f-(b+this.padLength)%f,c=new Array(r+this.padLength);c[0]=128;for(var u=1;u<r;u++)c[u]=0;if(b<<=3,this.endian==="big"){for(var l=8;l<this.padLength;l++)c[u++]=0;c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=b>>>24&255,c[u++]=b>>>16&255,c[u++]=b>>>8&255,c[u++]=b&255}else for(c[u++]=b&255,c[u++]=b>>>8&255,c[u++]=b>>>16&255,c[u++]=b>>>24&255,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,l=8;l<this.padLength;l++)c[u++]=0;return c},oo}var J3={},H2={},Fp;function Kg(){if(Fp)return H2;Fp=1;var t=o4(),e=t.rotr32;function a(y,m,x,A){if(y===0)return n(m,x,A);if(y===1||y===3)return f(m,x,A);if(y===2)return b(m,x,A)}H2.ft_1=a;function n(y,m,x){return y&m^~y&x}H2.ch32=n;function b(y,m,x){return y&m^y&x^m&x}H2.maj32=b;function f(y,m,x){return y^m^x}H2.p32=f;function r(y){return e(y,2)^e(y,13)^e(y,22)}H2.s0_256=r;function c(y){return e(y,6)^e(y,11)^e(y,25)}H2.s1_256=c;function u(y){return e(y,7)^e(y,18)^y>>>3}H2.g0_256=u;function l(y){return e(y,17)^e(y,19)^y>>>10}return H2.g1_256=l,H2}var so,Yp;function vj(){if(Yp)return so;Yp=1;var t=o4(),e=Qb(),a=Kg(),n=t.rotl32,b=t.sum32,f=t.sum32_5,r=a.ft_1,c=e.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return t.inherits(l,c),so=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(m,x){for(var A=this.W,M=0;M<16;M++)A[M]=m[x+M];for(;M<A.length;M++)A[M]=n(A[M-3]^A[M-8]^A[M-14]^A[M-16],1);var v=this.h[0],w=this.h[1],D=this.h[2],N=this.h[3],T=this.h[4];for(M=0;M<A.length;M++){var j=~~(M/20),C=f(n(v,5),r(j,w,D,N),T,A[M],u[j]);T=N,N=D,D=n(w,30),w=v,v=C}this.h[0]=b(this.h[0],v),this.h[1]=b(this.h[1],w),this.h[2]=b(this.h[2],D),this.h[3]=b(this.h[3],N),this.h[4]=b(this.h[4],T)},l.prototype._digest=function(m){return m==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},so}var uo,Gp;function Jg(){if(Gp)return uo;Gp=1;var t=o4(),e=Qb(),a=Kg(),n=Rb(),b=t.sum32,f=t.sum32_4,r=t.sum32_5,c=a.ch32,u=a.maj32,l=a.s0_256,y=a.s1_256,m=a.g0_256,x=a.g1_256,A=e.BlockHash,M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;A.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=M,this.W=new Array(64)}return t.inherits(v,A),uo=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(D,N){for(var T=this.W,j=0;j<16;j++)T[j]=D[N+j];for(;j<T.length;j++)T[j]=f(x(T[j-2]),T[j-7],m(T[j-15]),T[j-16]);var C=this.h[0],G=this.h[1],W=this.h[2],Z=this.h[3],d0=this.h[4],n0=this.h[5],y0=this.h[6],H=this.h[7];for(n(this.k.length===T.length),j=0;j<T.length;j++){var F=r(H,y(d0),c(d0,n0,y0),this.k[j],T[j]),h=b(l(C),u(C,G,W));H=y0,y0=n0,n0=d0,d0=b(Z,F),Z=W,W=G,G=C,C=b(F,h)}this.h[0]=b(this.h[0],C),this.h[1]=b(this.h[1],G),this.h[2]=b(this.h[2],W),this.h[3]=b(this.h[3],Z),this.h[4]=b(this.h[4],d0),this.h[5]=b(this.h[5],n0),this.h[6]=b(this.h[6],y0),this.h[7]=b(this.h[7],H)},v.prototype._digest=function(D){return D==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},uo}var lo,Wp;function Tj(){if(Wp)return lo;Wp=1;var t=o4(),e=Jg();function a(){if(!(this instanceof a))return new a;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return t.inherits(a,e),lo=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(b){return b==="hex"?t.toHex32(this.h.slice(0,7),"big"):t.split32(this.h.slice(0,7),"big")},lo}var po,Hp;function qg(){if(Hp)return po;Hp=1;var t=o4(),e=Qb(),a=Rb(),n=t.rotr64_hi,b=t.rotr64_lo,f=t.shr64_hi,r=t.shr64_lo,c=t.sum64,u=t.sum64_hi,l=t.sum64_lo,y=t.sum64_4_hi,m=t.sum64_4_lo,x=t.sum64_5_hi,A=t.sum64_5_lo,M=e.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;M.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}t.inherits(w,M),po=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(h,I){for(var k=this.W,R=0;R<32;R++)k[R]=h[I+R];for(;R<k.length;R+=2){var z=y0(k[R-4],k[R-3]),q=H(k[R-4],k[R-3]),e0=k[R-14],V=k[R-13],S=d0(k[R-30],k[R-29]),b0=n0(k[R-30],k[R-29]),x0=k[R-32],O=k[R-31];k[R]=y(z,q,e0,V,S,b0,x0,O),k[R+1]=m(z,q,e0,V,S,b0,x0,O)}},w.prototype._update=function(h,I){this._prepareBlock(h,I);var k=this.W,R=this.h[0],z=this.h[1],q=this.h[2],e0=this.h[3],V=this.h[4],S=this.h[5],b0=this.h[6],x0=this.h[7],O=this.h[8],l0=this.h[9],f0=this.h[10],K=this.h[11],h0=this.h[12],g0=this.h[13],T0=this.h[14],m0=this.h[15];a(this.k.length===k.length);for(var q0=0;q0<k.length;q0+=2){var F0=T0,N0=m0,O0=W(O,l0),J0=Z(O,l0),t1=D(O,l0,f0,K,h0),i1=N(O,l0,f0,K,h0,g0),a1=this.k[q0],c0=this.k[q0+1],A0=k[q0],I0=k[q0+1],H0=x(F0,N0,O0,J0,t1,i1,a1,c0,A0,I0),X0=A(F0,N0,O0,J0,t1,i1,a1,c0,A0,I0);F0=C(R,z),N0=G(R,z),O0=T(R,z,q,e0,V),J0=j(R,z,q,e0,V,S);var Y0=u(F0,N0,O0,J0),K0=l(F0,N0,O0,J0);T0=h0,m0=g0,h0=f0,g0=K,f0=O,K=l0,O=u(b0,x0,H0,X0),l0=l(x0,x0,H0,X0),b0=V,x0=S,V=q,S=e0,q=R,e0=z,R=u(H0,X0,Y0,K0),z=l(H0,X0,Y0,K0)}c(this.h,0,R,z),c(this.h,2,q,e0),c(this.h,4,V,S),c(this.h,6,b0,x0),c(this.h,8,O,l0),c(this.h,10,f0,K),c(this.h,12,h0,g0),c(this.h,14,T0,m0)},w.prototype._digest=function(h){return h==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")};function D(F,h,I,k,R){var z=F&I^~F&R;return z<0&&(z+=4294967296),z}function N(F,h,I,k,R,z){var q=h&k^~h&z;return q<0&&(q+=4294967296),q}function T(F,h,I,k,R){var z=F&I^F&R^I&R;return z<0&&(z+=4294967296),z}function j(F,h,I,k,R,z){var q=h&k^h&z^k&z;return q<0&&(q+=4294967296),q}function C(F,h){var I=n(F,h,28),k=n(h,F,2),R=n(h,F,7),z=I^k^R;return z<0&&(z+=4294967296),z}function G(F,h){var I=b(F,h,28),k=b(h,F,2),R=b(h,F,7),z=I^k^R;return z<0&&(z+=4294967296),z}function W(F,h){var I=n(F,h,14),k=n(F,h,18),R=n(h,F,9),z=I^k^R;return z<0&&(z+=4294967296),z}function Z(F,h){var I=b(F,h,14),k=b(F,h,18),R=b(h,F,9),z=I^k^R;return z<0&&(z+=4294967296),z}function d0(F,h){var I=n(F,h,1),k=n(F,h,8),R=f(F,h,7),z=I^k^R;return z<0&&(z+=4294967296),z}function n0(F,h){var I=b(F,h,1),k=b(F,h,8),R=r(F,h,7),z=I^k^R;return z<0&&(z+=4294967296),z}function y0(F,h){var I=n(F,h,19),k=n(h,F,29),R=f(F,h,6),z=I^k^R;return z<0&&(z+=4294967296),z}function H(F,h){var I=b(F,h,19),k=b(h,F,29),R=r(F,h,6),z=I^k^R;return z<0&&(z+=4294967296),z}return po}var yo,Vp;function Nj(){if(Vp)return yo;Vp=1;var t=o4(),e=qg();function a(){if(!(this instanceof a))return new a;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return t.inherits(a,e),yo=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(b){return b==="hex"?t.toHex32(this.h.slice(0,12),"big"):t.split32(this.h.slice(0,12),"big")},yo}var Zp;function Ej(){return Zp||(Zp=1,J3.sha1=vj(),J3.sha224=Tj(),J3.sha256=Jg(),J3.sha384=Nj(),J3.sha512=qg()),J3}var mo={},Kp;function Dj(){if(Kp)return mo;Kp=1;var t=o4(),e=Qb(),a=t.rotl32,n=t.sum32,b=t.sum32_3,f=t.sum32_4,r=e.BlockHash;function c(){if(!(this instanceof c))return new c;r.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}t.inherits(c,r),mo.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(w,D){for(var N=this.h[0],T=this.h[1],j=this.h[2],C=this.h[3],G=this.h[4],W=N,Z=T,d0=j,n0=C,y0=G,H=0;H<80;H++){var F=n(a(f(N,u(H,T,j,C),w[m[H]+D],l(H)),A[H]),G);N=G,G=C,C=a(j,10),j=T,T=F,F=n(a(f(W,u(79-H,Z,d0,n0),w[x[H]+D],y(H)),M[H]),y0),W=y0,y0=n0,n0=a(d0,10),d0=Z,Z=F}F=b(this.h[1],j,n0),this.h[1]=b(this.h[2],C,y0),this.h[2]=b(this.h[3],G,W),this.h[3]=b(this.h[4],N,Z),this.h[4]=b(this.h[0],T,d0),this.h[0]=F},c.prototype._digest=function(w){return w==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")};function u(v,w,D,N){return v<=15?w^D^N:v<=31?w&D|~w&N:v<=47?(w|~D)^N:v<=63?w&N|D&~N:w^(D|~N)}function l(v){return v<=15?0:v<=31?1518500249:v<=47?1859775393:v<=63?2400959708:2840853838}function y(v){return v<=15?1352829926:v<=31?1548603684:v<=47?1836072691:v<=63?2053994217:0}var m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],A=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return mo}var ho,Jp;function Cj(){if(Jp)return ho;Jp=1;var t=o4(),e=Rb();function a(n,b,f){if(!(this instanceof a))return new a(n,b,f);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(t.toArray(b,f))}return ho=a,a.prototype._init=function(b){b.length>this.blockSize&&(b=new this.Hash().update(b).digest()),e(b.length<=this.blockSize);for(var f=b.length;f<this.blockSize;f++)b.push(0);for(f=0;f<b.length;f++)b[f]^=54;for(this.inner=new this.Hash().update(b),f=0;f<b.length;f++)b[f]^=106;this.outer=new this.Hash().update(b)},a.prototype.update=function(b,f){return this.inner.update(b,f),this},a.prototype.digest=function(b){return this.outer.update(this.inner.digest()),this.outer.digest(b)},ho}var qp;function kj(){return qp||(qp=1,(function(t){var e=t;e.utils=o4(),e.common=Qb(),e.sha=Ej(),e.ripemd=Dj(),e.hmac=Cj(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(io)),io}var jj=kj();const Z2=Y8(jj);function K9(t,e,a){return a={path:e,exports:{},require:function(n,b){return Sj(n,b??a.path)}},t(a,a.exports),a.exports}function Sj(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ps=Xg;function Xg(t,e){if(!t)throw new Error(e||"Assertion failed")}Xg.equal=function(e,a,n){if(e!=a)throw new Error(n||"Assertion failed: "+e+" != "+a)};var A2=K9(function(t,e){var a=e;function n(r,c){if(Array.isArray(r))return r.slice();if(!r)return[];var u=[];if(typeof r!="string"){for(var l=0;l<r.length;l++)u[l]=r[l]|0;return u}if(c==="hex"){r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r);for(var l=0;l<r.length;l+=2)u.push(parseInt(r[l]+r[l+1],16))}else for(var l=0;l<r.length;l++){var y=r.charCodeAt(l),m=y>>8,x=y&255;m?u.push(m,x):u.push(x)}return u}a.toArray=n;function b(r){return r.length===1?"0"+r:r}a.zero2=b;function f(r){for(var c="",u=0;u<r.length;u++)c+=b(r[u].toString(16));return c}a.toHex=f,a.encode=function(c,u){return u==="hex"?f(c):c}}),v8=K9(function(t,e){var a=e;a.assert=ps,a.toArray=A2.toArray,a.zero2=A2.zero2,a.toHex=A2.toHex,a.encode=A2.encode;function n(u,l,y){var m=new Array(Math.max(u.bitLength(),y)+1),x;for(x=0;x<m.length;x+=1)m[x]=0;var A=1<<l+1,M=u.clone();for(x=0;x<m.length;x++){var v,w=M.andln(A-1);M.isOdd()?(w>(A>>1)-1?v=(A>>1)-w:v=w,M.isubn(v)):v=0,m[x]=v,M.iushrn(1)}return m}a.getNAF=n;function b(u,l){var y=[[],[]];u=u.clone(),l=l.clone();for(var m=0,x=0,A;u.cmpn(-m)>0||l.cmpn(-x)>0;){var M=u.andln(3)+m&3,v=l.andln(3)+x&3;M===3&&(M=-1),v===3&&(v=-1);var w;(M&1)===0?w=0:(A=u.andln(7)+m&7,(A===3||A===5)&&v===2?w=-M:w=M),y[0].push(w);var D;(v&1)===0?D=0:(A=l.andln(7)+x&7,(A===3||A===5)&&M===2?D=-v:D=v),y[1].push(D),2*m===w+1&&(m=1-m),2*x===D+1&&(x=1-x),u.iushrn(1),l.iushrn(1)}return y}a.getJSF=b;function f(u,l,y){var m="_"+l;u.prototype[l]=function(){return this[m]!==void 0?this[m]:this[m]=y.call(this)}}a.cachedProperty=f;function r(u){return typeof u=="string"?a.toArray(u,"hex"):u}a.parseBytes=r;function c(u){return new q1(u,"hex","le")}a.intFromLE=c}),ld=v8.getNAF,Lj=v8.getJSF,pd=v8.assert;function b3(t,e){this.type=t,this.p=new q1(e.p,16),this.red=e.prime?q1.red(e.prime):q1.mont(this.p),this.zero=new q1(0).toRed(this.red),this.one=new q1(1).toRed(this.red),this.two=new q1(2).toRed(this.red),this.n=e.n&&new q1(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ya=b3;b3.prototype.point=function(){throw new Error("Not implemented")};b3.prototype.validate=function(){throw new Error("Not implemented")};b3.prototype._fixedNafMul=function(e,a){pd(e.precomputed);var n=e._getDoubles(),b=ld(a,1,this._bitLength),f=(1<<n.step+1)-(n.step%2===0?2:1);f/=3;var r=[],c,u;for(c=0;c<b.length;c+=n.step){u=0;for(var l=c+n.step-1;l>=c;l--)u=(u<<1)+b[l];r.push(u)}for(var y=this.jpoint(null,null,null),m=this.jpoint(null,null,null),x=f;x>0;x--){for(c=0;c<r.length;c++)u=r[c],u===x?m=m.mixedAdd(n.points[c]):u===-x&&(m=m.mixedAdd(n.points[c].neg()));y=y.add(m)}return y.toP()};b3.prototype._wnafMul=function(e,a){var n=4,b=e._getNAFPoints(n);n=b.wnd;for(var f=b.points,r=ld(a,n,this._bitLength),c=this.jpoint(null,null,null),u=r.length-1;u>=0;u--){for(var l=0;u>=0&&r[u]===0;u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var y=r[u];pd(y!==0),e.type==="affine"?y>0?c=c.mixedAdd(f[y-1>>1]):c=c.mixedAdd(f[-y-1>>1].neg()):y>0?c=c.add(f[y-1>>1]):c=c.add(f[-y-1>>1].neg())}return e.type==="affine"?c.toP():c};b3.prototype._wnafMulAdd=function(e,a,n,b,f){var r=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0,y,m,x;for(y=0;y<b;y++){x=a[y];var A=x._getNAFPoints(e);r[y]=A.wnd,c[y]=A.points}for(y=b-1;y>=1;y-=2){var M=y-1,v=y;if(r[M]!==1||r[v]!==1){u[M]=ld(n[M],r[M],this._bitLength),u[v]=ld(n[v],r[v],this._bitLength),l=Math.max(u[M].length,l),l=Math.max(u[v].length,l);continue}var w=[a[M],null,null,a[v]];a[M].y.cmp(a[v].y)===0?(w[1]=a[M].add(a[v]),w[2]=a[M].toJ().mixedAdd(a[v].neg())):a[M].y.cmp(a[v].y.redNeg())===0?(w[1]=a[M].toJ().mixedAdd(a[v]),w[2]=a[M].add(a[v].neg())):(w[1]=a[M].toJ().mixedAdd(a[v]),w[2]=a[M].toJ().mixedAdd(a[v].neg()));var D=[-3,-1,-5,-7,0,7,5,1,3],N=Lj(n[M],n[v]);for(l=Math.max(N[0].length,l),u[M]=new Array(l),u[v]=new Array(l),m=0;m<l;m++){var T=N[0][m]|0,j=N[1][m]|0;u[M][m]=D[(T+1)*3+(j+1)],u[v][m]=0,c[M]=w}}var C=this.jpoint(null,null,null),G=this._wnafT4;for(y=l;y>=0;y--){for(var W=0;y>=0;){var Z=!0;for(m=0;m<b;m++)G[m]=u[m][y]|0,G[m]!==0&&(Z=!1);if(!Z)break;W++,y--}if(y>=0&&W++,C=C.dblp(W),y<0)break;for(m=0;m<b;m++){var d0=G[m];d0!==0&&(d0>0?x=c[m][d0-1>>1]:d0<0&&(x=c[m][-d0-1>>1].neg()),x.type==="affine"?C=C.mixedAdd(x):C=C.add(x))}}for(y=0;y<b;y++)c[y]=null;return f?C:C.toP()};function G8(t,e){this.curve=t,this.type=e,this.precomputed=null}b3.BasePoint=G8;G8.prototype.eq=function(){throw new Error("Not implemented")};G8.prototype.validate=function(){return this.curve.validate(this)};b3.prototype.decodePoint=function(e,a){e=v8.toArray(e,a);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?pd(e[e.length-1]%2===0):e[0]===7&&pd(e[e.length-1]%2===1);var b=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return b}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};G8.prototype.encodeCompressed=function(e){return this.encode(e,!0)};G8.prototype._encode=function(e){var a=this.curve.p.byteLength(),n=this.getX().toArray("be",a);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",a))};G8.prototype.encode=function(e,a){return v8.encode(this._encode(a),e)};G8.prototype.precompute=function(e){if(this.precomputed)return this;var a={doubles:null,naf:null,beta:null};return a.naf=this._getNAFPoints(8),a.doubles=this._getDoubles(4,e),a.beta=this._getBeta(),this.precomputed=a,this};G8.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var a=this.precomputed.doubles;return a?a.points.length>=Math.ceil((e.bitLength()+1)/a.step):!1};G8.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],b=this,f=0;f<a;f+=e){for(var r=0;r<e;r++)b=b.dbl();n.push(b)}return{step:e,points:n}};G8.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var a=[this],n=(1<<e)-1,b=n===1?null:this.dbl(),f=1;f<n;f++)a[f]=a[f-1].add(b);return{wnd:e,points:a}};G8.prototype._getBeta=function(){return null};G8.prototype.dblp=function(e){for(var a=this,n=0;n<e;n++)a=a.dbl();return a};var ys=K9(function(t){typeof Object.create=="function"?t.exports=function(a,n){n&&(a.super_=n,a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(a,n){if(n){a.super_=n;var b=function(){};b.prototype=n.prototype,a.prototype=new b,a.prototype.constructor=a}}}),zj=v8.assert;function W8(t){ya.call(this,"short",t),this.a=new q1(t.a,16).toRed(this.red),this.b=new q1(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}ys(W8,ya);var Oj=W8;W8.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var a,n;if(e.beta)a=new q1(e.beta,16).toRed(this.red);else{var b=this._getEndoRoots(this.p);a=b[0].cmp(b[1])<0?b[0]:b[1],a=a.toRed(this.red)}if(e.lambda)n=new q1(e.lambda,16);else{var f=this._getEndoRoots(this.n);this.g.mul(f[0]).x.cmp(this.g.x.redMul(a))===0?n=f[0]:(n=f[1],zj(this.g.mul(n).x.cmp(this.g.x.redMul(a))===0))}var r;return e.basis?r=e.basis.map(function(c){return{a:new q1(c.a,16),b:new q1(c.b,16)}}):r=this._getEndoBasis(n),{beta:a,lambda:n,basis:r}}};W8.prototype._getEndoRoots=function(e){var a=e===this.p?this.red:q1.mont(e),n=new q1(2).toRed(a).redInvm(),b=n.redNeg(),f=new q1(3).toRed(a).redNeg().redSqrt().redMul(n),r=b.redAdd(f).fromRed(),c=b.redSub(f).fromRed();return[r,c]};W8.prototype._getEndoBasis=function(e){for(var a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,b=this.n.clone(),f=new q1(1),r=new q1(0),c=new q1(0),u=new q1(1),l,y,m,x,A,M,v,w=0,D,N;n.cmpn(0)!==0;){var T=b.div(n);D=b.sub(T.mul(n)),N=c.sub(T.mul(f));var j=u.sub(T.mul(r));if(!m&&D.cmp(a)<0)l=v.neg(),y=f,m=D.neg(),x=N;else if(m&&++w===2)break;v=D,b=n,n=D,c=f,f=N,u=r,r=j}A=D.neg(),M=N;var C=m.sqr().add(x.sqr()),G=A.sqr().add(M.sqr());return G.cmp(C)>=0&&(A=l,M=y),m.negative&&(m=m.neg(),x=x.neg()),A.negative&&(A=A.neg(),M=M.neg()),[{a:m,b:x},{a:A,b:M}]};W8.prototype._endoSplit=function(e){var a=this.endo.basis,n=a[0],b=a[1],f=b.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),c=f.mul(n.a),u=r.mul(b.a),l=f.mul(n.b),y=r.mul(b.b),m=e.sub(c).sub(u),x=l.add(y).neg();return{k1:m,k2:x}};W8.prototype.pointFromX=function(e,a){e=new q1(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),b=n.redSqrt();if(b.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var f=b.fromRed().isOdd();return(a&&!f||!a&&f)&&(b=b.redNeg()),this.point(e,b)};W8.prototype.validate=function(e){if(e.inf)return!0;var a=e.x,n=e.y,b=this.a.redMul(a),f=a.redSqr().redMul(a).redIAdd(b).redIAdd(this.b);return n.redSqr().redISub(f).cmpn(0)===0};W8.prototype._endoWnafMulAdd=function(e,a,n){for(var b=this._endoWnafT1,f=this._endoWnafT2,r=0;r<e.length;r++){var c=this._endoSplit(a[r]),u=e[r],l=u._getBeta();c.k1.negative&&(c.k1.ineg(),u=u.neg(!0)),c.k2.negative&&(c.k2.ineg(),l=l.neg(!0)),b[r*2]=u,b[r*2+1]=l,f[r*2]=c.k1,f[r*2+1]=c.k2}for(var y=this._wnafMulAdd(1,b,f,r*2,n),m=0;m<r*2;m++)b[m]=null,f[m]=null;return y};function Z5(t,e,a,n){ya.BasePoint.call(this,t,"affine"),e===null&&a===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new q1(e,16),this.y=new q1(a,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}ys(Z5,ya.BasePoint);W8.prototype.point=function(e,a,n){return new Z5(this,e,a,n)};W8.prototype.pointFromJSON=function(e,a){return Z5.fromJSON(this,e,a)};Z5.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var a=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,b=function(f){return n.point(f.x.redMul(n.endo.beta),f.y)};e.beta=a,a.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(b)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(b)}}}return a}};Z5.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Z5.fromJSON=function(e,a,n){typeof a=="string"&&(a=JSON.parse(a));var b=e.point(a[0],a[1],n);if(!a[2])return b;function f(c){return e.point(c[0],c[1],n)}var r=a[2];return b.precomputed={beta:null,doubles:r.doubles&&{step:r.doubles.step,points:[b].concat(r.doubles.points.map(f))},naf:r.naf&&{wnd:r.naf.wnd,points:[b].concat(r.naf.points.map(f))}},b};Z5.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Z5.prototype.isInfinity=function(){return this.inf};Z5.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var a=this.y.redSub(e.y);a.cmpn(0)!==0&&(a=a.redMul(this.x.redSub(e.x).redInvm()));var n=a.redSqr().redISub(this.x).redISub(e.x),b=a.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,b)};Z5.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a,n=this.x.redSqr(),b=e.redInvm(),f=n.redAdd(n).redIAdd(n).redIAdd(a).redMul(b),r=f.redSqr().redISub(this.x.redAdd(this.x)),c=f.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,c)};Z5.prototype.getX=function(){return this.x.fromRed()};Z5.prototype.getY=function(){return this.y.fromRed()};Z5.prototype.mul=function(e){return e=new q1(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Z5.prototype.mulAdd=function(e,a,n){var b=[this,a],f=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(b,f):this.curve._wnafMulAdd(1,b,f,2)};Z5.prototype.jmulAdd=function(e,a,n){var b=[this,a],f=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(b,f,!0):this.curve._wnafMulAdd(1,b,f,2,!0)};Z5.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Z5.prototype.neg=function(e){if(this.inf)return this;var a=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,b=function(f){return f.neg()};a.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(b)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(b)}}}return a};Z5.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function be(t,e,a,n){ya.BasePoint.call(this,t,"jacobian"),e===null&&a===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new q1(0)):(this.x=new q1(e,16),this.y=new q1(a,16),this.z=new q1(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ys(be,ya.BasePoint);W8.prototype.jpoint=function(e,a,n){return new be(this,e,a,n)};be.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),a=e.redSqr(),n=this.x.redMul(a),b=this.y.redMul(a).redMul(e);return this.curve.point(n,b)};be.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};be.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),n=this.z.redSqr(),b=this.x.redMul(a),f=e.x.redMul(n),r=this.y.redMul(a.redMul(e.z)),c=e.y.redMul(n.redMul(this.z)),u=b.redSub(f),l=r.redSub(c);if(u.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=u.redSqr(),m=y.redMul(u),x=b.redMul(y),A=l.redSqr().redIAdd(m).redISub(x).redISub(x),M=l.redMul(x.redISub(A)).redISub(r.redMul(m)),v=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(A,M,v)};be.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),n=this.x,b=e.x.redMul(a),f=this.y,r=e.y.redMul(a).redMul(this.z),c=n.redSub(b),u=f.redSub(r);if(c.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=c.redSqr(),y=l.redMul(c),m=n.redMul(l),x=u.redSqr().redIAdd(y).redISub(m).redISub(m),A=u.redMul(m.redISub(x)).redISub(f.redMul(y)),M=this.z.redMul(c);return this.curve.jpoint(x,A,M)};be.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var a;if(this.curve.zeroA||this.curve.threeA){var n=this;for(a=0;a<e;a++)n=n.dbl();return n}var b=this.curve.a,f=this.curve.tinv,r=this.x,c=this.y,u=this.z,l=u.redSqr().redSqr(),y=c.redAdd(c);for(a=0;a<e;a++){var m=r.redSqr(),x=y.redSqr(),A=x.redSqr(),M=m.redAdd(m).redIAdd(m).redIAdd(b.redMul(l)),v=r.redMul(x),w=M.redSqr().redISub(v.redAdd(v)),D=v.redISub(w),N=M.redMul(D);N=N.redIAdd(N).redISub(A);var T=y.redMul(u);a+1<e&&(l=l.redMul(A)),r=w,u=T,y=N}return this.curve.jpoint(r,y.redMul(f),u)};be.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};be.prototype._zeroDbl=function(){var e,a,n;if(this.zOne){var b=this.x.redSqr(),f=this.y.redSqr(),r=f.redSqr(),c=this.x.redAdd(f).redSqr().redISub(b).redISub(r);c=c.redIAdd(c);var u=b.redAdd(b).redIAdd(b),l=u.redSqr().redISub(c).redISub(c),y=r.redIAdd(r);y=y.redIAdd(y),y=y.redIAdd(y),e=l,a=u.redMul(c.redISub(l)).redISub(y),n=this.y.redAdd(this.y)}else{var m=this.x.redSqr(),x=this.y.redSqr(),A=x.redSqr(),M=this.x.redAdd(x).redSqr().redISub(m).redISub(A);M=M.redIAdd(M);var v=m.redAdd(m).redIAdd(m),w=v.redSqr(),D=A.redIAdd(A);D=D.redIAdd(D),D=D.redIAdd(D),e=w.redISub(M).redISub(M),a=v.redMul(M.redISub(e)).redISub(D),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,a,n)};be.prototype._threeDbl=function(){var e,a,n;if(this.zOne){var b=this.x.redSqr(),f=this.y.redSqr(),r=f.redSqr(),c=this.x.redAdd(f).redSqr().redISub(b).redISub(r);c=c.redIAdd(c);var u=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),l=u.redSqr().redISub(c).redISub(c);e=l;var y=r.redIAdd(r);y=y.redIAdd(y),y=y.redIAdd(y),a=u.redMul(c.redISub(l)).redISub(y),n=this.y.redAdd(this.y)}else{var m=this.z.redSqr(),x=this.y.redSqr(),A=this.x.redMul(x),M=this.x.redSub(m).redMul(this.x.redAdd(m));M=M.redAdd(M).redIAdd(M);var v=A.redIAdd(A);v=v.redIAdd(v);var w=v.redAdd(v);e=M.redSqr().redISub(w),n=this.y.redAdd(this.z).redSqr().redISub(x).redISub(m);var D=x.redSqr();D=D.redIAdd(D),D=D.redIAdd(D),D=D.redIAdd(D),a=M.redMul(v.redISub(e)).redISub(D)}return this.curve.jpoint(e,a,n)};be.prototype._dbl=function(){var e=this.curve.a,a=this.x,n=this.y,b=this.z,f=b.redSqr().redSqr(),r=a.redSqr(),c=n.redSqr(),u=r.redAdd(r).redIAdd(r).redIAdd(e.redMul(f)),l=a.redAdd(a);l=l.redIAdd(l);var y=l.redMul(c),m=u.redSqr().redISub(y.redAdd(y)),x=y.redISub(m),A=c.redSqr();A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var M=u.redMul(x).redISub(A),v=n.redAdd(n).redMul(b);return this.curve.jpoint(m,M,v)};be.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),a=this.y.redSqr(),n=this.z.redSqr(),b=a.redSqr(),f=e.redAdd(e).redIAdd(e),r=f.redSqr(),c=this.x.redAdd(a).redSqr().redISub(e).redISub(b);c=c.redIAdd(c),c=c.redAdd(c).redIAdd(c),c=c.redISub(r);var u=c.redSqr(),l=b.redIAdd(b);l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var y=f.redIAdd(c).redSqr().redISub(r).redISub(u).redISub(l),m=a.redMul(y);m=m.redIAdd(m),m=m.redIAdd(m);var x=this.x.redMul(u).redISub(m);x=x.redIAdd(x),x=x.redIAdd(x);var A=this.y.redMul(y.redMul(l.redISub(y)).redISub(c.redMul(u)));A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var M=this.z.redAdd(c).redSqr().redISub(n).redISub(u);return this.curve.jpoint(x,A,M)};be.prototype.mul=function(e,a){return e=new q1(e,a),this.curve._wnafMul(this,e)};be.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var a=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(a)).cmpn(0)!==0)return!1;var b=a.redMul(this.z),f=n.redMul(e.z);return this.y.redMul(f).redISub(e.y.redMul(b)).cmpn(0)===0};be.prototype.eqXToP=function(e){var a=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(a);if(this.x.cmp(n)===0)return!0;for(var b=e.clone(),f=this.curve.redN.redMul(a);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(f),this.x.cmp(n)===0)return!0}};be.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};be.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Jr=K9(function(t,e){var a=e;a.base=ya,a.short=Oj,a.mont=null,a.edwards=null}),qr=K9(function(t,e){var a=e,n=v8.assert;function b(c){c.type==="short"?this.curve=new Jr.short(c):c.type==="edwards"?this.curve=new Jr.edwards(c):this.curve=new Jr.mont(c),this.g=this.curve.g,this.n=this.curve.n,this.hash=c.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}a.PresetCurve=b;function f(c,u){Object.defineProperty(a,c,{configurable:!0,enumerable:!0,get:function(){var l=new b(u);return Object.defineProperty(a,c,{configurable:!0,enumerable:!0,value:l}),l}})}f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Z2.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Z2.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Z2.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Z2.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Z2.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Z2.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Z2.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var r;try{r=null.crash()}catch{r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Z2.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function e3(t){if(!(this instanceof e3))return new e3(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=A2.toArray(t.entropy,t.entropyEnc||"hex"),a=A2.toArray(t.nonce,t.nonceEnc||"hex"),n=A2.toArray(t.pers,t.persEnc||"hex");ps(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,a,n)}var $g=e3;e3.prototype._init=function(e,a,n){var b=e.concat(a).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var f=0;f<this.V.length;f++)this.K[f]=0,this.V[f]=1;this._update(b),this._reseed=1,this.reseedInterval=281474976710656};e3.prototype._hmac=function(){return new Z2.hmac(this.hash,this.K)};e3.prototype._update=function(e){var a=this._hmac().update(this.V).update([0]);e&&(a=a.update(e)),this.K=a.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};e3.prototype.reseed=function(e,a,n,b){typeof a!="string"&&(b=n,n=a,a=null),e=A2.toArray(e,a),n=A2.toArray(n,b),ps(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};e3.prototype.generate=function(e,a,n,b){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof a!="string"&&(b=n,n=a,a=null),n&&(n=A2.toArray(n,b||"hex"),this._update(n));for(var f=[];f.length<e;)this.V=this._hmac().update(this.V).digest(),f=f.concat(this.V);var r=f.slice(0,e);return this._update(n),this._reseed++,A2.encode(r,a)};var p7=v8.assert;function Ae(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var ms=Ae;Ae.fromPublic=function(e,a,n){return a instanceof Ae?a:new Ae(e,{pub:a,pubEnc:n})};Ae.fromPrivate=function(e,a,n){return a instanceof Ae?a:new Ae(e,{priv:a,privEnc:n})};Ae.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};Ae.prototype.getPublic=function(e,a){return typeof e=="string"&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub};Ae.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};Ae.prototype._importPrivate=function(e,a){this.priv=new q1(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)};Ae.prototype._importPublic=function(e,a){if(e.x||e.y){this.ec.curve.type==="mont"?p7(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&p7(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,a)};Ae.prototype.derive=function(e){return e.validate()||p7(e.validate(),"public point not validated"),e.mul(this.priv).getX()};Ae.prototype.sign=function(e,a,n){return this.ec.sign(e,this,a,n)};Ae.prototype.verify=function(e,a,n){return this.ec.verify(e,a,this,void 0,n)};Ae.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var _j=v8.assert;function Hd(t,e){if(t instanceof Hd)return t;this._importDER(t,e)||(_j(t.r&&t.s,"Signature without r or s"),this.r=new q1(t.r,16),this.s=new q1(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Vd=Hd;function Bj(){this.place=0}function go(t,e){var a=t[e.place++];if(!(a&128))return a;var n=a&15;if(n===0||n>4||t[e.place]===0)return!1;for(var b=0,f=0,r=e.place;f<n;f++,r++)b<<=8,b|=t[r],b>>>=0;return b<=127?!1:(e.place=r,b)}function Xp(t){for(var e=0,a=t.length-1;!t[e]&&!(t[e+1]&128)&&e<a;)e++;return e===0?t:t.slice(e)}Hd.prototype._importDER=function(e,a){e=v8.toArray(e,a);var n=new Bj;if(e[n.place++]!==48)return!1;var b=go(e,n);if(b===!1||b+n.place!==e.length||e[n.place++]!==2)return!1;var f=go(e,n);if(f===!1||(e[n.place]&128)!==0)return!1;var r=e.slice(n.place,f+n.place);if(n.place+=f,e[n.place++]!==2)return!1;var c=go(e,n);if(c===!1||e.length!==c+n.place||(e[n.place]&128)!==0)return!1;var u=e.slice(n.place,c+n.place);if(r[0]===0)if(r[1]&128)r=r.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new q1(r),this.s=new q1(u),this.recoveryParam=null,!0};function Ao(t,e){if(e<128){t.push(e);return}var a=1+(Math.log(e)/Math.LN2>>>3);for(t.push(a|128);--a;)t.push(e>>>(a<<3)&255);t.push(e)}Hd.prototype.toDER=function(e){var a=this.r.toArray(),n=this.s.toArray();for(a[0]&128&&(a=[0].concat(a)),n[0]&128&&(n=[0].concat(n)),a=Xp(a),n=Xp(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var b=[2];Ao(b,a.length),b=b.concat(a),b.push(2),Ao(b,n.length);var f=b.concat(n),r=[48];return Ao(r,f.length),r=r.concat(f),v8.encode(r,e)};var Pj=(function(){throw new Error("unsupported")}),ea=v8.assert;function F8(t){if(!(this instanceof F8))return new F8(t);typeof t=="string"&&(ea(Object.prototype.hasOwnProperty.call(qr,t),"Unknown curve "+t),t=qr[t]),t instanceof qr.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Uj=F8;F8.prototype.keyPair=function(e){return new ms(this,e)};F8.prototype.keyFromPrivate=function(e,a){return ms.fromPrivate(this,e,a)};F8.prototype.keyFromPublic=function(e,a){return ms.fromPublic(this,e,a)};F8.prototype.genKeyPair=function(e){e||(e={});for(var a=new $g({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Pj(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),b=this.n.sub(new q1(2));;){var f=new q1(a.generate(n));if(!(f.cmp(b)>0))return f.iaddn(1),this.keyFromPrivate(f)}};F8.prototype._truncateToN=function(e,a,n){var b;if(q1.isBN(e)||typeof e=="number")e=new q1(e,16),b=e.byteLength();else if(typeof e=="object")b=e.length,e=new q1(e,16);else{var f=e.toString();b=f.length+1>>>1,e=new q1(f,16)}typeof n!="number"&&(n=b*8);var r=n-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!a&&e.cmp(this.n)>=0?e.sub(this.n):e};F8.prototype.sign=function(e,a,n,b){if(typeof n=="object"&&(b=n,n=null),b||(b={}),typeof e!="string"&&typeof e!="number"&&!q1.isBN(e)){ea(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),ea(e.length>>>0===e.length);for(var f=0;f<e.length;f++)ea((e[f]&255)===e[f])}a=this.keyFromPrivate(a,n),e=this._truncateToN(e,!1,b.msgBitLength),ea(!e.isNeg(),"Can not sign a negative message");var r=this.n.byteLength(),c=a.getPrivate().toArray("be",r),u=e.toArray("be",r);ea(new q1(u).eq(e),"Can not sign message");for(var l=new $g({hash:this.hash,entropy:c,nonce:u,pers:b.pers,persEnc:b.persEnc||"utf8"}),y=this.n.sub(new q1(1)),m=0;;m++){var x=b.k?b.k(m):new q1(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(y)>=0)){var A=this.g.mul(x);if(!A.isInfinity()){var M=A.getX(),v=M.umod(this.n);if(v.cmpn(0)!==0){var w=x.invm(this.n).mul(v.mul(a.getPrivate()).iadd(e));if(w=w.umod(this.n),w.cmpn(0)!==0){var D=(A.getY().isOdd()?1:0)|(M.cmp(v)!==0?2:0);return b.canonical&&w.cmp(this.nh)>0&&(w=this.n.sub(w),D^=1),new Vd({r:v,s:w,recoveryParam:D})}}}}}};F8.prototype.verify=function(e,a,n,b,f){f||(f={}),e=this._truncateToN(e,!1,f.msgBitLength),n=this.keyFromPublic(n,b),a=new Vd(a,"hex");var r=a.r,c=a.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;var u=c.invm(this.n),l=u.mul(e).umod(this.n),y=u.mul(r).umod(this.n),m;return this.curve._maxwellTrick?(m=this.g.jmulAdd(l,n.getPublic(),y),m.isInfinity()?!1:m.eqXToP(r)):(m=this.g.mulAdd(l,n.getPublic(),y),m.isInfinity()?!1:m.getX().umod(this.n).cmp(r)===0)};F8.prototype.recoverPubKey=function(t,e,a,n){ea((3&a)===a,"The recovery param is more than two bits"),e=new Vd(e,n);var b=this.n,f=new q1(t),r=e.r,c=e.s,u=a&1,l=a>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?r=this.curve.pointFromX(r.add(this.curve.n),u):r=this.curve.pointFromX(r,u);var y=e.r.invm(b),m=b.sub(f).mul(y).umod(b),x=c.mul(y).umod(b);return this.g.mulAdd(m,r,x)};F8.prototype.getKeyRecoveryParam=function(t,e,a,n){if(e=new Vd(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var b=0;b<4;b++){var f;try{f=this.recoverPubKey(t,e,b)}catch{continue}if(f.eq(a))return b}throw new Error("Unable to find valid recovery factor")};var Rj=K9(function(t,e){var a=e;a.version="6.6.1",a.utils=v8,a.rand=(function(){throw new Error("unsupported")}),a.curve=Jr,a.curves=qr,a.ec=Uj,a.eddsa=null}),Qj=Rj.ec;const Fj="signing-key/5.8.0",y7=new R0(Fj);let Mo=null;function Ht(){return Mo||(Mo=new Qj("secp256k1")),Mo}class Yj{constructor(e){p1(this,"curve","secp256k1"),p1(this,"privateKey",_1(e)),$t(this.privateKey)!==32&&y7.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const a=Ht().keyFromPrivate(R1(this.privateKey));p1(this,"publicKey","0x"+a.getPublic(!1,"hex")),p1(this,"compressedPublicKey","0x"+a.getPublic(!0,"hex")),p1(this,"_isSigningKey",!0)}_addPoint(e){const a=Ht().keyFromPublic(R1(this.publicKey)),n=Ht().keyFromPublic(R1(e));return"0x"+a.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const a=Ht().keyFromPrivate(R1(this.privateKey)),n=R1(e);n.length!==32&&y7.throwArgumentError("bad digest length","digest",e);const b=a.sign(n,{canonical:!0});return Fd({recoveryParam:b.recoveryParam,r:e5("0x"+b.r.toString(16),32),s:e5("0x"+b.s.toString(16),32)})}computeSharedSecret(e){const a=Ht().keyFromPrivate(R1(this.privateKey)),n=Ht().keyFromPublic(R1(eA(e)));return e5("0x"+a.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function Gj(t,e){const a=Fd(e),n={r:R1(a.r),s:R1(a.s)};return"0x"+Ht().recoverPubKey(R1(t),n,a.recoveryParam).encode("hex",!1)}function eA(t,e){const a=R1(t);return a.length===32?new Yj(a).publicKey:a.length===33?"0x"+Ht().keyFromPublic(a).getPublic(!1,"hex"):a.length===65?_1(a):y7.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Wj="transactions/5.8.0",tA=new R0(Wj);var $p;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})($p||($p={}));function wo(t,e){return{address:Q5(t),storageKeys:(e||[]).map((a,n)=>($t(a)!==32&&tA.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,a),a.toLowerCase()))}}function Hj(t){if(Array.isArray(t))return t.map((a,n)=>Array.isArray(a)?(a.length>2&&tA.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,a),wo(a[0],a[1])):wo(a.address,a.storageKeys));const e=Object.keys(t).map(a=>{const n=t[a].reduce((b,f)=>(b[f]=!0,b),{});return wo(a,Object.keys(n).sort())});return e.sort((a,n)=>a.address.localeCompare(n.address)),e}const Vj="contracts/5.8.0";var oa=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const w5=new R0(Vj);function yd(t,e){return oa(this,void 0,void 0,function*(){const a=yield e;typeof a!="string"&&w5.throwArgumentError("invalid address or ENS name","name",a);try{return Q5(a)}catch{}t||w5.throwError("a provider or signer is needed to resolve ENS names",R0.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(a);return n==null&&w5.throwArgumentError("resolver or addr is not configured for ENS name","name",a),n})}function Xr(t,e,a){return oa(this,void 0,void 0,function*(){return Array.isArray(a)?yield Promise.all(a.map((n,b)=>Xr(t,Array.isArray(e)?e[b]:e[n.name],n))):a.type==="address"?yield yd(t,e):a.type==="tuple"?yield Xr(t,e,a.components):a.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Xr(t,n,a.arrayChildren))):Promise.reject(w5.makeError("invalid value for array",R0.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Zd(t,e,a){return oa(this,void 0,void 0,function*(){let n={};a.length===e.inputs.length+1&&typeof a[a.length-1]=="object"&&(n=R5(a.pop())),w5.checkArgumentCount(a.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=j5({override:yd(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>oa(this,void 0,void 0,function*(){return Q5(l.signer)!==l.override&&w5.throwError("Contract with a Signer cannot override from",R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=yd(t.provider,n.from));const b=yield j5({args:Xr(t.signer||t.provider,a,e.inputs),address:t.resolvedAddress,overrides:j5(n)||{}}),f=t.interface.encodeFunctionData(e,b.args),r={data:f,to:b.address},c=b.overrides;if(c.nonce!=null&&(r.nonce=g1.from(c.nonce).toNumber()),c.gasLimit!=null&&(r.gasLimit=g1.from(c.gasLimit)),c.gasPrice!=null&&(r.gasPrice=g1.from(c.gasPrice)),c.maxFeePerGas!=null&&(r.maxFeePerGas=g1.from(c.maxFeePerGas)),c.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=g1.from(c.maxPriorityFeePerGas)),c.from!=null&&(r.from=c.from),c.type!=null&&(r.type=c.type),c.accessList!=null&&(r.accessList=Hj(c.accessList)),r.gasLimit==null&&e.gas!=null){let l=21e3;const y=R1(f);for(let m=0;m<y.length;m++)l+=4,y[m]&&(l+=64);r.gasLimit=g1.from(e.gas).add(l)}if(c.value){const l=g1.from(c.value);!l.isZero()&&!e.payable&&w5.throwError("non-payable method cannot override value",R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),r.value=l}c.customData&&(r.customData=R5(c.customData)),c.ccipReadEnabled&&(r.ccipReadEnabled=!!c.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const u=Object.keys(n).filter(l=>n[l]!=null);return u.length&&w5.throwError(`cannot override ${u.map(l=>JSON.stringify(l)).join(",")}`,R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),r})}function Zj(t,e){return function(...a){return Zd(t,e,a)}}function Kj(t,e){const a=t.signer||t.provider;return function(...n){return oa(this,void 0,void 0,function*(){a||w5.throwError("estimate require a provider or signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const b=yield Zd(t,e,n);return yield a.estimateGas(b)})}}function Jj(t,e){const a=e.wait.bind(e);e.wait=n=>a(n).then(b=>(b.events=b.logs.map(f=>{let r=nt(f),c=null;try{c=t.interface.parseLog(f)}catch{}return c&&(r.args=c.args,r.decode=(u,l)=>t.interface.decodeEventLog(c.eventFragment,u,l),r.event=c.name,r.eventSignature=c.signature),r.removeListener=()=>t.provider,r.getBlock=()=>t.provider.getBlock(b.blockHash),r.getTransaction=()=>t.provider.getTransaction(b.transactionHash),r.getTransactionReceipt=()=>Promise.resolve(b),r}),b))}function aA(t,e,a){const n=t.signer||t.provider;return function(...b){return oa(this,void 0,void 0,function*(){let f;if(b.length===e.inputs.length+1&&typeof b[b.length-1]=="object"){const u=R5(b.pop());u.blockTag!=null&&(f=yield u.blockTag),delete u.blockTag,b.push(u)}t.deployTransaction!=null&&(yield t._deployed(f));const r=yield Zd(t,e,b),c=yield n.call(r,f);try{let u=t.interface.decodeFunctionResult(e,c);return a&&e.outputs.length===1&&(u=u[0]),u}catch(u){throw u.code===R0.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=b,u.transaction=r),u}})}}function qj(t,e){return function(...a){return oa(this,void 0,void 0,function*(){t.signer||w5.throwError("sending a transaction requires a signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Zd(t,e,a),b=yield t.signer.sendTransaction(n);return Jj(t,b),b})}}function ey(t,e,a){return e.constant?aA(t,e,a):qj(t,e)}function nA(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class wb{constructor(e,a){p1(this,"tag",e),p1(this,"filter",a),this._listeners=[]}addListener(e,a){this._listeners.push({listener:e,once:a})}removeListener(e){let a=!1;this._listeners=this._listeners.filter(n=>a||n.listener!==e?!0:(a=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const a=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const b=e.slice();return setTimeout(()=>{n.listener.apply(this,b)},0),!n.once}),a}prepareEvent(e){}getEmit(e){return[e]}}class Xj extends wb{constructor(){super("error",null)}}class ty extends wb{constructor(e,a,n,b){const f={address:e};let r=a.getEventTopic(n);b?(r!==b[0]&&w5.throwArgumentError("topic mismatch","topics",b),f.topics=b.slice()):f.topics=[r],super(nA(f),f),p1(this,"address",e),p1(this,"interface",a),p1(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(a,n)=>this.interface.decodeEventLog(this.fragment,a,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(a){e.args=null,e.decodeError=a}}getEmit(e){const a=ak(e.args);if(a.length)throw a[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class ay extends wb{constructor(e,a){super("*",{address:e}),p1(this,"address",e),p1(this,"interface",a)}prepareEvent(e){super.prepareEvent(e);try{const a=this.interface.parseLog(e);e.event=a.name,e.eventSignature=a.signature,e.decode=(n,b)=>this.interface.decodeEventLog(a.eventFragment,n,b),e.args=a.args}catch{}}}class $j{constructor(e,a,n){p1(this,"interface",f4(new.target,"getInterface")(a)),n==null?(p1(this,"provider",null),p1(this,"signer",null)):Ub.isSigner(n)?(p1(this,"provider",n.provider||null),p1(this,"signer",n)):Wd.isProvider(n)?(p1(this,"provider",n),p1(this,"signer",null)):w5.throwArgumentError("invalid signer or provider","signerOrProvider",n),p1(this,"callStatic",{}),p1(this,"estimateGas",{}),p1(this,"functions",{}),p1(this,"populateTransaction",{}),p1(this,"filters",{});{const r={};Object.keys(this.interface.events).forEach(c=>{const u=this.interface.events[c];p1(this.filters,c,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(u,l)})),r[u.name]||(r[u.name]=[]),r[u.name].push(c)}),Object.keys(r).forEach(c=>{const u=r[c];u.length===1?p1(this.filters,c,this.filters[u[0]]):w5.warn(`Duplicate definition of ${c} (${u.join(", ")})`)})}if(p1(this,"_runningEvents",{}),p1(this,"_wrappedEmits",{}),e==null&&w5.throwArgumentError("invalid contract address or ENS name","addressOrName",e),p1(this,"address",e),this.provider)p1(this,"resolvedAddress",yd(this.provider,e));else try{p1(this,"resolvedAddress",Promise.resolve(Q5(e)))}catch{w5.throwError("provider is required to use ENS name as contract address",R0.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(r=>{});const b={},f={};Object.keys(this.interface.functions).forEach(r=>{const c=this.interface.functions[r];if(f[r]){w5.warn(`Duplicate ABI entry for ${JSON.stringify(r)}`);return}f[r]=!0;{const u=c.name;b[`%${u}`]||(b[`%${u}`]=[]),b[`%${u}`].push(r)}this[r]==null&&p1(this,r,ey(this,c,!0)),this.functions[r]==null&&p1(this.functions,r,ey(this,c,!1)),this.callStatic[r]==null&&p1(this.callStatic,r,aA(this,c,!0)),this.populateTransaction[r]==null&&p1(this.populateTransaction,r,Zj(this,c)),this.estimateGas[r]==null&&p1(this.estimateGas,r,Kj(this,c))}),Object.keys(b).forEach(r=>{const c=b[r];if(c.length>1)return;r=r.substring(1);const u=c[0];try{this[r]==null&&p1(this,r,this[u])}catch{}this.functions[r]==null&&p1(this.functions,r,this.functions[u]),this.callStatic[r]==null&&p1(this.callStatic,r,this.callStatic[u]),this.populateTransaction[r]==null&&p1(this.populateTransaction,r,this.populateTransaction[u]),this.estimateGas[r]==null&&p1(this.estimateGas,r,this.estimateGas[u])})}static getContractAddress(e){return Cg(e)}static getInterface(e){return Bp.isInterface(e)?e:new Bp(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(a=>(a==="0x"&&w5.throwError("contract not deployed",R0.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||w5.throwError("sending a transactions require a signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const a=R5(e||{});return["from","to"].forEach(function(n){a[n]!=null&&w5.throwError("cannot override "+n,R0.errors.UNSUPPORTED_OPERATION,{operation:n})}),a.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(a))}connect(e){typeof e=="string"&&(e=new ls(e,this.provider));const a=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&p1(a,"deployTransaction",this.deployTransaction),a}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return l7.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Xj);if(e==="event")return this._normalizeRunningEvent(new wb("event",null));if(e==="*")return this._normalizeRunningEvent(new ay(this.address,this.interface));const a=this.interface.getEvent(e);return this._normalizeRunningEvent(new ty(this.address,this.interface,a))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const b=this.interface.getEvent(n);return this._normalizeRunningEvent(new ty(this.address,this.interface,b,e.topics))}catch{}const a={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new wb(nA(a),a))}return this._normalizeRunningEvent(new ay(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const a=this._wrappedEmits[e.tag];a&&e.filter&&(this.provider.off(e.filter,a),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,a,n){const b=nt(a);return b.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},b.getBlock=()=>this.provider.getBlock(a.blockHash),b.getTransaction=()=>this.provider.getTransaction(a.transactionHash),b.getTransactionReceipt=()=>this.provider.getTransactionReceipt(a.transactionHash),e.prepareEvent(b),b}_addEventListener(e,a,n){if(this.provider||w5.throwError("events require a provider or a signer with a provider",R0.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(a,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const b=f=>{let r=this._wrapEvent(e,f,a);if(r.decodeError==null)try{const c=e.getEmit(r);this.emit(e.filter,...c)}catch(c){r.decodeError=c.error}e.filter!=null&&this.emit("event",r),r.decodeError!=null&&this.emit("error",r.decodeError,r)};this._wrappedEmits[e.tag]=b,e.filter!=null&&this.provider.on(e.filter,b)}}queryFilter(e,a,n){const b=this._getRunningEvent(e),f=R5(b.filter);return typeof a=="string"&&z6(a,32)?(n!=null&&w5.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),f.blockHash=a):(f.fromBlock=a??0,f.toBlock=n??"latest"),this.provider.getLogs(f).then(r=>r.map(c=>this._wrapEvent(b,c,null)))}on(e,a){return this._addEventListener(this._getRunningEvent(e),a,!1),this}once(e,a){return this._addEventListener(this._getRunningEvent(e),a,!0),this}emit(e,...a){if(!this.provider)return!1;const n=this._getRunningEvent(e),b=n.run(a)>0;return this._checkRunningEvents(n),b}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((a,n)=>a+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const a=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(b=>{a.push(b)});return a}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const b=this._runningEvents[n];b.removeAllListeners(),this._checkRunningEvents(b)}return this}const a=this._getRunningEvent(e);return a.removeAllListeners(),this._checkRunningEvents(a),this}off(e,a){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(a),this._checkRunningEvents(n),this}removeListener(e,a){return this.off(e,a)}}class eS extends $j{}class bA{constructor(e){p1(this,"alphabet",e),p1(this,"base",e.length),p1(this,"_alphabetMap",{}),p1(this,"_leader",e.charAt(0));for(let a=0;a<e.length;a++)this._alphabetMap[e.charAt(a)]=a}encode(e){let a=R1(e);if(a.length===0)return"";let n=[0];for(let f=0;f<a.length;++f){let r=a[f];for(let c=0;c<n.length;++c)r+=n[c]<<8,n[c]=r%this.base,r=r/this.base|0;for(;r>0;)n.push(r%this.base),r=r/this.base|0}let b="";for(let f=0;a[f]===0&&f<a.length-1;++f)b+=this._leader;for(let f=n.length-1;f>=0;--f)b+=this.alphabet[n[f]];return b}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let a=[];if(e.length===0)return new Uint8Array(a);a.push(0);for(let n=0;n<e.length;n++){let b=this._alphabetMap[e[n]];if(b===void 0)throw new Error("Non-base"+this.base+" character");let f=b;for(let r=0;r<a.length;++r)f+=a[r]*this.base,a[r]=f&255,f>>=8;for(;f>0;)a.push(f&255),f>>=8}for(let n=0;e[n]===this._leader&&n<e.length-1;++n)a.push(0);return R1(new Uint8Array(a.reverse()))}}new bA("abcdefghijklmnopqrstuvwxyz234567");const m7=new bA("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function ny(t){return"0x"+Z2.sha256().update(R1(t)).digest("hex")}const tS="networks/5.8.0",by=new R0(tS);function aS(t){return t&&typeof t.renetwork=="function"}function y2(t){const e=function(a,n){n==null&&(n={});const b=[];if(a.InfuraProvider&&n.infura!=="-")try{b.push(new a.InfuraProvider(t,n.infura))}catch{}if(a.EtherscanProvider&&n.etherscan!=="-")try{b.push(new a.EtherscanProvider(t,n.etherscan))}catch{}if(a.AlchemyProvider&&n.alchemy!=="-")try{b.push(new a.AlchemyProvider(t,n.alchemy))}catch{}if(a.PocketProvider&&n.pocket!=="-"){const f=["goerli","ropsten","rinkeby","sepolia"];try{const r=new a.PocketProvider(t,n.pocket);r.network&&f.indexOf(r.network.name)===-1&&b.push(r)}catch{}}if(a.CloudflareProvider&&n.cloudflare!=="-")try{b.push(new a.CloudflareProvider(t))}catch{}if(a.AnkrProvider&&n.ankr!=="-")try{const f=["ropsten"],r=new a.AnkrProvider(t,n.ankr);r.network&&f.indexOf(r.network.name)===-1&&b.push(r)}catch{}if(a.QuickNodeProvider&&n.quicknode!=="-")try{b.push(new a.QuickNodeProvider(t,n.quicknode))}catch{}if(b.length===0)return null;if(a.FallbackProvider){let f=1;return n.quorum!=null?f=n.quorum:t==="homestead"&&(f=2),new a.FallbackProvider(b,f)}return b[0]};return e.renetwork=function(a){return y2(a)},e}function md(t,e){const a=function(n,b){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return a.renetwork=function(n){return md(t,n)},a}const fy={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:y2("homestead")},ry={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:y2("ropsten")},dy={chainId:63,name:"classicMordor",_defaultProvider:md("https://www.ethercluster.com/mordor","classicMordor")},hr={unspecified:{chainId:0,name:"unspecified"},homestead:fy,mainnet:fy,morden:{chainId:2,name:"morden"},ropsten:ry,testnet:ry,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:y2("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:y2("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:y2("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"sepolia",_defaultProvider:y2("sepolia")},holesky:{chainId:17e3,name:"holesky",_defaultProvider:y2("holesky")},classic:{chainId:61,name:"classic",_defaultProvider:md("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:dy,classicTestnet:dy,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:md("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:y2("matic")},maticmum:{chainId:80001,name:"maticmum",_defaultProvider:y2("maticmum")},optimism:{chainId:10,name:"optimism",_defaultProvider:y2("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},"optimism-sepolia":{chainId:11155420,name:"optimism-sepolia"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},"arbitrum-sepolia":{chainId:421614,name:"arbitrum-sepolia"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function nS(t){if(t==null)return null;if(typeof t=="number"){for(const n in hr){const b=hr[n];if(b.chainId===t)return{name:b.name,chainId:b.chainId,ensAddress:b.ensAddress||null,_defaultProvider:b._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=hr[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=hr[t.name];if(!e)return typeof t.chainId!="number"&&by.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&by.throwArgumentError("network chainId mismatch","network",t);let a=t._defaultProvider||null;return a==null&&e._defaultProvider&&(aS(e._defaultProvider)?a=e._defaultProvider.renetwork(t):a=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:a}}const bS="web/5.8.0";var fS=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};function rS(t,e){return fS(this,void 0,void 0,function*(){e==null&&(e={});const a={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(a.mode="cors",a.cache="no-cache",a.credentials="same-origin",a.redirect="follow",a.referrer="client"),e.fetchOptions!=null){const r=e.fetchOptions;r.mode&&(a.mode=r.mode),r.cache&&(a.cache=r.cache),r.credentials&&(a.credentials=r.credentials),r.redirect&&(a.redirect=r.redirect),r.referrer&&(a.referrer=r.referrer)}const n=yield fetch(t,a),b=yield n.arrayBuffer(),f={};return n.headers.forEach?n.headers.forEach((r,c)=>{f[c.toLowerCase()]=r}):n.headers.keys().forEach(r=>{f[r.toLowerCase()]=n.headers.get(r)}),{headers:f,statusCode:n.status,statusMessage:n.statusText,body:R1(new Uint8Array(b))}})}var dS=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const l2=new R0(bS);function iy(t){return new Promise(e=>{setTimeout(e,t)})}function Rt(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ds(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Pb(t)}catch{}return _1(t)}return t}function iS(t){return d4(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,a)=>String.fromCharCode(parseInt(a,16))))}function cS(t,e,a){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;l2.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const b=typeof t=="object"?t.throttleCallback:null,f=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;l2.assertArgument(f>0&&f%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",f);const r=typeof t=="object"?!!t.errorPassThrough:!1,c={};let u=null;const l={method:"GET"};let y=!1,m=120*1e3;if(typeof t=="string")u=t;else if(typeof t=="object"){if((t==null||t.url==null)&&l2.throwArgumentError("missing URL","connection.url",t),u=t.url,typeof t.timeout=="number"&&t.timeout>0&&(m=t.timeout),t.headers)for(const D in t.headers)c[D.toLowerCase()]={key:D,value:String(t.headers[D])},["if-none-match","if-modified-since"].indexOf(D.toLowerCase())>=0&&(y=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){u.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&l2.throwError("basic authentication requires a secure https url",R0.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});const D=t.user+":"+t.password;c.authorization={key:"Authorization",value:"Basic "+Ug(d4(D))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=R5(t.fetchOptions))}const x=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),A=u?u.match(x):null;if(A)try{const D={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]||"text/plain"},body:A[2]?Pg(A[3]):iS(A[3])};let N=D.body;return a&&(N=a(D.body,D)),Promise.resolve(N)}catch(D){l2.throwError("processing response error",R0.errors.SERVER_ERROR,{body:Rt(A[1],A[2]),error:D,requestBody:null,requestMethod:"GET",url:u})}e&&(l.method="POST",l.body=e,c["content-type"]==null&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),c["content-length"]==null&&(c["content-length"]={key:"Content-Length",value:String(e.length)}));const M={};Object.keys(c).forEach(D=>{const N=c[D];M[N.key]=N.value}),l.headers=M;const v=(function(){let D=null;return{promise:new Promise(function(j,C){m&&(D=setTimeout(()=>{D!=null&&(D=null,C(l2.makeError("timeout",R0.errors.TIMEOUT,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,timeout:m,url:u})))},m))}),cancel:function(){D!=null&&(clearTimeout(D),D=null)}}})(),w=(function(){return dS(this,void 0,void 0,function*(){for(let D=0;D<n;D++){let N=null;try{if(N=yield rS(u,l),D<n){if(N.statusCode===301||N.statusCode===302){const j=N.headers.location||"";if(l.method==="GET"&&j.match(/^https:/)){u=N.headers.location;continue}}else if(N.statusCode===429){let j=!0;if(b&&(j=yield b(D,u)),j){let C=0;const G=N.headers["retry-after"];typeof G=="string"&&G.match(/^[1-9][0-9]*$/)?C=parseInt(G)*1e3:C=f*parseInt(String(Math.random()*Math.pow(2,D))),yield iy(C);continue}}}}catch(j){N=j.response,N==null&&(v.cancel(),l2.throwError("missing response",R0.errors.SERVER_ERROR,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,serverError:j,url:u}))}let T=N.body;if(y&&N.statusCode===304?T=null:!r&&(N.statusCode<200||N.statusCode>=300)&&(v.cancel(),l2.throwError("bad response",R0.errors.SERVER_ERROR,{status:N.statusCode,headers:N.headers,body:Rt(T,N.headers?N.headers["content-type"]:null),requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})),a)try{const j=yield a(T,N);return v.cancel(),j}catch(j){if(j.throttleRetry&&D<n){let C=!0;if(b&&(C=yield b(D,u)),C){const G=f*parseInt(String(Math.random()*Math.pow(2,D)));yield iy(G);continue}}v.cancel(),l2.throwError("processing response error",R0.errors.SERVER_ERROR,{body:Rt(T,N.headers?N.headers["content-type"]:null),error:j,requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})}return v.cancel(),T}return l2.throwError("failed response",R0.errors.SERVER_ERROR,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})})})();return Promise.race([v.promise,w])}function hs(t,e,a){let n=(f,r)=>{let c=null;if(f!=null)try{c=JSON.parse(Pb(f))}catch(u){l2.throwError("invalid JSON",R0.errors.SERVER_ERROR,{body:f,error:u})}return a&&(c=a(c,r)),c},b=null;if(e!=null){b=d4(e);const f=typeof t=="string"?{url:t}:R5(t);f.headers?Object.keys(f.headers).filter(c=>c.toLowerCase()==="content-type").length!==0||(f.headers=R5(f.headers),f.headers["content-type"]="application/json"):f.headers={"content-type":"application/json"},t=f}return cS(t,b,n)}function bb(t,e){return e||(e={}),e=R5(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(a,n){let b=null,f=!1;const r=()=>f?!1:(f=!0,b&&clearTimeout(b),!0);e.timeout&&(b=setTimeout(()=>{r()&&n(new Error("timeout"))},e.timeout));const c=e.retryLimit;let u=0;function l(){return t().then(function(y){if(y!==void 0)r()&&a(y);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!f){if(u++,u>c){r()&&n(new Error("retry limit reached"));return}let m=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));m<e.floor&&(m=e.floor),m>e.ceiling&&(m=e.ceiling),setTimeout(l,m)}return null},function(y){r()&&n(y)})}l()})}var xo,cy;function oS(){if(cy)return xo;cy=1;for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",e={},a=0;a<t.length;a++){var n=t.charAt(a);if(e[n]!==void 0)throw new TypeError(n+" is ambiguous");e[n]=a}function b(v){var w=v>>25;return(v&33554431)<<5^-(w>>0&1)&996825010^-(w>>1&1)&642813549^-(w>>2&1)&513874426^-(w>>3&1)&1027748829^-(w>>4&1)&705979059}function f(v){for(var w=1,D=0;D<v.length;++D){var N=v.charCodeAt(D);if(N<33||N>126)return"Invalid prefix ("+v+")";w=b(w)^N>>5}for(w=b(w),D=0;D<v.length;++D){var T=v.charCodeAt(D);w=b(w)^T&31}return w}function r(v,w,D){if(D=D||90,v.length+7+w.length>D)throw new TypeError("Exceeds length limit");v=v.toLowerCase();var N=f(v);if(typeof N=="string")throw new Error(N);for(var T=v+"1",j=0;j<w.length;++j){var C=w[j];if(C>>5!==0)throw new Error("Non 5-bit word");N=b(N)^C,T+=t.charAt(C)}for(j=0;j<6;++j)N=b(N);for(N^=1,j=0;j<6;++j){var G=N>>(5-j)*5&31;T+=t.charAt(G)}return T}function c(v,w){if(w=w||90,v.length<8)return v+" too short";if(v.length>w)return"Exceeds length limit";var D=v.toLowerCase(),N=v.toUpperCase();if(v!==D&&v!==N)return"Mixed-case string "+v;v=D;var T=v.lastIndexOf("1");if(T===-1)return"No separator character for "+v;if(T===0)return"Missing prefix for "+v;var j=v.slice(0,T),C=v.slice(T+1);if(C.length<6)return"Data too short";var G=f(j);if(typeof G=="string")return G;for(var W=[],Z=0;Z<C.length;++Z){var d0=C.charAt(Z),n0=e[d0];if(n0===void 0)return"Unknown character "+d0;G=b(G)^n0,!(Z+6>=C.length)&&W.push(n0)}return G!==1?"Invalid checksum for "+v:{prefix:j,words:W}}function u(){var v=c.apply(null,arguments);if(typeof v=="object")return v}function l(v){var w=c.apply(null,arguments);if(typeof w=="object")return w;throw new Error(w)}function y(v,w,D,N){for(var T=0,j=0,C=(1<<D)-1,G=[],W=0;W<v.length;++W)for(T=T<<w|v[W],j+=w;j>=D;)j-=D,G.push(T>>j&C);if(N)j>0&&G.push(T<<D-j&C);else{if(j>=w)return"Excess padding";if(T<<D-j&C)return"Non-zero padding"}return G}function m(v){var w=y(v,8,5,!0);if(Array.isArray(w))return w}function x(v){var w=y(v,8,5,!0);if(Array.isArray(w))return w;throw new Error(w)}function A(v){var w=y(v,5,8,!1);if(Array.isArray(w))return w}function M(v){var w=y(v,5,8,!1);if(Array.isArray(w))return w;throw new Error(w)}return xo={decodeUnsafe:u,decode:l,encode:r,toWordsUnsafe:m,toWords:x,fromWordsUnsafe:A,fromWords:M},xo}var sS=oS();const oy=Y8(sS),Kd="providers/5.8.0",uS="transactions/5.8.0",rt=new R0(uS);var sy;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(sy||(sy={}));function gs(t){return t==="0x"?null:Q5(t)}function me(t){return t==="0x"?Lg:g1.from(t)}function lS(t){const e=eA(t);return Q5(ye(U5(ye(e,1)),12))}function fA(t,e){return lS(Gj(R1(t),e))}function w8(t,e){const a=Q9(g1.from(t).toHexString());return a.length>32&&rt.throwArgumentError("invalid length for "+e,"transaction:"+e,t),a}function Io(t,e){return{address:Q5(t),storageKeys:(e||[]).map((a,n)=>($t(a)!==32&&rt.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,a),a.toLowerCase()))}}function Fb(t){if(Array.isArray(t))return t.map((a,n)=>Array.isArray(a)?(a.length>2&&rt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,a),Io(a[0],a[1])):Io(a.address,a.storageKeys));const e=Object.keys(t).map(a=>{const n=t[a].reduce((b,f)=>(b[f]=!0,b),{});return Io(a,Object.keys(n).sort())});return e.sort((a,n)=>a.address.localeCompare(n.address)),e}function rA(t){return Fb(t).map(e=>[e.address,e.storageKeys])}function pS(t,e){if(t.gasPrice!=null){const n=g1.from(t.gasPrice),b=g1.from(t.maxFeePerGas||0);n.eq(b)||rt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:b})}const a=[w8(t.chainId||0,"chainId"),w8(t.nonce||0,"nonce"),w8(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w8(t.maxFeePerGas||0,"maxFeePerGas"),w8(t.gasLimit||0,"gasLimit"),t.to!=null?Q5(t.to):"0x",w8(t.value||0,"value"),t.data||"0x",rA(t.accessList||[])];if(e){const n=Fd(e);a.push(w8(n.recoveryParam,"recoveryParam")),a.push(Q9(n.r)),a.push(Q9(n.s))}return Xe(["0x02",Yd(a)])}function yS(t,e){const a=[w8(t.chainId||0,"chainId"),w8(t.nonce||0,"nonce"),w8(t.gasPrice||0,"gasPrice"),w8(t.gasLimit||0,"gasLimit"),t.to!=null?Q5(t.to):"0x",w8(t.value||0,"value"),t.data||"0x",rA(t.accessList||[])];if(e){const n=Fd(e);a.push(w8(n.recoveryParam,"recoveryParam")),a.push(Q9(n.r)),a.push(Q9(n.s))}return Xe(["0x01",Yd(a)])}function dA(t,e,a){try{const n=me(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{rt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=e5(e[1],32),t.s=e5(e[2],32);try{const n=U5(a(t));t.from=fA(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function mS(t){const e=ss(t.slice(1));e.length!==9&&e.length!==12&&rt.throwArgumentError("invalid component count for transaction type: 2","payload",_1(t));const a=me(e[2]),n=me(e[3]),b={type:2,chainId:me(e[0]).toNumber(),nonce:me(e[1]).toNumber(),maxPriorityFeePerGas:a,maxFeePerGas:n,gasPrice:null,gasLimit:me(e[4]),to:gs(e[5]),value:me(e[6]),data:e[7],accessList:Fb(e[8])};return e.length===9||(b.hash=U5(t),dA(b,e.slice(9),pS)),b}function hS(t){const e=ss(t.slice(1));e.length!==8&&e.length!==11&&rt.throwArgumentError("invalid component count for transaction type: 1","payload",_1(t));const a={type:1,chainId:me(e[0]).toNumber(),nonce:me(e[1]).toNumber(),gasPrice:me(e[2]),gasLimit:me(e[3]),to:gs(e[4]),value:me(e[5]),data:e[6],accessList:Fb(e[7])};return e.length===8||(a.hash=U5(t),dA(a,e.slice(8),yS)),a}function gS(t){const e=ss(t);e.length!==9&&e.length!==6&&rt.throwArgumentError("invalid raw transaction","rawTransaction",t);const a={nonce:me(e[0]).toNumber(),gasPrice:me(e[1]),gasLimit:me(e[2]),to:gs(e[3]),value:me(e[4]),data:e[5],chainId:0};if(e.length===6)return a;try{a.v=g1.from(e[6]).toNumber()}catch{return a}if(a.r=e5(e[7],32),a.s=e5(e[8],32),g1.from(a.r).isZero()&&g1.from(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);let n=a.v-27;const b=e.slice(0,6);a.chainId!==0&&(b.push(_1(a.chainId)),b.push("0x"),b.push("0x"),n-=a.chainId*2+8);const f=U5(Yd(b));try{a.from=fA(f,{r:_1(a.r),s:_1(a.s),recoveryParam:n})}catch{}a.hash=U5(t)}return a.type=null,a}function AS(t){const e=R1(t);if(e[0]>127)return gS(e);switch(e[0]){case 1:return hS(e);case 2:return mS(e)}return rt.throwError(`unsupported transaction type: ${e[0]}`,R0.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const $n=new R0(Kd);class C1{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},a=this.address.bind(this),n=this.bigNumber.bind(this),b=this.blockTag.bind(this),f=this.data.bind(this),r=this.hash.bind(this),c=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this),y=m=>this.data(m,!0);return e.transaction={hash:r,type:l,accessList:C1.allowNull(this.accessList.bind(this),null),blockHash:C1.allowNull(r,null),blockNumber:C1.allowNull(u,null),transactionIndex:C1.allowNull(u,null),confirmations:C1.allowNull(u,null),from:a,gasPrice:C1.allowNull(n),maxPriorityFeePerGas:C1.allowNull(n),maxFeePerGas:C1.allowNull(n),gasLimit:n,to:C1.allowNull(a,null),value:n,nonce:u,data:f,r:C1.allowNull(this.uint256),s:C1.allowNull(this.uint256),v:C1.allowNull(u),creates:C1.allowNull(a,null),raw:C1.allowNull(f)},e.transactionRequest={from:C1.allowNull(a),nonce:C1.allowNull(u),gasLimit:C1.allowNull(n),gasPrice:C1.allowNull(n),maxPriorityFeePerGas:C1.allowNull(n),maxFeePerGas:C1.allowNull(n),to:C1.allowNull(a),value:C1.allowNull(n),data:C1.allowNull(y),type:C1.allowNull(u),accessList:C1.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:r,address:a,topics:C1.arrayOf(r),data:f,logIndex:u,blockHash:r},e.receipt={to:C1.allowNull(this.address,null),from:C1.allowNull(this.address,null),contractAddress:C1.allowNull(a,null),transactionIndex:u,root:C1.allowNull(c),gasUsed:n,logsBloom:C1.allowNull(f),blockHash:r,transactionHash:r,logs:C1.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:C1.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:C1.allowNull(n),status:C1.allowNull(u),type:l},e.block={hash:C1.allowNull(r),parentHash:r,number:u,timestamp:u,nonce:C1.allowNull(c),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:C1.allowNull(a),extraData:f,transactions:C1.allowNull(C1.arrayOf(r)),baseFeePerGas:C1.allowNull(n)},e.blockWithTransactions=R5(e.block),e.blockWithTransactions.transactions=C1.allowNull(C1.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:C1.allowNull(b,void 0),toBlock:C1.allowNull(b,void 0),blockHash:C1.allowNull(r,void 0),address:C1.allowNull(a,void 0),topics:C1.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:C1.allowNull(u),blockHash:C1.allowNull(r),transactionIndex:u,removed:C1.allowNull(this.boolean.bind(this)),address:a,data:C1.allowFalsish(f,"0x"),topics:C1.arrayOf(r),transactionHash:r,logIndex:u},e}accessList(e){return Fb(e||[])}number(e){return e==="0x"?0:g1.from(e).toNumber()}type(e){return e==="0x"||e==null?0:g1.from(e).toNumber()}bigNumber(e){return g1.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,a){return typeof e=="string"&&(!a&&e.substring(0,2)!=="0x"&&(e="0x"+e),z6(e))?e.toLowerCase():$n.throwArgumentError("invalid hash","value",e)}data(e,a){const n=this.hex(e,a);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Q5(e)}callAddress(e){if(!z6(e,32))return null;const a=Q5(ye(e,12));return a===gk?null:a}contractAddress(e){return Cg(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||z6(e))return is(e);throw new Error("invalid blockTag")}hash(e,a){const n=this.hex(e,a);return $t(n)!==32?$n.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const a=g1.from(e);try{return a.toNumber()}catch{}return null}uint256(e){if(!z6(e))throw new Error("invalid uint256");return e5(e,32)}_block(e,a){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,b=C1.check(a,e);return b._difficulty=n==null?null:g1.from(n),b}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return C1.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&g1.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const a=C1.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;z6(n)&&(n=g1.from(n).toNumber()),a.chainId=n}else{let n=e.networkId;n==null&&a.v==null&&(n=e.chainId),z6(n)&&(n=g1.from(n).toNumber()),typeof n!="number"&&a.v!=null&&(n=(a.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),a.chainId=n}return a.blockHash&&a.blockHash.replace(/0/g,"")==="x"&&(a.blockHash=null),a}transaction(e){return AS(e)}receiptLog(e){return C1.check(this.formats.receiptLog,e)}receipt(e){const a=C1.check(this.formats.receipt,e);if(a.root!=null)if(a.root.length<=4){const n=g1.from(a.root).toNumber();n===0||n===1?(a.status!=null&&a.status!==n&&$n.throwArgumentError("alt-root-status/status mismatch","value",{root:a.root,status:a.status}),a.status=n,delete a.root):$n.throwArgumentError("invalid alt-root-status","value.root",a.root)}else a.root.length!==66&&$n.throwArgumentError("invalid root hash","value.root",a.root);return a.status!=null&&(a.byzantium=!0),a}topics(e){return Array.isArray(e)?e.map(a=>this.topics(a)):e!=null?this.hash(e,!0):null}filter(e){return C1.check(this.formats.filter,e)}filterLog(e){return C1.check(this.formats.filterLog,e)}static check(e,a){const n={};for(const b in e)try{const f=e[b](a[b]);f!==void 0&&(n[b]=f)}catch(f){throw f.checkKey=b,f.checkValue=a[b],f}return n}static allowNull(e,a){return(function(n){return n==null?a:e(n)})}static allowFalsish(e,a){return(function(n){return n?e(n):a})}static arrayOf(e){return(function(a){if(!Array.isArray(a))throw new Error("not an array");const n=[];return a.forEach(function(b){n.push(e(b))}),n})}}var n6=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const m6=new R0(Kd),MS=10;function uy(t){return t==null?"null":($t(t)!==32&&m6.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function ly(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const a={};e.forEach(b=>{a[uy(b)]=!0});const n=Object.keys(a);return n.sort(),n.join("|")}else return uy(e)}).join("&")}function wS(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const a=e.split("|").map(n=>n==="null"?null:n);return a.length===1?a[0]:a})}function A9(t){if(typeof t=="string"){if(t=t.toLowerCase(),$t(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+ly(t);if(Aj.isForkEvent(t))throw m6.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+ly(t.topics||[])}throw new Error("invalid event - "+t)}function eb(){return new Date().getTime()}function py(t){return new Promise(e=>{setTimeout(e,t)})}const xS=["block","network","pending","poll"];let IS=class{constructor(e,a,n){p1(this,"tag",e),p1(this,"listener",a),p1(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const a=e[1],n=wS(e[2]),b={};return n.length>0&&(b.topics=n),a&&a!=="*"&&(b.address=a),b}pollable(){return this.tag.indexOf(":")>=0||xS.indexOf(this.tag)>=0}};const vS={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function vo(t){return e5(g1.from(t).toHexString(),32)}function yy(t){return m7.encode(I8([t,ye(ny(ny(t)),0,4)]))}const iA=new RegExp("^(ipfs)://(.*)$","i"),my=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),iA,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $r(t,e){try{return Pb(xb(t,e))}catch{}return null}function xb(t,e){if(t==="0x")return null;const a=g1.from(ye(t,e,e+32)).toNumber(),n=g1.from(ye(t,a,a+32)).toNumber();return ye(t,a+32,a+32+n)}function To(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):m6.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function hy(t){const e=R1(t);if(e.length>32)throw new Error("internal; should not happen");const a=new Uint8Array(32);return a.set(e,32-e.length),a}function TS(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function cA(t){const e=[];let a=0;for(let n=0;n<t.length;n++)e.push(null),a+=32;for(let n=0;n<t.length;n++){const b=R1(t[n]);e[n]=hy(a),e.push(hy(b.length)),e.push(TS(b)),a+=32+Math.ceil(b.length/32)*32}return Xe(e)}class gy{constructor(e,a,n,b){p1(this,"provider",e),p1(this,"name",n),p1(this,"address",e.formatter.address(a)),p1(this,"_resolvedAddress",b)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>g1.from(e).eq(1)).catch(e=>{if(e.code===R0.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,a){return n6(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Xe([e,Kr(this.name),a||"0x"])};let b=!1;(yield this.supportsWildcard())&&(b=!0,n.data=Xe(["0x9061b923",cA([bj(this.name),n.data])]));try{let f=yield this.provider.call(n);return R1(f).length%32===4&&m6.throwError("resolver threw error",R0.errors.CALL_EXCEPTION,{transaction:n,data:f}),b&&(f=xb(f,0)),f}catch(f){if(f.code===R0.errors.CALL_EXCEPTION)return null;throw f}})}_fetchBytes(e,a){return n6(this,void 0,void 0,function*(){const n=yield this._fetch(e,a);return n!=null?xb(n,0):null})}_getAddress(e,a){const n=vS[String(e)];if(n==null&&m6.throwError(`unsupported coin type: ${e}`,R0.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(a);const b=R1(a);if(n.p2pkh!=null){const f=a.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(f){const r=parseInt(f[1],16);if(f[2].length===r*2&&r>=1&&r<=75)return yy(I8([[n.p2pkh],"0x"+f[2]]))}}if(n.p2sh!=null){const f=a.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(f){const r=parseInt(f[1],16);if(f[2].length===r*2&&r>=1&&r<=75)return yy(I8([[n.p2sh],"0x"+f[2]]))}}if(n.prefix!=null){const f=b[1];let r=b[0];if(r===0?f!==20&&f!==32&&(r=-1):r=-1,r>=0&&b.length===2+f&&f>=1&&f<=75){const c=oy.toWords(b.slice(2));return c.unshift(r),oy.encode(n.prefix,c)}}return null}getAddress(e){return n6(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const b=yield this._fetch("0x3b3b57de");return b==="0x"||b===xk?null:this.provider.formatter.callAddress(b)}catch(b){if(b.code===R0.errors.CALL_EXCEPTION)return null;throw b}const a=yield this._fetchBytes("0xf1cb7e06",vo(e));if(a==null||a==="0x")return null;const n=this._getAddress(e,a);return n==null&&m6.throwError("invalid or unsupported coin data",R0.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:a}),n})}getAvatar(){return n6(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const a=yield this.getText("avatar");if(a==null)return null;for(let n=0;n<my.length;n++){const b=a.match(my[n]);if(b==null)continue;const f=b[1].toLowerCase();switch(f){case"https":return e.push({type:"url",content:a}),{linkage:e,url:a};case"data":return e.push({type:"data",content:a}),{linkage:e,url:a};case"ipfs":return e.push({type:"ipfs",content:a}),{linkage:e,url:To(a)};case"erc721":case"erc1155":{const r=f==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:f,content:a});const c=this._resolvedAddress||(yield this.getAddress()),u=(b[2]||"").split("/");if(u.length!==2)return null;const l=yield this.provider.formatter.address(u[0]),y=e5(g1.from(u[1]).toHexString(),32);if(f==="erc721"){const v=this.provider.formatter.callAddress(yield this.provider.call({to:l,data:Xe(["0x6352211e",y])}));if(c!==v)return null;e.push({type:"owner",content:v})}else if(f==="erc1155"){const v=g1.from(yield this.provider.call({to:l,data:Xe(["0x00fdd58e",e5(c,32),y])}));if(v.isZero())return null;e.push({type:"balance",content:v.toString()})}const m={to:this.provider.formatter.address(u[0]),data:Xe([r,y])};let x=$r(yield this.provider.call(m),0);if(x==null)return null;e.push({type:"metadata-url-base",content:x}),f==="erc1155"&&(x=x.replace("{id}",y.substring(2)),e.push({type:"metadata-url-expanded",content:x})),x.match(/^ipfs:/i)&&(x=To(x)),e.push({type:"metadata-url",content:x});const A=yield hs(x);if(!A)return null;e.push({type:"metadata",content:JSON.stringify(A)});let M=A.image;if(typeof M!="string")return null;if(!M.match(/^(https:\/\/|data:)/i)){if(M.match(iA)==null)return null;e.push({type:"url-ipfs",content:M}),M=To(M)}return e.push({type:"url",content:M}),{linkage:e,url:M}}}}}catch{}return null})}getContentHash(){return n6(this,void 0,void 0,function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;const a=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){const r=parseInt(a[3],16);if(a[4].length===r*2)return"ipfs://"+m7.encode("0x"+a[1])}const n=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const r=parseInt(n[3],16);if(n[4].length===r*2)return"ipns://"+m7.encode("0x"+n[1])}const b=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(b&&b[1].length===64)return"bzz://"+b[1];const f=e.match(/^0x90b2c605([0-9a-f]*)$/);if(f&&f[1].length===68){const r={"=":"","+":"-","/":"_"};return"sia://"+Ug("0x"+f[1]).replace(/[=+\/]/g,u=>r[u])}return m6.throwError("invalid or unsupported content hash data",R0.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return n6(this,void 0,void 0,function*(){let a=d4(e);a=I8([vo(64),vo(a.length),a]),a.length%32!==0&&(a=I8([a,e5("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",_1(a));return n==null||n==="0x"?null:Pb(n)})}}let No=null,NS=1;class ES extends Wd{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),p1(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(a=>{}),this._ready().catch(a=>{});else{const a=f4(new.target,"getNetwork")(e);a?(p1(this,"_network",a),this.emit("network",a,null)):m6.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return n6(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||m6.throwError("no network detected",R0.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:p1(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return bb(()=>this._ready().then(e=>e,e=>{if(!(e.code===R0.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return No==null&&(No=new C1),No}static getNetwork(e){return nS(e??"homestead")}ccipReadFetch(e,a,n){return n6(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const b=e.to.toLowerCase(),f=a.toLowerCase(),r=[];for(let c=0;c<n.length;c++){const u=n[c],l=u.replace("{sender}",b).replace("{data}",f),y=u.indexOf("{data}")>=0?null:JSON.stringify({data:f,sender:b}),m=yield hs({url:l,errorPassThrough:!0},y,(A,M)=>(A.status=M.statusCode,A));if(m.data)return m.data;const x=m.message||"unknown error";if(m.status>=400&&m.status<500)return m6.throwError(`response not found during CCIP fetch: ${x}`,R0.errors.SERVER_ERROR,{url:u,errorMessage:x});r.push(x)}return m6.throwError(`error encountered during CCIP fetch: ${r.map(c=>JSON.stringify(c)).join(", ")}`,R0.errors.SERVER_ERROR,{urls:n,errorMessages:r})})}_getInternalBlockNumber(e){return n6(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const b=this._internalBlockNumber;try{const f=yield b;if(eb()-f.respTime<=e)return f.blockNumber;break}catch{if(this._internalBlockNumber===b)break}}const a=eb(),n=j5({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(b=>null,b=>b)}).then(({blockNumber:b,networkError:f})=>{if(f)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),f;const r=eb();return b=g1.from(b).toNumber(),b<this._maxInternalBlockNumber&&(b=this._maxInternalBlockNumber),this._maxInternalBlockNumber=b,this._setFastBlockNumber(b),{blockNumber:b,reqTime:a,respTime:r}});return this._internalBlockNumber=n,n.catch(b=>{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return n6(this,void 0,void 0,function*(){const e=NS++,a=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(b){this.emit("error",b);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)m6.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",m6.makeError("network block skew detected",R0.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let b=this._emitted.block+1;b<=n;b++)this.emit("block",b);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(b=>{if(b==="block")return;const f=this._emitted[b];f!=="pending"&&n-f>12&&delete this._emitted[b]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(b=>{switch(b.type){case"tx":{const f=b.hash;let r=this.getTransactionReceipt(f).then(c=>(!c||c.blockNumber==null||(this._emitted["t:"+f]=c.blockNumber,this.emit(f,c)),null)).catch(c=>{this.emit("error",c)});a.push(r);break}case"filter":{if(!b._inflight){b._inflight=!0,b._lastBlockNumber===-2&&(b._lastBlockNumber=n-1);const f=b.filter;f.fromBlock=b._lastBlockNumber+1,f.toBlock=n;const r=f.toBlock-this._maxFilterBlockRange;r>f.fromBlock&&(f.fromBlock=r),f.fromBlock<0&&(f.fromBlock=0);const c=this.getLogs(f).then(u=>{b._inflight=!1,u.length!==0&&u.forEach(l=>{l.blockNumber>b._lastBlockNumber&&(b._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(f,l)})}).catch(u=>{this.emit("error",u),b._inflight=!1});a.push(c)}break}}}),this._lastBlockNumber=n,Promise.all(a).then(()=>{this.emit("didPoll",e)}).catch(b=>{this.emit("error",b)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return n6(this,void 0,void 0,function*(){return m6.throwError("provider does not support network detection",R0.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return n6(this,void 0,void 0,function*(){const e=yield this._ready(),a=yield this.detectNetwork();if(e.chainId!==a.chainId){if(this.anyNetwork)return this._network=a,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",a,e),yield py(0),this._network;const n=m6.makeError("underlying network changed",R0.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:a});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=eb();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(a=>((this._fastBlockNumber==null||a>this._fastBlockNumber)&&(this._fastBlockNumber=a),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&e<this._fastBlockNumber||(this._fastQueryDate=eb(),(this._fastBlockNumber==null||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,a,n){return n6(this,void 0,void 0,function*(){return this._waitForTransaction(e,a??1,n||0,null)})}_waitForTransaction(e,a,n,b){return n6(this,void 0,void 0,function*(){const f=yield this.getTransactionReceipt(e);return(f?f.confirmations:0)>=a?f:new Promise((r,c)=>{const u=[];let l=!1;const y=function(){return l?!0:(l=!0,u.forEach(x=>{x()}),!1)},m=x=>{x.confirmations<a||y()||r(x)};if(this.on(e,m),u.push(()=>{this.removeListener(e,m)}),b){let x=b.startBlock,A=null;const M=v=>n6(this,void 0,void 0,function*(){l||(yield py(1e3),this.getTransactionCount(b.from).then(w=>n6(this,void 0,void 0,function*(){if(!l){if(w<=b.nonce)x=v;else{{const D=yield this.getTransaction(e);if(D&&D.blockNumber!=null)return}for(A==null&&(A=x-3,A<b.startBlock&&(A=b.startBlock));A<=v;){if(l)return;const D=yield this.getBlockWithTransactions(A);for(let N=0;N<D.transactions.length;N++){const T=D.transactions[N];if(T.hash===e)return;if(T.from===b.from&&T.nonce===b.nonce){if(l)return;const j=yield this.waitForTransaction(T.hash,a);if(y())return;let C="replaced";T.data===b.data&&T.to===b.to&&T.value.eq(b.value)?C="repriced":T.data==="0x"&&T.from===T.to&&T.value.isZero()&&(C="cancelled"),c(m6.makeError("transaction was replaced",R0.errors.TRANSACTION_REPLACED,{cancelled:C==="replaced"||C==="cancelled",reason:C,replacement:this._wrapTransaction(T),hash:e,receipt:j}));return}}A++}}l||this.once("block",M)}}),w=>{l||this.once("block",M)}))});if(l)return;this.once("block",M),u.push(()=>{this.removeListener("block",M)})}if(typeof n=="number"&&n>0){const x=setTimeout(()=>{y()||c(m6.makeError("timeout exceeded",R0.errors.TIMEOUT,{timeout:n}))},n);x.unref&&x.unref(),u.push(()=>{clearTimeout(x)})}})})}getBlockNumber(){return n6(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return g1.from(e)}catch(a){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:a})}})}getBalance(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getBalance",n);try{return g1.from(b)}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getBalance",params:n,result:b,error:f})}})}getTransactionCount(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getTransactionCount",n);try{return g1.from(b).toNumber()}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:b,error:f})}})}getCode(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getCode",n);try{return _1(b)}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getCode",params:n,result:b,error:f})}})}getStorageAt(e,a,n){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const b=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(a).then(r=>is(r))}),f=yield this.perform("getStorageAt",b);try{return _1(f)}catch(r){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getStorageAt",params:b,result:f,error:r})}})}_wrapTransaction(e,a,n){if(a!=null&&$t(a)!==32)throw new Error("invalid response - sendTransaction");const b=e;return a!=null&&e.hash!==a&&m6.throwError("Transaction hash mismatch from Provider.sendTransaction.",R0.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:a}),b.wait=(f,r)=>n6(this,void 0,void 0,function*(){f==null&&(f=1),r==null&&(r=0);let c;f!==0&&n!=null&&(c={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const u=yield this._waitForTransaction(e.hash,f,r,c);return u==null&&f===0?null:(this._emitted["t:"+e.hash]=u.blockNumber,u.status===0&&m6.throwError("transaction failed",R0.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),u)}),b}sendTransaction(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield Promise.resolve(e).then(f=>_1(f)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const b=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const f=yield this.perform("sendTransaction",{signedTransaction:a});return this._wrapTransaction(n,f,b)}catch(f){throw f.transaction=n,f.transactionHash=n.hash,f}})}_getTransactionRequest(e){return n6(this,void 0,void 0,function*(){const a=yield e,n={};return["from","to"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?this._getAddress(f):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?g1.from(f):null))}),["type"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f??null))}),a.accessList&&(n.accessList=this.formatter.accessList(a.accessList)),["data"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?_1(f):null))}),this.formatter.transactionRequest(yield j5(n))})}_getFilter(e){return n6(this,void 0,void 0,function*(){e=yield e;const a={};return e.address!=null&&(a.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(a[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(a[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield j5(a))})}_call(e,a,n){return n6(this,void 0,void 0,function*(){n>=MS&&m6.throwError("CCIP read exceeded maximum redirections",R0.errors.SERVER_ERROR,{redirects:n,transaction:e});const b=e.to,f=yield this.perform("call",{transaction:e,blockTag:a});if(n>=0&&a==="latest"&&b!=null&&f.substring(0,10)==="0x556f1830"&&$t(f)%32===4)try{const r=ye(f,4),c=ye(r,0,32);g1.from(c).eq(b)||m6.throwError("CCIP Read sender did not match",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const u=[],l=g1.from(ye(r,32,64)).toNumber(),y=g1.from(ye(r,l,l+32)).toNumber(),m=ye(r,l+32);for(let D=0;D<y;D++){const N=$r(m,D*32);N==null&&m6.throwError("CCIP Read contained corrupt URL string",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f}),u.push(N)}const x=xb(r,64);g1.from(ye(r,100,128)).isZero()||m6.throwError("CCIP Read callback selector included junk",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const A=ye(r,96,100),M=xb(r,128),v=yield this.ccipReadFetch(e,x,u);v==null&&m6.throwError("CCIP Read disabled or provided no URLs",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const w={to:b,data:Xe([A,cA([v,M])])};return this._call(w,a,n+1)}catch(r){if(r.code===R0.errors.SERVER_ERROR)throw r}try{return _1(f)}catch(r){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:a},result:f,error:r})}})}call(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(a),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1)})}estimateGas(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield j5({transaction:this._getTransactionRequest(e)}),n=yield this.perform("estimateGas",a);try{return g1.from(n)}catch(b){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"estimateGas",params:a,result:n,error:b})}})}_getAddress(e){return n6(this,void 0,void 0,function*(){e=yield e,typeof e!="string"&&m6.throwArgumentError("invalid address or ENS name","name",e);const a=yield this.resolveName(e);return a==null&&m6.throwError("ENS name not configured",R0.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),a})}_getBlock(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let n=-128;const b={includeTransactions:!!a};if(z6(e,32))b.blockHash=e;else try{b.blockTag=yield this._getBlockTag(e),z6(b.blockTag)&&(n=parseInt(b.blockTag.substring(2),16))}catch{m6.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return bb(()=>n6(this,void 0,void 0,function*(){const f=yield this.perform("getBlock",b);if(f==null)return b.blockHash!=null&&this._emitted["b:"+b.blockHash]==null||b.blockTag!=null&&n>this._emitted.block?null:void 0;if(a){let r=null;for(let u=0;u<f.transactions.length;u++){const l=f.transactions[u];if(l.blockNumber==null)l.confirmations=0;else if(l.confirmations==null){r==null&&(r=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let y=r-l.blockNumber+1;y<=0&&(y=1),l.confirmations=y}}const c=this.formatter.blockWithTransactions(f);return c.transactions=c.transactions.map(u=>this._wrapTransaction(u)),c}return this.formatter.block(f)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const a={transactionHash:this.formatter.hash(e,!0)};return bb(()=>n6(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",a);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const b=this.formatter.transactionResponse(n);if(b.blockNumber==null)b.confirmations=0;else if(b.confirmations==null){let r=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-b.blockNumber+1;r<=0&&(r=1),b.confirmations=r}return this._wrapTransaction(b)}),{oncePoll:this})})}getTransactionReceipt(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const a={transactionHash:this.formatter.hash(e,!0)};return bb(()=>n6(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",a);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const b=this.formatter.receipt(n);if(b.blockNumber==null)b.confirmations=0;else if(b.confirmations==null){let r=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-b.blockNumber+1;r<=0&&(r=1),b.confirmations=r}return b}),{oncePoll:this})})}getLogs(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield j5({filter:this._getFilter(e)}),n=yield this.perform("getLogs",a);return n.forEach(b=>{b.removed==null&&(b.removed=!1)}),C1.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return n6(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return n6(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&m6.throwArgumentError("invalid BlockTag","blockTag",e);let a=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return a+=e,a<0&&(a=0),this.formatter.blockTag(a)}return this.formatter.blockTag(e)})}getResolver(e){return n6(this,void 0,void 0,function*(){let a=e;for(;;){if(a===""||a==="."||e!=="eth"&&a==="eth")return null;const n=yield this._getResolver(a,"getResolver");if(n!=null){const b=new gy(this,n,e);return a!==e&&!(yield b.supportsWildcard())?null:b}a=a.split(".").slice(1).join(".")}})}_getResolver(e,a){return n6(this,void 0,void 0,function*(){a==null&&(a="ENS");const n=yield this.getNetwork();n.ensAddress||m6.throwError("network does not support ENS",R0.errors.UNSUPPORTED_OPERATION,{operation:a,network:n.name});try{const b=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Kr(e).substring(2)});return this.formatter.callAddress(b)}catch{}return null})}resolveName(e){return n6(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(z6(e))throw n}typeof e!="string"&&m6.throwArgumentError("invalid ENS name","name",e);const a=yield this.getResolver(e);return a?yield a.getAddress():null})}lookupAddress(e){return n6(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const a=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(a,"lookupAddress");if(n==null)return null;const b=$r(yield this.call({to:n,data:"0x691f3431"+Kr(a).substring(2)}),0);return(yield this.resolveName(b))!=e?null:b})}getAvatar(e){return n6(this,void 0,void 0,function*(){let a=null;if(z6(e)){const f=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(f,"getAvatar");if(!r)return null;a=new gy(this,r,f);try{const c=yield a.getAvatar();if(c)return c.url}catch(c){if(c.code!==R0.errors.CALL_EXCEPTION)throw c}try{const c=$r(yield this.call({to:r,data:"0x691f3431"+Kr(f).substring(2)}),0);a=yield this.getResolver(c)}catch(c){if(c.code!==R0.errors.CALL_EXCEPTION)throw c;return null}}else if(a=yield this.getResolver(e),!a)return null;const n=yield a.getAvatar();return n==null?null:n.url})}perform(e,a){return m6.throwError(e+" not implemented",R0.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(a=>a.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(a=>a.pollable()).length>0}_addEventListener(e,a,n){const b=new IS(A9(e),a,n);return this._events.push(b),this._startEvent(b),this}on(e,a){return this._addEventListener(e,a,!1)}once(e,a){return this._addEventListener(e,a,!0)}emit(e,...a){let n=!1,b=[],f=A9(e);return this._events=this._events.filter(r=>r.tag!==f?!0:(setTimeout(()=>{r.listener.apply(this,a)},0),n=!0,r.once?(b.push(r),!1):!0)),b.forEach(r=>{this._stopEvent(r)}),n}listenerCount(e){if(!e)return this._events.length;let a=A9(e);return this._events.filter(n=>n.tag===a).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let a=A9(e);return this._events.filter(n=>n.tag===a).map(n=>n.listener)}off(e,a){if(a==null)return this.removeAllListeners(e);const n=[];let b=!1,f=A9(e);return this._events=this._events.filter(r=>r.tag!==f||r.listener!=a||b?!0:(b=!0,n.push(r),!1)),n.forEach(r=>{this._stopEvent(r)}),this}removeAllListeners(e){let a=[];if(e==null)a=this._events,this._events=[];else{const n=A9(e);this._events=this._events.filter(b=>b.tag!==n?!0:(a.push(b),!1))}return a.forEach(n=>{this._stopEvent(n)}),this}}var J4=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const S5=new R0(Kd),DS=["call","estimateGas"];function cb(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const a=z6(t.data)?t.data:null;if(!e||a)return{message:t.message,data:a}}if(typeof t=="object"){for(const a in t){const n=cb(t[a],e);if(n)return n}return null}if(typeof t=="string")try{return cb(JSON.parse(t),e)}catch{}return null}function oA(t,e,a){const n=a.transaction||a.signedTransaction;if(t==="call"){const f=cb(e,!0);if(f)return f.data;S5.throwError("missing revert data in call exception; Transaction reverted without a reason string",R0.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let f=cb(e.body,!1);f==null&&(f=cb(e,!1)),f&&S5.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{reason:f.message,method:t,transaction:n,error:e})}let b=e.message;throw e.code===R0.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?b=e.error.message:typeof e.body=="string"?b=e.body:typeof e.responseText=="string"&&(b=e.responseText),b=(b||"").toLowerCase(),b.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&S5.throwError("insufficient funds for intrinsic transaction cost",R0.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),b.match(/nonce (is )?too low/i)&&S5.throwError("nonce has already been used",R0.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),b.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&S5.throwError("replacement fee too low",R0.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),b.match(/only replay-protected/i)&&S5.throwError("legacy pre-eip-155 transactions not supported",R0.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),DS.indexOf(t)>=0&&b.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&S5.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Ay(t){return new Promise(function(e){setTimeout(e,t)})}function CS(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function tb(t){return t&&t.toLowerCase()}const h7={};class sA extends Ub{constructor(e,a,n){if(super(),e!==h7)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");p1(this,"provider",a),n==null&&(n=0),typeof n=="string"?(p1(this,"_address",this.provider.formatter.address(n)),p1(this,"_index",null)):typeof n=="number"?(p1(this,"_index",n),p1(this,"_address",null)):S5.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return S5.throwError("cannot alter JSON-RPC Signer connection",R0.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kS(h7,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&S5.throwError("unknown account #"+this._index,R0.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=R5(e);const a=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=R5(e);n.from=a,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>J4(this,void 0,void 0,function*(){if(n==null)return null;const b=yield this.provider.resolveName(n);return b==null&&S5.throwArgumentError("provided ENS name resolves to null","tx.to",n),b}))),j5({tx:j5(e),sender:a}).then(({tx:n,sender:b})=>{n.from!=null?n.from.toLowerCase()!==b&&S5.throwArgumentError("from address mismatch","transaction",e):n.from=b;const f=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[f]).then(r=>r,r=>(typeof r.message=="string"&&r.message.match(/user denied/i)&&S5.throwError("user rejected transaction",R0.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),oA("sendTransaction",r,f)))})}signTransaction(e){return S5.throwError("signing transactions is unsupported",R0.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return J4(this,void 0,void 0,function*(){const a=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield bb(()=>J4(this,void 0,void 0,function*(){const b=yield this.provider.getTransaction(n);if(b!==null)return this.provider._wrapTransaction(b,n,a)}),{oncePoll:this.provider})}catch(b){throw b.transactionHash=n,b}})}signMessage(e){return J4(this,void 0,void 0,function*(){const a=typeof e=="string"?d4(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[_1(a),n.toLowerCase()])}catch(b){throw typeof b.message=="string"&&b.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),b}})}_legacySignMessage(e){return J4(this,void 0,void 0,function*(){const a=typeof e=="string"?d4(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),_1(a)])}catch(b){throw typeof b.message=="string"&&b.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),b}})}_signTypedData(e,a,n){return J4(this,void 0,void 0,function*(){const b=yield A8.resolveNames(e,a,n,r=>this.provider.resolveName(r)),f=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[f.toLowerCase(),JSON.stringify(A8.getPayload(b.domain,a,b.value))])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"_signTypedData",from:f,messageData:{domain:b.domain,types:a,value:b.value}}),r}})}unlock(e){return J4(this,void 0,void 0,function*(){const a=this.provider,n=yield this.getAddress();return a.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class kS extends sA{sendTransaction(e){return this.sendUncheckedTransaction(e).then(a=>({hash:a,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(a,n)}))}}const jS={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class SS extends ES{constructor(e,a){let n=a;n==null&&(n=new Promise((b,f)=>{setTimeout(()=>{this.detectNetwork().then(r=>{b(r)},r=>{f(r)})},0)})),super(n),e||(e=f4(this.constructor,"defaultUrl")()),typeof e=="string"?p1(this,"connection",Object.freeze({url:e})):p1(this,"connection",Object.freeze(R5(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return J4(this,void 0,void 0,function*(){yield Ay(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const a=f4(this.constructor,"getNetwork");try{return a(g1.from(e).toNumber())}catch(n){return S5.throwError("could not detect network",R0.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return S5.throwError("could not detect network",R0.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new sA(h7,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(a=>this.formatter.address(a)))}send(e,a){const n={method:e,params:a,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:nt(n),provider:this});const b=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(b&&this._cache[e])return this._cache[e];const f=hs(this.connection,JSON.stringify(n),CS).then(r=>(this.emit("debug",{action:"response",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",error:r,request:n,provider:this}),r});return b&&(this._cache[e]=f,setTimeout(()=>{this._cache[e]=null},0)),f}prepareRequest(e,a){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[tb(a.address),a.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tb(a.address),a.blockTag]];case"getCode":return["eth_getCode",[tb(a.address),a.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tb(a.address),e5(a.position,32),a.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[a.signedTransaction]];case"getBlock":return a.blockTag?["eth_getBlockByNumber",[a.blockTag,!!a.includeTransactions]]:a.blockHash?["eth_getBlockByHash",[a.blockHash,!!a.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[a.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[a.transactionHash]];case"call":return["eth_call",[f4(this.constructor,"hexlifyTransaction")(a.transaction,{from:!0}),a.blockTag]];case"estimateGas":return["eth_estimateGas",[f4(this.constructor,"hexlifyTransaction")(a.transaction,{from:!0})]];case"getLogs":return a.filter&&a.filter.address!=null&&(a.filter.address=tb(a.filter.address)),["eth_getLogs",[a.filter]]}return null}perform(e,a){return J4(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const b=a.transaction;if(b&&b.type!=null&&g1.from(b.type).isZero()&&b.maxFeePerGas==null&&b.maxPriorityFeePerGas==null){const f=yield this.getFeeData();f.maxFeePerGas==null&&f.maxPriorityFeePerGas==null&&(a=R5(a),a.transaction=R5(b),delete a.transaction.type)}}const n=this.prepareRequest(e,a);n==null&&S5.throwError(e+" not implemented",R0.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(b){return oA(e,b,a)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,a=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=a,a.then(function(n){function b(){e.send("eth_getFilterChanges",[n]).then(function(f){if(e._pendingFilter!=a)return null;let r=Promise.resolve();return f.forEach(function(c){e._emitted["t:"+c.toLowerCase()]="pending",r=r.then(function(){return e.getTransaction(c).then(function(u){return e.emit("pending",u),null})})}),r.then(function(){return Ay(1e3)})}).then(function(){if(e._pendingFilter!=a){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){b()},0),null}).catch(f=>{})}return b(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,a){const n=R5(jS);if(a)for(const f in a)a[f]&&(n[f]=!0);ZC(e,n);const b={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(f){if(e[f]==null)return;const r=is(g1.from(e[f]));f==="gasLimit"&&(f="gas"),b[f]=r}),["from","to","data"].forEach(function(f){e[f]!=null&&(b[f]=_1(e[f]))}),e.accessList&&(b.accessList=Fb(e.accessList)),b}}const My=new R0(Kd);let LS=1;function wy(t,e){const a="Web3LegacyFetcher";return function(n,b){const f={method:n,params:b,id:LS++,jsonrpc:"2.0"};return new Promise((r,c)=>{this.emit("debug",{action:"request",fetcher:a,request:nt(f),provider:this}),e(f,(u,l)=>{if(u)return this.emit("debug",{action:"response",fetcher:a,error:u,request:f,provider:this}),c(u);if(this.emit("debug",{action:"response",fetcher:a,request:f,response:l,provider:this}),l.error){const y=new Error(l.error.message);return y.code=l.error.code,y.data=l.error.data,c(y)}r(l.result)})})}}function zS(t){return function(e,a){a==null&&(a=[]);const n={method:e,params:a};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:nt(n),provider:this}),t.request(n).then(b=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:b,provider:this}),b),b=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:b,provider:this}),b})}}class Ib extends SS{constructor(e,a){e==null&&My.throwArgumentError("missing provider","provider",e);let n=null,b=null,f=null;typeof e=="function"?(n="unknown:",b=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),f=e,e.request?(n===""&&(n="eip-1193:"),b=zS(e)):e.sendAsync?b=wy(e,e.sendAsync.bind(e)):e.send?b=wy(e,e.send.bind(e)):My.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,a),p1(this,"jsonRpcFetchFunc",b),p1(this,"provider",f)}send(e,a){return this.jsonRpcFetchFunc(e,a)}}function OS(t,e){return Vr(t,e)}function xy(t){return OS(t,18)}const As={address:""},Yb=kd(As.address),f3={production:!1,feedbackDetailsMaxEndorsements:5,provider:void 0},Iy=kd({fontsLoaded:!1,bootstrapLoaded:!1}),_S=t=>{Object.assign(f3,t)};function dt(t,e){const a=f3.production?ts:as;return{apiUrl:t[W9]||void 0||a}}function BS(){return{socialLinkUrl:f3.production?FD:YD}}function X6({children:t,forwardedRef:e,className:a,style:n,excludeBootstrap:b,excludeFonts:f}){const r=n3(Iy),c=!f&&!r.fontsLoaded,u=!b&&!r.bootstrapLoaded,l={fontsLoaded:r.fontsLoaded||c,bootstrapLoaded:r.bootstrapLoaded||u};return P(Iy.Provider,{value:l,children:P(Yb.Provider,{value:As.address,children:P("div",{ref:e,className:a,children:[P("style",{children:[c&&P(Be,{children:'@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap";'}),u&&P(Be,{children:'@import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-reboot.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-grid.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-utilities.min.css";'}),n]}),t]})})})}x1.polygon_mainnet,x1.ethereum_testnet;x1.base_testnet,x1.base_mainnet,x1.lisk_testnet,x1.lisk_mainnet,x1.optimism_testnet,x1.optimism_mainnet,x1.aurora_testnet,x1.aurora_mainnet;function H4(t){return gg(_1(t))}const Se={[x1.polygon_mainnet]:{chainId:H4(137)},[x1.ethereum_testnet]:{chainId:H4(11155111)},[x1.lisk_mainnet]:{chainId:H4(1135)},[x1.lisk_testnet]:{chainId:H4(4202)},[x1.optimism_mainnet]:{chainId:H4(10)},[x1.optimism_testnet]:{chainId:H4(11155420)},[x1.aurora_mainnet]:{chainId:H4(1313161554)},[x1.aurora_testnet]:{chainId:H4(1313161555)},[x1.base_testnet]:{chainId:H4(84532)}},PS={[x1.polygon_mainnet]:{chainId:Se[x1.polygon_mainnet].chainId,chainName:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"]},[x1.ethereum_testnet]:{chainId:Se[x1.ethereum_testnet].chainId,chainName:"Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://1rpc.io/sepolia"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[x1.lisk_mainnet]:{chainId:Se[x1.lisk_mainnet].chainId,chainName:"Lisk",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.api.lisk.com"],blockExplorerUrls:["https://blockscout.lisk.com"]},[x1.lisk_testnet]:{chainId:Se[x1.lisk_testnet].chainId,chainName:"Lisk Sepolia Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia-api.lisk.com"],blockExplorerUrls:["https://sepolia-blockscout.lisk.com"]},[x1.optimism_mainnet]:{chainId:Se[x1.optimism_mainnet].chainId,chainName:"OP Mainnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[x1.optimism_testnet]:{chainId:Se[x1.optimism_testnet].chainId,chainName:"OP Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.optimism.io"],blockExplorerUrls:["https://sepolia-sequencer.optimism.io"]},[x1.base_testnet]:{chainId:Se[x1.base_testnet].chainId,chainName:"Base Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.base.org"],blockExplorerUrls:["https://base-sepolia.blockscout.com/"]}},US={[x1.polygon_mainnet]:"0xE62dc4c82a9749Bf2E40F73138B3CFee0a2EC89F",[x1.ethereum_testnet]:"0x537BE61c5EFB865Df53CA55eeA07ceEe5d5fB162",[x1.lisk_mainnet]:"0x3B2A3a6E8C087fe399a24e08D3Cab12f17e033C3",[x1.lisk_testnet]:"0x0125f1E709eC3dEA2aD8152826fD4b9496086B71",[x1.optimism_mainnet]:"0xb2e9dB661F992d2F3013e4AFcE01C72d52f58A37",[x1.optimism_testnet]:"0xbdF3b87B410C50Ba9620d8Ac416A81e6bF7296eF",[x1.aurora_mainnet]:"0xaE53DcC63d7895600e2510A986Dc2b65c953E26c",[x1.aurora_testnet]:"0x2ac7F081f8eB51ce393bA298e4C020b0DeF420E1",[x1.base_testnet]:"0xC72b7A6146d3D53B614A4769A1A1459882ED4B1A"};async function RS(t,e){const a=PS[e];if(!a)throw new Error(`Network configuration not found for ${e}`);try{await t.request({method:"wallet_addEthereumChain",params:[a]})}catch(n){throw n}}async function vy(t,e){const a=Se[e];if(!a)throw new Error(`Switch chain parameters not found for ${e}`);try{await t.request({method:"wallet_switchEthereumChain",params:[a]})}catch(n){throw n}}function QS(t){let e;return f3.production?e=FS(t):e=YS(t),e}function FS(t){switch(t){case Se[x1.lisk_mainnet].chainId:return x1.lisk_mainnet;case Se[x1.optimism_mainnet].chainId:return x1.optimism_mainnet;case Se[x1.aurora_mainnet].chainId:return x1.aurora_mainnet;default:return x1.polygon_mainnet}}function YS(t){const e=Se[x1.base_testnet].chainId;switch(t){case Se[x1.lisk_testnet].chainId:return x1.lisk_testnet;case Se[x1.optimism_testnet].chainId:return x1.optimism_testnet;case Se[x1.aurora_testnet].chainId:return x1.aurora_testnet;case e:return x1.base_testnet;default:return x1.ethereum_testnet}}async function GS(t){return QS(t)}function Ty(t){return US[t]}function K2(){return f3.provider}function hd(t){return{ids:{uuid:t}}}function Jd(t,e={}){return{...e,headers:{...e.headers||{},...WS(t)}}}function WS(t){return{Authorization:`Bearer ${t}`}}async function uA(t,e,a,n,b){const f=mg.stringify({sourceCriteria:JSON.stringify(hd(e)),targetType:a,targetCriterias:b?.map(l=>JSON.stringify(hd(l)))}),r=`${t}${Ob}${HD}?${f}`,c=Jd(n);return await K6.get(r,c)}async function lA(t,e,a,n,b,f){return K6.post(`${t}${Ob}${VD}`,{sourceCriteria:a,targetCriteria:n,transactionId:b,items:f},Jd(e)).then(r=>r).catch(r=>r)}async function pA(t,e,a,n){const b=hd(a),f=hd(n),r=mg.stringify({sourceCriteria:b,targetCriteria:f}),c=`${t}${Ob}${KD}?${r}`;return K6.get(c,Jd(e))}async function yA(t=null,e=null,a=!1){const n=t??(f3.production?ts:as),b=K2();if(!b&&!e)return null;const r=await new Ib(e||b).getSigner(),c=await r.getAddress(),u=await r.signMessage("Sign in at UTU"),{data:l}=await K6.post(`${n}${JD}`,{address:c,signature:u},{withCredentials:!!a});return l}async function mA(t,e=f3.production?ts:as){try{const a=await K2();if(!a||typeof a.request!="function")return console.warn("UTU provider missing while fetching UTT balance"),{balance:"N/A"};await a.request({method:"eth_requestAccounts"});const f=await(await new Ib(a).getSigner()).getAddress(),r=await K6.get(`${e}${XD}/${f}`,{headers:{Authorization:`Bearer ${t}`}});return{balance:typeof r.data=="number"?r.data:"N/A"}}catch(a){return console.error("Error fetching UTT balance:",a),{balance:"N/A",error:a instanceof Error?a:new Error(String(a))}}}const HS=async(t,e,a)=>{const n=VS(e);let b;if(n){const f=ZS(e);b={name:e,type:"domain",ids:{uuid:f,address:f,url:e}}}else{const f=e.toLowerCase();b={name:e,type:"Address",ids:{uuid:f,address:f}}}try{return K6.post(`${t}${Ob}${qD}`,{name:b.name,type:b.type,ids:{uuid:b.ids.uuid,address:b.ids.address}},Jd(a))}catch(f){throw console.error("Failed to initialize entity:",f),console.error("Entity data:",b),f}},VS=t=>t.startsWith("0x")&&t.length===42?!1:t.includes(".")&&!t.startsWith("0x");function ZS(t){let e;try{e=new URL(t).hostname}catch{try{e=new URL(`https://${t}`).hostname}catch{e=t}}return na(e).slice(0,42).toLowerCase()}function ma(){const[t,e]=B1(JS());return x5(()=>{function a(n){const{access_token:b}=n.detail??{};if(!b){e(null);return}e(b)}return window.addEventListener(dd,a),()=>{window.removeEventListener(dd,a)}},[]),{accessToken:t}}async function KS(t=null,e=null,a=!1){const n=await yA(t,e,a);return await localStorage.setItem(ns,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(dd,{detail:n})),n}function JS(){const t=localStorage.getItem(ns);if(t){const{access_token:e}=JSON.parse(t);if(!e)return null;try{const{exp:a}=eC(e);if(qS(a))return e}catch(a){return console.warn("Invalid stored UTU access token:",a),null}}return null}function qS(t){return Date.now()<t*1e3}function hA(){const[t,e]=B1(null);return x5(()=>{async function a(){const n={burnerconnect:{package:wE,options:{defaultNetwork:"100"}}},b=new gE({cacheProvider:!0,network:"mainnet",providerOptions:n});e(b)}a()},[e]),{web3Modal:t}}function XS(t){const e=t?.trim();return e?e.split(" "):void 0}function $S(t,e){const{accessToken:a}=ma();x5(()=>{async function n(){try{return await HS(t,e,a)}catch(b){console.log(b)}}n()})}function eL(t,e,a,n){const{accessToken:b}=ma(),[f,r]=B1(void 0);return x5(()=>{async function c(){if(!b){r(void 0);return}const u=await uA(t,e,a,b,XS(n));r(u.data.result)}c()},[b,t,e,a,n]),{rankingItems:f}}var Le=(t=>(t[t.idle=0]="idle",t[t.submitting=1]="submitting",t[t.success=2]="success",t[t.error=3]="error",t[t.notFound=4]="notFound",t))(Le||{});const tL=3e3;function gd(t){setTimeout(()=>t(0),tL)}function qd(t,e,a,n){const{accessToken:b}=ma(),[f,r]=B1(0),c=Ny(e),u=Ny(a);async function l(y){return r(1),lA(t,b,c,u,n,y).then(m=>(r(2),gd(r),m)).catch(m=>(r(3),gd(r),m))}return{sendFeedback:l,submitStatus:f}}function aL(t){const{accessToken:e}=ma(),[a,n]=B1([]);return x5(()=>{async function b(){if(!e){n([]);return}const f=await K6.get(`${t}${Ob}${ZD}`,rL(e));n(f.data.result)}b()},[n,t,e]),{badgeSets:a}}function nL(t,e,a){const{accessToken:n}=ma(),[b,f]=B1(void 0),[r,c]=B1(0);return x5(()=>{async function u(){c(1);try{const l=await pA(t,n,e,a);c(2),f(l.data.result.items)}catch(l){console.log(l),l?.response?.status===404?c(4):c(3),f(null)}}u()},[f,t,n,e,a]),{feedbackSummary:b,submitStatus:r}}function bL(t,e,a){const{accessToken:n}=ma(),[b,f]=B1({uploading:!1});return x5(()=>{if(!e)return;const r={read(){return e.read()}},c={resume:!1,endpoint:`${t}${GD}/upload`,headers:gA(n),chunkSize:28*1024,uploadLengthDeferred:!0,retryDelays:[0,3e3,5e3,1e4,2e4],metadata:{filename:"webcam.webm",filetype:"video/webm"},onError(){f({uploading:!1,errorMessage:"video was not successfully uploaded "})},onSuccess(){const l=fL(t,u.url);a(l),f({successMessage:"video was successfully uploaded"}),f({uploading:!1,publishedVideoUrl:l})}},u=new kD(r,c);u.start(),f({uploading:!0})},[n,e]),b}function fL(t,e){const a=e.split("/").pop();return`${t}${WD}/${a}`}function Ny(t){return{ids:{uuid:t}}}function rL(t,e={}){return{...e,headers:{...e.headers||{},...gA(t)}}}function gA(t){return{Authorization:`Bearer ${t}`}}const dL="::slotted(ul){list-style:none;padding:0;margin:0}";function iL(t){const{apiUrl:e}=dt(t),a=t[L5],n=t[H9],b=t[rg],{rankingItems:f}=eL(e,a,n,b),r=da();return x5(()=>{r.current&&f&&(r.current.data=f,setTimeout(()=>{r.current.dispatchEvent(new CustomEvent("loaded",{composed:!0,detail:{data:f}}))},0))},[r,f]),P(X6,{forwardedRef:r,className:"recommendation-root",style:dL,excludeBootstrap:!0,excludeFonts:!0,children:P("slot",{})})}const cL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.recommendation-title{margin-bottom:8px;font-family:sans-serif;letter-spacing:1px;font-size:17px;font-weight:500}.utu-recommendation{border-radius:5px;padding-right:1rem}.utu-recommendation-content{display:flex;margin-left:5px}.utu-recommendation-text{align-self:center;margin-left:20px}.utu-recommendation-text-light{color:#000}.utu-recommendation-text-dark{color:#fff}.summary-image-list{display:flex;justify-content:center;margin:1.5rem 0 1rem 2rem;padding-left:0;list-style:none}.summary-image-item{margin-left:-15px;height:2.5rem}.summary-image-item-light,.summary-image-item-dark{border:2px solid rgb(252,229,70)}';function g7(t){if(t&&t.current){const a=t.current.getRootNode().host.closest(fg);if(a)return a.shadowRoot.firstChild}return null}function Ey(t,e){const a=g7(t);return a&&a.data?a.data.find(n=>n.entity.uuid===e):null}function AA(t){const e=da(),a=t[ge],[n,b]=B1(!1),[f,r]=B1(Ey(e,a));t[t8]==="dark"&&b(!0);const c=n?"dark":"light";return x5(()=>{function u(){r(Ey(e,a))}if(e.current&&a){const l=g7(e);l&&l.addEventListener("loaded",u)}return()=>{const l=g7(e);l&&l.removeEventListener("loaded",u)}},[e,a]),P(X6,{forwardedRef:e,className:`utu-recommendation x-utu-section x-utu-section-no-border-${c}`,children:[P("style",{children:cL}),f?P("p",{className:"recommendation-title",children:"Recommendation"}):"",f&&P("div",{className:"utu-recommendation-content",children:[P("ul",{className:"summary-image-list",children:f.summaryImages.map(u=>P("li",{children:P("img",{className:`rounded-circle summary-image-item summary-image-item-${c}`,src:u,onError:l=>{l.target.onerror=null,l.target.src="",l.target.className="",l.target.alt=""},alt:"profile"})},u))}),P("div",{className:`utu-recommendation-text utu-recommendation-text-${c}`,children:f.summaryText})]})]})}const oL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.utu-feedback-form{width:100%;margin:auto;background-color:#fff;height:30rem}.utu-feedback-form_title_wrapper{width:100%;background-color:#fce546;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;font-family:sans-serif;padding:1rem 3rem}.utu-feedback-form_title{letter-spacing:1px;font-weight:500px;font-size:16px}.x-utu-feedback-form-text{letter-spacing:1px}.x-utu-feedback-form_body_1{background-color:#fffdf4;display:flex;justify-content:space-between;padding:1rem 32px}.x-utu-feedback-form_body_2{background-color:#fffdf4}.x-utu-feedback-details_divider{background-color:gray;height:100px;width:3px}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:46%}@media only screen and (max-width: 1000px){.utu-feedback-form_title_wrapper{text-align:center;width:100%;border-radius:0}}@media only screen and (max-width: 1300px){.x-utu-feedback-form_body_1{flex-direction:column}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:100%;text-align:center;padding:.5rem 0}.x-utu-feedback-details_title-text{width:50%;font-size:12px}}',MA='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.feedback-form-badge-wrapper{width:90%;height:8rem;display:flex;justify-content:center;padding:20px;border-radius:10px;margin-bottom:32px;background-color:#ffdd331a;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px}.badges-wrapper{margin-left:32px}.x-utu-badge-title-thumbs{display:flex}.button{cursor:pointer}.button:hover{background-color:#fdfdfd}.button:active{transform:translateY(1px)}.x-utu-badge-set-container{width:8rem;height:7rem;padding:1rem 1rem 1rem 0}.x-utu-badge-set-section{width:100%;display:flex;flex-direction:row;background-color:#ffdd331a;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;border-radius:10.07px}.x-utu-badge-section{width:80%}.x-utu-badge-disable{height:50px;width:50px;opacity:.6}.x-utu-badge-item-text{justify-content:center;align-items:center;color:#fff}.x-utu-badge-text{font-size:.7rem}.x-utu-badge-text-h3{text-align:center;margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}.x-utu-badge-text-h3-light{color:#000}.x-utu-badge-text-h3-dark{color:#fff}.x-utu-badge-img{width:2.2rem}.x-utu-badge-img-container{display:flex;justify-content:space-around;opacity:1}.x-utu-badge-img-big{width:4.5rem}.x-utu-badge-img-big-section{display:flex;align-items:center;justify-content:center;padding:1rem}.x-utu-badge-section-title{margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}@media only screen and (min-width: 768px){.x-utu-badge-section{padding-left:0;padding-right:0}}@media only screen and (min-width: 1210px){.x-utu-badge-section{padding-top:0}}',sL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}';function Xd(){return P("svg",{style:sL,version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",className:"logo-size",viewBox:"0 0 841.89 401.471",xmlSpace:"preserve",children:P("g",{id:"Layer_2",children:P("g",{id:"Layer_1-2",children:[P("path",{fill:"#FFFFFF",d:"M565.858,0c263.37,4.676,263.323,395.802,0,400.243C302.487,395.709,302.532,4.397,565.858,0z"}),P("path",{fill:"#BBBBBB",d:`M0.005,224.144v-45.228c-0.005-2.54,2.051-4.603,4.591-4.607c0.019,0,0.038,0,0.057,0
|
|
346
|
+
*/(function(N){const T=a,j=w,C=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;N.Buffer=H,N.SlowBuffer=b0,N.INSPECT_MAX_BYTES=50;const G=2147483647;N.kMaxLength=G;const{Uint8Array:W,ArrayBuffer:Z,SharedArrayBuffer:d0}=globalThis;H.TYPED_ARRAY_SUPPORT=n0(),!H.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n0(){try{const t0=new W(1),_={foo:function(){return 42}};return Object.setPrototypeOf(_,W.prototype),Object.setPrototypeOf(t0,_),t0.foo()===42}catch{return!1}}Object.defineProperty(H.prototype,"parent",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.buffer}}),Object.defineProperty(H.prototype,"offset",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.byteOffset}});function y0(t0){if(t0>G)throw new RangeError('The value "'+t0+'" is invalid for option "size"');const _=new W(t0);return Object.setPrototypeOf(_,H.prototype),_}function H(t0,_,Y){if(typeof t0=="number"){if(typeof _=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(t0)}return F(t0,_,Y)}H.poolSize=8192;function F(t0,_,Y){if(typeof t0=="string")return R(t0,_);if(Z.isView(t0))return q(t0);if(t0==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t0);if(C6(t0,Z)||t0&&C6(t0.buffer,Z)||typeof d0<"u"&&(C6(t0,d0)||t0&&C6(t0.buffer,d0)))return e0(t0,_,Y);if(typeof t0=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const p0=t0.valueOf&&t0.valueOf();if(p0!=null&&p0!==t0)return H.from(p0,_,Y);const E0=V(t0);if(E0)return E0;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t0[Symbol.toPrimitive]=="function")return H.from(t0[Symbol.toPrimitive]("string"),_,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t0)}H.from=function(t0,_,Y){return F(t0,_,Y)},Object.setPrototypeOf(H.prototype,W.prototype),Object.setPrototypeOf(H,W);function h(t0){if(typeof t0!="number")throw new TypeError('"size" argument must be of type number');if(t0<0)throw new RangeError('The value "'+t0+'" is invalid for option "size"')}function I(t0,_,Y){return h(t0),t0<=0?y0(t0):_!==void 0?typeof Y=="string"?y0(t0).fill(_,Y):y0(t0).fill(_):y0(t0)}H.alloc=function(t0,_,Y){return I(t0,_,Y)};function k(t0){return h(t0),y0(t0<0?0:S(t0)|0)}H.allocUnsafe=function(t0){return k(t0)},H.allocUnsafeSlow=function(t0){return k(t0)};function R(t0,_){if((typeof _!="string"||_==="")&&(_="utf8"),!H.isEncoding(_))throw new TypeError("Unknown encoding: "+_);const Y=x0(t0,_)|0;let p0=y0(Y);const E0=p0.write(t0,_);return E0!==Y&&(p0=p0.slice(0,E0)),p0}function z(t0){const _=t0.length<0?0:S(t0.length)|0,Y=y0(_);for(let p0=0;p0<_;p0+=1)Y[p0]=t0[p0]&255;return Y}function q(t0){if(C6(t0,W)){const _=new W(t0);return e0(_.buffer,_.byteOffset,_.byteLength)}return z(t0)}function e0(t0,_,Y){if(_<0||t0.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(t0.byteLength<_+(Y||0))throw new RangeError('"length" is outside of buffer bounds');let p0;return _===void 0&&Y===void 0?p0=new W(t0):Y===void 0?p0=new W(t0,_):p0=new W(t0,_,Y),Object.setPrototypeOf(p0,H.prototype),p0}function V(t0){if(H.isBuffer(t0)){const _=S(t0.length)|0,Y=y0(_);return Y.length===0||t0.copy(Y,0,0,_),Y}if(t0.length!==void 0)return typeof t0.length!="number"||F1(t0.length)?y0(0):z(t0);if(t0.type==="Buffer"&&Array.isArray(t0.data))return z(t0.data)}function S(t0){if(t0>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return t0|0}function b0(t0){return+t0!=t0&&(t0=0),H.alloc(+t0)}H.isBuffer=function(_){return _!=null&&_._isBuffer===!0&&_!==H.prototype},H.compare=function(_,Y){if(C6(_,W)&&(_=H.from(_,_.offset,_.byteLength)),C6(Y,W)&&(Y=H.from(Y,Y.offset,Y.byteLength)),!H.isBuffer(_)||!H.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===Y)return 0;let p0=_.length,E0=Y.length;for(let z0=0,W0=Math.min(p0,E0);z0<W0;++z0)if(_[z0]!==Y[z0]){p0=_[z0],E0=Y[z0];break}return p0<E0?-1:E0<p0?1:0},H.isEncoding=function(_){switch(String(_).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},H.concat=function(_,Y){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(_.length===0)return H.alloc(0);let p0;if(Y===void 0)for(Y=0,p0=0;p0<_.length;++p0)Y+=_[p0].length;const E0=H.allocUnsafe(Y);let z0=0;for(p0=0;p0<_.length;++p0){let W0=_[p0];if(C6(W0,W))z0+W0.length>E0.length?(H.isBuffer(W0)||(W0=H.from(W0)),W0.copy(E0,z0)):W.prototype.set.call(E0,W0,z0);else if(H.isBuffer(W0))W0.copy(E0,z0);else throw new TypeError('"list" argument must be an Array of Buffers');z0+=W0.length}return E0};function x0(t0,_){if(H.isBuffer(t0))return t0.length;if(Z.isView(t0)||C6(t0,Z))return t0.byteLength;if(typeof t0!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t0);const Y=t0.length,p0=arguments.length>2&&arguments[2]===!0;if(!p0&&Y===0)return 0;let E0=!1;for(;;)switch(_){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return o1(t0).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return d1(t0).length;default:if(E0)return p0?-1:o1(t0).length;_=(""+_).toLowerCase(),E0=!0}}H.byteLength=x0;function O(t0,_,Y){let p0=!1;if((_===void 0||_<0)&&(_=0),_>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,_>>>=0,Y<=_))return"";for(t0||(t0="utf8");;)switch(t0){case"hex":return a1(this,_,Y);case"utf8":case"utf-8":return N0(this,_,Y);case"ascii":return t1(this,_,Y);case"latin1":case"binary":return i1(this,_,Y);case"base64":return F0(this,_,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c0(this,_,Y);default:if(p0)throw new TypeError("Unknown encoding: "+t0);t0=(t0+"").toLowerCase(),p0=!0}}H.prototype._isBuffer=!0;function l0(t0,_,Y){const p0=t0[_];t0[_]=t0[Y],t0[Y]=p0}H.prototype.swap16=function(){const _=this.length;if(_%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<_;Y+=2)l0(this,Y,Y+1);return this},H.prototype.swap32=function(){const _=this.length;if(_%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<_;Y+=4)l0(this,Y,Y+3),l0(this,Y+1,Y+2);return this},H.prototype.swap64=function(){const _=this.length;if(_%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<_;Y+=8)l0(this,Y,Y+7),l0(this,Y+1,Y+6),l0(this,Y+2,Y+5),l0(this,Y+3,Y+4);return this},H.prototype.toString=function(){const _=this.length;return _===0?"":arguments.length===0?N0(this,0,_):O.apply(this,arguments)},H.prototype.toLocaleString=H.prototype.toString,H.prototype.equals=function(_){if(!H.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_?!0:H.compare(this,_)===0},H.prototype.inspect=function(){let _="";const Y=N.INSPECT_MAX_BYTES;return _=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(_+=" ... "),"<Buffer "+_+">"},C&&(H.prototype[C]=H.prototype.inspect),H.prototype.compare=function(_,Y,p0,E0,z0){if(C6(_,W)&&(_=H.from(_,_.offset,_.byteLength)),!H.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(Y===void 0&&(Y=0),p0===void 0&&(p0=_?_.length:0),E0===void 0&&(E0=0),z0===void 0&&(z0=this.length),Y<0||p0>_.length||E0<0||z0>this.length)throw new RangeError("out of range index");if(E0>=z0&&Y>=p0)return 0;if(E0>=z0)return-1;if(Y>=p0)return 1;if(Y>>>=0,p0>>>=0,E0>>>=0,z0>>>=0,this===_)return 0;let W0=z0-E0,O1=p0-Y;const L1=Math.min(W0,O1),D1=this.slice(E0,z0),c6=_.slice(Y,p0);for(let N1=0;N1<L1;++N1)if(D1[N1]!==c6[N1]){W0=D1[N1],O1=c6[N1];break}return W0<O1?-1:O1<W0?1:0};function f0(t0,_,Y,p0,E0){if(t0.length===0)return-1;if(typeof Y=="string"?(p0=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,F1(Y)&&(Y=E0?0:t0.length-1),Y<0&&(Y=t0.length+Y),Y>=t0.length){if(E0)return-1;Y=t0.length-1}else if(Y<0)if(E0)Y=0;else return-1;if(typeof _=="string"&&(_=H.from(_,p0)),H.isBuffer(_))return _.length===0?-1:K(t0,_,Y,p0,E0);if(typeof _=="number")return _=_&255,typeof W.prototype.indexOf=="function"?E0?W.prototype.indexOf.call(t0,_,Y):W.prototype.lastIndexOf.call(t0,_,Y):K(t0,[_],Y,p0,E0);throw new TypeError("val must be string, number or Buffer")}function K(t0,_,Y,p0,E0){let z0=1,W0=t0.length,O1=_.length;if(p0!==void 0&&(p0=String(p0).toLowerCase(),p0==="ucs2"||p0==="ucs-2"||p0==="utf16le"||p0==="utf-16le")){if(t0.length<2||_.length<2)return-1;z0=2,W0/=2,O1/=2,Y/=2}function L1(c6,N1){return z0===1?c6[N1]:c6.readUInt16BE(N1*z0)}let D1;if(E0){let c6=-1;for(D1=Y;D1<W0;D1++)if(L1(t0,D1)===L1(_,c6===-1?0:D1-c6)){if(c6===-1&&(c6=D1),D1-c6+1===O1)return c6*z0}else c6!==-1&&(D1-=D1-c6),c6=-1}else for(Y+O1>W0&&(Y=W0-O1),D1=Y;D1>=0;D1--){let c6=!0;for(let N1=0;N1<O1;N1++)if(L1(t0,D1+N1)!==L1(_,N1)){c6=!1;break}if(c6)return D1}return-1}H.prototype.includes=function(_,Y,p0){return this.indexOf(_,Y,p0)!==-1},H.prototype.indexOf=function(_,Y,p0){return f0(this,_,Y,p0,!0)},H.prototype.lastIndexOf=function(_,Y,p0){return f0(this,_,Y,p0,!1)};function h0(t0,_,Y,p0){Y=Number(Y)||0;const E0=t0.length-Y;p0?(p0=Number(p0),p0>E0&&(p0=E0)):p0=E0;const z0=_.length;p0>z0/2&&(p0=z0/2);let W0;for(W0=0;W0<p0;++W0){const O1=parseInt(_.substr(W0*2,2),16);if(F1(O1))return W0;t0[Y+W0]=O1}return W0}function g0(t0,_,Y,p0){return Q1(o1(_,t0.length-Y),t0,Y,p0)}function T0(t0,_,Y,p0){return Q1(s1(_),t0,Y,p0)}function m0(t0,_,Y,p0){return Q1(d1(_),t0,Y,p0)}function q0(t0,_,Y,p0){return Q1(v1(_,t0.length-Y),t0,Y,p0)}H.prototype.write=function(_,Y,p0,E0){if(Y===void 0)E0="utf8",p0=this.length,Y=0;else if(p0===void 0&&typeof Y=="string")E0=Y,p0=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(p0)?(p0=p0>>>0,E0===void 0&&(E0="utf8")):(E0=p0,p0=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z0=this.length-Y;if((p0===void 0||p0>z0)&&(p0=z0),_.length>0&&(p0<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");E0||(E0="utf8");let W0=!1;for(;;)switch(E0){case"hex":return h0(this,_,Y,p0);case"utf8":case"utf-8":return g0(this,_,Y,p0);case"ascii":case"latin1":case"binary":return T0(this,_,Y,p0);case"base64":return m0(this,_,Y,p0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q0(this,_,Y,p0);default:if(W0)throw new TypeError("Unknown encoding: "+E0);E0=(""+E0).toLowerCase(),W0=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F0(t0,_,Y){return _===0&&Y===t0.length?T.fromByteArray(t0):T.fromByteArray(t0.slice(_,Y))}function N0(t0,_,Y){Y=Math.min(t0.length,Y);const p0=[];let E0=_;for(;E0<Y;){const z0=t0[E0];let W0=null,O1=z0>239?4:z0>223?3:z0>191?2:1;if(E0+O1<=Y){let L1,D1,c6,N1;switch(O1){case 1:z0<128&&(W0=z0);break;case 2:L1=t0[E0+1],(L1&192)===128&&(N1=(z0&31)<<6|L1&63,N1>127&&(W0=N1));break;case 3:L1=t0[E0+1],D1=t0[E0+2],(L1&192)===128&&(D1&192)===128&&(N1=(z0&15)<<12|(L1&63)<<6|D1&63,N1>2047&&(N1<55296||N1>57343)&&(W0=N1));break;case 4:L1=t0[E0+1],D1=t0[E0+2],c6=t0[E0+3],(L1&192)===128&&(D1&192)===128&&(c6&192)===128&&(N1=(z0&15)<<18|(L1&63)<<12|(D1&63)<<6|c6&63,N1>65535&&N1<1114112&&(W0=N1))}}W0===null?(W0=65533,O1=1):W0>65535&&(W0-=65536,p0.push(W0>>>10&1023|55296),W0=56320|W0&1023),p0.push(W0),E0+=O1}return J0(p0)}const O0=4096;function J0(t0){const _=t0.length;if(_<=O0)return String.fromCharCode.apply(String,t0);let Y="",p0=0;for(;p0<_;)Y+=String.fromCharCode.apply(String,t0.slice(p0,p0+=O0));return Y}function t1(t0,_,Y){let p0="";Y=Math.min(t0.length,Y);for(let E0=_;E0<Y;++E0)p0+=String.fromCharCode(t0[E0]&127);return p0}function i1(t0,_,Y){let p0="";Y=Math.min(t0.length,Y);for(let E0=_;E0<Y;++E0)p0+=String.fromCharCode(t0[E0]);return p0}function a1(t0,_,Y){const p0=t0.length;(!_||_<0)&&(_=0),(!Y||Y<0||Y>p0)&&(Y=p0);let E0="";for(let z0=_;z0<Y;++z0)E0+=X1[t0[z0]];return E0}function c0(t0,_,Y){const p0=t0.slice(_,Y);let E0="";for(let z0=0;z0<p0.length-1;z0+=2)E0+=String.fromCharCode(p0[z0]+p0[z0+1]*256);return E0}H.prototype.slice=function(_,Y){const p0=this.length;_=~~_,Y=Y===void 0?p0:~~Y,_<0?(_+=p0,_<0&&(_=0)):_>p0&&(_=p0),Y<0?(Y+=p0,Y<0&&(Y=0)):Y>p0&&(Y=p0),Y<_&&(Y=_);const E0=this.subarray(_,Y);return Object.setPrototypeOf(E0,H.prototype),E0};function A0(t0,_,Y){if(t0%1!==0||t0<0)throw new RangeError("offset is not uint");if(t0+_>Y)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_],z0=1,W0=0;for(;++W0<Y&&(z0*=256);)E0+=this[_+W0]*z0;return E0},H.prototype.readUintBE=H.prototype.readUIntBE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_+--Y],z0=1;for(;Y>0&&(z0*=256);)E0+=this[_+--Y]*z0;return E0},H.prototype.readUint8=H.prototype.readUInt8=function(_,Y){return _=_>>>0,Y||A0(_,1,this.length),this[_]},H.prototype.readUint16LE=H.prototype.readUInt16LE=function(_,Y){return _=_>>>0,Y||A0(_,2,this.length),this[_]|this[_+1]<<8},H.prototype.readUint16BE=H.prototype.readUInt16BE=function(_,Y){return _=_>>>0,Y||A0(_,2,this.length),this[_]<<8|this[_+1]},H.prototype.readUint32LE=H.prototype.readUInt32LE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+this[_+3]*16777216},H.prototype.readUint32BE=H.prototype.readUInt32BE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]*16777216+(this[_+1]<<16|this[_+2]<<8|this[_+3])},H.prototype.readBigUInt64LE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=Y+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24,z0=this[++_]+this[++_]*2**8+this[++_]*2**16+p0*2**24;return BigInt(E0)+(BigInt(z0)<<BigInt(32))}),H.prototype.readBigUInt64BE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=Y*2**24+this[++_]*2**16+this[++_]*2**8+this[++_],z0=this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+p0;return(BigInt(E0)<<BigInt(32))+BigInt(z0)}),H.prototype.readIntLE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=this[_],z0=1,W0=0;for(;++W0<Y&&(z0*=256);)E0+=this[_+W0]*z0;return z0*=128,E0>=z0&&(E0-=Math.pow(2,8*Y)),E0},H.prototype.readIntBE=function(_,Y,p0){_=_>>>0,Y=Y>>>0,p0||A0(_,Y,this.length);let E0=Y,z0=1,W0=this[_+--E0];for(;E0>0&&(z0*=256);)W0+=this[_+--E0]*z0;return z0*=128,W0>=z0&&(W0-=Math.pow(2,8*Y)),W0},H.prototype.readInt8=function(_,Y){return _=_>>>0,Y||A0(_,1,this.length),this[_]&128?(255-this[_]+1)*-1:this[_]},H.prototype.readInt16LE=function(_,Y){_=_>>>0,Y||A0(_,2,this.length);const p0=this[_]|this[_+1]<<8;return p0&32768?p0|4294901760:p0},H.prototype.readInt16BE=function(_,Y){_=_>>>0,Y||A0(_,2,this.length);const p0=this[_+1]|this[_]<<8;return p0&32768?p0|4294901760:p0},H.prototype.readInt32LE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},H.prototype.readInt32BE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},H.prototype.readBigInt64LE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=this[_+4]+this[_+5]*2**8+this[_+6]*2**16+(p0<<24);return(BigInt(E0)<<BigInt(32))+BigInt(Y+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24)}),H.prototype.readBigInt64BE=F6(function(_){_=_>>>0,M0(_,"offset");const Y=this[_],p0=this[_+7];(Y===void 0||p0===void 0)&&j0(_,this.length-8);const E0=(Y<<24)+this[++_]*2**16+this[++_]*2**8+this[++_];return(BigInt(E0)<<BigInt(32))+BigInt(this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+p0)}),H.prototype.readFloatLE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),j.read(this,_,!0,23,4)},H.prototype.readFloatBE=function(_,Y){return _=_>>>0,Y||A0(_,4,this.length),j.read(this,_,!1,23,4)},H.prototype.readDoubleLE=function(_,Y){return _=_>>>0,Y||A0(_,8,this.length),j.read(this,_,!0,52,8)},H.prototype.readDoubleBE=function(_,Y){return _=_>>>0,Y||A0(_,8,this.length),j.read(this,_,!1,52,8)};function I0(t0,_,Y,p0,E0,z0){if(!H.isBuffer(t0))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>E0||_<z0)throw new RangeError('"value" argument is out of bounds');if(Y+p0>t0.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,p0=p0>>>0,!E0){const O1=Math.pow(2,8*p0)-1;I0(this,_,Y,p0,O1,0)}let z0=1,W0=0;for(this[Y]=_&255;++W0<p0&&(z0*=256);)this[Y+W0]=_/z0&255;return Y+p0},H.prototype.writeUintBE=H.prototype.writeUIntBE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,p0=p0>>>0,!E0){const O1=Math.pow(2,8*p0)-1;I0(this,_,Y,p0,O1,0)}let z0=p0-1,W0=1;for(this[Y+z0]=_&255;--z0>=0&&(W0*=256);)this[Y+z0]=_/W0&255;return Y+p0},H.prototype.writeUint8=H.prototype.writeUInt8=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,1,255,0),this[Y]=_&255,Y+1},H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,65535,0),this[Y]=_&255,this[Y+1]=_>>>8,Y+2},H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,65535,0),this[Y]=_>>>8,this[Y+1]=_&255,Y+2},H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,4294967295,0),this[Y+3]=_>>>24,this[Y+2]=_>>>16,this[Y+1]=_>>>8,this[Y]=_&255,Y+4},H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,4294967295,0),this[Y]=_>>>24,this[Y+1]=_>>>16,this[Y+2]=_>>>8,this[Y+3]=_&255,Y+4};function H0(t0,_,Y,p0,E0){r0(_,p0,E0,t0,Y,7);let z0=Number(_&BigInt(4294967295));t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0,z0=z0>>8,t0[Y++]=z0;let W0=Number(_>>BigInt(32)&BigInt(4294967295));return t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,W0=W0>>8,t0[Y++]=W0,Y}function X0(t0,_,Y,p0,E0){r0(_,p0,E0,t0,Y,7);let z0=Number(_&BigInt(4294967295));t0[Y+7]=z0,z0=z0>>8,t0[Y+6]=z0,z0=z0>>8,t0[Y+5]=z0,z0=z0>>8,t0[Y+4]=z0;let W0=Number(_>>BigInt(32)&BigInt(4294967295));return t0[Y+3]=W0,W0=W0>>8,t0[Y+2]=W0,W0=W0>>8,t0[Y+1]=W0,W0=W0>>8,t0[Y]=W0,Y+8}H.prototype.writeBigUInt64LE=F6(function(_,Y=0){return H0(this,_,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeBigUInt64BE=F6(function(_,Y=0){return X0(this,_,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeIntLE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,!E0){const L1=Math.pow(2,8*p0-1);I0(this,_,Y,p0,L1-1,-L1)}let z0=0,W0=1,O1=0;for(this[Y]=_&255;++z0<p0&&(W0*=256);)_<0&&O1===0&&this[Y+z0-1]!==0&&(O1=1),this[Y+z0]=(_/W0>>0)-O1&255;return Y+p0},H.prototype.writeIntBE=function(_,Y,p0,E0){if(_=+_,Y=Y>>>0,!E0){const L1=Math.pow(2,8*p0-1);I0(this,_,Y,p0,L1-1,-L1)}let z0=p0-1,W0=1,O1=0;for(this[Y+z0]=_&255;--z0>=0&&(W0*=256);)_<0&&O1===0&&this[Y+z0+1]!==0&&(O1=1),this[Y+z0]=(_/W0>>0)-O1&255;return Y+p0},H.prototype.writeInt8=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,1,127,-128),_<0&&(_=255+_+1),this[Y]=_&255,Y+1},H.prototype.writeInt16LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,32767,-32768),this[Y]=_&255,this[Y+1]=_>>>8,Y+2},H.prototype.writeInt16BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,2,32767,-32768),this[Y]=_>>>8,this[Y+1]=_&255,Y+2},H.prototype.writeInt32LE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,2147483647,-2147483648),this[Y]=_&255,this[Y+1]=_>>>8,this[Y+2]=_>>>16,this[Y+3]=_>>>24,Y+4},H.prototype.writeInt32BE=function(_,Y,p0){return _=+_,Y=Y>>>0,p0||I0(this,_,Y,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[Y]=_>>>24,this[Y+1]=_>>>16,this[Y+2]=_>>>8,this[Y+3]=_&255,Y+4},H.prototype.writeBigInt64LE=F6(function(_,Y=0){return H0(this,_,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),H.prototype.writeBigInt64BE=F6(function(_,Y=0){return X0(this,_,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y0(t0,_,Y,p0,E0,z0){if(Y+p0>t0.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function K0(t0,_,Y,p0,E0){return _=+_,Y=Y>>>0,E0||Y0(t0,_,Y,4),j.write(t0,_,Y,p0,23,4),Y+4}H.prototype.writeFloatLE=function(_,Y,p0){return K0(this,_,Y,!0,p0)},H.prototype.writeFloatBE=function(_,Y,p0){return K0(this,_,Y,!1,p0)};function y1(t0,_,Y,p0,E0){return _=+_,Y=Y>>>0,E0||Y0(t0,_,Y,8),j.write(t0,_,Y,p0,52,8),Y+8}H.prototype.writeDoubleLE=function(_,Y,p0){return y1(this,_,Y,!0,p0)},H.prototype.writeDoubleBE=function(_,Y,p0){return y1(this,_,Y,!1,p0)},H.prototype.copy=function(_,Y,p0,E0){if(!H.isBuffer(_))throw new TypeError("argument should be a Buffer");if(p0||(p0=0),!E0&&E0!==0&&(E0=this.length),Y>=_.length&&(Y=_.length),Y||(Y=0),E0>0&&E0<p0&&(E0=p0),E0===p0||_.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(p0<0||p0>=this.length)throw new RangeError("Index out of range");if(E0<0)throw new RangeError("sourceEnd out of bounds");E0>this.length&&(E0=this.length),_.length-Y<E0-p0&&(E0=_.length-Y+p0);const z0=E0-p0;return this===_&&typeof W.prototype.copyWithin=="function"?this.copyWithin(Y,p0,E0):W.prototype.set.call(_,this.subarray(p0,E0),Y),z0},H.prototype.fill=function(_,Y,p0,E0){if(typeof _=="string"){if(typeof Y=="string"?(E0=Y,Y=0,p0=this.length):typeof p0=="string"&&(E0=p0,p0=this.length),E0!==void 0&&typeof E0!="string")throw new TypeError("encoding must be a string");if(typeof E0=="string"&&!H.isEncoding(E0))throw new TypeError("Unknown encoding: "+E0);if(_.length===1){const W0=_.charCodeAt(0);(E0==="utf8"&&W0<128||E0==="latin1")&&(_=W0)}}else typeof _=="number"?_=_&255:typeof _=="boolean"&&(_=Number(_));if(Y<0||this.length<Y||this.length<p0)throw new RangeError("Out of range index");if(p0<=Y)return this;Y=Y>>>0,p0=p0===void 0?this.length:p0>>>0,_||(_=0);let z0;if(typeof _=="number")for(z0=Y;z0<p0;++z0)this[z0]=_;else{const W0=H.isBuffer(_)?_:H.from(_,E0),O1=W0.length;if(O1===0)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(z0=0;z0<p0-Y;++z0)this[z0+Y]=W0[z0%O1]}return this};const u1={};function X(t0,_,Y){u1[t0]=class extends Y{constructor(){super(),Object.defineProperty(this,"message",{value:_.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t0}]`,this.stack,delete this.name}get code(){return t0}set code(E0){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:E0,writable:!0})}toString(){return`${this.name} [${t0}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(t0){return t0?`${t0} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(t0,_){return`The "${t0}" argument must be of type number. Received type ${typeof _}`},TypeError),X("ERR_OUT_OF_RANGE",function(t0,_,Y){let p0=`The value of "${t0}" is out of range.`,E0=Y;return Number.isInteger(Y)&&Math.abs(Y)>2**32?E0=L(String(Y)):typeof Y=="bigint"&&(E0=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(E0=L(E0)),E0+="n"),p0+=` It must be ${_}. Received ${E0}`,p0},RangeError);function L(t0){let _="",Y=t0.length;const p0=t0[0]==="-"?1:0;for(;Y>=p0+4;Y-=3)_=`_${t0.slice(Y-3,Y)}${_}`;return`${t0.slice(0,Y)}${_}`}function Q(t0,_,Y){M0(_,"offset"),(t0[_]===void 0||t0[_+Y]===void 0)&&j0(_,t0.length-(Y+1))}function r0(t0,_,Y,p0,E0,z0){if(t0>Y||t0<_){const W0=typeof _=="bigint"?"n":"";let O1;throw _===0||_===BigInt(0)?O1=`>= 0${W0} and < 2${W0} ** ${(z0+1)*8}${W0}`:O1=`>= -(2${W0} ** ${(z0+1)*8-1}${W0}) and < 2 ** ${(z0+1)*8-1}${W0}`,new u1.ERR_OUT_OF_RANGE("value",O1,t0)}Q(p0,E0,z0)}function M0(t0,_){if(typeof t0!="number")throw new u1.ERR_INVALID_ARG_TYPE(_,"number",t0)}function j0(t0,_,Y){throw Math.floor(t0)!==t0?(M0(t0,Y),new u1.ERR_OUT_OF_RANGE("offset","an integer",t0)):_<0?new u1.ERR_BUFFER_OUT_OF_BOUNDS:new u1.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${_}`,t0)}const s0=/[^+/0-9A-Za-z-_]/g;function k0(t0){if(t0=t0.split("=")[0],t0=t0.trim().replace(s0,""),t0.length<2)return"";for(;t0.length%4!==0;)t0=t0+"=";return t0}function o1(t0,_){_=_||1/0;let Y;const p0=t0.length;let E0=null;const z0=[];for(let W0=0;W0<p0;++W0){if(Y=t0.charCodeAt(W0),Y>55295&&Y<57344){if(!E0){if(Y>56319){(_-=3)>-1&&z0.push(239,191,189);continue}else if(W0+1===p0){(_-=3)>-1&&z0.push(239,191,189);continue}E0=Y;continue}if(Y<56320){(_-=3)>-1&&z0.push(239,191,189),E0=Y;continue}Y=(E0-55296<<10|Y-56320)+65536}else E0&&(_-=3)>-1&&z0.push(239,191,189);if(E0=null,Y<128){if((_-=1)<0)break;z0.push(Y)}else if(Y<2048){if((_-=2)<0)break;z0.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((_-=3)<0)break;z0.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((_-=4)<0)break;z0.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return z0}function s1(t0){const _=[];for(let Y=0;Y<t0.length;++Y)_.push(t0.charCodeAt(Y)&255);return _}function v1(t0,_){let Y,p0,E0;const z0=[];for(let W0=0;W0<t0.length&&!((_-=2)<0);++W0)Y=t0.charCodeAt(W0),p0=Y>>8,E0=Y%256,z0.push(E0),z0.push(p0);return z0}function d1(t0){return T.toByteArray(k0(t0))}function Q1(t0,_,Y,p0){let E0;for(E0=0;E0<p0&&!(E0+Y>=_.length||E0>=t0.length);++E0)_[E0+Y]=t0[E0];return E0}function C6(t0,_){return t0 instanceof _||t0!=null&&t0.constructor!=null&&t0.constructor.name!=null&&t0.constructor.name===_.name}function F1(t0){return t0!==t0}const X1=(function(){const t0="0123456789abcdef",_=new Array(256);for(let Y=0;Y<16;++Y){const p0=Y*16;for(let E0=0;E0<16;++E0)_[p0+E0]=t0[Y]+t0[E0]}return _})();function F6(t0){return typeof BigInt>"u"?$1:t0}function $1(){throw new Error("BigInt not supported")}})(e);const D=e.Buffer;t.Blob=e.Blob,t.BlobOptions=e.BlobOptions,t.Buffer=e.Buffer,t.File=e.File,t.FileOptions=e.FileOptions,t.INSPECT_MAX_BYTES=e.INSPECT_MAX_BYTES,t.SlowBuffer=e.SlowBuffer,t.TranscodeEncoding=e.TranscodeEncoding,t.atob=e.atob,t.btoa=e.btoa,t.constants=e.constants,t.default=D,t.isAscii=e.isAscii,t.isUtf8=e.isUtf8,t.kMaxLength=e.kMaxLength,t.kStringMaxLength=e.kStringMaxLength,t.resolveObjectURL=e.resolveObjectURL,t.transcode=e.transcode})($c)),$c}var _C=Wr.exports,sp;function BC(){return sp||(sp=1,(function(t){(function(e,a){function n(F,h){if(!F)throw new Error(h||"Assertion failed")}function b(F,h){F.super_=h;var I=function(){};I.prototype=h.prototype,F.prototype=new I,F.prototype.constructor=F}function f(F,h,I){if(f.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((h==="le"||h==="be")&&(I=h,h=10),this._init(F||0,h||10,I||"be"))}typeof e=="object"?e.exports=f:a.BN=f,f.BN=f,f.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=OC().Buffer}catch{}f.isBN=function(h){return h instanceof f?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===f.wordSize&&Array.isArray(h.words)},f.max=function(h,I){return h.cmp(I)>0?h:I},f.min=function(h,I){return h.cmp(I)<0?h:I},f.prototype._init=function(h,I,k){if(typeof h=="number")return this._initNumber(h,I,k);if(typeof h=="object")return this._initArray(h,I,k);I==="hex"&&(I=16),n(I===(I|0)&&I>=2&&I<=36),h=h.toString().replace(/\s+/g,"");var R=0;h[0]==="-"&&(R++,this.negative=1),R<h.length&&(I===16?this._parseHex(h,R,k):(this._parseBase(h,I,R),k==="le"&&this._initArray(this.toArray(),I,k)))},f.prototype._initNumber=function(h,I,k){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),k==="le"&&this._initArray(this.toArray(),I,k)},f.prototype._initArray=function(h,I,k){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var z,q,e0=0;if(k==="be")for(R=h.length-1,z=0;R>=0;R-=3)q=h[R]|h[R-1]<<8|h[R-2]<<16,this.words[z]|=q<<e0&67108863,this.words[z+1]=q>>>26-e0&67108863,e0+=24,e0>=26&&(e0-=26,z++);else if(k==="le")for(R=0,z=0;R<h.length;R+=3)q=h[R]|h[R+1]<<8|h[R+2]<<16,this.words[z]|=q<<e0&67108863,this.words[z+1]=q>>>26-e0&67108863,e0+=24,e0>=26&&(e0-=26,z++);return this._strip()};function c(F,h){var I=F.charCodeAt(h);if(I>=48&&I<=57)return I-48;if(I>=65&&I<=70)return I-55;if(I>=97&&I<=102)return I-87;n(!1,"Invalid character in "+F)}function u(F,h,I){var k=c(F,I);return I-1>=h&&(k|=c(F,I-1)<<4),k}f.prototype._parseHex=function(h,I,k){this.length=Math.ceil((h.length-I)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var z=0,q=0,e0;if(k==="be")for(R=h.length-1;R>=I;R-=2)e0=u(h,I,R)<<z,this.words[q]|=e0&67108863,z>=18?(z-=18,q+=1,this.words[q]|=e0>>>26):z+=8;else{var V=h.length-I;for(R=V%2===0?I+1:I;R<h.length;R+=2)e0=u(h,I,R)<<z,this.words[q]|=e0&67108863,z>=18?(z-=18,q+=1,this.words[q]|=e0>>>26):z+=8}this._strip()};function l(F,h,I,k){for(var R=0,z=0,q=Math.min(F.length,I),e0=h;e0<q;e0++){var V=F.charCodeAt(e0)-48;R*=k,V>=49?z=V-49+10:V>=17?z=V-17+10:z=V,n(V>=0&&z<k,"Invalid character"),R+=z}return R}f.prototype._parseBase=function(h,I,k){this.words=[0],this.length=1;for(var R=0,z=1;z<=67108863;z*=I)R++;R--,z=z/I|0;for(var q=h.length-k,e0=q%R,V=Math.min(q,q-e0)+k,S=0,b0=k;b0<V;b0+=R)S=l(h,b0,b0+R,I),this.imuln(z),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S);if(e0!==0){var x0=1;for(S=l(h,b0,h.length,I),b0=0;b0<e0;b0++)x0*=I;this.imuln(x0),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S)}this._strip()},f.prototype.copy=function(h){h.words=new Array(this.length);for(var I=0;I<this.length;I++)h.words[I]=this.words[I];h.length=this.length,h.negative=this.negative,h.red=this.red};function y(F,h){F.words=h.words,F.length=h.length,F.negative=h.negative,F.red=h.red}if(f.prototype._move=function(h){y(h,this)},f.prototype.clone=function(){var h=new f(null);return this.copy(h),h},f.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch{f.prototype.inspect=m}else f.prototype.inspect=m;function m(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(h,I){h=h||10,I=I|0||1;var k;if(h===16||h==="hex"){k="";for(var R=0,z=0,q=0;q<this.length;q++){var e0=this.words[q],V=((e0<<R|z)&16777215).toString(16);z=e0>>>24-R&16777215,R+=2,R>=26&&(R-=26,q--),z!==0||q!==this.length-1?k=x[6-V.length]+V+k:k=V+k}for(z!==0&&(k=z.toString(16)+k);k.length%I!==0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}if(h===(h|0)&&h>=2&&h<=36){var S=A[h],b0=M[h];k="";var x0=this.clone();for(x0.negative=0;!x0.isZero();){var O=x0.modrn(b0).toString(h);x0=x0.idivn(b0),x0.isZero()?k=O+k:k=x[S-O.length]+O+k}for(this.isZero()&&(k="0"+k);k.length%I!==0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}n(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},f.prototype.toJSON=function(){return this.toString(16,2)},r&&(f.prototype.toBuffer=function(h,I){return this.toArrayLike(r,h,I)}),f.prototype.toArray=function(h,I){return this.toArrayLike(Array,h,I)};var v=function(h,I){return h.allocUnsafe?h.allocUnsafe(I):new h(I)};f.prototype.toArrayLike=function(h,I,k){this._strip();var R=this.byteLength(),z=k||Math.max(1,R);n(R<=z,"byte array longer than desired length"),n(z>0,"Requested array length <= 0");var q=v(h,z),e0=I==="le"?"LE":"BE";return this["_toArrayLike"+e0](q,R),q},f.prototype._toArrayLikeLE=function(h,I){for(var k=0,R=0,z=0,q=0;z<this.length;z++){var e0=this.words[z]<<q|R;h[k++]=e0&255,k<h.length&&(h[k++]=e0>>8&255),k<h.length&&(h[k++]=e0>>16&255),q===6?(k<h.length&&(h[k++]=e0>>24&255),R=0,q=0):(R=e0>>>24,q+=2)}if(k<h.length)for(h[k++]=R;k<h.length;)h[k++]=0},f.prototype._toArrayLikeBE=function(h,I){for(var k=h.length-1,R=0,z=0,q=0;z<this.length;z++){var e0=this.words[z]<<q|R;h[k--]=e0&255,k>=0&&(h[k--]=e0>>8&255),k>=0&&(h[k--]=e0>>16&255),q===6?(k>=0&&(h[k--]=e0>>24&255),R=0,q=0):(R=e0>>>24,q+=2)}if(k>=0)for(h[k--]=R;k>=0;)h[k--]=0},Math.clz32?f.prototype._countBits=function(h){return 32-Math.clz32(h)}:f.prototype._countBits=function(h){var I=h,k=0;return I>=4096&&(k+=13,I>>>=13),I>=64&&(k+=7,I>>>=7),I>=8&&(k+=4,I>>>=4),I>=2&&(k+=2,I>>>=2),k+I},f.prototype._zeroBits=function(h){if(h===0)return 26;var I=h,k=0;return(I&8191)===0&&(k+=13,I>>>=13),(I&127)===0&&(k+=7,I>>>=7),(I&15)===0&&(k+=4,I>>>=4),(I&3)===0&&(k+=2,I>>>=2),(I&1)===0&&k++,k},f.prototype.bitLength=function(){var h=this.words[this.length-1],I=this._countBits(h);return(this.length-1)*26+I};function w(F){for(var h=new Array(F.bitLength()),I=0;I<h.length;I++){var k=I/26|0,R=I%26;h[I]=F.words[k]>>>R&1}return h}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,I=0;I<this.length;I++){var k=this._zeroBits(this.words[I]);if(h+=k,k!==26)break}return h},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},f.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var I=0;I<h.length;I++)this.words[I]=this.words[I]|h.words[I];return this._strip()},f.prototype.ior=function(h){return n((this.negative|h.negative)===0),this.iuor(h)},f.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},f.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},f.prototype.iuand=function(h){var I;this.length>h.length?I=h:I=this;for(var k=0;k<I.length;k++)this.words[k]=this.words[k]&h.words[k];return this.length=I.length,this._strip()},f.prototype.iand=function(h){return n((this.negative|h.negative)===0),this.iuand(h)},f.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},f.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},f.prototype.iuxor=function(h){var I,k;this.length>h.length?(I=this,k=h):(I=h,k=this);for(var R=0;R<k.length;R++)this.words[R]=I.words[R]^k.words[R];if(this!==I)for(;R<I.length;R++)this.words[R]=I.words[R];return this.length=I.length,this._strip()},f.prototype.ixor=function(h){return n((this.negative|h.negative)===0),this.iuxor(h)},f.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},f.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},f.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var I=Math.ceil(h/26)|0,k=h%26;this._expand(I),k>0&&I--;for(var R=0;R<I;R++)this.words[R]=~this.words[R]&67108863;return k>0&&(this.words[R]=~this.words[R]&67108863>>26-k),this._strip()},f.prototype.notn=function(h){return this.clone().inotn(h)},f.prototype.setn=function(h,I){n(typeof h=="number"&&h>=0);var k=h/26|0,R=h%26;return this._expand(k+1),I?this.words[k]=this.words[k]|1<<R:this.words[k]=this.words[k]&~(1<<R),this._strip()},f.prototype.iadd=function(h){var I;if(this.negative!==0&&h.negative===0)return this.negative=0,I=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,I=this.isub(h),h.negative=1,I._normSign();var k,R;this.length>h.length?(k=this,R=h):(k=h,R=this);for(var z=0,q=0;q<R.length;q++)I=(k.words[q]|0)+(R.words[q]|0)+z,this.words[q]=I&67108863,z=I>>>26;for(;z!==0&&q<k.length;q++)I=(k.words[q]|0)+z,this.words[q]=I&67108863,z=I>>>26;if(this.length=k.length,z!==0)this.words[this.length]=z,this.length++;else if(k!==this)for(;q<k.length;q++)this.words[q]=k.words[q];return this},f.prototype.add=function(h){var I;return h.negative!==0&&this.negative===0?(h.negative=0,I=this.sub(h),h.negative^=1,I):h.negative===0&&this.negative!==0?(this.negative=0,I=h.sub(this),this.negative=1,I):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},f.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var I=this.iadd(h);return h.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var k=this.cmp(h);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,z;k>0?(R=this,z=h):(R=h,z=this);for(var q=0,e0=0;e0<z.length;e0++)I=(R.words[e0]|0)-(z.words[e0]|0)+q,q=I>>26,this.words[e0]=I&67108863;for(;q!==0&&e0<R.length;e0++)I=(R.words[e0]|0)+q,q=I>>26,this.words[e0]=I&67108863;if(q===0&&e0<R.length&&R!==this)for(;e0<R.length;e0++)this.words[e0]=R.words[e0];return this.length=Math.max(this.length,e0),R!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(h){return this.clone().isub(h)};function D(F,h,I){I.negative=h.negative^F.negative;var k=F.length+h.length|0;I.length=k,k=k-1|0;var R=F.words[0]|0,z=h.words[0]|0,q=R*z,e0=q&67108863,V=q/67108864|0;I.words[0]=e0;for(var S=1;S<k;S++){for(var b0=V>>>26,x0=V&67108863,O=Math.min(S,h.length-1),l0=Math.max(0,S-F.length+1);l0<=O;l0++){var f0=S-l0|0;R=F.words[f0]|0,z=h.words[l0]|0,q=R*z+x0,b0+=q/67108864|0,x0=q&67108863}I.words[S]=x0|0,V=b0|0}return V!==0?I.words[S]=V|0:I.length--,I._strip()}var N=function(h,I,k){var R=h.words,z=I.words,q=k.words,e0=0,V,S,b0,x0=R[0]|0,O=x0&8191,l0=x0>>>13,f0=R[1]|0,K=f0&8191,h0=f0>>>13,g0=R[2]|0,T0=g0&8191,m0=g0>>>13,q0=R[3]|0,F0=q0&8191,N0=q0>>>13,O0=R[4]|0,J0=O0&8191,t1=O0>>>13,i1=R[5]|0,a1=i1&8191,c0=i1>>>13,A0=R[6]|0,I0=A0&8191,H0=A0>>>13,X0=R[7]|0,Y0=X0&8191,K0=X0>>>13,y1=R[8]|0,u1=y1&8191,X=y1>>>13,L=R[9]|0,Q=L&8191,r0=L>>>13,M0=z[0]|0,j0=M0&8191,s0=M0>>>13,k0=z[1]|0,o1=k0&8191,s1=k0>>>13,v1=z[2]|0,d1=v1&8191,Q1=v1>>>13,C6=z[3]|0,F1=C6&8191,X1=C6>>>13,F6=z[4]|0,$1=F6&8191,t0=F6>>>13,_=z[5]|0,Y=_&8191,p0=_>>>13,E0=z[6]|0,z0=E0&8191,W0=E0>>>13,O1=z[7]|0,L1=O1&8191,D1=O1>>>13,c6=z[8]|0,N1=c6&8191,y6=c6>>>13,v5=z[9]|0,u6=v5&8191,x6=v5>>>13;k.negative=h.negative^I.negative,k.length=19,V=Math.imul(O,j0),S=Math.imul(O,s0),S=S+Math.imul(l0,j0)|0,b0=Math.imul(l0,s0);var O5=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(O5>>>26)|0,O5&=67108863,V=Math.imul(K,j0),S=Math.imul(K,s0),S=S+Math.imul(h0,j0)|0,b0=Math.imul(h0,s0),V=V+Math.imul(O,o1)|0,S=S+Math.imul(O,s1)|0,S=S+Math.imul(l0,o1)|0,b0=b0+Math.imul(l0,s1)|0;var v0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(v0>>>26)|0,v0&=67108863,V=Math.imul(T0,j0),S=Math.imul(T0,s0),S=S+Math.imul(m0,j0)|0,b0=Math.imul(m0,s0),V=V+Math.imul(K,o1)|0,S=S+Math.imul(K,s1)|0,S=S+Math.imul(h0,o1)|0,b0=b0+Math.imul(h0,s1)|0,V=V+Math.imul(O,d1)|0,S=S+Math.imul(O,Q1)|0,S=S+Math.imul(l0,d1)|0,b0=b0+Math.imul(l0,Q1)|0;var U0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(U0>>>26)|0,U0&=67108863,V=Math.imul(F0,j0),S=Math.imul(F0,s0),S=S+Math.imul(N0,j0)|0,b0=Math.imul(N0,s0),V=V+Math.imul(T0,o1)|0,S=S+Math.imul(T0,s1)|0,S=S+Math.imul(m0,o1)|0,b0=b0+Math.imul(m0,s1)|0,V=V+Math.imul(K,d1)|0,S=S+Math.imul(K,Q1)|0,S=S+Math.imul(h0,d1)|0,b0=b0+Math.imul(h0,Q1)|0,V=V+Math.imul(O,F1)|0,S=S+Math.imul(O,X1)|0,S=S+Math.imul(l0,F1)|0,b0=b0+Math.imul(l0,X1)|0;var D0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(D0>>>26)|0,D0&=67108863,V=Math.imul(J0,j0),S=Math.imul(J0,s0),S=S+Math.imul(t1,j0)|0,b0=Math.imul(t1,s0),V=V+Math.imul(F0,o1)|0,S=S+Math.imul(F0,s1)|0,S=S+Math.imul(N0,o1)|0,b0=b0+Math.imul(N0,s1)|0,V=V+Math.imul(T0,d1)|0,S=S+Math.imul(T0,Q1)|0,S=S+Math.imul(m0,d1)|0,b0=b0+Math.imul(m0,Q1)|0,V=V+Math.imul(K,F1)|0,S=S+Math.imul(K,X1)|0,S=S+Math.imul(h0,F1)|0,b0=b0+Math.imul(h0,X1)|0,V=V+Math.imul(O,$1)|0,S=S+Math.imul(O,t0)|0,S=S+Math.imul(l0,$1)|0,b0=b0+Math.imul(l0,t0)|0;var L0=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(L0>>>26)|0,L0&=67108863,V=Math.imul(a1,j0),S=Math.imul(a1,s0),S=S+Math.imul(c0,j0)|0,b0=Math.imul(c0,s0),V=V+Math.imul(J0,o1)|0,S=S+Math.imul(J0,s1)|0,S=S+Math.imul(t1,o1)|0,b0=b0+Math.imul(t1,s1)|0,V=V+Math.imul(F0,d1)|0,S=S+Math.imul(F0,Q1)|0,S=S+Math.imul(N0,d1)|0,b0=b0+Math.imul(N0,Q1)|0,V=V+Math.imul(T0,F1)|0,S=S+Math.imul(T0,X1)|0,S=S+Math.imul(m0,F1)|0,b0=b0+Math.imul(m0,X1)|0,V=V+Math.imul(K,$1)|0,S=S+Math.imul(K,t0)|0,S=S+Math.imul(h0,$1)|0,b0=b0+Math.imul(h0,t0)|0,V=V+Math.imul(O,Y)|0,S=S+Math.imul(O,p0)|0,S=S+Math.imul(l0,Y)|0,b0=b0+Math.imul(l0,p0)|0;var f1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(f1>>>26)|0,f1&=67108863,V=Math.imul(I0,j0),S=Math.imul(I0,s0),S=S+Math.imul(H0,j0)|0,b0=Math.imul(H0,s0),V=V+Math.imul(a1,o1)|0,S=S+Math.imul(a1,s1)|0,S=S+Math.imul(c0,o1)|0,b0=b0+Math.imul(c0,s1)|0,V=V+Math.imul(J0,d1)|0,S=S+Math.imul(J0,Q1)|0,S=S+Math.imul(t1,d1)|0,b0=b0+Math.imul(t1,Q1)|0,V=V+Math.imul(F0,F1)|0,S=S+Math.imul(F0,X1)|0,S=S+Math.imul(N0,F1)|0,b0=b0+Math.imul(N0,X1)|0,V=V+Math.imul(T0,$1)|0,S=S+Math.imul(T0,t0)|0,S=S+Math.imul(m0,$1)|0,b0=b0+Math.imul(m0,t0)|0,V=V+Math.imul(K,Y)|0,S=S+Math.imul(K,p0)|0,S=S+Math.imul(h0,Y)|0,b0=b0+Math.imul(h0,p0)|0,V=V+Math.imul(O,z0)|0,S=S+Math.imul(O,W0)|0,S=S+Math.imul(l0,z0)|0,b0=b0+Math.imul(l0,W0)|0;var m1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(m1>>>26)|0,m1&=67108863,V=Math.imul(Y0,j0),S=Math.imul(Y0,s0),S=S+Math.imul(K0,j0)|0,b0=Math.imul(K0,s0),V=V+Math.imul(I0,o1)|0,S=S+Math.imul(I0,s1)|0,S=S+Math.imul(H0,o1)|0,b0=b0+Math.imul(H0,s1)|0,V=V+Math.imul(a1,d1)|0,S=S+Math.imul(a1,Q1)|0,S=S+Math.imul(c0,d1)|0,b0=b0+Math.imul(c0,Q1)|0,V=V+Math.imul(J0,F1)|0,S=S+Math.imul(J0,X1)|0,S=S+Math.imul(t1,F1)|0,b0=b0+Math.imul(t1,X1)|0,V=V+Math.imul(F0,$1)|0,S=S+Math.imul(F0,t0)|0,S=S+Math.imul(N0,$1)|0,b0=b0+Math.imul(N0,t0)|0,V=V+Math.imul(T0,Y)|0,S=S+Math.imul(T0,p0)|0,S=S+Math.imul(m0,Y)|0,b0=b0+Math.imul(m0,p0)|0,V=V+Math.imul(K,z0)|0,S=S+Math.imul(K,W0)|0,S=S+Math.imul(h0,z0)|0,b0=b0+Math.imul(h0,W0)|0,V=V+Math.imul(O,L1)|0,S=S+Math.imul(O,D1)|0,S=S+Math.imul(l0,L1)|0,b0=b0+Math.imul(l0,D1)|0;var h1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(h1>>>26)|0,h1&=67108863,V=Math.imul(u1,j0),S=Math.imul(u1,s0),S=S+Math.imul(X,j0)|0,b0=Math.imul(X,s0),V=V+Math.imul(Y0,o1)|0,S=S+Math.imul(Y0,s1)|0,S=S+Math.imul(K0,o1)|0,b0=b0+Math.imul(K0,s1)|0,V=V+Math.imul(I0,d1)|0,S=S+Math.imul(I0,Q1)|0,S=S+Math.imul(H0,d1)|0,b0=b0+Math.imul(H0,Q1)|0,V=V+Math.imul(a1,F1)|0,S=S+Math.imul(a1,X1)|0,S=S+Math.imul(c0,F1)|0,b0=b0+Math.imul(c0,X1)|0,V=V+Math.imul(J0,$1)|0,S=S+Math.imul(J0,t0)|0,S=S+Math.imul(t1,$1)|0,b0=b0+Math.imul(t1,t0)|0,V=V+Math.imul(F0,Y)|0,S=S+Math.imul(F0,p0)|0,S=S+Math.imul(N0,Y)|0,b0=b0+Math.imul(N0,p0)|0,V=V+Math.imul(T0,z0)|0,S=S+Math.imul(T0,W0)|0,S=S+Math.imul(m0,z0)|0,b0=b0+Math.imul(m0,W0)|0,V=V+Math.imul(K,L1)|0,S=S+Math.imul(K,D1)|0,S=S+Math.imul(h0,L1)|0,b0=b0+Math.imul(h0,D1)|0,V=V+Math.imul(O,N1)|0,S=S+Math.imul(O,y6)|0,S=S+Math.imul(l0,N1)|0,b0=b0+Math.imul(l0,y6)|0;var E1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(E1>>>26)|0,E1&=67108863,V=Math.imul(Q,j0),S=Math.imul(Q,s0),S=S+Math.imul(r0,j0)|0,b0=Math.imul(r0,s0),V=V+Math.imul(u1,o1)|0,S=S+Math.imul(u1,s1)|0,S=S+Math.imul(X,o1)|0,b0=b0+Math.imul(X,s1)|0,V=V+Math.imul(Y0,d1)|0,S=S+Math.imul(Y0,Q1)|0,S=S+Math.imul(K0,d1)|0,b0=b0+Math.imul(K0,Q1)|0,V=V+Math.imul(I0,F1)|0,S=S+Math.imul(I0,X1)|0,S=S+Math.imul(H0,F1)|0,b0=b0+Math.imul(H0,X1)|0,V=V+Math.imul(a1,$1)|0,S=S+Math.imul(a1,t0)|0,S=S+Math.imul(c0,$1)|0,b0=b0+Math.imul(c0,t0)|0,V=V+Math.imul(J0,Y)|0,S=S+Math.imul(J0,p0)|0,S=S+Math.imul(t1,Y)|0,b0=b0+Math.imul(t1,p0)|0,V=V+Math.imul(F0,z0)|0,S=S+Math.imul(F0,W0)|0,S=S+Math.imul(N0,z0)|0,b0=b0+Math.imul(N0,W0)|0,V=V+Math.imul(T0,L1)|0,S=S+Math.imul(T0,D1)|0,S=S+Math.imul(m0,L1)|0,b0=b0+Math.imul(m0,D1)|0,V=V+Math.imul(K,N1)|0,S=S+Math.imul(K,y6)|0,S=S+Math.imul(h0,N1)|0,b0=b0+Math.imul(h0,y6)|0,V=V+Math.imul(O,u6)|0,S=S+Math.imul(O,x6)|0,S=S+Math.imul(l0,u6)|0,b0=b0+Math.imul(l0,x6)|0;var Z1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(Z1>>>26)|0,Z1&=67108863,V=Math.imul(Q,o1),S=Math.imul(Q,s1),S=S+Math.imul(r0,o1)|0,b0=Math.imul(r0,s1),V=V+Math.imul(u1,d1)|0,S=S+Math.imul(u1,Q1)|0,S=S+Math.imul(X,d1)|0,b0=b0+Math.imul(X,Q1)|0,V=V+Math.imul(Y0,F1)|0,S=S+Math.imul(Y0,X1)|0,S=S+Math.imul(K0,F1)|0,b0=b0+Math.imul(K0,X1)|0,V=V+Math.imul(I0,$1)|0,S=S+Math.imul(I0,t0)|0,S=S+Math.imul(H0,$1)|0,b0=b0+Math.imul(H0,t0)|0,V=V+Math.imul(a1,Y)|0,S=S+Math.imul(a1,p0)|0,S=S+Math.imul(c0,Y)|0,b0=b0+Math.imul(c0,p0)|0,V=V+Math.imul(J0,z0)|0,S=S+Math.imul(J0,W0)|0,S=S+Math.imul(t1,z0)|0,b0=b0+Math.imul(t1,W0)|0,V=V+Math.imul(F0,L1)|0,S=S+Math.imul(F0,D1)|0,S=S+Math.imul(N0,L1)|0,b0=b0+Math.imul(N0,D1)|0,V=V+Math.imul(T0,N1)|0,S=S+Math.imul(T0,y6)|0,S=S+Math.imul(m0,N1)|0,b0=b0+Math.imul(m0,y6)|0,V=V+Math.imul(K,u6)|0,S=S+Math.imul(K,x6)|0,S=S+Math.imul(h0,u6)|0,b0=b0+Math.imul(h0,x6)|0;var K1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(K1>>>26)|0,K1&=67108863,V=Math.imul(Q,d1),S=Math.imul(Q,Q1),S=S+Math.imul(r0,d1)|0,b0=Math.imul(r0,Q1),V=V+Math.imul(u1,F1)|0,S=S+Math.imul(u1,X1)|0,S=S+Math.imul(X,F1)|0,b0=b0+Math.imul(X,X1)|0,V=V+Math.imul(Y0,$1)|0,S=S+Math.imul(Y0,t0)|0,S=S+Math.imul(K0,$1)|0,b0=b0+Math.imul(K0,t0)|0,V=V+Math.imul(I0,Y)|0,S=S+Math.imul(I0,p0)|0,S=S+Math.imul(H0,Y)|0,b0=b0+Math.imul(H0,p0)|0,V=V+Math.imul(a1,z0)|0,S=S+Math.imul(a1,W0)|0,S=S+Math.imul(c0,z0)|0,b0=b0+Math.imul(c0,W0)|0,V=V+Math.imul(J0,L1)|0,S=S+Math.imul(J0,D1)|0,S=S+Math.imul(t1,L1)|0,b0=b0+Math.imul(t1,D1)|0,V=V+Math.imul(F0,N1)|0,S=S+Math.imul(F0,y6)|0,S=S+Math.imul(N0,N1)|0,b0=b0+Math.imul(N0,y6)|0,V=V+Math.imul(T0,u6)|0,S=S+Math.imul(T0,x6)|0,S=S+Math.imul(m0,u6)|0,b0=b0+Math.imul(m0,x6)|0;var Y1=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(Y1>>>26)|0,Y1&=67108863,V=Math.imul(Q,F1),S=Math.imul(Q,X1),S=S+Math.imul(r0,F1)|0,b0=Math.imul(r0,X1),V=V+Math.imul(u1,$1)|0,S=S+Math.imul(u1,t0)|0,S=S+Math.imul(X,$1)|0,b0=b0+Math.imul(X,t0)|0,V=V+Math.imul(Y0,Y)|0,S=S+Math.imul(Y0,p0)|0,S=S+Math.imul(K0,Y)|0,b0=b0+Math.imul(K0,p0)|0,V=V+Math.imul(I0,z0)|0,S=S+Math.imul(I0,W0)|0,S=S+Math.imul(H0,z0)|0,b0=b0+Math.imul(H0,W0)|0,V=V+Math.imul(a1,L1)|0,S=S+Math.imul(a1,D1)|0,S=S+Math.imul(c0,L1)|0,b0=b0+Math.imul(c0,D1)|0,V=V+Math.imul(J0,N1)|0,S=S+Math.imul(J0,y6)|0,S=S+Math.imul(t1,N1)|0,b0=b0+Math.imul(t1,y6)|0,V=V+Math.imul(F0,u6)|0,S=S+Math.imul(F0,x6)|0,S=S+Math.imul(N0,u6)|0,b0=b0+Math.imul(N0,x6)|0;var E6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(E6>>>26)|0,E6&=67108863,V=Math.imul(Q,$1),S=Math.imul(Q,t0),S=S+Math.imul(r0,$1)|0,b0=Math.imul(r0,t0),V=V+Math.imul(u1,Y)|0,S=S+Math.imul(u1,p0)|0,S=S+Math.imul(X,Y)|0,b0=b0+Math.imul(X,p0)|0,V=V+Math.imul(Y0,z0)|0,S=S+Math.imul(Y0,W0)|0,S=S+Math.imul(K0,z0)|0,b0=b0+Math.imul(K0,W0)|0,V=V+Math.imul(I0,L1)|0,S=S+Math.imul(I0,D1)|0,S=S+Math.imul(H0,L1)|0,b0=b0+Math.imul(H0,D1)|0,V=V+Math.imul(a1,N1)|0,S=S+Math.imul(a1,y6)|0,S=S+Math.imul(c0,N1)|0,b0=b0+Math.imul(c0,y6)|0,V=V+Math.imul(J0,u6)|0,S=S+Math.imul(J0,x6)|0,S=S+Math.imul(t1,u6)|0,b0=b0+Math.imul(t1,x6)|0;var I6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(I6>>>26)|0,I6&=67108863,V=Math.imul(Q,Y),S=Math.imul(Q,p0),S=S+Math.imul(r0,Y)|0,b0=Math.imul(r0,p0),V=V+Math.imul(u1,z0)|0,S=S+Math.imul(u1,W0)|0,S=S+Math.imul(X,z0)|0,b0=b0+Math.imul(X,W0)|0,V=V+Math.imul(Y0,L1)|0,S=S+Math.imul(Y0,D1)|0,S=S+Math.imul(K0,L1)|0,b0=b0+Math.imul(K0,D1)|0,V=V+Math.imul(I0,N1)|0,S=S+Math.imul(I0,y6)|0,S=S+Math.imul(H0,N1)|0,b0=b0+Math.imul(H0,y6)|0,V=V+Math.imul(a1,u6)|0,S=S+Math.imul(a1,x6)|0,S=S+Math.imul(c0,u6)|0,b0=b0+Math.imul(c0,x6)|0;var v6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(v6>>>26)|0,v6&=67108863,V=Math.imul(Q,z0),S=Math.imul(Q,W0),S=S+Math.imul(r0,z0)|0,b0=Math.imul(r0,W0),V=V+Math.imul(u1,L1)|0,S=S+Math.imul(u1,D1)|0,S=S+Math.imul(X,L1)|0,b0=b0+Math.imul(X,D1)|0,V=V+Math.imul(Y0,N1)|0,S=S+Math.imul(Y0,y6)|0,S=S+Math.imul(K0,N1)|0,b0=b0+Math.imul(K0,y6)|0,V=V+Math.imul(I0,u6)|0,S=S+Math.imul(I0,x6)|0,S=S+Math.imul(H0,u6)|0,b0=b0+Math.imul(H0,x6)|0;var r6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(r6>>>26)|0,r6&=67108863,V=Math.imul(Q,L1),S=Math.imul(Q,D1),S=S+Math.imul(r0,L1)|0,b0=Math.imul(r0,D1),V=V+Math.imul(u1,N1)|0,S=S+Math.imul(u1,y6)|0,S=S+Math.imul(X,N1)|0,b0=b0+Math.imul(X,y6)|0,V=V+Math.imul(Y0,u6)|0,S=S+Math.imul(Y0,x6)|0,S=S+Math.imul(K0,u6)|0,b0=b0+Math.imul(K0,x6)|0;var b6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(b6>>>26)|0,b6&=67108863,V=Math.imul(Q,N1),S=Math.imul(Q,y6),S=S+Math.imul(r0,N1)|0,b0=Math.imul(r0,y6),V=V+Math.imul(u1,u6)|0,S=S+Math.imul(u1,x6)|0,S=S+Math.imul(X,u6)|0,b0=b0+Math.imul(X,x6)|0;var k6=(e0+V|0)+((S&8191)<<13)|0;e0=(b0+(S>>>13)|0)+(k6>>>26)|0,k6&=67108863,V=Math.imul(Q,u6),S=Math.imul(Q,x6),S=S+Math.imul(r0,u6)|0,b0=Math.imul(r0,x6);var S6=(e0+V|0)+((S&8191)<<13)|0;return e0=(b0+(S>>>13)|0)+(S6>>>26)|0,S6&=67108863,q[0]=O5,q[1]=v0,q[2]=U0,q[3]=D0,q[4]=L0,q[5]=f1,q[6]=m1,q[7]=h1,q[8]=E1,q[9]=Z1,q[10]=K1,q[11]=Y1,q[12]=E6,q[13]=I6,q[14]=v6,q[15]=r6,q[16]=b6,q[17]=k6,q[18]=S6,e0!==0&&(q[19]=e0,k.length++),k};Math.imul||(N=D);function T(F,h,I){I.negative=h.negative^F.negative,I.length=F.length+h.length;for(var k=0,R=0,z=0;z<I.length-1;z++){var q=R;R=0;for(var e0=k&67108863,V=Math.min(z,h.length-1),S=Math.max(0,z-F.length+1);S<=V;S++){var b0=z-S,x0=F.words[b0]|0,O=h.words[S]|0,l0=x0*O,f0=l0&67108863;q=q+(l0/67108864|0)|0,f0=f0+e0|0,e0=f0&67108863,q=q+(f0>>>26)|0,R+=q>>>26,q&=67108863}I.words[z]=e0,k=q,q=R}return k!==0?I.words[z]=k:I.length--,I._strip()}function j(F,h,I){return T(F,h,I)}f.prototype.mulTo=function(h,I){var k,R=this.length+h.length;return this.length===10&&h.length===10?k=N(this,h,I):R<63?k=D(this,h,I):R<1024?k=T(this,h,I):k=j(this,h,I),k},f.prototype.mul=function(h){var I=new f(null);return I.words=new Array(this.length+h.length),this.mulTo(h,I)},f.prototype.mulf=function(h){var I=new f(null);return I.words=new Array(this.length+h.length),j(this,h,I)},f.prototype.imul=function(h){return this.clone().mulTo(h,this)},f.prototype.imuln=function(h){var I=h<0;I&&(h=-h),n(typeof h=="number"),n(h<67108864);for(var k=0,R=0;R<this.length;R++){var z=(this.words[R]|0)*h,q=(z&67108863)+(k&67108863);k>>=26,k+=z/67108864|0,k+=q>>>26,this.words[R]=q&67108863}return k!==0&&(this.words[R]=k,this.length++),this.length=h===0?1:this.length,I?this.ineg():this},f.prototype.muln=function(h){return this.clone().imuln(h)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(h){var I=w(h);if(I.length===0)return new f(1);for(var k=this,R=0;R<I.length&&I[R]===0;R++,k=k.sqr());if(++R<I.length)for(var z=k.sqr();R<I.length;R++,z=z.sqr())I[R]!==0&&(k=k.mul(z));return k},f.prototype.iushln=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26,R=67108863>>>26-I<<26-I,z;if(I!==0){var q=0;for(z=0;z<this.length;z++){var e0=this.words[z]&R,V=(this.words[z]|0)-e0<<I;this.words[z]=V|q,q=e0>>>26-I}q&&(this.words[z]=q,this.length++)}if(k!==0){for(z=this.length-1;z>=0;z--)this.words[z+k]=this.words[z];for(z=0;z<k;z++)this.words[z]=0;this.length+=k}return this._strip()},f.prototype.ishln=function(h){return n(this.negative===0),this.iushln(h)},f.prototype.iushrn=function(h,I,k){n(typeof h=="number"&&h>=0);var R;I?R=(I-I%26)/26:R=0;var z=h%26,q=Math.min((h-z)/26,this.length),e0=67108863^67108863>>>z<<z,V=k;if(R-=q,R=Math.max(0,R),V){for(var S=0;S<q;S++)V.words[S]=this.words[S];V.length=q}if(q!==0)if(this.length>q)for(this.length-=q,S=0;S<this.length;S++)this.words[S]=this.words[S+q];else this.words[0]=0,this.length=1;var b0=0;for(S=this.length-1;S>=0&&(b0!==0||S>=R);S--){var x0=this.words[S]|0;this.words[S]=b0<<26-z|x0>>>z,b0=x0&e0}return V&&b0!==0&&(V.words[V.length++]=b0),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(h,I,k){return n(this.negative===0),this.iushrn(h,I,k)},f.prototype.shln=function(h){return this.clone().ishln(h)},f.prototype.ushln=function(h){return this.clone().iushln(h)},f.prototype.shrn=function(h){return this.clone().ishrn(h)},f.prototype.ushrn=function(h){return this.clone().iushrn(h)},f.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26,R=1<<I;if(this.length<=k)return!1;var z=this.words[k];return!!(z&R)},f.prototype.imaskn=function(h){n(typeof h=="number"&&h>=0);var I=h%26,k=(h-I)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=k)return this;if(I!==0&&k++,this.length=Math.min(k,this.length),I!==0){var R=67108863^67108863>>>I<<I;this.words[this.length-1]&=R}return this._strip()},f.prototype.maskn=function(h){return this.clone().imaskn(h)},f.prototype.iaddn=function(h){return n(typeof h=="number"),n(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<=h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},f.prototype._iaddn=function(h){this.words[0]+=h;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},f.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this._strip()},f.prototype.addn=function(h){return this.clone().iaddn(h)},f.prototype.subn=function(h){return this.clone().isubn(h)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(h,I,k){var R=h.length+k,z;this._expand(R);var q,e0=0;for(z=0;z<h.length;z++){q=(this.words[z+k]|0)+e0;var V=(h.words[z]|0)*I;q-=V&67108863,e0=(q>>26)-(V/67108864|0),this.words[z+k]=q&67108863}for(;z<this.length-k;z++)q=(this.words[z+k]|0)+e0,e0=q>>26,this.words[z+k]=q&67108863;if(e0===0)return this._strip();for(n(e0===-1),e0=0,z=0;z<this.length;z++)q=-(this.words[z]|0)+e0,e0=q>>26,this.words[z]=q&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(h,I){var k=this.length-h.length,R=this.clone(),z=h,q=z.words[z.length-1]|0,e0=this._countBits(q);k=26-e0,k!==0&&(z=z.ushln(k),R.iushln(k),q=z.words[z.length-1]|0);var V=R.length-z.length,S;if(I!=="mod"){S=new f(null),S.length=V+1,S.words=new Array(S.length);for(var b0=0;b0<S.length;b0++)S.words[b0]=0}var x0=R.clone()._ishlnsubmul(z,1,V);x0.negative===0&&(R=x0,S&&(S.words[V]=1));for(var O=V-1;O>=0;O--){var l0=(R.words[z.length+O]|0)*67108864+(R.words[z.length+O-1]|0);for(l0=Math.min(l0/q|0,67108863),R._ishlnsubmul(z,l0,O);R.negative!==0;)l0--,R.negative=0,R._ishlnsubmul(z,1,O),R.isZero()||(R.negative^=1);S&&(S.words[O]=l0)}return S&&S._strip(),R._strip(),I!=="div"&&k!==0&&R.iushrn(k),{div:S||null,mod:R}},f.prototype.divmod=function(h,I,k){if(n(!h.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var R,z,q;return this.negative!==0&&h.negative===0?(q=this.neg().divmod(h,I),I!=="mod"&&(R=q.div.neg()),I!=="div"&&(z=q.mod.neg(),k&&z.negative!==0&&z.iadd(h)),{div:R,mod:z}):this.negative===0&&h.negative!==0?(q=this.divmod(h.neg(),I),I!=="mod"&&(R=q.div.neg()),{div:R,mod:q.mod}):(this.negative&h.negative)!==0?(q=this.neg().divmod(h.neg(),I),I!=="div"&&(z=q.mod.neg(),k&&z.negative!==0&&z.isub(h)),{div:q.div,mod:z}):h.length>this.length||this.cmp(h)<0?{div:new f(0),mod:this}:h.length===1?I==="div"?{div:this.divn(h.words[0]),mod:null}:I==="mod"?{div:null,mod:new f(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new f(this.modrn(h.words[0]))}:this._wordDiv(h,I)},f.prototype.div=function(h){return this.divmod(h,"div",!1).div},f.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},f.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},f.prototype.divRound=function(h){var I=this.divmod(h);if(I.mod.isZero())return I.div;var k=I.div.negative!==0?I.mod.isub(h):I.mod,R=h.ushrn(1),z=h.andln(1),q=k.cmp(R);return q<0||z===1&&q===0?I.div:I.div.negative!==0?I.div.isubn(1):I.div.iaddn(1)},f.prototype.modrn=function(h){var I=h<0;I&&(h=-h),n(h<=67108863);for(var k=(1<<26)%h,R=0,z=this.length-1;z>=0;z--)R=(k*R+(this.words[z]|0))%h;return I?-R:R},f.prototype.modn=function(h){return this.modrn(h)},f.prototype.idivn=function(h){var I=h<0;I&&(h=-h),n(h<=67108863);for(var k=0,R=this.length-1;R>=0;R--){var z=(this.words[R]|0)+k*67108864;this.words[R]=z/h|0,k=z%h}return this._strip(),I?this.ineg():this},f.prototype.divn=function(h){return this.clone().idivn(h)},f.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var I=this,k=h.clone();I.negative!==0?I=I.umod(h):I=I.clone();for(var R=new f(1),z=new f(0),q=new f(0),e0=new f(1),V=0;I.isEven()&&k.isEven();)I.iushrn(1),k.iushrn(1),++V;for(var S=k.clone(),b0=I.clone();!I.isZero();){for(var x0=0,O=1;(I.words[0]&O)===0&&x0<26;++x0,O<<=1);if(x0>0)for(I.iushrn(x0);x0-- >0;)(R.isOdd()||z.isOdd())&&(R.iadd(S),z.isub(b0)),R.iushrn(1),z.iushrn(1);for(var l0=0,f0=1;(k.words[0]&f0)===0&&l0<26;++l0,f0<<=1);if(l0>0)for(k.iushrn(l0);l0-- >0;)(q.isOdd()||e0.isOdd())&&(q.iadd(S),e0.isub(b0)),q.iushrn(1),e0.iushrn(1);I.cmp(k)>=0?(I.isub(k),R.isub(q),z.isub(e0)):(k.isub(I),q.isub(R),e0.isub(z))}return{a:q,b:e0,gcd:k.iushln(V)}},f.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var I=this,k=h.clone();I.negative!==0?I=I.umod(h):I=I.clone();for(var R=new f(1),z=new f(0),q=k.clone();I.cmpn(1)>0&&k.cmpn(1)>0;){for(var e0=0,V=1;(I.words[0]&V)===0&&e0<26;++e0,V<<=1);if(e0>0)for(I.iushrn(e0);e0-- >0;)R.isOdd()&&R.iadd(q),R.iushrn(1);for(var S=0,b0=1;(k.words[0]&b0)===0&&S<26;++S,b0<<=1);if(S>0)for(k.iushrn(S);S-- >0;)z.isOdd()&&z.iadd(q),z.iushrn(1);I.cmp(k)>=0?(I.isub(k),R.isub(z)):(k.isub(I),z.isub(R))}var x0;return I.cmpn(1)===0?x0=R:x0=z,x0.cmpn(0)<0&&x0.iadd(h),x0},f.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var I=this.clone(),k=h.clone();I.negative=0,k.negative=0;for(var R=0;I.isEven()&&k.isEven();R++)I.iushrn(1),k.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;k.isEven();)k.iushrn(1);var z=I.cmp(k);if(z<0){var q=I;I=k,k=q}else if(z===0||k.cmpn(1)===0)break;I.isub(k)}while(!0);return k.iushln(R)},f.prototype.invm=function(h){return this.egcd(h).a.umod(h)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(h){return this.words[0]&h},f.prototype.bincn=function(h){n(typeof h=="number");var I=h%26,k=(h-I)/26,R=1<<I;if(this.length<=k)return this._expand(k+1),this.words[k]|=R,this;for(var z=R,q=k;z!==0&&q<this.length;q++){var e0=this.words[q]|0;e0+=z,z=e0>>>26,e0&=67108863,this.words[q]=e0}return z!==0&&(this.words[q]=z,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(h){var I=h<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this._strip();var k;if(this.length>1)k=1;else{I&&(h=-h),n(h<=67108863,"Number is too big");var R=this.words[0]|0;k=R===h?0:R<h?-1:1}return this.negative!==0?-k|0:k},f.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var I=this.ucmp(h);return this.negative!==0?-I|0:I},f.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var I=0,k=this.length-1;k>=0;k--){var R=this.words[k]|0,z=h.words[k]|0;if(R!==z){R<z?I=-1:R>z&&(I=1);break}}return I},f.prototype.gtn=function(h){return this.cmpn(h)===1},f.prototype.gt=function(h){return this.cmp(h)===1},f.prototype.gten=function(h){return this.cmpn(h)>=0},f.prototype.gte=function(h){return this.cmp(h)>=0},f.prototype.ltn=function(h){return this.cmpn(h)===-1},f.prototype.lt=function(h){return this.cmp(h)===-1},f.prototype.lten=function(h){return this.cmpn(h)<=0},f.prototype.lte=function(h){return this.cmp(h)<=0},f.prototype.eqn=function(h){return this.cmpn(h)===0},f.prototype.eq=function(h){return this.cmp(h)===0},f.red=function(h){return new y0(h)},f.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},f.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(h){return this.red=h,this},f.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},f.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},f.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},f.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},f.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},f.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},f.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},f.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},f.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var C={k256:null,p224:null,p192:null,p25519:null};function G(F,h){this.name=F,this.p=new f(h,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var h=new f(null);return h.words=new Array(Math.ceil(this.n/13)),h},G.prototype.ireduce=function(h){var I=h,k;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),k=I.bitLength();while(k>this.n);var R=k<this.n?-1:I.ucmp(this.p);return R===0?(I.words[0]=0,I.length=1):R>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},G.prototype.split=function(h,I){h.iushrn(this.n,0,I)},G.prototype.imulK=function(h){return h.imul(this.k)};function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(W,G),W.prototype.split=function(h,I){for(var k=4194303,R=Math.min(h.length,9),z=0;z<R;z++)I.words[z]=h.words[z];if(I.length=R,h.length<=9){h.words[0]=0,h.length=1;return}var q=h.words[9];for(I.words[I.length++]=q&k,z=10;z<h.length;z++){var e0=h.words[z]|0;h.words[z-10]=(e0&k)<<4|q>>>22,q=e0}q>>>=22,h.words[z-10]=q,q===0&&h.length>10?h.length-=10:h.length-=9},W.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var I=0,k=0;k<h.length;k++){var R=h.words[k]|0;I+=R*977,h.words[k]=I&67108863,I=R*64+(I/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function Z(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Z,G);function d0(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(d0,G);function n0(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(n0,G),n0.prototype.imulK=function(h){for(var I=0,k=0;k<h.length;k++){var R=(h.words[k]|0)*19+I,z=R&67108863;R>>>=26,h.words[k]=z,I=R}return I!==0&&(h.words[h.length++]=I),h},f._prime=function(h){if(C[h])return C[h];var I;if(h==="k256")I=new W;else if(h==="p224")I=new Z;else if(h==="p192")I=new d0;else if(h==="p25519")I=new n0;else throw new Error("Unknown prime "+h);return C[h]=I,I};function y0(F){if(typeof F=="string"){var h=f._prime(F);this.m=h.p,this.prime=h}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}y0.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},y0.prototype._verify2=function(h,I){n((h.negative|I.negative)===0,"red works only with positives"),n(h.red&&h.red===I.red,"red works only with red numbers")},y0.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(y(h,h.umod(this.m)._forceRed(this)),h)},y0.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},y0.prototype.add=function(h,I){this._verify2(h,I);var k=h.add(I);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},y0.prototype.iadd=function(h,I){this._verify2(h,I);var k=h.iadd(I);return k.cmp(this.m)>=0&&k.isub(this.m),k},y0.prototype.sub=function(h,I){this._verify2(h,I);var k=h.sub(I);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},y0.prototype.isub=function(h,I){this._verify2(h,I);var k=h.isub(I);return k.cmpn(0)<0&&k.iadd(this.m),k},y0.prototype.shl=function(h,I){return this._verify1(h),this.imod(h.ushln(I))},y0.prototype.imul=function(h,I){return this._verify2(h,I),this.imod(h.imul(I))},y0.prototype.mul=function(h,I){return this._verify2(h,I),this.imod(h.mul(I))},y0.prototype.isqr=function(h){return this.imul(h,h.clone())},y0.prototype.sqr=function(h){return this.mul(h,h)},y0.prototype.sqrt=function(h){if(h.isZero())return h.clone();var I=this.m.andln(3);if(n(I%2===1),I===3){var k=this.m.add(new f(1)).iushrn(2);return this.pow(h,k)}for(var R=this.m.subn(1),z=0;!R.isZero()&&R.andln(1)===0;)z++,R.iushrn(1);n(!R.isZero());var q=new f(1).toRed(this),e0=q.redNeg(),V=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new f(2*S*S).toRed(this);this.pow(S,V).cmp(e0)!==0;)S.redIAdd(e0);for(var b0=this.pow(S,R),x0=this.pow(h,R.addn(1).iushrn(1)),O=this.pow(h,R),l0=z;O.cmp(q)!==0;){for(var f0=O,K=0;f0.cmp(q)!==0;K++)f0=f0.redSqr();n(K<l0);var h0=this.pow(b0,new f(1).iushln(l0-K-1));x0=x0.redMul(h0),b0=h0.redSqr(),O=O.redMul(b0),l0=K}return x0},y0.prototype.invm=function(h){var I=h._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},y0.prototype.pow=function(h,I){if(I.isZero())return new f(1).toRed(this);if(I.cmpn(1)===0)return h.clone();var k=4,R=new Array(1<<k);R[0]=new f(1).toRed(this),R[1]=h;for(var z=2;z<R.length;z++)R[z]=this.mul(R[z-1],h);var q=R[0],e0=0,V=0,S=I.bitLength()%26;for(S===0&&(S=26),z=I.length-1;z>=0;z--){for(var b0=I.words[z],x0=S-1;x0>=0;x0--){var O=b0>>x0&1;if(q!==R[0]&&(q=this.sqr(q)),O===0&&e0===0){V=0;continue}e0<<=1,e0|=O,V++,!(V!==k&&(z!==0||x0!==0))&&(q=this.mul(q,R[e0]),V=0,e0=0)}S=26}return q},y0.prototype.convertTo=function(h){var I=h.umod(this.m);return I===h?I.clone():I},y0.prototype.convertFrom=function(h){var I=h.clone();return I.red=null,I},f.mont=function(h){return new H(h)};function H(F){y0.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b(H,y0),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var I=this.imod(h.mul(this.rinv));return I.red=null,I},H.prototype.imul=function(h,I){if(h.isZero()||I.isZero())return h.words[0]=0,h.length=1,h;var k=h.imul(I),R=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=k.isub(R).iushrn(this.shift),q=z;return z.cmp(this.m)>=0?q=z.isub(this.m):z.cmpn(0)<0&&(q=z.iadd(this.m)),q._forceRed(this)},H.prototype.mul=function(h,I){if(h.isZero()||I.isZero())return new f(0)._forceRed(this);var k=h.mul(I),R=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=k.isub(R).iushrn(this.shift),q=z;return z.cmp(this.m)>=0?q=z.isub(this.m):z.cmpn(0)<0&&(q=z.iadd(this.m)),q._forceRed(this)},H.prototype.invm=function(h){var I=this.imod(h._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(t,_C)})(Wr)),Wr.exports}var PC=BC();const q1=Y8(PC),UC="logger/5.8.0";let up=!1,lp=!1;const Hr={debug:1,default:2,info:2,warning:3,error:4,off:5};let pp=Hr.default,eo=null;function RC(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const yp=RC();var s7;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(s7||(s7={}));var p2;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(p2||(p2={}));const mp="0123456789abcdef";class R0{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,a){const n=e.toLowerCase();Hr[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(pp>Hr[n])&&console.log.apply(console,a)}debug(...e){this._log(R0.levels.DEBUG,e)}info(...e){this._log(R0.levels.INFO,e)}warn(...e){this._log(R0.levels.WARNING,e)}makeError(e,a,n){if(lp)return this.makeError("censored error",a,{});a||(a=R0.errors.UNKNOWN_ERROR),n||(n={});const b=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let y="";for(let m=0;m<l.length;m++)y+=mp[l[m]>>4],y+=mp[l[m]&15];b.push(u+"=Uint8Array(0x"+y+")")}else b.push(u+"="+JSON.stringify(l))}catch{b.push(u+"="+JSON.stringify(n[u].toString()))}}),b.push(`code=${a}`),b.push(`version=${this.version}`);const f=e;let r="";switch(a){case p2.NUMERIC_FAULT:{r="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":r+="-"+u;break;case"negative-power":case"negative-width":r+="-unsupported";break;case"unbound-bitwise-result":r+="-unbound-result";break}break}case p2.CALL_EXCEPTION:case p2.INSUFFICIENT_FUNDS:case p2.MISSING_NEW:case p2.NONCE_EXPIRED:case p2.REPLACEMENT_UNDERPRICED:case p2.TRANSACTION_REPLACED:case p2.UNPREDICTABLE_GAS_LIMIT:r=a;break}r&&(e+=" [ See: https://links.ethers.org/v5-errors-"+r+" ]"),b.length&&(e+=" ("+b.join(", ")+")");const c=new Error(e);return c.reason=f,c.code=a,Object.keys(n).forEach(function(u){c[u]=n[u]}),c}throwError(e,a,n){throw this.makeError(e,a,n)}throwArgumentError(e,a,n){return this.throwError(e,R0.errors.INVALID_ARGUMENT,{argument:a,value:n})}assert(e,a,n,b){e||this.throwError(a,n,b)}assertArgument(e,a,n,b){e||this.throwArgumentError(a,n,b)}checkNormalize(e){yp&&this.throwError("platform missing String.prototype.normalize",R0.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:yp})}checkSafeUint53(e,a){typeof e=="number"&&(a==null&&(a="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(a,R0.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(a,R0.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,a,n){n?n=": "+n:n="",e<a&&this.throwError("missing argument"+n,R0.errors.MISSING_ARGUMENT,{count:e,expectedCount:a}),e>a&&this.throwError("too many arguments"+n,R0.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:a})}checkNew(e,a){(e===Object||e==null)&&this.throwError("missing new",R0.errors.MISSING_NEW,{name:a.name})}checkAbstract(e,a){e===a?this.throwError("cannot instantiate abstract class "+JSON.stringify(a.name)+" directly; use a sub-class",R0.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",R0.errors.MISSING_NEW,{name:a.name})}static globalLogger(){return eo||(eo=new R0(UC)),eo}static setCensorship(e,a){if(!e&&a&&this.globalLogger().throwError("cannot permanently disable censorship",R0.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),up){if(!e)return;this.globalLogger().throwError("error censorship permanent",R0.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}lp=!!e,up=!!a}static setLogLevel(e){const a=Hr[e.toLowerCase()];if(a==null){R0.globalLogger().warn("invalid log level - "+e);return}pp=a}static from(e){return new R0(e)}}R0.errors=p2;R0.levels=s7;const QC="bytes/5.8.0",y5=new R0(QC);function hg(t){return!!t.toHexString}function O9(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return O9(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ds(t){return z6(t)&&!(t.length%2)||Z9(t)}function hp(t){return typeof t=="number"&&t==t&&t%1===0}function Z9(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!hp(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const a=t[e];if(!hp(a)||a<0||a>=256)return!1}return!0}function R1(t,e){if(e||(e={}),typeof t=="number"){y5.checkSafeUint53(t,"invalid arrayify value");const a=[];for(;t;)a.unshift(t&255),t=parseInt(String(t/256));return a.length===0&&a.push(0),O9(new Uint8Array(a))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),hg(t)&&(t=t.toHexString()),z6(t)){let a=t.substring(2);a.length%2&&(e.hexPad==="left"?a="0"+a:e.hexPad==="right"?a+="0":y5.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let b=0;b<a.length;b+=2)n.push(parseInt(a.substring(b,b+2),16));return O9(new Uint8Array(n))}return Z9(t)?O9(new Uint8Array(t)):y5.throwArgumentError("invalid arrayify value","value",t)}function I8(t){const e=t.map(b=>R1(b)),a=e.reduce((b,f)=>b+f.length,0),n=new Uint8Array(a);return e.reduce((b,f)=>(n.set(f,b),b+f.length),0),O9(n)}function Q9(t){let e=R1(t);if(e.length===0)return e;let a=0;for(;a<e.length&&e[a]===0;)a++;return a&&(e=e.slice(a)),e}function FC(t,e){t=R1(t),t.length>e&&y5.throwArgumentError("value out of range","value",arguments[0]);const a=new Uint8Array(e);return a.set(t,e-t.length),O9(a)}function z6(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const to="0123456789abcdef";function _1(t,e){if(e||(e={}),typeof t=="number"){y5.checkSafeUint53(t,"invalid hexlify value");let a="";for(;t;)a=to[t&15]+a,t=Math.floor(t/16);return a.length?(a.length%2&&(a="0"+a),"0x"+a):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),hg(t))return t.toHexString();if(z6(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":y5.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Z9(t)){let a="0x";for(let n=0;n<t.length;n++){let b=t[n];a+=to[(b&240)>>4]+to[b&15]}return a}return y5.throwArgumentError("invalid hexlify value","value",t)}function $t(t){if(typeof t!="string")t=_1(t);else if(!z6(t)||t.length%2)return null;return(t.length-2)/2}function ye(t,e,a){return typeof t!="string"?t=_1(t):(!z6(t)||t.length%2)&&y5.throwArgumentError("invalid hexData","value",t),e=2+2*e,a!=null?"0x"+t.substring(e,2+2*a):"0x"+t.substring(e)}function Xe(t){let e="0x";return t.forEach(a=>{e+=_1(a).substring(2)}),e}function is(t){const e=gg(_1(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function gg(t){typeof t!="string"&&(t=_1(t)),z6(t)||y5.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e<t.length&&t[e]==="0";)e++;return"0x"+t.substring(e)}function e5(t,e){for(typeof t!="string"?t=_1(t):z6(t)||y5.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&y5.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Fd(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ds(t)){let a=R1(t);a.length===64?(e.v=27+(a[32]>>7),a[32]&=127,e.r=_1(a.slice(0,32)),e.s=_1(a.slice(32,64))):a.length===65?(e.r=_1(a.slice(0,32)),e.s=_1(a.slice(32,64)),e.v=a[64]):y5.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:y5.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(a[32]|=128),e._vs=_1(a.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const b=FC(R1(e._vs),32);e._vs=_1(b);const f=b[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=f:e.recoveryParam!==f&&y5.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),b[0]&=127;const r=_1(b);e.s==null?e.s=r:e.s!==r&&y5.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?y5.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const b=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==b&&y5.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!z6(e.r)?y5.throwArgumentError("signature missing or invalid r","signature",t):e.r=e5(e.r,32),e.s==null||!z6(e.s)?y5.throwArgumentError("signature missing or invalid s","signature",t):e.s=e5(e.s,32);const a=R1(e.s);a[0]>=128&&y5.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(a[0]|=128);const n=_1(a);e._vs&&(z6(e._vs)||y5.throwArgumentError("signature invalid _vs","signature",t),e._vs=e5(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&y5.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}const Ag="bignumber/5.8.0";var cd=q1.BN;const K4=new R0(Ag),ao={},gp=9007199254740991;function YC(t){return t!=null&&(g1.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||z6(t)||typeof t=="bigint"||Z9(t))}let Ap=!1;class g1{constructor(e,a){e!==ao&&K4.throwError("cannot call constructor directly; use BigNumber.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=a,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Je(w6(this).fromTwos(e))}toTwos(e){return Je(w6(this).toTwos(e))}abs(){return this._hex[0]==="-"?g1.from(this._hex.substring(1)):this}add(e){return Je(w6(this).add(w6(e)))}sub(e){return Je(w6(this).sub(w6(e)))}div(e){return g1.from(e).isZero()&&P8("division-by-zero","div"),Je(w6(this).div(w6(e)))}mul(e){return Je(w6(this).mul(w6(e)))}mod(e){const a=w6(e);return a.isNeg()&&P8("division-by-zero","mod"),Je(w6(this).umod(a))}pow(e){const a=w6(e);return a.isNeg()&&P8("negative-power","pow"),Je(w6(this).pow(a))}and(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","and"),Je(w6(this).and(a))}or(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","or"),Je(w6(this).or(a))}xor(e){const a=w6(e);return(this.isNegative()||a.isNeg())&&P8("unbound-bitwise-result","xor"),Je(w6(this).xor(a))}mask(e){return(this.isNegative()||e<0)&&P8("negative-width","mask"),Je(w6(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&P8("negative-width","shl"),Je(w6(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&P8("negative-width","shr"),Je(w6(this).shrn(e))}eq(e){return w6(this).eq(w6(e))}lt(e){return w6(this).lt(w6(e))}lte(e){return w6(this).lte(w6(e))}gt(e){return w6(this).gt(w6(e))}gte(e){return w6(this).gte(w6(e))}isNegative(){return this._hex[0]==="-"}isZero(){return w6(this).isZero()}toNumber(){try{return w6(this).toNumber()}catch{P8("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return K4.throwError("this platform does not support BigInt",R0.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Ap||(Ap=!0,K4.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?K4.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",R0.errors.UNEXPECTED_ARGUMENT,{}):K4.throwError("BigNumber.toString does not accept parameters",R0.errors.UNEXPECTED_ARGUMENT,{})),w6(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof g1)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new g1(ao,mb(e)):e.match(/^-?[0-9]+$/)?new g1(ao,mb(new cd(e))):K4.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&P8("underflow","BigNumber.from",e),(e>=gp||e<=-gp)&&P8("overflow","BigNumber.from",e),g1.from(String(e));const a=e;if(typeof a=="bigint")return g1.from(a.toString());if(Z9(a))return g1.from(_1(a));if(a)if(a.toHexString){const n=a.toHexString();if(typeof n=="string")return g1.from(n)}else{let n=a._hex;if(n==null&&a.type==="BigNumber"&&(n=a.hex),typeof n=="string"&&(z6(n)||n[0]==="-"&&z6(n.substring(1))))return g1.from(n)}return K4.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function mb(t){if(typeof t!="string")return mb(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&K4.throwArgumentError("invalid hex","value",t),t=mb(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Je(t){return g1.from(mb(t))}function w6(t){const e=g1.from(t).toHexString();return e[0]==="-"?new cd("-"+e.substring(3),16):new cd(e.substring(2),16)}function P8(t,e,a){const n={fault:t,operation:e};return a!=null&&(n.value=a),K4.throwError(t,R0.errors.NUMERIC_FAULT,n)}function GC(t){return new cd(t,36).toString(16)}const ze=new R0(Ag),db={},Mg=g1.from(0),wg=g1.from(-1);function xg(t,e,a,n){const b={fault:e,operation:a};return n!==void 0&&(b.value=n),ze.throwError(t,R0.errors.NUMERIC_FAULT,b)}let ib="0";for(;ib.length<256;)ib+=ib;function cs(t){if(typeof t!="number")try{t=g1.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+ib.substring(0,t):ze.throwArgumentError("invalid decimal size","decimals",t)}function Vr(t,e){e==null&&(e=0);const a=cs(e);t=g1.from(t);const n=t.lt(Mg);n&&(t=t.mul(wg));let b=t.mod(a).toString();for(;b.length<a.length-1;)b="0"+b;b=b.match(/^([0-9]*[1-9]|0)(0*)/)[1];const f=t.div(a).toString();return a.length===1?t=f:t=f+"."+b,n&&(t="-"+t),t}function W4(t,e){e==null&&(e=0);const a=cs(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&ze.throwArgumentError("invalid decimal value","value",t);const n=t.substring(0,1)==="-";n&&(t=t.substring(1)),t==="."&&ze.throwArgumentError("missing value","value",t);const b=t.split(".");b.length>2&&ze.throwArgumentError("too many decimal points","value",t);let f=b[0],r=b[1];for(f||(f="0"),r||(r="0");r[r.length-1]==="0";)r=r.substring(0,r.length-1);for(r.length>a.length-1&&xg("fractional component exceeds decimals","underflow","parseFixed"),r===""&&(r="0");r.length<a.length-1;)r+="0";const c=g1.from(f),u=g1.from(r);let l=c.mul(a).add(u);return n&&(l=l.mul(wg)),l}class _9{constructor(e,a,n,b){e!==db&&ze.throwError("cannot use FixedFormat constructor; use FixedFormat.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=a,this.width=n,this.decimals=b,this.name=(a?"":"u")+"fixed"+String(n)+"x"+String(b),this._multiplier=cs(b),Object.freeze(this)}static from(e){if(e instanceof _9)return e;typeof e=="number"&&(e=`fixed128x${e}`);let a=!0,n=128,b=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")a=!1;else{const f=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);f||ze.throwArgumentError("invalid fixed format","format",e),a=f[1]!=="u",n=parseInt(f[2]),b=parseInt(f[3])}}else if(e){const f=(r,c,u)=>e[r]==null?u:(typeof e[r]!==c&&ze.throwArgumentError("invalid fixed format ("+r+" not "+c+")","format."+r,e[r]),e[r]);a=f("signed","boolean",a),n=f("width","number",n),b=f("decimals","number",b)}return n%8&&ze.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),b>80&&ze.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",b),new _9(db,a,n,b)}}class ne{constructor(e,a,n,b){e!==db&&ze.throwError("cannot use FixedNumber constructor; use FixedNumber.from",R0.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=b,this._hex=a,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&ze.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const a=W4(this._value,this.format.decimals),n=W4(e._value,e.format.decimals);return ne.fromValue(a.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let a=ne.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(a=a.subUnsafe(Mp.toFormat(a.format))),a}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let a=ne.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(a=a.addUnsafe(Mp.toFormat(a.format))),a}round(e){e==null&&(e=0);const a=this.toString().split(".");if(a.length===1&&a.push("0"),(e<0||e>80||e%1)&&ze.throwArgumentError("invalid decimal count","decimals",e),a[1].length<=e)return this;const n=ne.from("1"+ib.substring(0,e),this.format),b=WC.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(b).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&ze.throwArgumentError("invalid byte width","width",e);const a=g1.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return e5(a,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ne.fromString(this._value,e)}static fromValue(e,a,n){return n==null&&a!=null&&!YC(a)&&(n=a,a=null),a==null&&(a=0),n==null&&(n="fixed"),ne.fromString(Vr(e,a),_9.from(n))}static fromString(e,a){a==null&&(a="fixed");const n=_9.from(a),b=W4(e,n.decimals);!n.signed&&b.lt(Mg)&&xg("unsigned value cannot be negative","overflow","value",e);let f=null;n.signed?f=b.toTwos(n.width).toHexString():(f=b.toHexString(),f=e5(f,n.width/8));const r=Vr(b,n.decimals);return new ne(db,f,r,n)}static fromBytes(e,a){a==null&&(a="fixed");const n=_9.from(a);if(R1(e).length>n.width/8)throw new Error("overflow");let b=g1.from(e);n.signed&&(b=b.fromTwos(n.width));const f=b.toTwos((n.signed?0:1)+n.width).toHexString(),r=Vr(b,n.decimals);return new ne(db,f,r,n)}static from(e,a){if(typeof e=="string")return ne.fromString(e,a);if(Z9(e))return ne.fromBytes(e,a);try{return ne.fromValue(e,0,a)}catch(n){if(n.code!==R0.errors.INVALID_ARGUMENT)throw n}return ze.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Mp=ne.from(1),WC=ne.from("0.5"),HC="properties/5.8.0";var VC=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const od=new R0(HC);function p1(t,e,a){Object.defineProperty(t,e,{enumerable:!0,value:a,writable:!1})}function f4(t,e){for(let a=0;a<32;a++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function j5(t){return VC(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const b=t[n];return Promise.resolve(b).then(f=>({key:n,value:f}))});return(yield Promise.all(e)).reduce((n,b)=>(n[b.key]=b.value,n),{})})}function ZC(t,e){(!t||typeof t!="object")&&od.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(a=>{e[a]||od.throwArgumentError("invalid object key - "+a,"transaction:"+a,t)})}function R5(t){const e={};for(const a in t)e[a]=t[a];return e}const KC={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Ig(t){if(t==null||KC[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let a=0;a<e.length;a++){let n=null;try{n=t[e[a]]}catch{continue}if(!Ig(n))return!1}return!0}return od.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function JC(t){if(Ig(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>nt(e)));if(typeof t=="object"){const e={};for(const a in t){const n=t[a];n!==void 0&&p1(e,a,nt(n))}return e}return od.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function nt(t){return JC(t)}class _b{constructor(e){for(const a in e)this[a]=nt(e[a])}}const Bb="abi/5.8.0",N6=new R0(Bb),ca={};let wp={calldata:!0,memory:!0,storage:!0},qC={calldata:!0,memory:!0};function lr(t,e){if(t==="bytes"||t==="string"){if(wp[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&qC[e])return!0;return(wp[e]||e==="payable")&&N6.throwArgumentError("invalid modifier","name",e),!1}function XC(t,e){let a=t;function n(c){N6.throwArgumentError(`unexpected character at position ${c}`,"param",t)}t=t.replace(/\s/g," ");function b(c){let u={type:"",name:"",parent:c,state:{allowType:!0}};return e&&(u.indexed=!1),u}let f={type:"",name:"",state:{allowType:!0}},r=f;for(let c=0;c<t.length;c++){let u=t[c];switch(u){case"(":r.state.allowType&&r.type===""?r.type="tuple":r.state.allowParams||n(c),r.state.allowType=!1,r.type=E9(r.type),r.components=[b(r)],r=r.components[0];break;case")":delete r.state,r.name==="indexed"&&(e||n(c),r.indexed=!0,r.name=""),lr(r.type,r.name)&&(r.name=""),r.type=E9(r.type);let l=r;r=r.parent,r||n(c),delete l.parent,r.state.allowParams=!1,r.state.allowName=!0,r.state.allowArray=!0;break;case",":delete r.state,r.name==="indexed"&&(e||n(c),r.indexed=!0,r.name=""),lr(r.type,r.name)&&(r.name=""),r.type=E9(r.type);let y=b(r.parent);r.parent.components.push(y),delete r.parent,r=y;break;case" ":r.state.allowType&&r.type!==""&&(r.type=E9(r.type),delete r.state.allowType,r.state.allowName=!0,r.state.allowParams=!0),r.state.allowName&&r.name!==""&&(r.name==="indexed"?(e||n(c),r.indexed&&n(c),r.indexed=!0,r.name=""):lr(r.type,r.name)?r.name="":r.state.allowName=!1);break;case"[":r.state.allowArray||n(c),r.type+=u,r.state.allowArray=!1,r.state.allowName=!1,r.state.readArray=!0;break;case"]":r.state.readArray||n(c),r.type+=u,r.state.readArray=!1,r.state.allowArray=!0,r.state.allowName=!0;break;default:r.state.allowType?(r.type+=u,r.state.allowParams=!0,r.state.allowArray=!0):r.state.allowName?(r.name+=u,delete r.state.allowArray):r.state.readArray?r.type+=u:n(c)}}return r.parent&&N6.throwArgumentError("unexpected eof","param",t),delete f.state,r.name==="indexed"?(e||n(a.length-7),r.indexed&&n(a.length-7),r.indexed=!0,r.name=""):lr(r.type,r.name)&&(r.name=""),f.type=E9(f.type),f}function Zr(t,e){for(let a in e)p1(t,a,e[a])}const L6=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),$C=new RegExp(/^(.*)\[([0-9]*)\]$/);class H5{constructor(e,a){e!==ca&&N6.throwError("use fromString",R0.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Zr(this,a);let n=this.type.match($C);n?Zr(this,{arrayLength:parseInt(n[2]||"-1"),arrayChildren:H5.fromObject({type:n[1],components:this.components}),baseType:"array"}):Zr(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json){let n={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(n.indexed=this.indexed),this.components&&(n.components=this.components.map(b=>JSON.parse(b.format(e)))),JSON.stringify(n)}let a="";return this.baseType==="array"?(a+=this.arrayChildren.format(e),a+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==L6.sighash&&(a+=this.type),a+="("+this.components.map(n=>n.format(e)).join(e===L6.full?", ":",")+")"):a+=this.type,e!==L6.sighash&&(this.indexed===!0&&(a+=" indexed"),e===L6.full&&this.name&&(a+=" "+this.name)),a}static from(e,a){return typeof e=="string"?H5.fromString(e,a):H5.fromObject(e)}static fromObject(e){return H5.isParamType(e)?e:new H5(ca,{name:e.name||null,type:E9(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(H5.fromObject):null})}static fromString(e,a){function n(b){return H5.fromObject({name:b.name,type:b.type,indexed:b.indexed,components:b.components})}return n(XC(e,!!a))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function hb(t,e){return tk(t).map(a=>H5.fromString(a,e))}class et{constructor(e,a){e!==ca&&N6.throwError("use a static from method",R0.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Zr(this,a),this._isFragment=!0,Object.freeze(this)}static from(e){return et.isFragment(e)?e:typeof e=="string"?et.fromString(e):et.fromObject(e)}static fromObject(e){if(et.isFragment(e))return e;switch(e.type){case"function":return n4.fromObject(e);case"event":return X4.fromObject(e);case"constructor":return a4.fromObject(e);case"error":return Zt.fromObject(e);case"fallback":case"receive":return null}return N6.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?X4.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?n4.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?a4.fromString(e.trim()):e.split(" ")[0]==="error"?Zt.fromString(e.substring(5).trim()):N6.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class X4 extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="event "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",e!==L6.sighash&&this.anonymous&&(a+="anonymous "),a.trim()}static from(e){return typeof e=="string"?X4.fromString(e):X4.fromObject(e)}static fromObject(e){if(X4.isEventFragment(e))return e;e.type!=="event"&&N6.throwArgumentError("invalid event object","value",e);const a={name:gb(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(H5.fromObject):[],type:"event"};return new X4(ca,a)}static fromString(e){let a=e.match(Ab);a||N6.throwArgumentError("invalid event string","value",e);let n=!1;return a[3].split(" ").forEach(b=>{switch(b.trim()){case"anonymous":n=!0;break;case"":break;default:N6.warn("unknown modifier: "+b)}}),X4.fromObject({name:a[1].trim(),anonymous:n,inputs:hb(a[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function vg(t,e){e.gas=null;let a=t.split("@");return a.length!==1?(a.length>2&&N6.throwArgumentError("invalid human-readable ABI signature","value",t),a[1].match(/^[0-9]+$/)||N6.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=g1.from(a[1]),a[0]):t}function Tg(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(a=>{switch(a.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+a)}})}function Ng(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&N6.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&N6.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&N6.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&N6.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&N6.throwArgumentError("unable to determine stateMutability","value",t),e}class a4 extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===L6.sighash&&N6.throwError("cannot format a constructor for sighash",R0.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let a="constructor("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(a+=this.stateMutability+" "),a.trim()}static from(e){return typeof e=="string"?a4.fromString(e):a4.fromObject(e)}static fromObject(e){if(a4.isConstructorFragment(e))return e;e.type!=="constructor"&&N6.throwArgumentError("invalid constructor object","value",e);let a=Ng(e);a.constant&&N6.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(H5.fromObject):[],payable:a.payable,stateMutability:a.stateMutability,gas:e.gas?g1.from(e.gas):null};return new a4(ca,n)}static fromString(e){let a={type:"constructor"};e=vg(e,a);let n=e.match(Ab);return(!n||n[1].trim()!=="constructor")&&N6.throwArgumentError("invalid constructor string","value",e),a.inputs=hb(n[2].trim(),!1),Tg(n[3].trim(),a),a4.fromObject(a)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class n4 extends a4{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="function "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",e!==L6.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(a+=this.stateMutability+" "):this.constant&&(a+="view "),this.outputs&&this.outputs.length&&(a+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(a+="@"+this.gas.toString()+" ")),a.trim()}static from(e){return typeof e=="string"?n4.fromString(e):n4.fromObject(e)}static fromObject(e){if(n4.isFunctionFragment(e))return e;e.type!=="function"&&N6.throwArgumentError("invalid function object","value",e);let a=Ng(e);const n={type:e.type,name:gb(e.name),constant:a.constant,inputs:e.inputs?e.inputs.map(H5.fromObject):[],outputs:e.outputs?e.outputs.map(H5.fromObject):[],payable:a.payable,stateMutability:a.stateMutability,gas:e.gas?g1.from(e.gas):null};return new n4(ca,n)}static fromString(e){let a={type:"function"};e=vg(e,a);let n=e.split(" returns ");n.length>2&&N6.throwArgumentError("invalid function string","value",e);let b=n[0].match(Ab);if(b||N6.throwArgumentError("invalid function signature","value",e),a.name=b[1].trim(),a.name&&gb(a.name),a.inputs=hb(b[2],!1),Tg(b[3].trim(),a),n.length>1){let f=n[1].match(Ab);(f[1].trim()!=""||f[3].trim()!="")&&N6.throwArgumentError("unexpected tokens","value",e),a.outputs=hb(f[2],!1)}else a.outputs=[];return n4.fromObject(a)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function xp(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&N6.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Zt extends et{format(e){if(e||(e=L6.sighash),L6[e]||N6.throwArgumentError("invalid format type","format",e),e===L6.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let a="";return e!==L6.sighash&&(a+="error "),a+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===L6.full?", ":",")+") ",a.trim()}static from(e){return typeof e=="string"?Zt.fromString(e):Zt.fromObject(e)}static fromObject(e){if(Zt.isErrorFragment(e))return e;e.type!=="error"&&N6.throwArgumentError("invalid error object","value",e);const a={type:e.type,name:gb(e.name),inputs:e.inputs?e.inputs.map(H5.fromObject):[]};return xp(new Zt(ca,a))}static fromString(e){let a={type:"error"},n=e.match(Ab);return n||N6.throwArgumentError("invalid error signature","value",e),a.name=n[1].trim(),a.name&&gb(a.name),a.inputs=hb(n[2],!1),xp(Zt.fromObject(a))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function E9(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const ek=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function gb(t){return(!t||!t.match(ek))&&N6.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Ab=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function tk(t){t=t.trim();let e=[],a="",n=0;for(let b=0;b<t.length;b++){let f=t[b];f===","&&n===0?(e.push(a),a=""):(a+=f,f==="("?n++:f===")"&&(n--,n===-1&&N6.throwArgumentError("unbalanced parenthesis","value",t)))}return a&&e.push(a),e}const os=new R0(Bb);function ak(t){const e=[],a=function(n,b){if(Array.isArray(b))for(let f in b){const r=n.slice();r.push(f);try{a(r,b[f])}catch(c){e.push({path:r,error:c})}}};return a([],t),e}class ft{constructor(e,a,n,b){this.name=e,this.type=a,this.localName=n,this.dynamic=b}_throwError(e,a){os.throwArgumentError(e,this.localName,a)}}class u7{constructor(e){p1(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Xe(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(I8(e._data))}writeBytes(e){let a=R1(e);const n=a.length%this.wordSize;return n&&(a=I8([a,this._padding.slice(n)])),this._writeData(a)}_getValue(e){let a=R1(g1.from(e));return a.length>this.wordSize&&os.throwError("value out-of-bounds",R0.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:a.length}),a.length%this.wordSize&&(a=I8([this._padding.slice(a.length%this.wordSize),a])),a}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,a=>{this._data[e]=this._getValue(a)}}}class sd{constructor(e,a,n,b){p1(this,"_data",R1(e)),p1(this,"wordSize",a||32),p1(this,"_coerceFunc",n),p1(this,"allowLoose",b),this._offset=0}get data(){return _1(this._data)}get consumed(){return this._offset}static coerce(e,a){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(a=a.toNumber()),a}coerce(e,a){return this._coerceFunc?this._coerceFunc(e,a):sd.coerce(e,a)}_peekBytes(e,a,n){let b=Math.ceil(a/this.wordSize)*this.wordSize;return this._offset+b>this._data.length&&(this.allowLoose&&n&&this._offset+a<=this._data.length?b=a:os.throwError("data out-of-bounds",R0.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+b})),this._data.slice(this._offset,this._offset+b)}subReader(e){return new sd(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,a){let n=this._peekBytes(0,e,!!a);return this._offset+=n.length,n.slice(0,e)}readValue(){return g1.from(this.readBytes(this.wordSize))}}var no={exports:{}},Ip;function nk(){return Ip||(Ip=1,(function(t){(function(){var e="input is invalid type",a="finalize already called",n=typeof window=="object",b=n?window:{};b.JS_SHA3_NO_WINDOW&&(n=!1);var f=!n&&typeof self=="object",r=!b.JS_SHA3_NO_NODE_JS&&typeof V5=="object"&&V5.versions&&V5.versions.node;r?b=g2:f&&(b=self);var c=!b.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,u=!b.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],m=[4,1024,262144,67108864],x=[1,256,65536,16777216],A=[6,1536,393216,100663296],M=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],w=[224,256,384,512],D=[128,256],N=["hex","buffer","arrayBuffer","array","digest"],T={128:168,256:136};(b.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return Object.prototype.toString.call(O)==="[object Array]"}),u&&(b.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var j=function(O,l0,f0){return function(K){return new S(O,l0,O).update(K)[f0]()}},C=function(O,l0,f0){return function(K,h0){return new S(O,l0,h0).update(K)[f0]()}},G=function(O,l0,f0){return function(K,h0,g0,T0){return h["cshake"+O].update(K,h0,g0,T0)[f0]()}},W=function(O,l0,f0){return function(K,h0,g0,T0){return h["kmac"+O].update(K,h0,g0,T0)[f0]()}},Z=function(O,l0,f0,K){for(var h0=0;h0<N.length;++h0){var g0=N[h0];O[g0]=l0(f0,K,g0)}return O},d0=function(O,l0){var f0=j(O,l0,"hex");return f0.create=function(){return new S(O,l0,O)},f0.update=function(K){return f0.create().update(K)},Z(f0,j,O,l0)},n0=function(O,l0){var f0=C(O,l0,"hex");return f0.create=function(K){return new S(O,l0,K)},f0.update=function(K,h0){return f0.create(h0).update(K)},Z(f0,C,O,l0)},y0=function(O,l0){var f0=T[O],K=G(O,l0,"hex");return K.create=function(h0,g0,T0){return!g0&&!T0?h["shake"+O].create(h0):new S(O,l0,h0).bytepad([g0,T0],f0)},K.update=function(h0,g0,T0,m0){return K.create(g0,T0,m0).update(h0)},Z(K,G,O,l0)},H=function(O,l0){var f0=T[O],K=W(O,l0,"hex");return K.create=function(h0,g0,T0){return new b0(O,l0,g0).bytepad(["KMAC",T0],f0).bytepad([h0],f0)},K.update=function(h0,g0,T0,m0){return K.create(h0,T0,m0).update(g0)},Z(K,W,O,l0)},F=[{name:"keccak",padding:x,bits:w,createMethod:d0},{name:"sha3",padding:A,bits:w,createMethod:d0},{name:"shake",padding:y,bits:D,createMethod:n0},{name:"cshake",padding:m,bits:D,createMethod:y0},{name:"kmac",padding:m,bits:D,createMethod:H}],h={},I=[],k=0;k<F.length;++k)for(var R=F[k],z=R.bits,q=0;q<z.length;++q){var e0=R.name+"_"+z[q];if(I.push(e0),h[e0]=R.createMethod(z[q],R.padding),R.name!=="sha3"){var V=R.name+z[q];I.push(V),h[V]=h[e0]}}function S(O,l0,f0){this.blocks=[],this.s=[],this.padding=l0,this.outputBits=f0,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(O<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=f0>>5,this.extraBytes=(f0&31)>>3;for(var K=0;K<50;++K)this.s[K]=0}S.prototype.update=function(O){if(this.finalized)throw new Error(a);var l0,f0=typeof O;if(f0!=="string"){if(f0==="object"){if(O===null)throw new Error(e);if(u&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!u||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);l0=!0}for(var K=this.blocks,h0=this.byteCount,g0=O.length,T0=this.blockCount,m0=0,q0=this.s,F0,N0;m0<g0;){if(this.reset)for(this.reset=!1,K[0]=this.block,F0=1;F0<T0+1;++F0)K[F0]=0;if(l0)for(F0=this.start;m0<g0&&F0<h0;++m0)K[F0>>2]|=O[m0]<<M[F0++&3];else for(F0=this.start;m0<g0&&F0<h0;++m0)N0=O.charCodeAt(m0),N0<128?K[F0>>2]|=N0<<M[F0++&3]:N0<2048?(K[F0>>2]|=(192|N0>>6)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]):N0<55296||N0>=57344?(K[F0>>2]|=(224|N0>>12)<<M[F0++&3],K[F0>>2]|=(128|N0>>6&63)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]):(N0=65536+((N0&1023)<<10|O.charCodeAt(++m0)&1023),K[F0>>2]|=(240|N0>>18)<<M[F0++&3],K[F0>>2]|=(128|N0>>12&63)<<M[F0++&3],K[F0>>2]|=(128|N0>>6&63)<<M[F0++&3],K[F0>>2]|=(128|N0&63)<<M[F0++&3]);if(this.lastByteIndex=F0,F0>=h0){for(this.start=F0-h0,this.block=K[T0],F0=0;F0<T0;++F0)q0[F0]^=K[F0];x0(q0),this.reset=!0}else this.start=F0}return this},S.prototype.encode=function(O,l0){var f0=O&255,K=1,h0=[f0];for(O=O>>8,f0=O&255;f0>0;)h0.unshift(f0),O=O>>8,f0=O&255,++K;return l0?h0.push(K):h0.unshift(K),this.update(h0),h0.length},S.prototype.encodeString=function(O){var l0,f0=typeof O;if(f0!=="string"){if(f0==="object"){if(O===null)throw new Error(e);if(u&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!u||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);l0=!0}var K=0,h0=O.length;if(l0)K=h0;else for(var g0=0;g0<O.length;++g0){var T0=O.charCodeAt(g0);T0<128?K+=1:T0<2048?K+=2:T0<55296||T0>=57344?K+=3:(T0=65536+((T0&1023)<<10|O.charCodeAt(++g0)&1023),K+=4)}return K+=this.encode(K*8),this.update(O),K},S.prototype.bytepad=function(O,l0){for(var f0=this.encode(l0),K=0;K<O.length;++K)f0+=this.encodeString(O[K]);var h0=l0-f0%l0,g0=[];return g0.length=h0,this.update(g0),this},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var O=this.blocks,l0=this.lastByteIndex,f0=this.blockCount,K=this.s;if(O[l0>>2]|=this.padding[l0&3],this.lastByteIndex===this.byteCount)for(O[0]=O[f0],l0=1;l0<f0+1;++l0)O[l0]=0;for(O[f0-1]|=2147483648,l0=0;l0<f0;++l0)K[l0]^=O[l0];x0(K)}},S.prototype.toString=S.prototype.hex=function(){this.finalize();for(var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0="",m0;g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)m0=l0[h0],T0+=l[m0>>4&15]+l[m0&15]+l[m0>>12&15]+l[m0>>8&15]+l[m0>>20&15]+l[m0>>16&15]+l[m0>>28&15]+l[m0>>24&15];g0%O===0&&(x0(l0),h0=0)}return K&&(m0=l0[h0],T0+=l[m0>>4&15]+l[m0&15],K>1&&(T0+=l[m0>>12&15]+l[m0>>8&15]),K>2&&(T0+=l[m0>>20&15]+l[m0>>16&15])),T0},S.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0=this.outputBits>>3,m0;K?m0=new ArrayBuffer(f0+1<<2):m0=new ArrayBuffer(T0);for(var q0=new Uint32Array(m0);g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)q0[g0]=l0[h0];g0%O===0&&x0(l0)}return K&&(q0[h0]=l0[h0],m0=m0.slice(0,T0)),m0},S.prototype.buffer=S.prototype.arrayBuffer,S.prototype.digest=S.prototype.array=function(){this.finalize();for(var O=this.blockCount,l0=this.s,f0=this.outputBlocks,K=this.extraBytes,h0=0,g0=0,T0=[],m0,q0;g0<f0;){for(h0=0;h0<O&&g0<f0;++h0,++g0)m0=g0<<2,q0=l0[h0],T0[m0]=q0&255,T0[m0+1]=q0>>8&255,T0[m0+2]=q0>>16&255,T0[m0+3]=q0>>24&255;g0%O===0&&x0(l0)}return K&&(m0=g0<<2,q0=l0[h0],T0[m0]=q0&255,K>1&&(T0[m0+1]=q0>>8&255),K>2&&(T0[m0+2]=q0>>16&255)),T0};function b0(O,l0,f0){S.call(this,O,l0,f0)}b0.prototype=new S,b0.prototype.finalize=function(){return this.encode(this.outputBits,!0),S.prototype.finalize.call(this)};var x0=function(O){var l0,f0,K,h0,g0,T0,m0,q0,F0,N0,O0,J0,t1,i1,a1,c0,A0,I0,H0,X0,Y0,K0,y1,u1,X,L,Q,r0,M0,j0,s0,k0,o1,s1,v1,d1,Q1,C6,F1,X1,F6,$1,t0,_,Y,p0,E0,z0,W0,O1,L1,D1,c6,N1,y6,v5,u6,x6,O5,v0,U0,D0,L0;for(K=0;K<48;K+=2)h0=O[0]^O[10]^O[20]^O[30]^O[40],g0=O[1]^O[11]^O[21]^O[31]^O[41],T0=O[2]^O[12]^O[22]^O[32]^O[42],m0=O[3]^O[13]^O[23]^O[33]^O[43],q0=O[4]^O[14]^O[24]^O[34]^O[44],F0=O[5]^O[15]^O[25]^O[35]^O[45],N0=O[6]^O[16]^O[26]^O[36]^O[46],O0=O[7]^O[17]^O[27]^O[37]^O[47],J0=O[8]^O[18]^O[28]^O[38]^O[48],t1=O[9]^O[19]^O[29]^O[39]^O[49],l0=J0^(T0<<1|m0>>>31),f0=t1^(m0<<1|T0>>>31),O[0]^=l0,O[1]^=f0,O[10]^=l0,O[11]^=f0,O[20]^=l0,O[21]^=f0,O[30]^=l0,O[31]^=f0,O[40]^=l0,O[41]^=f0,l0=h0^(q0<<1|F0>>>31),f0=g0^(F0<<1|q0>>>31),O[2]^=l0,O[3]^=f0,O[12]^=l0,O[13]^=f0,O[22]^=l0,O[23]^=f0,O[32]^=l0,O[33]^=f0,O[42]^=l0,O[43]^=f0,l0=T0^(N0<<1|O0>>>31),f0=m0^(O0<<1|N0>>>31),O[4]^=l0,O[5]^=f0,O[14]^=l0,O[15]^=f0,O[24]^=l0,O[25]^=f0,O[34]^=l0,O[35]^=f0,O[44]^=l0,O[45]^=f0,l0=q0^(J0<<1|t1>>>31),f0=F0^(t1<<1|J0>>>31),O[6]^=l0,O[7]^=f0,O[16]^=l0,O[17]^=f0,O[26]^=l0,O[27]^=f0,O[36]^=l0,O[37]^=f0,O[46]^=l0,O[47]^=f0,l0=N0^(h0<<1|g0>>>31),f0=O0^(g0<<1|h0>>>31),O[8]^=l0,O[9]^=f0,O[18]^=l0,O[19]^=f0,O[28]^=l0,O[29]^=f0,O[38]^=l0,O[39]^=f0,O[48]^=l0,O[49]^=f0,i1=O[0],a1=O[1],p0=O[11]<<4|O[10]>>>28,E0=O[10]<<4|O[11]>>>28,r0=O[20]<<3|O[21]>>>29,M0=O[21]<<3|O[20]>>>29,v0=O[31]<<9|O[30]>>>23,U0=O[30]<<9|O[31]>>>23,$1=O[40]<<18|O[41]>>>14,t0=O[41]<<18|O[40]>>>14,s1=O[2]<<1|O[3]>>>31,v1=O[3]<<1|O[2]>>>31,c0=O[13]<<12|O[12]>>>20,A0=O[12]<<12|O[13]>>>20,z0=O[22]<<10|O[23]>>>22,W0=O[23]<<10|O[22]>>>22,j0=O[33]<<13|O[32]>>>19,s0=O[32]<<13|O[33]>>>19,D0=O[42]<<2|O[43]>>>30,L0=O[43]<<2|O[42]>>>30,N1=O[5]<<30|O[4]>>>2,y6=O[4]<<30|O[5]>>>2,d1=O[14]<<6|O[15]>>>26,Q1=O[15]<<6|O[14]>>>26,I0=O[25]<<11|O[24]>>>21,H0=O[24]<<11|O[25]>>>21,O1=O[34]<<15|O[35]>>>17,L1=O[35]<<15|O[34]>>>17,k0=O[45]<<29|O[44]>>>3,o1=O[44]<<29|O[45]>>>3,u1=O[6]<<28|O[7]>>>4,X=O[7]<<28|O[6]>>>4,v5=O[17]<<23|O[16]>>>9,u6=O[16]<<23|O[17]>>>9,C6=O[26]<<25|O[27]>>>7,F1=O[27]<<25|O[26]>>>7,X0=O[36]<<21|O[37]>>>11,Y0=O[37]<<21|O[36]>>>11,D1=O[47]<<24|O[46]>>>8,c6=O[46]<<24|O[47]>>>8,_=O[8]<<27|O[9]>>>5,Y=O[9]<<27|O[8]>>>5,L=O[18]<<20|O[19]>>>12,Q=O[19]<<20|O[18]>>>12,x6=O[29]<<7|O[28]>>>25,O5=O[28]<<7|O[29]>>>25,X1=O[38]<<8|O[39]>>>24,F6=O[39]<<8|O[38]>>>24,K0=O[48]<<14|O[49]>>>18,y1=O[49]<<14|O[48]>>>18,O[0]=i1^~c0&I0,O[1]=a1^~A0&H0,O[10]=u1^~L&r0,O[11]=X^~Q&M0,O[20]=s1^~d1&C6,O[21]=v1^~Q1&F1,O[30]=_^~p0&z0,O[31]=Y^~E0&W0,O[40]=N1^~v5&x6,O[41]=y6^~u6&O5,O[2]=c0^~I0&X0,O[3]=A0^~H0&Y0,O[12]=L^~r0&j0,O[13]=Q^~M0&s0,O[22]=d1^~C6&X1,O[23]=Q1^~F1&F6,O[32]=p0^~z0&O1,O[33]=E0^~W0&L1,O[42]=v5^~x6&v0,O[43]=u6^~O5&U0,O[4]=I0^~X0&K0,O[5]=H0^~Y0&y1,O[14]=r0^~j0&k0,O[15]=M0^~s0&o1,O[24]=C6^~X1&$1,O[25]=F1^~F6&t0,O[34]=z0^~O1&D1,O[35]=W0^~L1&c6,O[44]=x6^~v0&D0,O[45]=O5^~U0&L0,O[6]=X0^~K0&i1,O[7]=Y0^~y1&a1,O[16]=j0^~k0&u1,O[17]=s0^~o1&X,O[26]=X1^~$1&s1,O[27]=F6^~t0&v1,O[36]=O1^~D1&_,O[37]=L1^~c6&Y,O[46]=v0^~D0&N1,O[47]=U0^~L0&y6,O[8]=K0^~i1&c0,O[9]=y1^~a1&A0,O[18]=k0^~u1&L,O[19]=o1^~X&Q,O[28]=$1^~s1&d1,O[29]=t0^~v1&Q1,O[38]=D1^~_&p0,O[39]=c6^~Y&E0,O[48]=D0^~N1&v5,O[49]=L0^~y6&u6,O[0]^=v[K],O[1]^=v[K+1]};if(c)t.exports=h;else for(k=0;k<I.length;++k)b[I[k]]=h[I[k]]})()})(no)),no.exports}var bk=nk();const fk=Y8(bk);function U5(t){return"0x"+fk.keccak_256(R1(t))}const rk="rlp/5.8.0",X2=new R0(rk);function vp(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function Tp(t,e,a){let n=0;for(let b=0;b<a;b++)n=n*256+t[e+b];return n}function Eg(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(f){n=n.concat(Eg(f))}),n.length<=55)return n.unshift(192+n.length),n;const b=vp(n.length);return b.unshift(247+b.length),b.concat(n)}ds(t)||X2.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(R1(t));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const a=vp(e.length);return a.unshift(183+a.length),a.concat(e)}function Yd(t){return _1(Eg(t))}function Np(t,e,a,n){const b=[];for(;a<e+1+n;){const f=Dg(t,a);b.push(f.result),a+=f.consumed,a>e+1+n&&X2.throwError("child data too short",R0.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:b}}function Dg(t,e){if(t.length===0&&X2.throwError("data too short",R0.errors.BUFFER_OVERRUN,{}),t[e]>=248){const a=t[e]-247;e+1+a>t.length&&X2.throwError("data short segment too short",R0.errors.BUFFER_OVERRUN,{});const n=Tp(t,e+1,a);return e+1+a+n>t.length&&X2.throwError("data long segment too short",R0.errors.BUFFER_OVERRUN,{}),Np(t,e,e+1+a,a+n)}else if(t[e]>=192){const a=t[e]-192;return e+1+a>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{}),Np(t,e,e+1,a)}else if(t[e]>=184){const a=t[e]-183;e+1+a>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{});const n=Tp(t,e+1,a);e+1+a+n>t.length&&X2.throwError("data array too short",R0.errors.BUFFER_OVERRUN,{});const b=_1(t.slice(e+1+a,e+1+a+n));return{consumed:1+a+n,result:b}}else if(t[e]>=128){const a=t[e]-128;e+1+a>t.length&&X2.throwError("data too short",R0.errors.BUFFER_OVERRUN,{});const n=_1(t.slice(e+1,e+1+a));return{consumed:1+a,result:n}}return{consumed:1,result:_1(t[e])}}function ss(t){const e=R1(t),a=Dg(e,0);return a.consumed!==e.length&&X2.throwArgumentError("invalid rlp data","data",t),a.result}const dk="address/5.8.0",k9=new R0(dk);function Ep(t){z6(t,20)||k9.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),a=new Uint8Array(40);for(let b=0;b<40;b++)a[b]=e[b].charCodeAt(0);const n=R1(U5(a));for(let b=0;b<40;b+=2)n[b>>1]>>4>=8&&(e[b]=e[b].toUpperCase()),(n[b>>1]&15)>=8&&(e[b+1]=e[b+1].toUpperCase());return"0x"+e.join("")}const ik=9007199254740991;function ck(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const us={};for(let t=0;t<10;t++)us[String(t)]=String(t);for(let t=0;t<26;t++)us[String.fromCharCode(65+t)]=String(10+t);const Dp=Math.floor(ck(ik));function ok(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>us[n]).join("");for(;e.length>=Dp;){let n=e.substring(0,Dp);e=parseInt(n,10)%97+e.substring(n.length)}let a=String(98-parseInt(e,10)%97);for(;a.length<2;)a="0"+a;return a}function Q5(t){let e=null;if(typeof t!="string"&&k9.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Ep(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&k9.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ok(t)&&k9.throwArgumentError("bad icap checksum","address",t),e=GC(t.substring(4));e.length<40;)e="0"+e;e=Ep("0x"+e)}else k9.throwArgumentError("invalid address","address",t);return e}function bo(t){try{return Q5(t),!0}catch{}return!1}function Cg(t){let e=null;try{e=Q5(t.from)}catch{k9.throwArgumentError("missing from address","transaction",t)}const a=Q9(R1(g1.from(t.nonce).toHexString()));return Q5(ye(U5(Yd([e,a])),12))}class sk extends ft{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,a){try{a=Q5(a)}catch(n){this._throwError(n.message,a)}return e.writeValue(a)}decode(e){return Q5(e5(e.readValue().toHexString(),20))}}class uk extends ft{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,a){return this.coder.encode(e,a)}decode(e){return this.coder.decode(e)}}const j9=new R0(Bb);function kg(t,e,a){let n=null;if(Array.isArray(a))n=a;else if(a&&typeof a=="object"){let u={};n=e.map(l=>{const y=l.localName;return y||j9.throwError("cannot encode object for signature with missing names",R0.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:a}),u[y]&&j9.throwError("cannot encode object for signature with duplicate names",R0.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:a}),u[y]=!0,a[y]})}else j9.throwArgumentError("invalid tuple value","tuple",a);e.length!==n.length&&j9.throwArgumentError("types/value length mismatch","tuple",a);let b=new u7(t.wordSize),f=new u7(t.wordSize),r=[];e.forEach((u,l)=>{let y=n[l];if(u.dynamic){let m=f.length;u.encode(f,y);let x=b.writeUpdatableValue();r.push(A=>{x(A+m)})}else u.encode(b,y)}),r.forEach(u=>{u(b.length)});let c=t.appendWriter(b);return c+=t.appendWriter(f),c}function jg(t,e){let a=[],n=t.subReader(0);e.forEach(f=>{let r=null;if(f.dynamic){let c=t.readValue(),u=n.subReader(c.toNumber());try{r=f.decode(u)}catch(l){if(l.code===R0.errors.BUFFER_OVERRUN)throw l;r=l,r.baseType=f.name,r.name=f.localName,r.type=f.type}}else try{r=f.decode(t)}catch(c){if(c.code===R0.errors.BUFFER_OVERRUN)throw c;r=c,r.baseType=f.name,r.name=f.localName,r.type=f.type}r!=null&&a.push(r)});const b=e.reduce((f,r)=>{const c=r.localName;return c&&(f[c]||(f[c]=0),f[c]++),f},{});e.forEach((f,r)=>{let c=f.localName;if(!c||b[c]!==1||(c==="length"&&(c="_length"),a[c]!=null))return;const u=a[r];u instanceof Error?Object.defineProperty(a,c,{enumerable:!0,get:()=>{throw u}}):a[c]=u});for(let f=0;f<a.length;f++){const r=a[f];r instanceof Error&&Object.defineProperty(a,f,{enumerable:!0,get:()=>{throw r}})}return Object.freeze(a)}class lk extends ft{constructor(e,a,n){const b=e.type+"["+(a>=0?a:"")+"]",f=a===-1||e.dynamic;super("array",b,n,f),this.coder=e,this.length=a}defaultValue(){const e=this.coder.defaultValue(),a=[];for(let n=0;n<this.length;n++)a.push(e);return a}encode(e,a){Array.isArray(a)||this._throwError("expected array value",a);let n=this.length;n===-1&&(n=a.length,e.writeValue(a.length)),j9.checkArgumentCount(a.length,n,"coder array"+(this.localName?" "+this.localName:""));let b=[];for(let f=0;f<a.length;f++)b.push(this.coder);return kg(e,b,a)}decode(e){let a=this.length;a===-1&&(a=e.readValue().toNumber(),a*32>e._data.length&&j9.throwError("insufficient data length",R0.errors.BUFFER_OVERRUN,{length:e._data.length,count:a}));let n=[];for(let b=0;b<a;b++)n.push(new uk(this.coder));return e.coerce(this.name,jg(e,n))}}class pk extends ft{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,a){return e.writeValue(a?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Sg extends ft{constructor(e,a){super(e,e,a,!0)}defaultValue(){return"0x"}encode(e,a){a=R1(a);let n=e.writeValue(a.length);return n+=e.writeBytes(a),n}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class yk extends Sg{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,_1(super.decode(e)))}}class mk extends ft{constructor(e,a){let n="bytes"+String(e);super(n,n,a,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,a){let n=R1(a);return n.length!==this.size&&this._throwError("incorrect data length",a),e.writeBytes(n)}decode(e){return e.coerce(this.name,_1(e.readBytes(this.size)))}}class hk extends ft{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,a){return a!=null&&this._throwError("not null",a),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}const gk="0x0000000000000000000000000000000000000000",Ak=g1.from(-1),Lg=g1.from(0),Mk=g1.from(1),wk=g1.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),xk="0x0000000000000000000000000000000000000000000000000000000000000000";class Ik extends ft{constructor(e,a,n){const b=(a?"int":"uint")+e*8;super(b,b,n,!1),this.size=e,this.signed=a}defaultValue(){return 0}encode(e,a){let n=g1.from(a),b=wk.mask(e.wordSize*8);if(this.signed){let f=b.mask(this.size*8-1);(n.gt(f)||n.lt(f.add(Mk).mul(Ak)))&&this._throwError("value out-of-bounds",a)}else(n.lt(Lg)||n.gt(b.mask(this.size*8)))&&this._throwError("value out-of-bounds",a);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let a=e.readValue().mask(this.size*8);return this.signed&&(a=a.fromTwos(this.size*8)),e.coerce(this.name,a)}}const vk="strings/5.8.0",zg=new R0(vk);var Mb;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(Mb||(Mb={}));var M8;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(M8||(M8={}));function Tk(t,e,a,n,b){return zg.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",a)}function Og(t,e,a,n,b){if(t===M8.BAD_PREFIX||t===M8.UNEXPECTED_CONTINUE){let f=0;for(let r=e+1;r<a.length&&a[r]>>6===2;r++)f++;return f}return t===M8.OVERRUN?a.length-e-1:0}function Nk(t,e,a,n,b){return t===M8.OVERLONG?(n.push(b),0):(n.push(65533),Og(t,e,a))}const Ek=Object.freeze({error:Tk,ignore:Og,replace:Nk});function _g(t,e){e==null&&(e=Ek.error),t=R1(t);const a=[];let n=0;for(;n<t.length;){const b=t[n++];if(b>>7===0){a.push(b);continue}let f=null,r=null;if((b&224)===192)f=1,r=127;else if((b&240)===224)f=2,r=2047;else if((b&248)===240)f=3,r=65535;else{(b&192)===128?n+=e(M8.UNEXPECTED_CONTINUE,n-1,t,a):n+=e(M8.BAD_PREFIX,n-1,t,a);continue}if(n-1+f>=t.length){n+=e(M8.OVERRUN,n-1,t,a);continue}let c=b&(1<<8-f-1)-1;for(let u=0;u<f;u++){let l=t[n];if((l&192)!=128){n+=e(M8.MISSING_CONTINUE,n,t,a),c=null;break}c=c<<6|l&63,n++}if(c!==null){if(c>1114111){n+=e(M8.OUT_OF_RANGE,n-1-f,t,a,c);continue}if(c>=55296&&c<=57343){n+=e(M8.UTF16_SURROGATE,n-1-f,t,a,c);continue}if(c<=r){n+=e(M8.OVERLONG,n-1-f,t,a,c);continue}a.push(c)}}return a}function d4(t,e=Mb.current){e!=Mb.current&&(zg.checkNormalize(),t=t.normalize(e));let a=[];for(let n=0;n<t.length;n++){const b=t.charCodeAt(n);if(b<128)a.push(b);else if(b<2048)a.push(b>>6|192),a.push(b&63|128);else if((b&64512)==55296){n++;const f=t.charCodeAt(n);if(n>=t.length||(f&64512)!==56320)throw new Error("invalid utf-8 string");const r=65536+((b&1023)<<10)+(f&1023);a.push(r>>18|240),a.push(r>>12&63|128),a.push(r>>6&63|128),a.push(r&63|128)}else a.push(b>>12|224),a.push(b>>6&63|128),a.push(b&63|128)}return R1(a)}function Dk(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Pb(t,e){return Dk(_g(t,e))}function Ck(t,e=Mb.current){return _g(d4(t,e))}class kk extends Sg{constructor(e){super("string",e)}defaultValue(){return""}encode(e,a){return super.encode(e,d4(a))}decode(e){return Pb(super.decode(e))}}class pr extends ft{constructor(e,a){let n=!1;const b=[];e.forEach(r=>{r.dynamic&&(n=!0),b.push(r.type)});const f="tuple("+b.join(",")+")";super("tuple",f,a,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const a=this.coders.reduce((n,b)=>{const f=b.localName;return f&&(n[f]||(n[f]=0),n[f]++),n},{});return this.coders.forEach((n,b)=>{let f=n.localName;!f||a[f]!==1||(f==="length"&&(f="_length"),e[f]==null&&(e[f]=e[b]))}),Object.freeze(e)}encode(e,a){return kg(e,this.coders,a)}decode(e){return e.coerce(this.name,jg(e,this.coders))}}const yr=new R0(Bb),jk=new RegExp(/^bytes([0-9]*)$/),Sk=new RegExp(/^(u?int)([0-9]*)$/);class Lk{constructor(e){p1(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new sk(e.name);case"bool":return new pk(e.name);case"string":return new kk(e.name);case"bytes":return new yk(e.name);case"array":return new lk(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new pr((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new hk(e.name)}let a=e.type.match(Sk);if(a){let n=parseInt(a[2]||"256");return(n===0||n>256||n%8!==0)&&yr.throwArgumentError("invalid "+a[1]+" bit length","param",e),new Ik(n/8,a[1]==="int",e.name)}if(a=e.type.match(jk),a){let n=parseInt(a[1]);return(n===0||n>32)&&yr.throwArgumentError("invalid bytes length","param",e),new mk(n,e.name)}return yr.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,a){return new sd(e,this._getWordSize(),this.coerceFunc,a)}_getWriter(){return new u7(this._getWordSize())}getDefaultValue(e){const a=e.map(b=>this._getCoder(H5.from(b)));return new pr(a,"_").defaultValue()}encode(e,a){e.length!==a.length&&yr.throwError("types/values length mismatch",R0.errors.INVALID_ARGUMENT,{count:{types:e.length,values:a.length},value:{types:e,values:a}});const n=e.map(r=>this._getCoder(H5.from(r))),b=new pr(n,"_"),f=this._getWriter();return b.encode(f,a),f.data}decode(e,a,n){const b=e.map(r=>this._getCoder(H5.from(r)));return new pr(b,"_").decode(this._getReader(R1(a),n))}}const zk=new Lk;function na(t){return U5(d4(t))}const Bg="hash/5.8.0";function Pg(t){t=atob(t);const e=[];for(let a=0;a<t.length;a++)e.push(t.charCodeAt(a));return R1(e)}function Ug(t){t=R1(t);let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function Rg(t,e){e==null&&(e=1);const a=[],n=a.forEach,b=function(f,r){n.call(f,function(c){r>0&&Array.isArray(c)?b(c,r-1):a.push(c)})};return b(t,e),a}function Ok(t){const e={};for(let a=0;a<t.length;a++){const n=t[a];e[n[0]]=n[1]}return e}function _k(t){let e=0;function a(){return t[e++]<<8|t[e++]}let n=a(),b=1,f=[0,1];for(let C=1;C<n;C++)f.push(b+=a());let r=a(),c=e;e+=r;let u=0,l=0;function y(){return u==0&&(l=l<<8|t[e++],u=8),l>>--u&1}const m=31,x=Math.pow(2,m),A=x>>>1,M=A>>1,v=x-1;let w=0;for(let C=0;C<m;C++)w=w<<1|y();let D=[],N=0,T=x;for(;;){let C=Math.floor(((w-N+1)*b-1)/T),G=0,W=n;for(;W-G>1;){let n0=G+W>>>1;C<f[n0]?W=n0:G=n0}if(G==0)break;D.push(G);let Z=N+Math.floor(T*f[G]/b),d0=N+Math.floor(T*f[G+1]/b)-1;for(;((Z^d0)&A)==0;)w=w<<1&v|y(),Z=Z<<1&v,d0=d0<<1&v|1;for(;Z&~d0&M;)w=w&A|w<<1&v>>>1|y(),Z=Z<<1^A,d0=(d0^A)<<1|A|1;N=Z,T=1+d0-Z}let j=n-4;return D.map(C=>{switch(C-j){case 3:return j+65792+(t[c++]<<16|t[c++]<<8|t[c++]);case 2:return j+256+(t[c++]<<8|t[c++]);case 1:return j+t[c++];default:return C-1}})}function Bk(t){let e=0;return()=>t[e++]}function Pk(t){return Bk(_k(t))}function Uk(t){return t&1?~t>>1:t>>1}function Rk(t,e){let a=Array(t);for(let n=0;n<t;n++)a[n]=1+e();return a}function Cp(t,e){let a=Array(t);for(let n=0,b=-1;n<t;n++)a[n]=b+=1+e();return a}function Qk(t,e){let a=Array(t);for(let n=0,b=0;n<t;n++)a[n]=b+=Uk(e());return a}function ud(t,e){let a=Cp(t(),t),n=t(),b=Cp(n,t),f=Rk(n,t);for(let r=0;r<n;r++)for(let c=0;c<f[r];c++)a.push(b[r]+c);return e?a.map(r=>e[r]):a}function Fk(t){let e=[];for(;;){let a=t();if(a==0)break;e.push(Gk(a,t))}for(;;){let a=t()-1;if(a<0)break;e.push(Wk(a,t))}return Ok(Rg(e))}function Yk(t){let e=[];for(;;){let a=t();if(a==0)break;e.push(a)}return e}function Qg(t,e,a){let n=Array(t).fill(void 0).map(()=>[]);for(let b=0;b<e;b++)Qk(t,a).forEach((f,r)=>n[r].push(f));return n}function Gk(t,e){let a=1+e(),n=e(),b=Yk(e),f=Qg(b.length,1+t,e);return Rg(f.map((r,c)=>{const u=r[0],l=r.slice(1);return Array(b[c]).fill(void 0).map((y,m)=>{let x=m*n;return[u+m*a,l.map(A=>A+x)]})}))}function Wk(t,e){let a=1+e();return Qg(a,1+t,e).map(b=>[b[0],b.slice(1)])}function Hk(t){let e=ud(t).sort((n,b)=>n-b);return a();function a(){let n=[];for(;;){let l=ud(t,e);if(l.length==0)break;n.push({set:new Set(l),node:a()})}n.sort((l,y)=>y.set.size-l.set.size);let b=t(),f=b%3;b=b/3|0;let r=!!(b&1);b>>=1;let c=b==1,u=b==2;return{branches:n,valid:f,fe0f:r,save:c,check:u}}}function Vk(){return Pk(Pg("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Gd=Vk(),Zk=new Set(ud(Gd)),Kk=new Set(ud(Gd)),Jk=Fk(Gd),qk=Hk(Gd),kp=45,jp=95;function Fg(t){return Ck(t)}function Xk(t){return t.filter(e=>e!=65039)}function Yg(t){for(let e of t.split(".")){let a=Fg(e);try{for(let n=a.lastIndexOf(jp)-1;n>=0;n--)if(a[n]!==jp)throw new Error("underscore only allowed at start");if(a.length>=4&&a.every(n=>n<128)&&a[2]===kp&&a[3]===kp)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function $k(t){return Yg(ej(t,Xk))}function ej(t,e){let a=Fg(t).reverse(),n=[];for(;a.length;){let b=aj(a);if(b){n.push(...e(b));continue}let f=a.pop();if(Zk.has(f)){n.push(f);continue}if(Kk.has(f))continue;let r=Jk[f];if(r){n.push(...r);continue}throw new Error(`Disallowed codepoint: 0x${f.toString(16).toUpperCase()}`)}return Yg(tj(String.fromCodePoint(...n)))}function tj(t){return t.normalize("NFC")}function aj(t,e){var a;let n=qk,b,f,r=[],c=t.length;for(;c;){let u=t[--c];if(n=(a=n.branches.find(l=>l.set.has(u)))===null||a===void 0?void 0:a.node,!n)break;if(n.save)f=u;else if(n.check&&u===f)break;r.push(u),n.fe0f&&(r.push(65039),c>0&&t[c-1]==65039&&c--),n.valid&&(b=r.slice(),n.valid==2&&b.splice(1,1),t.length=c)}return b}const nj=new R0(Bg),Gg=new Uint8Array(32);Gg.fill(0);function Sp(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Wg(t){const e=d4($k(t)),a=[];if(t.length===0)return a;let n=0;for(let b=0;b<e.length;b++)e[b]===46&&(a.push(Sp(e.slice(n,b))),n=b+1);if(n>=e.length)throw new Error("invalid ENS name; empty component");return a.push(Sp(e.slice(n))),a}function Kr(t){typeof t!="string"&&nj.throwArgumentError("invalid ENS name; not a string","name",t);let e=Gg;const a=Wg(t);for(;a.length;)e=U5(I8([e,U5(a.pop())]));return _1(e)}function bj(t){return _1(I8(Wg(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const a=new Uint8Array(e.length+1);return a.set(e,1),a[0]=a.length-1,a})))+"00"}var fj=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const d5=new R0(Bg),Hg=new Uint8Array(32);Hg.fill(0);const rj=g1.from(-1),Vg=g1.from(0),Zg=g1.from(1),dj=g1.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ij(t){const e=R1(t),a=e.length%32;return a?Xe([e,Hg.slice(a)]):_1(e)}const cj=e5(Zg.toHexString(),32),oj=e5(Vg.toHexString(),32),Lp={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},fo=["name","version","chainId","verifyingContract","salt"];function zp(t){return function(e){return typeof e!="string"&&d5.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const sj={name:zp("name"),version:zp("version"),chainId:function(t){try{return g1.from(t).toString()}catch{}return d5.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Q5(t).toLowerCase()}catch{}return d5.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=R1(t);if(e.length!==32)throw new Error("bad length");return _1(e)}catch{}return d5.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function ro(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const a=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&d5.throwArgumentError("invalid numeric width","type",t);const b=dj.mask(a?n-1:n),f=a?b.add(Zg).mul(rj):Vg;return function(r){const c=g1.from(r);return(c.lt(f)||c.gt(b))&&d5.throwArgumentError(`value out-of-bounds for ${t}`,"value",r),e5(c.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const a=parseInt(e[1]);return(a===0||a>32||e[1]!==String(a))&&d5.throwArgumentError("invalid bytes width","type",t),function(n){return R1(n).length!==a&&d5.throwArgumentError(`invalid length for ${t}`,"value",n),ij(n)}}}switch(t){case"address":return function(e){return e5(Q5(e),32)};case"bool":return function(e){return e?cj:oj};case"bytes":return function(e){return U5(e)};case"string":return function(e){return na(e)}}return null}function Op(t,e){return`${t}(${e.map(({name:a,type:n})=>n+" "+a).join(",")})`}class A8{constructor(e){p1(this,"types",Object.freeze(nt(e))),p1(this,"_encoderCache",{}),p1(this,"_types",{});const a={},n={},b={};Object.keys(e).forEach(c=>{a[c]={},n[c]=[],b[c]={}});for(const c in e){const u={};e[c].forEach(l=>{u[l.name]&&d5.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(c)}`,"types",e),u[l.name]=!0;const y=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];y===c&&d5.throwArgumentError(`circular type reference to ${JSON.stringify(y)}`,"types",e),!ro(y)&&(n[y]||d5.throwArgumentError(`unknown type ${JSON.stringify(y)}`,"types",e),n[y].push(c),a[c][y]=!0)})}const f=Object.keys(n).filter(c=>n[c].length===0);f.length===0?d5.throwArgumentError("missing primary type","types",e):f.length>1&&d5.throwArgumentError(`ambiguous primary types or unused types: ${f.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),p1(this,"primaryType",f[0]);function r(c,u){u[c]&&d5.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),u[c]=!0,Object.keys(a[c]).forEach(l=>{n[l]&&(r(l,u),Object.keys(u).forEach(y=>{b[y][l]=!0}))}),delete u[c]}r(this.primaryType,{});for(const c in b){const u=Object.keys(b[c]);u.sort(),this._types[c]=Op(c,e[c])+u.map(l=>Op(l,e[l])).join("")}}getEncoder(e){let a=this._encoderCache[e];return a||(a=this._encoderCache[e]=this._getEncoder(e)),a}_getEncoder(e){{const b=ro(e);if(b)return b}const a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){const b=a[1],f=this.getEncoder(b),r=parseInt(a[3]);return c=>{r>=0&&c.length!==r&&d5.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",c);let u=c.map(f);return this._types[b]&&(u=u.map(U5)),U5(Xe(u))}}const n=this.types[e];if(n){const b=na(this._types[e]);return f=>{const r=n.map(({name:c,type:u})=>{const l=this.getEncoder(u)(f[c]);return this._types[u]?U5(l):l});return r.unshift(b),Xe(r)}}return d5.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const a=this._types[e];return a||d5.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),a}encodeData(e,a){return this.getEncoder(e)(a)}hashStruct(e,a){return U5(this.encodeData(e,a))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,a,n){if(ro(e))return n(e,a);const b=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(b){const r=b[1],c=parseInt(b[3]);return c>=0&&a.length!==c&&d5.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a),a.map(u=>this._visit(r,u,n))}const f=this.types[e];return f?f.reduce((r,{name:c,type:u})=>(r[c]=this._visit(u,a[c],n),r),{}):d5.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,a){return this._visit(this.primaryType,e,a)}static from(e){return new A8(e)}static getPrimaryType(e){return A8.from(e).primaryType}static hashStruct(e,a,n){return A8.from(a).hashStruct(e,n)}static hashDomain(e){const a=[];for(const n in e){const b=Lp[n];b||d5.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),a.push({name:n,type:b})}return a.sort((n,b)=>fo.indexOf(n.name)-fo.indexOf(b.name)),A8.hashStruct("EIP712Domain",{EIP712Domain:a},e)}static encode(e,a,n){return Xe(["0x1901",A8.hashDomain(e),A8.from(a).hash(n)])}static hash(e,a,n){return U5(A8.encode(e,a,n))}static resolveNames(e,a,n,b){return fj(this,void 0,void 0,function*(){e=R5(e);const f={};e.verifyingContract&&!z6(e.verifyingContract,20)&&(f[e.verifyingContract]="0x");const r=A8.from(a);r.visit(n,(c,u)=>(c==="address"&&!z6(u,20)&&(f[u]="0x"),u));for(const c in f)f[c]=yield b(c);return e.verifyingContract&&f[e.verifyingContract]&&(e.verifyingContract=f[e.verifyingContract]),n=r.visit(n,(c,u)=>c==="address"&&f[u]?f[u]:u),{domain:e,value:n}})}static getPayload(e,a,n){A8.hashDomain(e);const b={},f=[];fo.forEach(u=>{const l=e[u];l!=null&&(b[u]=sj[u](l),f.push({name:u,type:Lp[u]}))});const r=A8.from(a),c=R5(a);return c.EIP712Domain?d5.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",a):c.EIP712Domain=f,r.encode(n),{types:c,domain:b,primaryType:r.primaryType,message:r.visit(n,(u,l)=>{if(u.match(/^bytes(\d*)/))return _1(R1(l));if(u.match(/^u?int/))return g1.from(l).toString();switch(u){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&d5.throwArgumentError("invalid string","value",l),l}return d5.throwArgumentError("unsupported type","type",u)})}}}const f5=new R0(Bb);class uj extends _b{}class lj extends _b{}class pj extends _b{}class l7 extends _b{static isIndexed(e){return!!(e&&e._isIndexed)}}const yj={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function _p(t,e){const a=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return a.error=e,a}class Bp{constructor(e){let a=[];typeof e=="string"?a=JSON.parse(e):a=e,p1(this,"fragments",a.map(n=>et.from(n)).filter(n=>n!=null)),p1(this,"_abiCoder",f4(new.target,"getAbiCoder")()),p1(this,"functions",{}),p1(this,"errors",{}),p1(this,"events",{}),p1(this,"structs",{}),this.fragments.forEach(n=>{let b=null;switch(n.type){case"constructor":if(this.deploy){f5.warn("duplicate definition - constructor");return}p1(this,"deploy",n);return;case"function":b=this.functions;break;case"event":b=this.events;break;case"error":b=this.errors;break;default:return}let f=n.format();if(b[f]){f5.warn("duplicate definition - "+f);return}b[f]=n}),this.deploy||p1(this,"deploy",a4.from({payable:!1,type:"constructor"})),p1(this,"_isInterface",!0)}format(e){e||(e=L6.full),e===L6.sighash&&f5.throwArgumentError("interface does not support formatting sighash","format",e);const a=this.fragments.map(n=>n.format(e));return e===L6.json?JSON.stringify(a.map(n=>JSON.parse(n))):a}static getAbiCoder(){return zk}static getAddress(e){return Q5(e)}static getSighash(e){return ye(na(e.format()),0,4)}static getEventTopic(e){return na(e.format())}getFunction(e){if(z6(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];f5.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.functions).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching function","name",n):b.length>1&&f5.throwArgumentError("multiple matching functions","name",n),this.functions[b[0]]}const a=this.functions[n4.fromString(e).format()];return a||f5.throwArgumentError("no matching function","signature",e),a}getEvent(e){if(z6(e)){const n=e.toLowerCase();for(const b in this.events)if(n===this.getEventTopic(b))return this.events[b];f5.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.events).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching event","name",n):b.length>1&&f5.throwArgumentError("multiple matching events","name",n),this.events[b[0]]}const a=this.events[X4.fromString(e).format()];return a||f5.throwArgumentError("no matching event","signature",e),a}getError(e){if(z6(e)){const n=f4(this.constructor,"getSighash");for(const b in this.errors){const f=this.errors[b];if(e===n(f))return this.errors[b]}f5.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),b=Object.keys(this.errors).filter(f=>f.split("(")[0]===n);return b.length===0?f5.throwArgumentError("no matching error","name",n):b.length>1&&f5.throwArgumentError("multiple matching errors","name",n),this.errors[b[0]]}const a=this.errors[n4.fromString(e).format()];return a||f5.throwArgumentError("no matching error","signature",e),a}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(a){try{e=this.getError(e)}catch{throw a}}return f4(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),f4(this.constructor,"getEventTopic")(e)}_decodeParams(e,a){return this._abiCoder.decode(e,a)}_encodeParams(e,a){return this._abiCoder.encode(e,a)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,a){typeof e=="string"&&(e=this.getError(e));const n=R1(a);return _1(n.slice(0,4))!==this.getSighash(e)&&f5.throwArgumentError(`data signature does not match error ${e.name}.`,"data",_1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,a){return typeof e=="string"&&(e=this.getError(e)),_1(I8([this.getSighash(e),this._encodeParams(e.inputs,a||[])]))}decodeFunctionData(e,a){typeof e=="string"&&(e=this.getFunction(e));const n=R1(a);return _1(n.slice(0,4))!==this.getSighash(e)&&f5.throwArgumentError(`data signature does not match function ${e.name}.`,"data",_1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,a){return typeof e=="string"&&(e=this.getFunction(e)),_1(I8([this.getSighash(e),this._encodeParams(e.inputs,a||[])]))}decodeFunctionResult(e,a){typeof e=="string"&&(e=this.getFunction(e));let n=R1(a),b=null,f="",r=null,c=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=_1(n.slice(0,4)),y=yj[l];if(y)r=this._abiCoder.decode(y.inputs,n.slice(4)),c=y.name,u=y.signature,y.reason&&(b=r[0]),c==="Error"?f=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(r[0])}`:c==="Panic"&&(f=`; VM Exception while processing transaction: reverted with panic code ${r[0]}`);else try{const m=this.getError(l);r=this._abiCoder.decode(m.inputs,n.slice(4)),c=m.name,u=m.format()}catch{}break}}return f5.throwError("call revert exception"+f,R0.errors.CALL_EXCEPTION,{method:e.format(),data:_1(a),errorArgs:r,errorName:c,errorSignature:u,reason:b})}encodeFunctionResult(e,a){return typeof e=="string"&&(e=this.getFunction(e)),_1(this._abiCoder.encode(e.outputs,a||[]))}encodeFilterTopics(e,a){typeof e=="string"&&(e=this.getEvent(e)),a.length>e.inputs.length&&f5.throwError("too many arguments for "+e.format(),R0.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:a});let n=[];e.anonymous||n.push(this.getEventTopic(e));const b=(f,r)=>f.type==="string"?na(r):f.type==="bytes"?U5(_1(r)):(f.type==="bool"&&typeof r=="boolean"&&(r=r?"0x01":"0x00"),f.type.match(/^u?int/)&&(r=g1.from(r).toHexString()),f.type==="address"&&this._abiCoder.encode(["address"],[r]),e5(_1(r),32));for(a.forEach((f,r)=>{let c=e.inputs[r];if(!c.indexed){f!=null&&f5.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+c.name,f);return}f==null?n.push(null):c.baseType==="array"||c.baseType==="tuple"?f5.throwArgumentError("filtering with tuples or arrays not supported","contract."+c.name,f):Array.isArray(f)?n.push(f.map(u=>b(c,u))):n.push(b(c,f))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,a){typeof e=="string"&&(e=this.getEvent(e));const n=[],b=[],f=[];return e.anonymous||n.push(this.getEventTopic(e)),a.length!==e.inputs.length&&f5.throwArgumentError("event arguments/values mismatch","values",a),e.inputs.forEach((r,c)=>{const u=a[c];if(r.indexed)if(r.type==="string")n.push(na(u));else if(r.type==="bytes")n.push(U5(u));else{if(r.baseType==="tuple"||r.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([r.type],[u]))}else b.push(r),f.push(u)}),{data:this._abiCoder.encode(b,f),topics:n}}decodeEventLog(e,a,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let x=this.getEventTopic(e);(!z6(n[0],32)||n[0].toLowerCase()!==x)&&f5.throwError("fragment/topic mismatch",R0.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:x,value:n[0]}),n=n.slice(1)}let b=[],f=[],r=[];e.inputs.forEach((x,A)=>{x.indexed?x.type==="string"||x.type==="bytes"||x.baseType==="tuple"||x.baseType==="array"?(b.push(H5.fromObject({type:"bytes32",name:x.name})),r.push(!0)):(b.push(x),r.push(!1)):(f.push(x),r.push(!1))});let c=n!=null?this._abiCoder.decode(b,I8(n)):null,u=this._abiCoder.decode(f,a,!0),l=[],y=0,m=0;e.inputs.forEach((x,A)=>{if(x.indexed)if(c==null)l[A]=new l7({_isIndexed:!0,hash:null});else if(r[A])l[A]=new l7({_isIndexed:!0,hash:c[m++]});else try{l[A]=c[m++]}catch(M){l[A]=M}else try{l[A]=u[y++]}catch(M){l[A]=M}if(x.name&&l[x.name]==null){const M=l[A];M instanceof Error?Object.defineProperty(l,x.name,{enumerable:!0,get:()=>{throw _p(`property ${JSON.stringify(x.name)}`,M)}}):l[x.name]=M}});for(let x=0;x<l.length;x++){const A=l[x];A instanceof Error&&Object.defineProperty(l,x,{enumerable:!0,get:()=>{throw _p(`index ${x}`,A)}})}return Object.freeze(l)}parseTransaction(e){let a=this.getFunction(e.data.substring(0,10).toLowerCase());return a?new lj({args:this._abiCoder.decode(a.inputs,"0x"+e.data.substring(10)),functionFragment:a,name:a.name,signature:a.format(),sighash:this.getSighash(a),value:g1.from(e.value||"0")}):null}parseLog(e){let a=this.getEvent(e.topics[0]);return!a||a.anonymous?null:new uj({eventFragment:a,name:a.name,signature:a.format(),topic:this.getEventTopic(a),args:this.decodeEventLog(a,e.data,e.topics)})}parseError(e){const a=_1(e);let n=this.getError(a.substring(0,10).toLowerCase());return n?new pj({args:this._abiCoder.decode(n.inputs,"0x"+a.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const mj="abstract-provider/5.8.0";var hj=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const gj=new R0(mj);class Aj extends _b{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Wd{constructor(){gj.checkAbstract(new.target,Wd),p1(this,"_isProvider",!0)}getFeeData(){return hj(this,void 0,void 0,function*(){const{block:e,gasPrice:a}=yield j5({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(r=>null)});let n=null,b=null,f=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,f=g1.from("1500000000"),b=e.baseFeePerGas.mul(2).add(f)),{lastBaseFeePerGas:n,maxFeePerGas:b,maxPriorityFeePerGas:f,gasPrice:a}})}addListener(e,a){return this.on(e,a)}removeListener(e,a){return this.off(e,a)}static isProvider(e){return!!(e&&e._isProvider)}}const Mj="abstract-signer/5.8.0";var u2=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const U8=new R0(Mj),wj=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],xj=[R0.errors.INSUFFICIENT_FUNDS,R0.errors.NONCE_EXPIRED,R0.errors.REPLACEMENT_UNDERPRICED];class Ub{constructor(){U8.checkAbstract(new.target,Ub),p1(this,"_isSigner",!0)}getBalance(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return u2(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const a=yield j5(this.checkTransaction(e));return yield this.provider.estimateGas(a)})}call(e,a){return u2(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield j5(this.checkTransaction(e));return yield this.provider.call(n,a)})}sendTransaction(e){return u2(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const a=yield this.populateTransaction(e),n=yield this.signTransaction(a);return yield this.provider.sendTransaction(n)})}getChainId(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return u2(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return u2(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)wj.indexOf(n)===-1&&U8.throwArgumentError("invalid transaction key: "+n,"transaction",e);const a=R5(e);return a.from==null?a.from=this.getAddress():a.from=Promise.all([Promise.resolve(a.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&U8.throwArgumentError("from address mismatch","transaction",e),n[0])),a}populateTransaction(e){return u2(this,void 0,void 0,function*(){const a=yield j5(this.checkTransaction(e));a.to!=null&&(a.to=Promise.resolve(a.to).then(b=>u2(this,void 0,void 0,function*(){if(b==null)return null;const f=yield this.resolveName(b);return f==null&&U8.throwArgumentError("provided ENS name resolves to null","tx.to",b),f})),a.to.catch(b=>{}));const n=a.maxFeePerGas!=null||a.maxPriorityFeePerGas!=null;if(a.gasPrice!=null&&(a.type===2||n)?U8.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(a.type===0||a.type===1)&&n&&U8.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(a.type===2||a.type==null)&&a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)a.type=2;else if(a.type===0||a.type===1)a.gasPrice==null&&(a.gasPrice=this.getGasPrice());else{const b=yield this.getFeeData();if(a.type==null)if(b.maxFeePerGas!=null&&b.maxPriorityFeePerGas!=null)if(a.type=2,a.gasPrice!=null){const f=a.gasPrice;delete a.gasPrice,a.maxFeePerGas=f,a.maxPriorityFeePerGas=f}else a.maxFeePerGas==null&&(a.maxFeePerGas=b.maxFeePerGas),a.maxPriorityFeePerGas==null&&(a.maxPriorityFeePerGas=b.maxPriorityFeePerGas);else b.gasPrice!=null?(n&&U8.throwError("network does not support EIP-1559",R0.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),a.gasPrice==null&&(a.gasPrice=b.gasPrice),a.type=0):U8.throwError("failed to get consistent fee data",R0.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else a.type===2&&(a.maxFeePerGas==null&&(a.maxFeePerGas=b.maxFeePerGas),a.maxPriorityFeePerGas==null&&(a.maxPriorityFeePerGas=b.maxPriorityFeePerGas))}return a.nonce==null&&(a.nonce=this.getTransactionCount("pending")),a.gasLimit==null&&(a.gasLimit=this.estimateGas(a).catch(b=>{if(xj.indexOf(b.code)>=0)throw b;return U8.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{error:b,tx:a})})),a.chainId==null?a.chainId=this.getChainId():a.chainId=Promise.all([Promise.resolve(a.chainId),this.getChainId()]).then(b=>(b[1]!==0&&b[0]!==b[1]&&U8.throwArgumentError("chainId address mismatch","transaction",e),b[0])),yield j5(a)})}_checkProvider(e){this.provider||U8.throwError("missing provider",R0.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class ls extends Ub{constructor(e,a){super(),p1(this,"address",e),p1(this,"provider",a||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,a){return Promise.resolve().then(()=>{U8.throwError(e,R0.errors.UNSUPPORTED_OPERATION,{operation:a})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,a,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ls(this.address,e)}}var io={},H6={},co,Pp;function Rb(){if(Pp)return co;Pp=1,co=t;function t(e,a){if(!e)throw new Error(a||"Assertion failed")}return t.equal=function(a,n,b){if(a!=n)throw new Error(b||"Assertion failed: "+a+" != "+n)},co}var mr={exports:{}},Up;function Ij(){return Up||(Up=1,typeof Object.create=="function"?mr.exports=function(e,a){a&&(e.super_=a,e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mr.exports=function(e,a){if(a){e.super_=a;var n=function(){};n.prototype=a.prototype,e.prototype=new n,e.prototype.constructor=e}}),mr.exports}var Rp;function o4(){if(Rp)return H6;Rp=1;var t=Rb(),e=Ij();H6.inherits=e;function a(H,F){return(H.charCodeAt(F)&64512)!==55296||F<0||F+1>=H.length?!1:(H.charCodeAt(F+1)&64512)===56320}function n(H,F){if(Array.isArray(H))return H.slice();if(!H)return[];var h=[];if(typeof H=="string")if(F){if(F==="hex")for(H=H.replace(/[^a-z0-9]+/ig,""),H.length%2!==0&&(H="0"+H),k=0;k<H.length;k+=2)h.push(parseInt(H[k]+H[k+1],16))}else for(var I=0,k=0;k<H.length;k++){var R=H.charCodeAt(k);R<128?h[I++]=R:R<2048?(h[I++]=R>>6|192,h[I++]=R&63|128):a(H,k)?(R=65536+((R&1023)<<10)+(H.charCodeAt(++k)&1023),h[I++]=R>>18|240,h[I++]=R>>12&63|128,h[I++]=R>>6&63|128,h[I++]=R&63|128):(h[I++]=R>>12|224,h[I++]=R>>6&63|128,h[I++]=R&63|128)}else for(k=0;k<H.length;k++)h[k]=H[k]|0;return h}H6.toArray=n;function b(H){for(var F="",h=0;h<H.length;h++)F+=c(H[h].toString(16));return F}H6.toHex=b;function f(H){var F=H>>>24|H>>>8&65280|H<<8&16711680|(H&255)<<24;return F>>>0}H6.htonl=f;function r(H,F){for(var h="",I=0;I<H.length;I++){var k=H[I];F==="little"&&(k=f(k)),h+=u(k.toString(16))}return h}H6.toHex32=r;function c(H){return H.length===1?"0"+H:H}H6.zero2=c;function u(H){return H.length===7?"0"+H:H.length===6?"00"+H:H.length===5?"000"+H:H.length===4?"0000"+H:H.length===3?"00000"+H:H.length===2?"000000"+H:H.length===1?"0000000"+H:H}H6.zero8=u;function l(H,F,h,I){var k=h-F;t(k%4===0);for(var R=new Array(k/4),z=0,q=F;z<R.length;z++,q+=4){var e0;I==="big"?e0=H[q]<<24|H[q+1]<<16|H[q+2]<<8|H[q+3]:e0=H[q+3]<<24|H[q+2]<<16|H[q+1]<<8|H[q],R[z]=e0>>>0}return R}H6.join32=l;function y(H,F){for(var h=new Array(H.length*4),I=0,k=0;I<H.length;I++,k+=4){var R=H[I];F==="big"?(h[k]=R>>>24,h[k+1]=R>>>16&255,h[k+2]=R>>>8&255,h[k+3]=R&255):(h[k+3]=R>>>24,h[k+2]=R>>>16&255,h[k+1]=R>>>8&255,h[k]=R&255)}return h}H6.split32=y;function m(H,F){return H>>>F|H<<32-F}H6.rotr32=m;function x(H,F){return H<<F|H>>>32-F}H6.rotl32=x;function A(H,F){return H+F>>>0}H6.sum32=A;function M(H,F,h){return H+F+h>>>0}H6.sum32_3=M;function v(H,F,h,I){return H+F+h+I>>>0}H6.sum32_4=v;function w(H,F,h,I,k){return H+F+h+I+k>>>0}H6.sum32_5=w;function D(H,F,h,I){var k=H[F],R=H[F+1],z=I+R>>>0,q=(z<I?1:0)+h+k;H[F]=q>>>0,H[F+1]=z}H6.sum64=D;function N(H,F,h,I){var k=F+I>>>0,R=(k<F?1:0)+H+h;return R>>>0}H6.sum64_hi=N;function T(H,F,h,I){var k=F+I;return k>>>0}H6.sum64_lo=T;function j(H,F,h,I,k,R,z,q){var e0=0,V=F;V=V+I>>>0,e0+=V<F?1:0,V=V+R>>>0,e0+=V<R?1:0,V=V+q>>>0,e0+=V<q?1:0;var S=H+h+k+z+e0;return S>>>0}H6.sum64_4_hi=j;function C(H,F,h,I,k,R,z,q){var e0=F+I+R+q;return e0>>>0}H6.sum64_4_lo=C;function G(H,F,h,I,k,R,z,q,e0,V){var S=0,b0=F;b0=b0+I>>>0,S+=b0<F?1:0,b0=b0+R>>>0,S+=b0<R?1:0,b0=b0+q>>>0,S+=b0<q?1:0,b0=b0+V>>>0,S+=b0<V?1:0;var x0=H+h+k+z+e0+S;return x0>>>0}H6.sum64_5_hi=G;function W(H,F,h,I,k,R,z,q,e0,V){var S=F+I+R+q+V;return S>>>0}H6.sum64_5_lo=W;function Z(H,F,h){var I=F<<32-h|H>>>h;return I>>>0}H6.rotr64_hi=Z;function d0(H,F,h){var I=H<<32-h|F>>>h;return I>>>0}H6.rotr64_lo=d0;function n0(H,F,h){return H>>>h}H6.shr64_hi=n0;function y0(H,F,h){var I=H<<32-h|F>>>h;return I>>>0}return H6.shr64_lo=y0,H6}var oo={},Qp;function Qb(){if(Qp)return oo;Qp=1;var t=o4(),e=Rb();function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return oo.BlockHash=a,a.prototype.update=function(b,f){if(b=t.toArray(b,f),this.pending?this.pending=this.pending.concat(b):this.pending=b,this.pendingTotal+=b.length,this.pending.length>=this._delta8){b=this.pending;var r=b.length%this._delta8;this.pending=b.slice(b.length-r,b.length),this.pending.length===0&&(this.pending=null),b=t.join32(b,0,b.length-r,this.endian);for(var c=0;c<b.length;c+=this._delta32)this._update(b,c,c+this._delta32)}return this},a.prototype.digest=function(b){return this.update(this._pad()),e(this.pending===null),this._digest(b)},a.prototype._pad=function(){var b=this.pendingTotal,f=this._delta8,r=f-(b+this.padLength)%f,c=new Array(r+this.padLength);c[0]=128;for(var u=1;u<r;u++)c[u]=0;if(b<<=3,this.endian==="big"){for(var l=8;l<this.padLength;l++)c[u++]=0;c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=b>>>24&255,c[u++]=b>>>16&255,c[u++]=b>>>8&255,c[u++]=b&255}else for(c[u++]=b&255,c[u++]=b>>>8&255,c[u++]=b>>>16&255,c[u++]=b>>>24&255,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,l=8;l<this.padLength;l++)c[u++]=0;return c},oo}var J3={},H2={},Fp;function Kg(){if(Fp)return H2;Fp=1;var t=o4(),e=t.rotr32;function a(y,m,x,A){if(y===0)return n(m,x,A);if(y===1||y===3)return f(m,x,A);if(y===2)return b(m,x,A)}H2.ft_1=a;function n(y,m,x){return y&m^~y&x}H2.ch32=n;function b(y,m,x){return y&m^y&x^m&x}H2.maj32=b;function f(y,m,x){return y^m^x}H2.p32=f;function r(y){return e(y,2)^e(y,13)^e(y,22)}H2.s0_256=r;function c(y){return e(y,6)^e(y,11)^e(y,25)}H2.s1_256=c;function u(y){return e(y,7)^e(y,18)^y>>>3}H2.g0_256=u;function l(y){return e(y,17)^e(y,19)^y>>>10}return H2.g1_256=l,H2}var so,Yp;function vj(){if(Yp)return so;Yp=1;var t=o4(),e=Qb(),a=Kg(),n=t.rotl32,b=t.sum32,f=t.sum32_5,r=a.ft_1,c=e.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return t.inherits(l,c),so=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(m,x){for(var A=this.W,M=0;M<16;M++)A[M]=m[x+M];for(;M<A.length;M++)A[M]=n(A[M-3]^A[M-8]^A[M-14]^A[M-16],1);var v=this.h[0],w=this.h[1],D=this.h[2],N=this.h[3],T=this.h[4];for(M=0;M<A.length;M++){var j=~~(M/20),C=f(n(v,5),r(j,w,D,N),T,A[M],u[j]);T=N,N=D,D=n(w,30),w=v,v=C}this.h[0]=b(this.h[0],v),this.h[1]=b(this.h[1],w),this.h[2]=b(this.h[2],D),this.h[3]=b(this.h[3],N),this.h[4]=b(this.h[4],T)},l.prototype._digest=function(m){return m==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},so}var uo,Gp;function Jg(){if(Gp)return uo;Gp=1;var t=o4(),e=Qb(),a=Kg(),n=Rb(),b=t.sum32,f=t.sum32_4,r=t.sum32_5,c=a.ch32,u=a.maj32,l=a.s0_256,y=a.s1_256,m=a.g0_256,x=a.g1_256,A=e.BlockHash,M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;A.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=M,this.W=new Array(64)}return t.inherits(v,A),uo=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(D,N){for(var T=this.W,j=0;j<16;j++)T[j]=D[N+j];for(;j<T.length;j++)T[j]=f(x(T[j-2]),T[j-7],m(T[j-15]),T[j-16]);var C=this.h[0],G=this.h[1],W=this.h[2],Z=this.h[3],d0=this.h[4],n0=this.h[5],y0=this.h[6],H=this.h[7];for(n(this.k.length===T.length),j=0;j<T.length;j++){var F=r(H,y(d0),c(d0,n0,y0),this.k[j],T[j]),h=b(l(C),u(C,G,W));H=y0,y0=n0,n0=d0,d0=b(Z,F),Z=W,W=G,G=C,C=b(F,h)}this.h[0]=b(this.h[0],C),this.h[1]=b(this.h[1],G),this.h[2]=b(this.h[2],W),this.h[3]=b(this.h[3],Z),this.h[4]=b(this.h[4],d0),this.h[5]=b(this.h[5],n0),this.h[6]=b(this.h[6],y0),this.h[7]=b(this.h[7],H)},v.prototype._digest=function(D){return D==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")},uo}var lo,Wp;function Tj(){if(Wp)return lo;Wp=1;var t=o4(),e=Jg();function a(){if(!(this instanceof a))return new a;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return t.inherits(a,e),lo=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(b){return b==="hex"?t.toHex32(this.h.slice(0,7),"big"):t.split32(this.h.slice(0,7),"big")},lo}var po,Hp;function qg(){if(Hp)return po;Hp=1;var t=o4(),e=Qb(),a=Rb(),n=t.rotr64_hi,b=t.rotr64_lo,f=t.shr64_hi,r=t.shr64_lo,c=t.sum64,u=t.sum64_hi,l=t.sum64_lo,y=t.sum64_4_hi,m=t.sum64_4_lo,x=t.sum64_5_hi,A=t.sum64_5_lo,M=e.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;M.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}t.inherits(w,M),po=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(h,I){for(var k=this.W,R=0;R<32;R++)k[R]=h[I+R];for(;R<k.length;R+=2){var z=y0(k[R-4],k[R-3]),q=H(k[R-4],k[R-3]),e0=k[R-14],V=k[R-13],S=d0(k[R-30],k[R-29]),b0=n0(k[R-30],k[R-29]),x0=k[R-32],O=k[R-31];k[R]=y(z,q,e0,V,S,b0,x0,O),k[R+1]=m(z,q,e0,V,S,b0,x0,O)}},w.prototype._update=function(h,I){this._prepareBlock(h,I);var k=this.W,R=this.h[0],z=this.h[1],q=this.h[2],e0=this.h[3],V=this.h[4],S=this.h[5],b0=this.h[6],x0=this.h[7],O=this.h[8],l0=this.h[9],f0=this.h[10],K=this.h[11],h0=this.h[12],g0=this.h[13],T0=this.h[14],m0=this.h[15];a(this.k.length===k.length);for(var q0=0;q0<k.length;q0+=2){var F0=T0,N0=m0,O0=W(O,l0),J0=Z(O,l0),t1=D(O,l0,f0,K,h0),i1=N(O,l0,f0,K,h0,g0),a1=this.k[q0],c0=this.k[q0+1],A0=k[q0],I0=k[q0+1],H0=x(F0,N0,O0,J0,t1,i1,a1,c0,A0,I0),X0=A(F0,N0,O0,J0,t1,i1,a1,c0,A0,I0);F0=C(R,z),N0=G(R,z),O0=T(R,z,q,e0,V),J0=j(R,z,q,e0,V,S);var Y0=u(F0,N0,O0,J0),K0=l(F0,N0,O0,J0);T0=h0,m0=g0,h0=f0,g0=K,f0=O,K=l0,O=u(b0,x0,H0,X0),l0=l(x0,x0,H0,X0),b0=V,x0=S,V=q,S=e0,q=R,e0=z,R=u(H0,X0,Y0,K0),z=l(H0,X0,Y0,K0)}c(this.h,0,R,z),c(this.h,2,q,e0),c(this.h,4,V,S),c(this.h,6,b0,x0),c(this.h,8,O,l0),c(this.h,10,f0,K),c(this.h,12,h0,g0),c(this.h,14,T0,m0)},w.prototype._digest=function(h){return h==="hex"?t.toHex32(this.h,"big"):t.split32(this.h,"big")};function D(F,h,I,k,R){var z=F&I^~F&R;return z<0&&(z+=4294967296),z}function N(F,h,I,k,R,z){var q=h&k^~h&z;return q<0&&(q+=4294967296),q}function T(F,h,I,k,R){var z=F&I^F&R^I&R;return z<0&&(z+=4294967296),z}function j(F,h,I,k,R,z){var q=h&k^h&z^k&z;return q<0&&(q+=4294967296),q}function C(F,h){var I=n(F,h,28),k=n(h,F,2),R=n(h,F,7),z=I^k^R;return z<0&&(z+=4294967296),z}function G(F,h){var I=b(F,h,28),k=b(h,F,2),R=b(h,F,7),z=I^k^R;return z<0&&(z+=4294967296),z}function W(F,h){var I=n(F,h,14),k=n(F,h,18),R=n(h,F,9),z=I^k^R;return z<0&&(z+=4294967296),z}function Z(F,h){var I=b(F,h,14),k=b(F,h,18),R=b(h,F,9),z=I^k^R;return z<0&&(z+=4294967296),z}function d0(F,h){var I=n(F,h,1),k=n(F,h,8),R=f(F,h,7),z=I^k^R;return z<0&&(z+=4294967296),z}function n0(F,h){var I=b(F,h,1),k=b(F,h,8),R=r(F,h,7),z=I^k^R;return z<0&&(z+=4294967296),z}function y0(F,h){var I=n(F,h,19),k=n(h,F,29),R=f(F,h,6),z=I^k^R;return z<0&&(z+=4294967296),z}function H(F,h){var I=b(F,h,19),k=b(h,F,29),R=r(F,h,6),z=I^k^R;return z<0&&(z+=4294967296),z}return po}var yo,Vp;function Nj(){if(Vp)return yo;Vp=1;var t=o4(),e=qg();function a(){if(!(this instanceof a))return new a;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return t.inherits(a,e),yo=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(b){return b==="hex"?t.toHex32(this.h.slice(0,12),"big"):t.split32(this.h.slice(0,12),"big")},yo}var Zp;function Ej(){return Zp||(Zp=1,J3.sha1=vj(),J3.sha224=Tj(),J3.sha256=Jg(),J3.sha384=Nj(),J3.sha512=qg()),J3}var mo={},Kp;function Dj(){if(Kp)return mo;Kp=1;var t=o4(),e=Qb(),a=t.rotl32,n=t.sum32,b=t.sum32_3,f=t.sum32_4,r=e.BlockHash;function c(){if(!(this instanceof c))return new c;r.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}t.inherits(c,r),mo.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(w,D){for(var N=this.h[0],T=this.h[1],j=this.h[2],C=this.h[3],G=this.h[4],W=N,Z=T,d0=j,n0=C,y0=G,H=0;H<80;H++){var F=n(a(f(N,u(H,T,j,C),w[m[H]+D],l(H)),A[H]),G);N=G,G=C,C=a(j,10),j=T,T=F,F=n(a(f(W,u(79-H,Z,d0,n0),w[x[H]+D],y(H)),M[H]),y0),W=y0,y0=n0,n0=a(d0,10),d0=Z,Z=F}F=b(this.h[1],j,n0),this.h[1]=b(this.h[2],C,y0),this.h[2]=b(this.h[3],G,W),this.h[3]=b(this.h[4],N,Z),this.h[4]=b(this.h[0],T,d0),this.h[0]=F},c.prototype._digest=function(w){return w==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")};function u(v,w,D,N){return v<=15?w^D^N:v<=31?w&D|~w&N:v<=47?(w|~D)^N:v<=63?w&N|D&~N:w^(D|~N)}function l(v){return v<=15?0:v<=31?1518500249:v<=47?1859775393:v<=63?2400959708:2840853838}function y(v){return v<=15?1352829926:v<=31?1548603684:v<=47?1836072691:v<=63?2053994217:0}var m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],A=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return mo}var ho,Jp;function Cj(){if(Jp)return ho;Jp=1;var t=o4(),e=Rb();function a(n,b,f){if(!(this instanceof a))return new a(n,b,f);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(t.toArray(b,f))}return ho=a,a.prototype._init=function(b){b.length>this.blockSize&&(b=new this.Hash().update(b).digest()),e(b.length<=this.blockSize);for(var f=b.length;f<this.blockSize;f++)b.push(0);for(f=0;f<b.length;f++)b[f]^=54;for(this.inner=new this.Hash().update(b),f=0;f<b.length;f++)b[f]^=106;this.outer=new this.Hash().update(b)},a.prototype.update=function(b,f){return this.inner.update(b,f),this},a.prototype.digest=function(b){return this.outer.update(this.inner.digest()),this.outer.digest(b)},ho}var qp;function kj(){return qp||(qp=1,(function(t){var e=t;e.utils=o4(),e.common=Qb(),e.sha=Ej(),e.ripemd=Dj(),e.hmac=Cj(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(io)),io}var jj=kj();const Z2=Y8(jj);function K9(t,e,a){return a={path:e,exports:{},require:function(n,b){return Sj(n,b??a.path)}},t(a,a.exports),a.exports}function Sj(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ps=Xg;function Xg(t,e){if(!t)throw new Error(e||"Assertion failed")}Xg.equal=function(e,a,n){if(e!=a)throw new Error(n||"Assertion failed: "+e+" != "+a)};var A2=K9(function(t,e){var a=e;function n(r,c){if(Array.isArray(r))return r.slice();if(!r)return[];var u=[];if(typeof r!="string"){for(var l=0;l<r.length;l++)u[l]=r[l]|0;return u}if(c==="hex"){r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r);for(var l=0;l<r.length;l+=2)u.push(parseInt(r[l]+r[l+1],16))}else for(var l=0;l<r.length;l++){var y=r.charCodeAt(l),m=y>>8,x=y&255;m?u.push(m,x):u.push(x)}return u}a.toArray=n;function b(r){return r.length===1?"0"+r:r}a.zero2=b;function f(r){for(var c="",u=0;u<r.length;u++)c+=b(r[u].toString(16));return c}a.toHex=f,a.encode=function(c,u){return u==="hex"?f(c):c}}),v8=K9(function(t,e){var a=e;a.assert=ps,a.toArray=A2.toArray,a.zero2=A2.zero2,a.toHex=A2.toHex,a.encode=A2.encode;function n(u,l,y){var m=new Array(Math.max(u.bitLength(),y)+1),x;for(x=0;x<m.length;x+=1)m[x]=0;var A=1<<l+1,M=u.clone();for(x=0;x<m.length;x++){var v,w=M.andln(A-1);M.isOdd()?(w>(A>>1)-1?v=(A>>1)-w:v=w,M.isubn(v)):v=0,m[x]=v,M.iushrn(1)}return m}a.getNAF=n;function b(u,l){var y=[[],[]];u=u.clone(),l=l.clone();for(var m=0,x=0,A;u.cmpn(-m)>0||l.cmpn(-x)>0;){var M=u.andln(3)+m&3,v=l.andln(3)+x&3;M===3&&(M=-1),v===3&&(v=-1);var w;(M&1)===0?w=0:(A=u.andln(7)+m&7,(A===3||A===5)&&v===2?w=-M:w=M),y[0].push(w);var D;(v&1)===0?D=0:(A=l.andln(7)+x&7,(A===3||A===5)&&M===2?D=-v:D=v),y[1].push(D),2*m===w+1&&(m=1-m),2*x===D+1&&(x=1-x),u.iushrn(1),l.iushrn(1)}return y}a.getJSF=b;function f(u,l,y){var m="_"+l;u.prototype[l]=function(){return this[m]!==void 0?this[m]:this[m]=y.call(this)}}a.cachedProperty=f;function r(u){return typeof u=="string"?a.toArray(u,"hex"):u}a.parseBytes=r;function c(u){return new q1(u,"hex","le")}a.intFromLE=c}),ld=v8.getNAF,Lj=v8.getJSF,pd=v8.assert;function b3(t,e){this.type=t,this.p=new q1(e.p,16),this.red=e.prime?q1.red(e.prime):q1.mont(this.p),this.zero=new q1(0).toRed(this.red),this.one=new q1(1).toRed(this.red),this.two=new q1(2).toRed(this.red),this.n=e.n&&new q1(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ya=b3;b3.prototype.point=function(){throw new Error("Not implemented")};b3.prototype.validate=function(){throw new Error("Not implemented")};b3.prototype._fixedNafMul=function(e,a){pd(e.precomputed);var n=e._getDoubles(),b=ld(a,1,this._bitLength),f=(1<<n.step+1)-(n.step%2===0?2:1);f/=3;var r=[],c,u;for(c=0;c<b.length;c+=n.step){u=0;for(var l=c+n.step-1;l>=c;l--)u=(u<<1)+b[l];r.push(u)}for(var y=this.jpoint(null,null,null),m=this.jpoint(null,null,null),x=f;x>0;x--){for(c=0;c<r.length;c++)u=r[c],u===x?m=m.mixedAdd(n.points[c]):u===-x&&(m=m.mixedAdd(n.points[c].neg()));y=y.add(m)}return y.toP()};b3.prototype._wnafMul=function(e,a){var n=4,b=e._getNAFPoints(n);n=b.wnd;for(var f=b.points,r=ld(a,n,this._bitLength),c=this.jpoint(null,null,null),u=r.length-1;u>=0;u--){for(var l=0;u>=0&&r[u]===0;u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var y=r[u];pd(y!==0),e.type==="affine"?y>0?c=c.mixedAdd(f[y-1>>1]):c=c.mixedAdd(f[-y-1>>1].neg()):y>0?c=c.add(f[y-1>>1]):c=c.add(f[-y-1>>1].neg())}return e.type==="affine"?c.toP():c};b3.prototype._wnafMulAdd=function(e,a,n,b,f){var r=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0,y,m,x;for(y=0;y<b;y++){x=a[y];var A=x._getNAFPoints(e);r[y]=A.wnd,c[y]=A.points}for(y=b-1;y>=1;y-=2){var M=y-1,v=y;if(r[M]!==1||r[v]!==1){u[M]=ld(n[M],r[M],this._bitLength),u[v]=ld(n[v],r[v],this._bitLength),l=Math.max(u[M].length,l),l=Math.max(u[v].length,l);continue}var w=[a[M],null,null,a[v]];a[M].y.cmp(a[v].y)===0?(w[1]=a[M].add(a[v]),w[2]=a[M].toJ().mixedAdd(a[v].neg())):a[M].y.cmp(a[v].y.redNeg())===0?(w[1]=a[M].toJ().mixedAdd(a[v]),w[2]=a[M].add(a[v].neg())):(w[1]=a[M].toJ().mixedAdd(a[v]),w[2]=a[M].toJ().mixedAdd(a[v].neg()));var D=[-3,-1,-5,-7,0,7,5,1,3],N=Lj(n[M],n[v]);for(l=Math.max(N[0].length,l),u[M]=new Array(l),u[v]=new Array(l),m=0;m<l;m++){var T=N[0][m]|0,j=N[1][m]|0;u[M][m]=D[(T+1)*3+(j+1)],u[v][m]=0,c[M]=w}}var C=this.jpoint(null,null,null),G=this._wnafT4;for(y=l;y>=0;y--){for(var W=0;y>=0;){var Z=!0;for(m=0;m<b;m++)G[m]=u[m][y]|0,G[m]!==0&&(Z=!1);if(!Z)break;W++,y--}if(y>=0&&W++,C=C.dblp(W),y<0)break;for(m=0;m<b;m++){var d0=G[m];d0!==0&&(d0>0?x=c[m][d0-1>>1]:d0<0&&(x=c[m][-d0-1>>1].neg()),x.type==="affine"?C=C.mixedAdd(x):C=C.add(x))}}for(y=0;y<b;y++)c[y]=null;return f?C:C.toP()};function G8(t,e){this.curve=t,this.type=e,this.precomputed=null}b3.BasePoint=G8;G8.prototype.eq=function(){throw new Error("Not implemented")};G8.prototype.validate=function(){return this.curve.validate(this)};b3.prototype.decodePoint=function(e,a){e=v8.toArray(e,a);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?pd(e[e.length-1]%2===0):e[0]===7&&pd(e[e.length-1]%2===1);var b=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return b}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};G8.prototype.encodeCompressed=function(e){return this.encode(e,!0)};G8.prototype._encode=function(e){var a=this.curve.p.byteLength(),n=this.getX().toArray("be",a);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",a))};G8.prototype.encode=function(e,a){return v8.encode(this._encode(a),e)};G8.prototype.precompute=function(e){if(this.precomputed)return this;var a={doubles:null,naf:null,beta:null};return a.naf=this._getNAFPoints(8),a.doubles=this._getDoubles(4,e),a.beta=this._getBeta(),this.precomputed=a,this};G8.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var a=this.precomputed.doubles;return a?a.points.length>=Math.ceil((e.bitLength()+1)/a.step):!1};G8.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],b=this,f=0;f<a;f+=e){for(var r=0;r<e;r++)b=b.dbl();n.push(b)}return{step:e,points:n}};G8.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var a=[this],n=(1<<e)-1,b=n===1?null:this.dbl(),f=1;f<n;f++)a[f]=a[f-1].add(b);return{wnd:e,points:a}};G8.prototype._getBeta=function(){return null};G8.prototype.dblp=function(e){for(var a=this,n=0;n<e;n++)a=a.dbl();return a};var ys=K9(function(t){typeof Object.create=="function"?t.exports=function(a,n){n&&(a.super_=n,a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(a,n){if(n){a.super_=n;var b=function(){};b.prototype=n.prototype,a.prototype=new b,a.prototype.constructor=a}}}),zj=v8.assert;function W8(t){ya.call(this,"short",t),this.a=new q1(t.a,16).toRed(this.red),this.b=new q1(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}ys(W8,ya);var Oj=W8;W8.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var a,n;if(e.beta)a=new q1(e.beta,16).toRed(this.red);else{var b=this._getEndoRoots(this.p);a=b[0].cmp(b[1])<0?b[0]:b[1],a=a.toRed(this.red)}if(e.lambda)n=new q1(e.lambda,16);else{var f=this._getEndoRoots(this.n);this.g.mul(f[0]).x.cmp(this.g.x.redMul(a))===0?n=f[0]:(n=f[1],zj(this.g.mul(n).x.cmp(this.g.x.redMul(a))===0))}var r;return e.basis?r=e.basis.map(function(c){return{a:new q1(c.a,16),b:new q1(c.b,16)}}):r=this._getEndoBasis(n),{beta:a,lambda:n,basis:r}}};W8.prototype._getEndoRoots=function(e){var a=e===this.p?this.red:q1.mont(e),n=new q1(2).toRed(a).redInvm(),b=n.redNeg(),f=new q1(3).toRed(a).redNeg().redSqrt().redMul(n),r=b.redAdd(f).fromRed(),c=b.redSub(f).fromRed();return[r,c]};W8.prototype._getEndoBasis=function(e){for(var a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,b=this.n.clone(),f=new q1(1),r=new q1(0),c=new q1(0),u=new q1(1),l,y,m,x,A,M,v,w=0,D,N;n.cmpn(0)!==0;){var T=b.div(n);D=b.sub(T.mul(n)),N=c.sub(T.mul(f));var j=u.sub(T.mul(r));if(!m&&D.cmp(a)<0)l=v.neg(),y=f,m=D.neg(),x=N;else if(m&&++w===2)break;v=D,b=n,n=D,c=f,f=N,u=r,r=j}A=D.neg(),M=N;var C=m.sqr().add(x.sqr()),G=A.sqr().add(M.sqr());return G.cmp(C)>=0&&(A=l,M=y),m.negative&&(m=m.neg(),x=x.neg()),A.negative&&(A=A.neg(),M=M.neg()),[{a:m,b:x},{a:A,b:M}]};W8.prototype._endoSplit=function(e){var a=this.endo.basis,n=a[0],b=a[1],f=b.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),c=f.mul(n.a),u=r.mul(b.a),l=f.mul(n.b),y=r.mul(b.b),m=e.sub(c).sub(u),x=l.add(y).neg();return{k1:m,k2:x}};W8.prototype.pointFromX=function(e,a){e=new q1(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),b=n.redSqrt();if(b.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var f=b.fromRed().isOdd();return(a&&!f||!a&&f)&&(b=b.redNeg()),this.point(e,b)};W8.prototype.validate=function(e){if(e.inf)return!0;var a=e.x,n=e.y,b=this.a.redMul(a),f=a.redSqr().redMul(a).redIAdd(b).redIAdd(this.b);return n.redSqr().redISub(f).cmpn(0)===0};W8.prototype._endoWnafMulAdd=function(e,a,n){for(var b=this._endoWnafT1,f=this._endoWnafT2,r=0;r<e.length;r++){var c=this._endoSplit(a[r]),u=e[r],l=u._getBeta();c.k1.negative&&(c.k1.ineg(),u=u.neg(!0)),c.k2.negative&&(c.k2.ineg(),l=l.neg(!0)),b[r*2]=u,b[r*2+1]=l,f[r*2]=c.k1,f[r*2+1]=c.k2}for(var y=this._wnafMulAdd(1,b,f,r*2,n),m=0;m<r*2;m++)b[m]=null,f[m]=null;return y};function Z5(t,e,a,n){ya.BasePoint.call(this,t,"affine"),e===null&&a===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new q1(e,16),this.y=new q1(a,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}ys(Z5,ya.BasePoint);W8.prototype.point=function(e,a,n){return new Z5(this,e,a,n)};W8.prototype.pointFromJSON=function(e,a){return Z5.fromJSON(this,e,a)};Z5.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var a=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,b=function(f){return n.point(f.x.redMul(n.endo.beta),f.y)};e.beta=a,a.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(b)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(b)}}}return a}};Z5.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Z5.fromJSON=function(e,a,n){typeof a=="string"&&(a=JSON.parse(a));var b=e.point(a[0],a[1],n);if(!a[2])return b;function f(c){return e.point(c[0],c[1],n)}var r=a[2];return b.precomputed={beta:null,doubles:r.doubles&&{step:r.doubles.step,points:[b].concat(r.doubles.points.map(f))},naf:r.naf&&{wnd:r.naf.wnd,points:[b].concat(r.naf.points.map(f))}},b};Z5.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Z5.prototype.isInfinity=function(){return this.inf};Z5.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var a=this.y.redSub(e.y);a.cmpn(0)!==0&&(a=a.redMul(this.x.redSub(e.x).redInvm()));var n=a.redSqr().redISub(this.x).redISub(e.x),b=a.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,b)};Z5.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var a=this.curve.a,n=this.x.redSqr(),b=e.redInvm(),f=n.redAdd(n).redIAdd(n).redIAdd(a).redMul(b),r=f.redSqr().redISub(this.x.redAdd(this.x)),c=f.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,c)};Z5.prototype.getX=function(){return this.x.fromRed()};Z5.prototype.getY=function(){return this.y.fromRed()};Z5.prototype.mul=function(e){return e=new q1(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Z5.prototype.mulAdd=function(e,a,n){var b=[this,a],f=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(b,f):this.curve._wnafMulAdd(1,b,f,2)};Z5.prototype.jmulAdd=function(e,a,n){var b=[this,a],f=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(b,f,!0):this.curve._wnafMulAdd(1,b,f,2,!0)};Z5.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Z5.prototype.neg=function(e){if(this.inf)return this;var a=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,b=function(f){return f.neg()};a.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(b)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(b)}}}return a};Z5.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function be(t,e,a,n){ya.BasePoint.call(this,t,"jacobian"),e===null&&a===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new q1(0)):(this.x=new q1(e,16),this.y=new q1(a,16),this.z=new q1(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ys(be,ya.BasePoint);W8.prototype.jpoint=function(e,a,n){return new be(this,e,a,n)};be.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),a=e.redSqr(),n=this.x.redMul(a),b=this.y.redMul(a).redMul(e);return this.curve.point(n,b)};be.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};be.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),n=this.z.redSqr(),b=this.x.redMul(a),f=e.x.redMul(n),r=this.y.redMul(a.redMul(e.z)),c=e.y.redMul(n.redMul(this.z)),u=b.redSub(f),l=r.redSub(c);if(u.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=u.redSqr(),m=y.redMul(u),x=b.redMul(y),A=l.redSqr().redIAdd(m).redISub(x).redISub(x),M=l.redMul(x.redISub(A)).redISub(r.redMul(m)),v=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(A,M,v)};be.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),n=this.x,b=e.x.redMul(a),f=this.y,r=e.y.redMul(a).redMul(this.z),c=n.redSub(b),u=f.redSub(r);if(c.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=c.redSqr(),y=l.redMul(c),m=n.redMul(l),x=u.redSqr().redIAdd(y).redISub(m).redISub(m),A=u.redMul(m.redISub(x)).redISub(f.redMul(y)),M=this.z.redMul(c);return this.curve.jpoint(x,A,M)};be.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var a;if(this.curve.zeroA||this.curve.threeA){var n=this;for(a=0;a<e;a++)n=n.dbl();return n}var b=this.curve.a,f=this.curve.tinv,r=this.x,c=this.y,u=this.z,l=u.redSqr().redSqr(),y=c.redAdd(c);for(a=0;a<e;a++){var m=r.redSqr(),x=y.redSqr(),A=x.redSqr(),M=m.redAdd(m).redIAdd(m).redIAdd(b.redMul(l)),v=r.redMul(x),w=M.redSqr().redISub(v.redAdd(v)),D=v.redISub(w),N=M.redMul(D);N=N.redIAdd(N).redISub(A);var T=y.redMul(u);a+1<e&&(l=l.redMul(A)),r=w,u=T,y=N}return this.curve.jpoint(r,y.redMul(f),u)};be.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};be.prototype._zeroDbl=function(){var e,a,n;if(this.zOne){var b=this.x.redSqr(),f=this.y.redSqr(),r=f.redSqr(),c=this.x.redAdd(f).redSqr().redISub(b).redISub(r);c=c.redIAdd(c);var u=b.redAdd(b).redIAdd(b),l=u.redSqr().redISub(c).redISub(c),y=r.redIAdd(r);y=y.redIAdd(y),y=y.redIAdd(y),e=l,a=u.redMul(c.redISub(l)).redISub(y),n=this.y.redAdd(this.y)}else{var m=this.x.redSqr(),x=this.y.redSqr(),A=x.redSqr(),M=this.x.redAdd(x).redSqr().redISub(m).redISub(A);M=M.redIAdd(M);var v=m.redAdd(m).redIAdd(m),w=v.redSqr(),D=A.redIAdd(A);D=D.redIAdd(D),D=D.redIAdd(D),e=w.redISub(M).redISub(M),a=v.redMul(M.redISub(e)).redISub(D),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,a,n)};be.prototype._threeDbl=function(){var e,a,n;if(this.zOne){var b=this.x.redSqr(),f=this.y.redSqr(),r=f.redSqr(),c=this.x.redAdd(f).redSqr().redISub(b).redISub(r);c=c.redIAdd(c);var u=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),l=u.redSqr().redISub(c).redISub(c);e=l;var y=r.redIAdd(r);y=y.redIAdd(y),y=y.redIAdd(y),a=u.redMul(c.redISub(l)).redISub(y),n=this.y.redAdd(this.y)}else{var m=this.z.redSqr(),x=this.y.redSqr(),A=this.x.redMul(x),M=this.x.redSub(m).redMul(this.x.redAdd(m));M=M.redAdd(M).redIAdd(M);var v=A.redIAdd(A);v=v.redIAdd(v);var w=v.redAdd(v);e=M.redSqr().redISub(w),n=this.y.redAdd(this.z).redSqr().redISub(x).redISub(m);var D=x.redSqr();D=D.redIAdd(D),D=D.redIAdd(D),D=D.redIAdd(D),a=M.redMul(v.redISub(e)).redISub(D)}return this.curve.jpoint(e,a,n)};be.prototype._dbl=function(){var e=this.curve.a,a=this.x,n=this.y,b=this.z,f=b.redSqr().redSqr(),r=a.redSqr(),c=n.redSqr(),u=r.redAdd(r).redIAdd(r).redIAdd(e.redMul(f)),l=a.redAdd(a);l=l.redIAdd(l);var y=l.redMul(c),m=u.redSqr().redISub(y.redAdd(y)),x=y.redISub(m),A=c.redSqr();A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var M=u.redMul(x).redISub(A),v=n.redAdd(n).redMul(b);return this.curve.jpoint(m,M,v)};be.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),a=this.y.redSqr(),n=this.z.redSqr(),b=a.redSqr(),f=e.redAdd(e).redIAdd(e),r=f.redSqr(),c=this.x.redAdd(a).redSqr().redISub(e).redISub(b);c=c.redIAdd(c),c=c.redAdd(c).redIAdd(c),c=c.redISub(r);var u=c.redSqr(),l=b.redIAdd(b);l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var y=f.redIAdd(c).redSqr().redISub(r).redISub(u).redISub(l),m=a.redMul(y);m=m.redIAdd(m),m=m.redIAdd(m);var x=this.x.redMul(u).redISub(m);x=x.redIAdd(x),x=x.redIAdd(x);var A=this.y.redMul(y.redMul(l.redISub(y)).redISub(c.redMul(u)));A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var M=this.z.redAdd(c).redSqr().redISub(n).redISub(u);return this.curve.jpoint(x,A,M)};be.prototype.mul=function(e,a){return e=new q1(e,a),this.curve._wnafMul(this,e)};be.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var a=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(a)).cmpn(0)!==0)return!1;var b=a.redMul(this.z),f=n.redMul(e.z);return this.y.redMul(f).redISub(e.y.redMul(b)).cmpn(0)===0};be.prototype.eqXToP=function(e){var a=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(a);if(this.x.cmp(n)===0)return!0;for(var b=e.clone(),f=this.curve.redN.redMul(a);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(f),this.x.cmp(n)===0)return!0}};be.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};be.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Jr=K9(function(t,e){var a=e;a.base=ya,a.short=Oj,a.mont=null,a.edwards=null}),qr=K9(function(t,e){var a=e,n=v8.assert;function b(c){c.type==="short"?this.curve=new Jr.short(c):c.type==="edwards"?this.curve=new Jr.edwards(c):this.curve=new Jr.mont(c),this.g=this.curve.g,this.n=this.curve.n,this.hash=c.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}a.PresetCurve=b;function f(c,u){Object.defineProperty(a,c,{configurable:!0,enumerable:!0,get:function(){var l=new b(u);return Object.defineProperty(a,c,{configurable:!0,enumerable:!0,value:l}),l}})}f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Z2.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Z2.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Z2.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Z2.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Z2.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Z2.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Z2.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var r;try{r=null.crash()}catch{r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Z2.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function e3(t){if(!(this instanceof e3))return new e3(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=A2.toArray(t.entropy,t.entropyEnc||"hex"),a=A2.toArray(t.nonce,t.nonceEnc||"hex"),n=A2.toArray(t.pers,t.persEnc||"hex");ps(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,a,n)}var $g=e3;e3.prototype._init=function(e,a,n){var b=e.concat(a).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var f=0;f<this.V.length;f++)this.K[f]=0,this.V[f]=1;this._update(b),this._reseed=1,this.reseedInterval=281474976710656};e3.prototype._hmac=function(){return new Z2.hmac(this.hash,this.K)};e3.prototype._update=function(e){var a=this._hmac().update(this.V).update([0]);e&&(a=a.update(e)),this.K=a.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};e3.prototype.reseed=function(e,a,n,b){typeof a!="string"&&(b=n,n=a,a=null),e=A2.toArray(e,a),n=A2.toArray(n,b),ps(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};e3.prototype.generate=function(e,a,n,b){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof a!="string"&&(b=n,n=a,a=null),n&&(n=A2.toArray(n,b||"hex"),this._update(n));for(var f=[];f.length<e;)this.V=this._hmac().update(this.V).digest(),f=f.concat(this.V);var r=f.slice(0,e);return this._update(n),this._reseed++,A2.encode(r,a)};var p7=v8.assert;function Ae(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var ms=Ae;Ae.fromPublic=function(e,a,n){return a instanceof Ae?a:new Ae(e,{pub:a,pubEnc:n})};Ae.fromPrivate=function(e,a,n){return a instanceof Ae?a:new Ae(e,{priv:a,privEnc:n})};Ae.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};Ae.prototype.getPublic=function(e,a){return typeof e=="string"&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub};Ae.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};Ae.prototype._importPrivate=function(e,a){this.priv=new q1(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)};Ae.prototype._importPublic=function(e,a){if(e.x||e.y){this.ec.curve.type==="mont"?p7(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&p7(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,a)};Ae.prototype.derive=function(e){return e.validate()||p7(e.validate(),"public point not validated"),e.mul(this.priv).getX()};Ae.prototype.sign=function(e,a,n){return this.ec.sign(e,this,a,n)};Ae.prototype.verify=function(e,a,n){return this.ec.verify(e,a,this,void 0,n)};Ae.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var _j=v8.assert;function Hd(t,e){if(t instanceof Hd)return t;this._importDER(t,e)||(_j(t.r&&t.s,"Signature without r or s"),this.r=new q1(t.r,16),this.s=new q1(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Vd=Hd;function Bj(){this.place=0}function go(t,e){var a=t[e.place++];if(!(a&128))return a;var n=a&15;if(n===0||n>4||t[e.place]===0)return!1;for(var b=0,f=0,r=e.place;f<n;f++,r++)b<<=8,b|=t[r],b>>>=0;return b<=127?!1:(e.place=r,b)}function Xp(t){for(var e=0,a=t.length-1;!t[e]&&!(t[e+1]&128)&&e<a;)e++;return e===0?t:t.slice(e)}Hd.prototype._importDER=function(e,a){e=v8.toArray(e,a);var n=new Bj;if(e[n.place++]!==48)return!1;var b=go(e,n);if(b===!1||b+n.place!==e.length||e[n.place++]!==2)return!1;var f=go(e,n);if(f===!1||(e[n.place]&128)!==0)return!1;var r=e.slice(n.place,f+n.place);if(n.place+=f,e[n.place++]!==2)return!1;var c=go(e,n);if(c===!1||e.length!==c+n.place||(e[n.place]&128)!==0)return!1;var u=e.slice(n.place,c+n.place);if(r[0]===0)if(r[1]&128)r=r.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new q1(r),this.s=new q1(u),this.recoveryParam=null,!0};function Ao(t,e){if(e<128){t.push(e);return}var a=1+(Math.log(e)/Math.LN2>>>3);for(t.push(a|128);--a;)t.push(e>>>(a<<3)&255);t.push(e)}Hd.prototype.toDER=function(e){var a=this.r.toArray(),n=this.s.toArray();for(a[0]&128&&(a=[0].concat(a)),n[0]&128&&(n=[0].concat(n)),a=Xp(a),n=Xp(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var b=[2];Ao(b,a.length),b=b.concat(a),b.push(2),Ao(b,n.length);var f=b.concat(n),r=[48];return Ao(r,f.length),r=r.concat(f),v8.encode(r,e)};var Pj=(function(){throw new Error("unsupported")}),ea=v8.assert;function F8(t){if(!(this instanceof F8))return new F8(t);typeof t=="string"&&(ea(Object.prototype.hasOwnProperty.call(qr,t),"Unknown curve "+t),t=qr[t]),t instanceof qr.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Uj=F8;F8.prototype.keyPair=function(e){return new ms(this,e)};F8.prototype.keyFromPrivate=function(e,a){return ms.fromPrivate(this,e,a)};F8.prototype.keyFromPublic=function(e,a){return ms.fromPublic(this,e,a)};F8.prototype.genKeyPair=function(e){e||(e={});for(var a=new $g({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Pj(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),b=this.n.sub(new q1(2));;){var f=new q1(a.generate(n));if(!(f.cmp(b)>0))return f.iaddn(1),this.keyFromPrivate(f)}};F8.prototype._truncateToN=function(e,a,n){var b;if(q1.isBN(e)||typeof e=="number")e=new q1(e,16),b=e.byteLength();else if(typeof e=="object")b=e.length,e=new q1(e,16);else{var f=e.toString();b=f.length+1>>>1,e=new q1(f,16)}typeof n!="number"&&(n=b*8);var r=n-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!a&&e.cmp(this.n)>=0?e.sub(this.n):e};F8.prototype.sign=function(e,a,n,b){if(typeof n=="object"&&(b=n,n=null),b||(b={}),typeof e!="string"&&typeof e!="number"&&!q1.isBN(e)){ea(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),ea(e.length>>>0===e.length);for(var f=0;f<e.length;f++)ea((e[f]&255)===e[f])}a=this.keyFromPrivate(a,n),e=this._truncateToN(e,!1,b.msgBitLength),ea(!e.isNeg(),"Can not sign a negative message");var r=this.n.byteLength(),c=a.getPrivate().toArray("be",r),u=e.toArray("be",r);ea(new q1(u).eq(e),"Can not sign message");for(var l=new $g({hash:this.hash,entropy:c,nonce:u,pers:b.pers,persEnc:b.persEnc||"utf8"}),y=this.n.sub(new q1(1)),m=0;;m++){var x=b.k?b.k(m):new q1(l.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(y)>=0)){var A=this.g.mul(x);if(!A.isInfinity()){var M=A.getX(),v=M.umod(this.n);if(v.cmpn(0)!==0){var w=x.invm(this.n).mul(v.mul(a.getPrivate()).iadd(e));if(w=w.umod(this.n),w.cmpn(0)!==0){var D=(A.getY().isOdd()?1:0)|(M.cmp(v)!==0?2:0);return b.canonical&&w.cmp(this.nh)>0&&(w=this.n.sub(w),D^=1),new Vd({r:v,s:w,recoveryParam:D})}}}}}};F8.prototype.verify=function(e,a,n,b,f){f||(f={}),e=this._truncateToN(e,!1,f.msgBitLength),n=this.keyFromPublic(n,b),a=new Vd(a,"hex");var r=a.r,c=a.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0||c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;var u=c.invm(this.n),l=u.mul(e).umod(this.n),y=u.mul(r).umod(this.n),m;return this.curve._maxwellTrick?(m=this.g.jmulAdd(l,n.getPublic(),y),m.isInfinity()?!1:m.eqXToP(r)):(m=this.g.mulAdd(l,n.getPublic(),y),m.isInfinity()?!1:m.getX().umod(this.n).cmp(r)===0)};F8.prototype.recoverPubKey=function(t,e,a,n){ea((3&a)===a,"The recovery param is more than two bits"),e=new Vd(e,n);var b=this.n,f=new q1(t),r=e.r,c=e.s,u=a&1,l=a>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?r=this.curve.pointFromX(r.add(this.curve.n),u):r=this.curve.pointFromX(r,u);var y=e.r.invm(b),m=b.sub(f).mul(y).umod(b),x=c.mul(y).umod(b);return this.g.mulAdd(m,r,x)};F8.prototype.getKeyRecoveryParam=function(t,e,a,n){if(e=new Vd(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var b=0;b<4;b++){var f;try{f=this.recoverPubKey(t,e,b)}catch{continue}if(f.eq(a))return b}throw new Error("Unable to find valid recovery factor")};var Rj=K9(function(t,e){var a=e;a.version="6.6.1",a.utils=v8,a.rand=(function(){throw new Error("unsupported")}),a.curve=Jr,a.curves=qr,a.ec=Uj,a.eddsa=null}),Qj=Rj.ec;const Fj="signing-key/5.8.0",y7=new R0(Fj);let Mo=null;function Ht(){return Mo||(Mo=new Qj("secp256k1")),Mo}class Yj{constructor(e){p1(this,"curve","secp256k1"),p1(this,"privateKey",_1(e)),$t(this.privateKey)!==32&&y7.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const a=Ht().keyFromPrivate(R1(this.privateKey));p1(this,"publicKey","0x"+a.getPublic(!1,"hex")),p1(this,"compressedPublicKey","0x"+a.getPublic(!0,"hex")),p1(this,"_isSigningKey",!0)}_addPoint(e){const a=Ht().keyFromPublic(R1(this.publicKey)),n=Ht().keyFromPublic(R1(e));return"0x"+a.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const a=Ht().keyFromPrivate(R1(this.privateKey)),n=R1(e);n.length!==32&&y7.throwArgumentError("bad digest length","digest",e);const b=a.sign(n,{canonical:!0});return Fd({recoveryParam:b.recoveryParam,r:e5("0x"+b.r.toString(16),32),s:e5("0x"+b.s.toString(16),32)})}computeSharedSecret(e){const a=Ht().keyFromPrivate(R1(this.privateKey)),n=Ht().keyFromPublic(R1(eA(e)));return e5("0x"+a.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function Gj(t,e){const a=Fd(e),n={r:R1(a.r),s:R1(a.s)};return"0x"+Ht().recoverPubKey(R1(t),n,a.recoveryParam).encode("hex",!1)}function eA(t,e){const a=R1(t);return a.length===32?new Yj(a).publicKey:a.length===33?"0x"+Ht().keyFromPublic(a).getPublic(!1,"hex"):a.length===65?_1(a):y7.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Wj="transactions/5.8.0",tA=new R0(Wj);var $p;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})($p||($p={}));function wo(t,e){return{address:Q5(t),storageKeys:(e||[]).map((a,n)=>($t(a)!==32&&tA.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,a),a.toLowerCase()))}}function Hj(t){if(Array.isArray(t))return t.map((a,n)=>Array.isArray(a)?(a.length>2&&tA.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,a),wo(a[0],a[1])):wo(a.address,a.storageKeys));const e=Object.keys(t).map(a=>{const n=t[a].reduce((b,f)=>(b[f]=!0,b),{});return wo(a,Object.keys(n).sort())});return e.sort((a,n)=>a.address.localeCompare(n.address)),e}const Vj="contracts/5.8.0";var oa=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const w5=new R0(Vj);function yd(t,e){return oa(this,void 0,void 0,function*(){const a=yield e;typeof a!="string"&&w5.throwArgumentError("invalid address or ENS name","name",a);try{return Q5(a)}catch{}t||w5.throwError("a provider or signer is needed to resolve ENS names",R0.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(a);return n==null&&w5.throwArgumentError("resolver or addr is not configured for ENS name","name",a),n})}function Xr(t,e,a){return oa(this,void 0,void 0,function*(){return Array.isArray(a)?yield Promise.all(a.map((n,b)=>Xr(t,Array.isArray(e)?e[b]:e[n.name],n))):a.type==="address"?yield yd(t,e):a.type==="tuple"?yield Xr(t,e,a.components):a.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Xr(t,n,a.arrayChildren))):Promise.reject(w5.makeError("invalid value for array",R0.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Zd(t,e,a){return oa(this,void 0,void 0,function*(){let n={};a.length===e.inputs.length+1&&typeof a[a.length-1]=="object"&&(n=R5(a.pop())),w5.checkArgumentCount(a.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=j5({override:yd(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>oa(this,void 0,void 0,function*(){return Q5(l.signer)!==l.override&&w5.throwError("Contract with a Signer cannot override from",R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=yd(t.provider,n.from));const b=yield j5({args:Xr(t.signer||t.provider,a,e.inputs),address:t.resolvedAddress,overrides:j5(n)||{}}),f=t.interface.encodeFunctionData(e,b.args),r={data:f,to:b.address},c=b.overrides;if(c.nonce!=null&&(r.nonce=g1.from(c.nonce).toNumber()),c.gasLimit!=null&&(r.gasLimit=g1.from(c.gasLimit)),c.gasPrice!=null&&(r.gasPrice=g1.from(c.gasPrice)),c.maxFeePerGas!=null&&(r.maxFeePerGas=g1.from(c.maxFeePerGas)),c.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=g1.from(c.maxPriorityFeePerGas)),c.from!=null&&(r.from=c.from),c.type!=null&&(r.type=c.type),c.accessList!=null&&(r.accessList=Hj(c.accessList)),r.gasLimit==null&&e.gas!=null){let l=21e3;const y=R1(f);for(let m=0;m<y.length;m++)l+=4,y[m]&&(l+=64);r.gasLimit=g1.from(e.gas).add(l)}if(c.value){const l=g1.from(c.value);!l.isZero()&&!e.payable&&w5.throwError("non-payable method cannot override value",R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),r.value=l}c.customData&&(r.customData=R5(c.customData)),c.ccipReadEnabled&&(r.ccipReadEnabled=!!c.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const u=Object.keys(n).filter(l=>n[l]!=null);return u.length&&w5.throwError(`cannot override ${u.map(l=>JSON.stringify(l)).join(",")}`,R0.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),r})}function Zj(t,e){return function(...a){return Zd(t,e,a)}}function Kj(t,e){const a=t.signer||t.provider;return function(...n){return oa(this,void 0,void 0,function*(){a||w5.throwError("estimate require a provider or signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const b=yield Zd(t,e,n);return yield a.estimateGas(b)})}}function Jj(t,e){const a=e.wait.bind(e);e.wait=n=>a(n).then(b=>(b.events=b.logs.map(f=>{let r=nt(f),c=null;try{c=t.interface.parseLog(f)}catch{}return c&&(r.args=c.args,r.decode=(u,l)=>t.interface.decodeEventLog(c.eventFragment,u,l),r.event=c.name,r.eventSignature=c.signature),r.removeListener=()=>t.provider,r.getBlock=()=>t.provider.getBlock(b.blockHash),r.getTransaction=()=>t.provider.getTransaction(b.transactionHash),r.getTransactionReceipt=()=>Promise.resolve(b),r}),b))}function aA(t,e,a){const n=t.signer||t.provider;return function(...b){return oa(this,void 0,void 0,function*(){let f;if(b.length===e.inputs.length+1&&typeof b[b.length-1]=="object"){const u=R5(b.pop());u.blockTag!=null&&(f=yield u.blockTag),delete u.blockTag,b.push(u)}t.deployTransaction!=null&&(yield t._deployed(f));const r=yield Zd(t,e,b),c=yield n.call(r,f);try{let u=t.interface.decodeFunctionResult(e,c);return a&&e.outputs.length===1&&(u=u[0]),u}catch(u){throw u.code===R0.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=b,u.transaction=r),u}})}}function qj(t,e){return function(...a){return oa(this,void 0,void 0,function*(){t.signer||w5.throwError("sending a transaction requires a signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Zd(t,e,a),b=yield t.signer.sendTransaction(n);return Jj(t,b),b})}}function ey(t,e,a){return e.constant?aA(t,e,a):qj(t,e)}function nA(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class wb{constructor(e,a){p1(this,"tag",e),p1(this,"filter",a),this._listeners=[]}addListener(e,a){this._listeners.push({listener:e,once:a})}removeListener(e){let a=!1;this._listeners=this._listeners.filter(n=>a||n.listener!==e?!0:(a=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const a=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const b=e.slice();return setTimeout(()=>{n.listener.apply(this,b)},0),!n.once}),a}prepareEvent(e){}getEmit(e){return[e]}}class Xj extends wb{constructor(){super("error",null)}}class ty extends wb{constructor(e,a,n,b){const f={address:e};let r=a.getEventTopic(n);b?(r!==b[0]&&w5.throwArgumentError("topic mismatch","topics",b),f.topics=b.slice()):f.topics=[r],super(nA(f),f),p1(this,"address",e),p1(this,"interface",a),p1(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(a,n)=>this.interface.decodeEventLog(this.fragment,a,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(a){e.args=null,e.decodeError=a}}getEmit(e){const a=ak(e.args);if(a.length)throw a[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class ay extends wb{constructor(e,a){super("*",{address:e}),p1(this,"address",e),p1(this,"interface",a)}prepareEvent(e){super.prepareEvent(e);try{const a=this.interface.parseLog(e);e.event=a.name,e.eventSignature=a.signature,e.decode=(n,b)=>this.interface.decodeEventLog(a.eventFragment,n,b),e.args=a.args}catch{}}}class $j{constructor(e,a,n){p1(this,"interface",f4(new.target,"getInterface")(a)),n==null?(p1(this,"provider",null),p1(this,"signer",null)):Ub.isSigner(n)?(p1(this,"provider",n.provider||null),p1(this,"signer",n)):Wd.isProvider(n)?(p1(this,"provider",n),p1(this,"signer",null)):w5.throwArgumentError("invalid signer or provider","signerOrProvider",n),p1(this,"callStatic",{}),p1(this,"estimateGas",{}),p1(this,"functions",{}),p1(this,"populateTransaction",{}),p1(this,"filters",{});{const r={};Object.keys(this.interface.events).forEach(c=>{const u=this.interface.events[c];p1(this.filters,c,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(u,l)})),r[u.name]||(r[u.name]=[]),r[u.name].push(c)}),Object.keys(r).forEach(c=>{const u=r[c];u.length===1?p1(this.filters,c,this.filters[u[0]]):w5.warn(`Duplicate definition of ${c} (${u.join(", ")})`)})}if(p1(this,"_runningEvents",{}),p1(this,"_wrappedEmits",{}),e==null&&w5.throwArgumentError("invalid contract address or ENS name","addressOrName",e),p1(this,"address",e),this.provider)p1(this,"resolvedAddress",yd(this.provider,e));else try{p1(this,"resolvedAddress",Promise.resolve(Q5(e)))}catch{w5.throwError("provider is required to use ENS name as contract address",R0.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(r=>{});const b={},f={};Object.keys(this.interface.functions).forEach(r=>{const c=this.interface.functions[r];if(f[r]){w5.warn(`Duplicate ABI entry for ${JSON.stringify(r)}`);return}f[r]=!0;{const u=c.name;b[`%${u}`]||(b[`%${u}`]=[]),b[`%${u}`].push(r)}this[r]==null&&p1(this,r,ey(this,c,!0)),this.functions[r]==null&&p1(this.functions,r,ey(this,c,!1)),this.callStatic[r]==null&&p1(this.callStatic,r,aA(this,c,!0)),this.populateTransaction[r]==null&&p1(this.populateTransaction,r,Zj(this,c)),this.estimateGas[r]==null&&p1(this.estimateGas,r,Kj(this,c))}),Object.keys(b).forEach(r=>{const c=b[r];if(c.length>1)return;r=r.substring(1);const u=c[0];try{this[r]==null&&p1(this,r,this[u])}catch{}this.functions[r]==null&&p1(this.functions,r,this.functions[u]),this.callStatic[r]==null&&p1(this.callStatic,r,this.callStatic[u]),this.populateTransaction[r]==null&&p1(this.populateTransaction,r,this.populateTransaction[u]),this.estimateGas[r]==null&&p1(this.estimateGas,r,this.estimateGas[u])})}static getContractAddress(e){return Cg(e)}static getInterface(e){return Bp.isInterface(e)?e:new Bp(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(a=>(a==="0x"&&w5.throwError("contract not deployed",R0.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||w5.throwError("sending a transactions require a signer",R0.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const a=R5(e||{});return["from","to"].forEach(function(n){a[n]!=null&&w5.throwError("cannot override "+n,R0.errors.UNSUPPORTED_OPERATION,{operation:n})}),a.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(a))}connect(e){typeof e=="string"&&(e=new ls(e,this.provider));const a=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&p1(a,"deployTransaction",this.deployTransaction),a}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return l7.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new Xj);if(e==="event")return this._normalizeRunningEvent(new wb("event",null));if(e==="*")return this._normalizeRunningEvent(new ay(this.address,this.interface));const a=this.interface.getEvent(e);return this._normalizeRunningEvent(new ty(this.address,this.interface,a))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const b=this.interface.getEvent(n);return this._normalizeRunningEvent(new ty(this.address,this.interface,b,e.topics))}catch{}const a={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new wb(nA(a),a))}return this._normalizeRunningEvent(new ay(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const a=this._wrappedEmits[e.tag];a&&e.filter&&(this.provider.off(e.filter,a),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,a,n){const b=nt(a);return b.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},b.getBlock=()=>this.provider.getBlock(a.blockHash),b.getTransaction=()=>this.provider.getTransaction(a.transactionHash),b.getTransactionReceipt=()=>this.provider.getTransactionReceipt(a.transactionHash),e.prepareEvent(b),b}_addEventListener(e,a,n){if(this.provider||w5.throwError("events require a provider or a signer with a provider",R0.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(a,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const b=f=>{let r=this._wrapEvent(e,f,a);if(r.decodeError==null)try{const c=e.getEmit(r);this.emit(e.filter,...c)}catch(c){r.decodeError=c.error}e.filter!=null&&this.emit("event",r),r.decodeError!=null&&this.emit("error",r.decodeError,r)};this._wrappedEmits[e.tag]=b,e.filter!=null&&this.provider.on(e.filter,b)}}queryFilter(e,a,n){const b=this._getRunningEvent(e),f=R5(b.filter);return typeof a=="string"&&z6(a,32)?(n!=null&&w5.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),f.blockHash=a):(f.fromBlock=a??0,f.toBlock=n??"latest"),this.provider.getLogs(f).then(r=>r.map(c=>this._wrapEvent(b,c,null)))}on(e,a){return this._addEventListener(this._getRunningEvent(e),a,!1),this}once(e,a){return this._addEventListener(this._getRunningEvent(e),a,!0),this}emit(e,...a){if(!this.provider)return!1;const n=this._getRunningEvent(e),b=n.run(a)>0;return this._checkRunningEvents(n),b}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((a,n)=>a+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const a=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(b=>{a.push(b)});return a}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const b=this._runningEvents[n];b.removeAllListeners(),this._checkRunningEvents(b)}return this}const a=this._getRunningEvent(e);return a.removeAllListeners(),this._checkRunningEvents(a),this}off(e,a){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(a),this._checkRunningEvents(n),this}removeListener(e,a){return this.off(e,a)}}class eS extends $j{}class bA{constructor(e){p1(this,"alphabet",e),p1(this,"base",e.length),p1(this,"_alphabetMap",{}),p1(this,"_leader",e.charAt(0));for(let a=0;a<e.length;a++)this._alphabetMap[e.charAt(a)]=a}encode(e){let a=R1(e);if(a.length===0)return"";let n=[0];for(let f=0;f<a.length;++f){let r=a[f];for(let c=0;c<n.length;++c)r+=n[c]<<8,n[c]=r%this.base,r=r/this.base|0;for(;r>0;)n.push(r%this.base),r=r/this.base|0}let b="";for(let f=0;a[f]===0&&f<a.length-1;++f)b+=this._leader;for(let f=n.length-1;f>=0;--f)b+=this.alphabet[n[f]];return b}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let a=[];if(e.length===0)return new Uint8Array(a);a.push(0);for(let n=0;n<e.length;n++){let b=this._alphabetMap[e[n]];if(b===void 0)throw new Error("Non-base"+this.base+" character");let f=b;for(let r=0;r<a.length;++r)f+=a[r]*this.base,a[r]=f&255,f>>=8;for(;f>0;)a.push(f&255),f>>=8}for(let n=0;e[n]===this._leader&&n<e.length-1;++n)a.push(0);return R1(new Uint8Array(a.reverse()))}}new bA("abcdefghijklmnopqrstuvwxyz234567");const m7=new bA("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function ny(t){return"0x"+Z2.sha256().update(R1(t)).digest("hex")}const tS="networks/5.8.0",by=new R0(tS);function aS(t){return t&&typeof t.renetwork=="function"}function y2(t){const e=function(a,n){n==null&&(n={});const b=[];if(a.InfuraProvider&&n.infura!=="-")try{b.push(new a.InfuraProvider(t,n.infura))}catch{}if(a.EtherscanProvider&&n.etherscan!=="-")try{b.push(new a.EtherscanProvider(t,n.etherscan))}catch{}if(a.AlchemyProvider&&n.alchemy!=="-")try{b.push(new a.AlchemyProvider(t,n.alchemy))}catch{}if(a.PocketProvider&&n.pocket!=="-"){const f=["goerli","ropsten","rinkeby","sepolia"];try{const r=new a.PocketProvider(t,n.pocket);r.network&&f.indexOf(r.network.name)===-1&&b.push(r)}catch{}}if(a.CloudflareProvider&&n.cloudflare!=="-")try{b.push(new a.CloudflareProvider(t))}catch{}if(a.AnkrProvider&&n.ankr!=="-")try{const f=["ropsten"],r=new a.AnkrProvider(t,n.ankr);r.network&&f.indexOf(r.network.name)===-1&&b.push(r)}catch{}if(a.QuickNodeProvider&&n.quicknode!=="-")try{b.push(new a.QuickNodeProvider(t,n.quicknode))}catch{}if(b.length===0)return null;if(a.FallbackProvider){let f=1;return n.quorum!=null?f=n.quorum:t==="homestead"&&(f=2),new a.FallbackProvider(b,f)}return b[0]};return e.renetwork=function(a){return y2(a)},e}function md(t,e){const a=function(n,b){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return a.renetwork=function(n){return md(t,n)},a}const fy={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:y2("homestead")},ry={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:y2("ropsten")},dy={chainId:63,name:"classicMordor",_defaultProvider:md("https://www.ethercluster.com/mordor","classicMordor")},hr={unspecified:{chainId:0,name:"unspecified"},homestead:fy,mainnet:fy,morden:{chainId:2,name:"morden"},ropsten:ry,testnet:ry,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:y2("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:y2("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:y2("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"sepolia",_defaultProvider:y2("sepolia")},holesky:{chainId:17e3,name:"holesky",_defaultProvider:y2("holesky")},classic:{chainId:61,name:"classic",_defaultProvider:md("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:dy,classicTestnet:dy,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:md("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:y2("matic")},maticmum:{chainId:80001,name:"maticmum",_defaultProvider:y2("maticmum")},optimism:{chainId:10,name:"optimism",_defaultProvider:y2("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},"optimism-sepolia":{chainId:11155420,name:"optimism-sepolia"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},"arbitrum-sepolia":{chainId:421614,name:"arbitrum-sepolia"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function nS(t){if(t==null)return null;if(typeof t=="number"){for(const n in hr){const b=hr[n];if(b.chainId===t)return{name:b.name,chainId:b.chainId,ensAddress:b.ensAddress||null,_defaultProvider:b._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=hr[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=hr[t.name];if(!e)return typeof t.chainId!="number"&&by.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&by.throwArgumentError("network chainId mismatch","network",t);let a=t._defaultProvider||null;return a==null&&e._defaultProvider&&(aS(e._defaultProvider)?a=e._defaultProvider.renetwork(t):a=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:a}}const bS="web/5.8.0";var fS=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};function rS(t,e){return fS(this,void 0,void 0,function*(){e==null&&(e={});const a={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(a.mode="cors",a.cache="no-cache",a.credentials="same-origin",a.redirect="follow",a.referrer="client"),e.fetchOptions!=null){const r=e.fetchOptions;r.mode&&(a.mode=r.mode),r.cache&&(a.cache=r.cache),r.credentials&&(a.credentials=r.credentials),r.redirect&&(a.redirect=r.redirect),r.referrer&&(a.referrer=r.referrer)}const n=yield fetch(t,a),b=yield n.arrayBuffer(),f={};return n.headers.forEach?n.headers.forEach((r,c)=>{f[c.toLowerCase()]=r}):n.headers.keys().forEach(r=>{f[r.toLowerCase()]=n.headers.get(r)}),{headers:f,statusCode:n.status,statusMessage:n.statusText,body:R1(new Uint8Array(b))}})}var dS=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const l2=new R0(bS);function iy(t){return new Promise(e=>{setTimeout(e,t)})}function Rt(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ds(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Pb(t)}catch{}return _1(t)}return t}function iS(t){return d4(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,a)=>String.fromCharCode(parseInt(a,16))))}function cS(t,e,a){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;l2.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const b=typeof t=="object"?t.throttleCallback:null,f=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;l2.assertArgument(f>0&&f%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",f);const r=typeof t=="object"?!!t.errorPassThrough:!1,c={};let u=null;const l={method:"GET"};let y=!1,m=120*1e3;if(typeof t=="string")u=t;else if(typeof t=="object"){if((t==null||t.url==null)&&l2.throwArgumentError("missing URL","connection.url",t),u=t.url,typeof t.timeout=="number"&&t.timeout>0&&(m=t.timeout),t.headers)for(const D in t.headers)c[D.toLowerCase()]={key:D,value:String(t.headers[D])},["if-none-match","if-modified-since"].indexOf(D.toLowerCase())>=0&&(y=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){u.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&l2.throwError("basic authentication requires a secure https url",R0.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});const D=t.user+":"+t.password;c.authorization={key:"Authorization",value:"Basic "+Ug(d4(D))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=R5(t.fetchOptions))}const x=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),A=u?u.match(x):null;if(A)try{const D={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]||"text/plain"},body:A[2]?Pg(A[3]):iS(A[3])};let N=D.body;return a&&(N=a(D.body,D)),Promise.resolve(N)}catch(D){l2.throwError("processing response error",R0.errors.SERVER_ERROR,{body:Rt(A[1],A[2]),error:D,requestBody:null,requestMethod:"GET",url:u})}e&&(l.method="POST",l.body=e,c["content-type"]==null&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),c["content-length"]==null&&(c["content-length"]={key:"Content-Length",value:String(e.length)}));const M={};Object.keys(c).forEach(D=>{const N=c[D];M[N.key]=N.value}),l.headers=M;const v=(function(){let D=null;return{promise:new Promise(function(j,C){m&&(D=setTimeout(()=>{D!=null&&(D=null,C(l2.makeError("timeout",R0.errors.TIMEOUT,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,timeout:m,url:u})))},m))}),cancel:function(){D!=null&&(clearTimeout(D),D=null)}}})(),w=(function(){return dS(this,void 0,void 0,function*(){for(let D=0;D<n;D++){let N=null;try{if(N=yield rS(u,l),D<n){if(N.statusCode===301||N.statusCode===302){const j=N.headers.location||"";if(l.method==="GET"&&j.match(/^https:/)){u=N.headers.location;continue}}else if(N.statusCode===429){let j=!0;if(b&&(j=yield b(D,u)),j){let C=0;const G=N.headers["retry-after"];typeof G=="string"&&G.match(/^[1-9][0-9]*$/)?C=parseInt(G)*1e3:C=f*parseInt(String(Math.random()*Math.pow(2,D))),yield iy(C);continue}}}}catch(j){N=j.response,N==null&&(v.cancel(),l2.throwError("missing response",R0.errors.SERVER_ERROR,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,serverError:j,url:u}))}let T=N.body;if(y&&N.statusCode===304?T=null:!r&&(N.statusCode<200||N.statusCode>=300)&&(v.cancel(),l2.throwError("bad response",R0.errors.SERVER_ERROR,{status:N.statusCode,headers:N.headers,body:Rt(T,N.headers?N.headers["content-type"]:null),requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})),a)try{const j=yield a(T,N);return v.cancel(),j}catch(j){if(j.throttleRetry&&D<n){let C=!0;if(b&&(C=yield b(D,u)),C){const G=f*parseInt(String(Math.random()*Math.pow(2,D)));yield iy(G);continue}}v.cancel(),l2.throwError("processing response error",R0.errors.SERVER_ERROR,{body:Rt(T,N.headers?N.headers["content-type"]:null),error:j,requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})}return v.cancel(),T}return l2.throwError("failed response",R0.errors.SERVER_ERROR,{requestBody:Rt(l.body,M["content-type"]),requestMethod:l.method,url:u})})})();return Promise.race([v.promise,w])}function hs(t,e,a){let n=(f,r)=>{let c=null;if(f!=null)try{c=JSON.parse(Pb(f))}catch(u){l2.throwError("invalid JSON",R0.errors.SERVER_ERROR,{body:f,error:u})}return a&&(c=a(c,r)),c},b=null;if(e!=null){b=d4(e);const f=typeof t=="string"?{url:t}:R5(t);f.headers?Object.keys(f.headers).filter(c=>c.toLowerCase()==="content-type").length!==0||(f.headers=R5(f.headers),f.headers["content-type"]="application/json"):f.headers={"content-type":"application/json"},t=f}return cS(t,b,n)}function bb(t,e){return e||(e={}),e=R5(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(a,n){let b=null,f=!1;const r=()=>f?!1:(f=!0,b&&clearTimeout(b),!0);e.timeout&&(b=setTimeout(()=>{r()&&n(new Error("timeout"))},e.timeout));const c=e.retryLimit;let u=0;function l(){return t().then(function(y){if(y!==void 0)r()&&a(y);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!f){if(u++,u>c){r()&&n(new Error("retry limit reached"));return}let m=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));m<e.floor&&(m=e.floor),m>e.ceiling&&(m=e.ceiling),setTimeout(l,m)}return null},function(y){r()&&n(y)})}l()})}var xo,cy;function oS(){if(cy)return xo;cy=1;for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",e={},a=0;a<t.length;a++){var n=t.charAt(a);if(e[n]!==void 0)throw new TypeError(n+" is ambiguous");e[n]=a}function b(v){var w=v>>25;return(v&33554431)<<5^-(w>>0&1)&996825010^-(w>>1&1)&642813549^-(w>>2&1)&513874426^-(w>>3&1)&1027748829^-(w>>4&1)&705979059}function f(v){for(var w=1,D=0;D<v.length;++D){var N=v.charCodeAt(D);if(N<33||N>126)return"Invalid prefix ("+v+")";w=b(w)^N>>5}for(w=b(w),D=0;D<v.length;++D){var T=v.charCodeAt(D);w=b(w)^T&31}return w}function r(v,w,D){if(D=D||90,v.length+7+w.length>D)throw new TypeError("Exceeds length limit");v=v.toLowerCase();var N=f(v);if(typeof N=="string")throw new Error(N);for(var T=v+"1",j=0;j<w.length;++j){var C=w[j];if(C>>5!==0)throw new Error("Non 5-bit word");N=b(N)^C,T+=t.charAt(C)}for(j=0;j<6;++j)N=b(N);for(N^=1,j=0;j<6;++j){var G=N>>(5-j)*5&31;T+=t.charAt(G)}return T}function c(v,w){if(w=w||90,v.length<8)return v+" too short";if(v.length>w)return"Exceeds length limit";var D=v.toLowerCase(),N=v.toUpperCase();if(v!==D&&v!==N)return"Mixed-case string "+v;v=D;var T=v.lastIndexOf("1");if(T===-1)return"No separator character for "+v;if(T===0)return"Missing prefix for "+v;var j=v.slice(0,T),C=v.slice(T+1);if(C.length<6)return"Data too short";var G=f(j);if(typeof G=="string")return G;for(var W=[],Z=0;Z<C.length;++Z){var d0=C.charAt(Z),n0=e[d0];if(n0===void 0)return"Unknown character "+d0;G=b(G)^n0,!(Z+6>=C.length)&&W.push(n0)}return G!==1?"Invalid checksum for "+v:{prefix:j,words:W}}function u(){var v=c.apply(null,arguments);if(typeof v=="object")return v}function l(v){var w=c.apply(null,arguments);if(typeof w=="object")return w;throw new Error(w)}function y(v,w,D,N){for(var T=0,j=0,C=(1<<D)-1,G=[],W=0;W<v.length;++W)for(T=T<<w|v[W],j+=w;j>=D;)j-=D,G.push(T>>j&C);if(N)j>0&&G.push(T<<D-j&C);else{if(j>=w)return"Excess padding";if(T<<D-j&C)return"Non-zero padding"}return G}function m(v){var w=y(v,8,5,!0);if(Array.isArray(w))return w}function x(v){var w=y(v,8,5,!0);if(Array.isArray(w))return w;throw new Error(w)}function A(v){var w=y(v,5,8,!1);if(Array.isArray(w))return w}function M(v){var w=y(v,5,8,!1);if(Array.isArray(w))return w;throw new Error(w)}return xo={decodeUnsafe:u,decode:l,encode:r,toWordsUnsafe:m,toWords:x,fromWordsUnsafe:A,fromWords:M},xo}var sS=oS();const oy=Y8(sS),Kd="providers/5.8.0",uS="transactions/5.8.0",rt=new R0(uS);var sy;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(sy||(sy={}));function gs(t){return t==="0x"?null:Q5(t)}function me(t){return t==="0x"?Lg:g1.from(t)}function lS(t){const e=eA(t);return Q5(ye(U5(ye(e,1)),12))}function fA(t,e){return lS(Gj(R1(t),e))}function w8(t,e){const a=Q9(g1.from(t).toHexString());return a.length>32&&rt.throwArgumentError("invalid length for "+e,"transaction:"+e,t),a}function Io(t,e){return{address:Q5(t),storageKeys:(e||[]).map((a,n)=>($t(a)!==32&&rt.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,a),a.toLowerCase()))}}function Fb(t){if(Array.isArray(t))return t.map((a,n)=>Array.isArray(a)?(a.length>2&&rt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,a),Io(a[0],a[1])):Io(a.address,a.storageKeys));const e=Object.keys(t).map(a=>{const n=t[a].reduce((b,f)=>(b[f]=!0,b),{});return Io(a,Object.keys(n).sort())});return e.sort((a,n)=>a.address.localeCompare(n.address)),e}function rA(t){return Fb(t).map(e=>[e.address,e.storageKeys])}function pS(t,e){if(t.gasPrice!=null){const n=g1.from(t.gasPrice),b=g1.from(t.maxFeePerGas||0);n.eq(b)||rt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:b})}const a=[w8(t.chainId||0,"chainId"),w8(t.nonce||0,"nonce"),w8(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w8(t.maxFeePerGas||0,"maxFeePerGas"),w8(t.gasLimit||0,"gasLimit"),t.to!=null?Q5(t.to):"0x",w8(t.value||0,"value"),t.data||"0x",rA(t.accessList||[])];if(e){const n=Fd(e);a.push(w8(n.recoveryParam,"recoveryParam")),a.push(Q9(n.r)),a.push(Q9(n.s))}return Xe(["0x02",Yd(a)])}function yS(t,e){const a=[w8(t.chainId||0,"chainId"),w8(t.nonce||0,"nonce"),w8(t.gasPrice||0,"gasPrice"),w8(t.gasLimit||0,"gasLimit"),t.to!=null?Q5(t.to):"0x",w8(t.value||0,"value"),t.data||"0x",rA(t.accessList||[])];if(e){const n=Fd(e);a.push(w8(n.recoveryParam,"recoveryParam")),a.push(Q9(n.r)),a.push(Q9(n.s))}return Xe(["0x01",Yd(a)])}function dA(t,e,a){try{const n=me(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{rt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=e5(e[1],32),t.s=e5(e[2],32);try{const n=U5(a(t));t.from=fA(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function mS(t){const e=ss(t.slice(1));e.length!==9&&e.length!==12&&rt.throwArgumentError("invalid component count for transaction type: 2","payload",_1(t));const a=me(e[2]),n=me(e[3]),b={type:2,chainId:me(e[0]).toNumber(),nonce:me(e[1]).toNumber(),maxPriorityFeePerGas:a,maxFeePerGas:n,gasPrice:null,gasLimit:me(e[4]),to:gs(e[5]),value:me(e[6]),data:e[7],accessList:Fb(e[8])};return e.length===9||(b.hash=U5(t),dA(b,e.slice(9),pS)),b}function hS(t){const e=ss(t.slice(1));e.length!==8&&e.length!==11&&rt.throwArgumentError("invalid component count for transaction type: 1","payload",_1(t));const a={type:1,chainId:me(e[0]).toNumber(),nonce:me(e[1]).toNumber(),gasPrice:me(e[2]),gasLimit:me(e[3]),to:gs(e[4]),value:me(e[5]),data:e[6],accessList:Fb(e[7])};return e.length===8||(a.hash=U5(t),dA(a,e.slice(8),yS)),a}function gS(t){const e=ss(t);e.length!==9&&e.length!==6&&rt.throwArgumentError("invalid raw transaction","rawTransaction",t);const a={nonce:me(e[0]).toNumber(),gasPrice:me(e[1]),gasLimit:me(e[2]),to:gs(e[3]),value:me(e[4]),data:e[5],chainId:0};if(e.length===6)return a;try{a.v=g1.from(e[6]).toNumber()}catch{return a}if(a.r=e5(e[7],32),a.s=e5(e[8],32),g1.from(a.r).isZero()&&g1.from(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);let n=a.v-27;const b=e.slice(0,6);a.chainId!==0&&(b.push(_1(a.chainId)),b.push("0x"),b.push("0x"),n-=a.chainId*2+8);const f=U5(Yd(b));try{a.from=fA(f,{r:_1(a.r),s:_1(a.s),recoveryParam:n})}catch{}a.hash=U5(t)}return a.type=null,a}function AS(t){const e=R1(t);if(e[0]>127)return gS(e);switch(e[0]){case 1:return hS(e);case 2:return mS(e)}return rt.throwError(`unsupported transaction type: ${e[0]}`,R0.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const $n=new R0(Kd);class C1{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},a=this.address.bind(this),n=this.bigNumber.bind(this),b=this.blockTag.bind(this),f=this.data.bind(this),r=this.hash.bind(this),c=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this),y=m=>this.data(m,!0);return e.transaction={hash:r,type:l,accessList:C1.allowNull(this.accessList.bind(this),null),blockHash:C1.allowNull(r,null),blockNumber:C1.allowNull(u,null),transactionIndex:C1.allowNull(u,null),confirmations:C1.allowNull(u,null),from:a,gasPrice:C1.allowNull(n),maxPriorityFeePerGas:C1.allowNull(n),maxFeePerGas:C1.allowNull(n),gasLimit:n,to:C1.allowNull(a,null),value:n,nonce:u,data:f,r:C1.allowNull(this.uint256),s:C1.allowNull(this.uint256),v:C1.allowNull(u),creates:C1.allowNull(a,null),raw:C1.allowNull(f)},e.transactionRequest={from:C1.allowNull(a),nonce:C1.allowNull(u),gasLimit:C1.allowNull(n),gasPrice:C1.allowNull(n),maxPriorityFeePerGas:C1.allowNull(n),maxFeePerGas:C1.allowNull(n),to:C1.allowNull(a),value:C1.allowNull(n),data:C1.allowNull(y),type:C1.allowNull(u),accessList:C1.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:r,address:a,topics:C1.arrayOf(r),data:f,logIndex:u,blockHash:r},e.receipt={to:C1.allowNull(this.address,null),from:C1.allowNull(this.address,null),contractAddress:C1.allowNull(a,null),transactionIndex:u,root:C1.allowNull(c),gasUsed:n,logsBloom:C1.allowNull(f),blockHash:r,transactionHash:r,logs:C1.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:C1.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:C1.allowNull(n),status:C1.allowNull(u),type:l},e.block={hash:C1.allowNull(r),parentHash:r,number:u,timestamp:u,nonce:C1.allowNull(c),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:C1.allowNull(a),extraData:f,transactions:C1.allowNull(C1.arrayOf(r)),baseFeePerGas:C1.allowNull(n)},e.blockWithTransactions=R5(e.block),e.blockWithTransactions.transactions=C1.allowNull(C1.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:C1.allowNull(b,void 0),toBlock:C1.allowNull(b,void 0),blockHash:C1.allowNull(r,void 0),address:C1.allowNull(a,void 0),topics:C1.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:C1.allowNull(u),blockHash:C1.allowNull(r),transactionIndex:u,removed:C1.allowNull(this.boolean.bind(this)),address:a,data:C1.allowFalsish(f,"0x"),topics:C1.arrayOf(r),transactionHash:r,logIndex:u},e}accessList(e){return Fb(e||[])}number(e){return e==="0x"?0:g1.from(e).toNumber()}type(e){return e==="0x"||e==null?0:g1.from(e).toNumber()}bigNumber(e){return g1.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,a){return typeof e=="string"&&(!a&&e.substring(0,2)!=="0x"&&(e="0x"+e),z6(e))?e.toLowerCase():$n.throwArgumentError("invalid hash","value",e)}data(e,a){const n=this.hex(e,a);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Q5(e)}callAddress(e){if(!z6(e,32))return null;const a=Q5(ye(e,12));return a===gk?null:a}contractAddress(e){return Cg(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||z6(e))return is(e);throw new Error("invalid blockTag")}hash(e,a){const n=this.hex(e,a);return $t(n)!==32?$n.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const a=g1.from(e);try{return a.toNumber()}catch{}return null}uint256(e){if(!z6(e))throw new Error("invalid uint256");return e5(e,32)}_block(e,a){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,b=C1.check(a,e);return b._difficulty=n==null?null:g1.from(n),b}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return C1.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&g1.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const a=C1.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;z6(n)&&(n=g1.from(n).toNumber()),a.chainId=n}else{let n=e.networkId;n==null&&a.v==null&&(n=e.chainId),z6(n)&&(n=g1.from(n).toNumber()),typeof n!="number"&&a.v!=null&&(n=(a.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),a.chainId=n}return a.blockHash&&a.blockHash.replace(/0/g,"")==="x"&&(a.blockHash=null),a}transaction(e){return AS(e)}receiptLog(e){return C1.check(this.formats.receiptLog,e)}receipt(e){const a=C1.check(this.formats.receipt,e);if(a.root!=null)if(a.root.length<=4){const n=g1.from(a.root).toNumber();n===0||n===1?(a.status!=null&&a.status!==n&&$n.throwArgumentError("alt-root-status/status mismatch","value",{root:a.root,status:a.status}),a.status=n,delete a.root):$n.throwArgumentError("invalid alt-root-status","value.root",a.root)}else a.root.length!==66&&$n.throwArgumentError("invalid root hash","value.root",a.root);return a.status!=null&&(a.byzantium=!0),a}topics(e){return Array.isArray(e)?e.map(a=>this.topics(a)):e!=null?this.hash(e,!0):null}filter(e){return C1.check(this.formats.filter,e)}filterLog(e){return C1.check(this.formats.filterLog,e)}static check(e,a){const n={};for(const b in e)try{const f=e[b](a[b]);f!==void 0&&(n[b]=f)}catch(f){throw f.checkKey=b,f.checkValue=a[b],f}return n}static allowNull(e,a){return(function(n){return n==null?a:e(n)})}static allowFalsish(e,a){return(function(n){return n?e(n):a})}static arrayOf(e){return(function(a){if(!Array.isArray(a))throw new Error("not an array");const n=[];return a.forEach(function(b){n.push(e(b))}),n})}}var n6=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const m6=new R0(Kd),MS=10;function uy(t){return t==null?"null":($t(t)!==32&&m6.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function ly(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const a={};e.forEach(b=>{a[uy(b)]=!0});const n=Object.keys(a);return n.sort(),n.join("|")}else return uy(e)}).join("&")}function wS(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const a=e.split("|").map(n=>n==="null"?null:n);return a.length===1?a[0]:a})}function A9(t){if(typeof t=="string"){if(t=t.toLowerCase(),$t(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+ly(t);if(Aj.isForkEvent(t))throw m6.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+ly(t.topics||[])}throw new Error("invalid event - "+t)}function eb(){return new Date().getTime()}function py(t){return new Promise(e=>{setTimeout(e,t)})}const xS=["block","network","pending","poll"];let IS=class{constructor(e,a,n){p1(this,"tag",e),p1(this,"listener",a),p1(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const a=e[1],n=wS(e[2]),b={};return n.length>0&&(b.topics=n),a&&a!=="*"&&(b.address=a),b}pollable(){return this.tag.indexOf(":")>=0||xS.indexOf(this.tag)>=0}};const vS={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function vo(t){return e5(g1.from(t).toHexString(),32)}function yy(t){return m7.encode(I8([t,ye(ny(ny(t)),0,4)]))}const iA=new RegExp("^(ipfs)://(.*)$","i"),my=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),iA,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $r(t,e){try{return Pb(xb(t,e))}catch{}return null}function xb(t,e){if(t==="0x")return null;const a=g1.from(ye(t,e,e+32)).toNumber(),n=g1.from(ye(t,a,a+32)).toNumber();return ye(t,a+32,a+32+n)}function To(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):m6.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function hy(t){const e=R1(t);if(e.length>32)throw new Error("internal; should not happen");const a=new Uint8Array(32);return a.set(e,32-e.length),a}function TS(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function cA(t){const e=[];let a=0;for(let n=0;n<t.length;n++)e.push(null),a+=32;for(let n=0;n<t.length;n++){const b=R1(t[n]);e[n]=hy(a),e.push(hy(b.length)),e.push(TS(b)),a+=32+Math.ceil(b.length/32)*32}return Xe(e)}class gy{constructor(e,a,n,b){p1(this,"provider",e),p1(this,"name",n),p1(this,"address",e.formatter.address(a)),p1(this,"_resolvedAddress",b)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>g1.from(e).eq(1)).catch(e=>{if(e.code===R0.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,a){return n6(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Xe([e,Kr(this.name),a||"0x"])};let b=!1;(yield this.supportsWildcard())&&(b=!0,n.data=Xe(["0x9061b923",cA([bj(this.name),n.data])]));try{let f=yield this.provider.call(n);return R1(f).length%32===4&&m6.throwError("resolver threw error",R0.errors.CALL_EXCEPTION,{transaction:n,data:f}),b&&(f=xb(f,0)),f}catch(f){if(f.code===R0.errors.CALL_EXCEPTION)return null;throw f}})}_fetchBytes(e,a){return n6(this,void 0,void 0,function*(){const n=yield this._fetch(e,a);return n!=null?xb(n,0):null})}_getAddress(e,a){const n=vS[String(e)];if(n==null&&m6.throwError(`unsupported coin type: ${e}`,R0.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(a);const b=R1(a);if(n.p2pkh!=null){const f=a.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(f){const r=parseInt(f[1],16);if(f[2].length===r*2&&r>=1&&r<=75)return yy(I8([[n.p2pkh],"0x"+f[2]]))}}if(n.p2sh!=null){const f=a.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(f){const r=parseInt(f[1],16);if(f[2].length===r*2&&r>=1&&r<=75)return yy(I8([[n.p2sh],"0x"+f[2]]))}}if(n.prefix!=null){const f=b[1];let r=b[0];if(r===0?f!==20&&f!==32&&(r=-1):r=-1,r>=0&&b.length===2+f&&f>=1&&f<=75){const c=oy.toWords(b.slice(2));return c.unshift(r),oy.encode(n.prefix,c)}}return null}getAddress(e){return n6(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const b=yield this._fetch("0x3b3b57de");return b==="0x"||b===xk?null:this.provider.formatter.callAddress(b)}catch(b){if(b.code===R0.errors.CALL_EXCEPTION)return null;throw b}const a=yield this._fetchBytes("0xf1cb7e06",vo(e));if(a==null||a==="0x")return null;const n=this._getAddress(e,a);return n==null&&m6.throwError("invalid or unsupported coin data",R0.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:a}),n})}getAvatar(){return n6(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const a=yield this.getText("avatar");if(a==null)return null;for(let n=0;n<my.length;n++){const b=a.match(my[n]);if(b==null)continue;const f=b[1].toLowerCase();switch(f){case"https":return e.push({type:"url",content:a}),{linkage:e,url:a};case"data":return e.push({type:"data",content:a}),{linkage:e,url:a};case"ipfs":return e.push({type:"ipfs",content:a}),{linkage:e,url:To(a)};case"erc721":case"erc1155":{const r=f==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:f,content:a});const c=this._resolvedAddress||(yield this.getAddress()),u=(b[2]||"").split("/");if(u.length!==2)return null;const l=yield this.provider.formatter.address(u[0]),y=e5(g1.from(u[1]).toHexString(),32);if(f==="erc721"){const v=this.provider.formatter.callAddress(yield this.provider.call({to:l,data:Xe(["0x6352211e",y])}));if(c!==v)return null;e.push({type:"owner",content:v})}else if(f==="erc1155"){const v=g1.from(yield this.provider.call({to:l,data:Xe(["0x00fdd58e",e5(c,32),y])}));if(v.isZero())return null;e.push({type:"balance",content:v.toString()})}const m={to:this.provider.formatter.address(u[0]),data:Xe([r,y])};let x=$r(yield this.provider.call(m),0);if(x==null)return null;e.push({type:"metadata-url-base",content:x}),f==="erc1155"&&(x=x.replace("{id}",y.substring(2)),e.push({type:"metadata-url-expanded",content:x})),x.match(/^ipfs:/i)&&(x=To(x)),e.push({type:"metadata-url",content:x});const A=yield hs(x);if(!A)return null;e.push({type:"metadata",content:JSON.stringify(A)});let M=A.image;if(typeof M!="string")return null;if(!M.match(/^(https:\/\/|data:)/i)){if(M.match(iA)==null)return null;e.push({type:"url-ipfs",content:M}),M=To(M)}return e.push({type:"url",content:M}),{linkage:e,url:M}}}}}catch{}return null})}getContentHash(){return n6(this,void 0,void 0,function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;const a=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){const r=parseInt(a[3],16);if(a[4].length===r*2)return"ipfs://"+m7.encode("0x"+a[1])}const n=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const r=parseInt(n[3],16);if(n[4].length===r*2)return"ipns://"+m7.encode("0x"+n[1])}const b=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(b&&b[1].length===64)return"bzz://"+b[1];const f=e.match(/^0x90b2c605([0-9a-f]*)$/);if(f&&f[1].length===68){const r={"=":"","+":"-","/":"_"};return"sia://"+Ug("0x"+f[1]).replace(/[=+\/]/g,u=>r[u])}return m6.throwError("invalid or unsupported content hash data",R0.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return n6(this,void 0,void 0,function*(){let a=d4(e);a=I8([vo(64),vo(a.length),a]),a.length%32!==0&&(a=I8([a,e5("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",_1(a));return n==null||n==="0x"?null:Pb(n)})}}let No=null,NS=1;class ES extends Wd{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),p1(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(a=>{}),this._ready().catch(a=>{});else{const a=f4(new.target,"getNetwork")(e);a?(p1(this,"_network",a),this.emit("network",a,null)):m6.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return n6(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||m6.throwError("no network detected",R0.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:p1(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return bb(()=>this._ready().then(e=>e,e=>{if(!(e.code===R0.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return No==null&&(No=new C1),No}static getNetwork(e){return nS(e??"homestead")}ccipReadFetch(e,a,n){return n6(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const b=e.to.toLowerCase(),f=a.toLowerCase(),r=[];for(let c=0;c<n.length;c++){const u=n[c],l=u.replace("{sender}",b).replace("{data}",f),y=u.indexOf("{data}")>=0?null:JSON.stringify({data:f,sender:b}),m=yield hs({url:l,errorPassThrough:!0},y,(A,M)=>(A.status=M.statusCode,A));if(m.data)return m.data;const x=m.message||"unknown error";if(m.status>=400&&m.status<500)return m6.throwError(`response not found during CCIP fetch: ${x}`,R0.errors.SERVER_ERROR,{url:u,errorMessage:x});r.push(x)}return m6.throwError(`error encountered during CCIP fetch: ${r.map(c=>JSON.stringify(c)).join(", ")}`,R0.errors.SERVER_ERROR,{urls:n,errorMessages:r})})}_getInternalBlockNumber(e){return n6(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const b=this._internalBlockNumber;try{const f=yield b;if(eb()-f.respTime<=e)return f.blockNumber;break}catch{if(this._internalBlockNumber===b)break}}const a=eb(),n=j5({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(b=>null,b=>b)}).then(({blockNumber:b,networkError:f})=>{if(f)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),f;const r=eb();return b=g1.from(b).toNumber(),b<this._maxInternalBlockNumber&&(b=this._maxInternalBlockNumber),this._maxInternalBlockNumber=b,this._setFastBlockNumber(b),{blockNumber:b,reqTime:a,respTime:r}});return this._internalBlockNumber=n,n.catch(b=>{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return n6(this,void 0,void 0,function*(){const e=NS++,a=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(b){this.emit("error",b);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)m6.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",m6.makeError("network block skew detected",R0.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let b=this._emitted.block+1;b<=n;b++)this.emit("block",b);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(b=>{if(b==="block")return;const f=this._emitted[b];f!=="pending"&&n-f>12&&delete this._emitted[b]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(b=>{switch(b.type){case"tx":{const f=b.hash;let r=this.getTransactionReceipt(f).then(c=>(!c||c.blockNumber==null||(this._emitted["t:"+f]=c.blockNumber,this.emit(f,c)),null)).catch(c=>{this.emit("error",c)});a.push(r);break}case"filter":{if(!b._inflight){b._inflight=!0,b._lastBlockNumber===-2&&(b._lastBlockNumber=n-1);const f=b.filter;f.fromBlock=b._lastBlockNumber+1,f.toBlock=n;const r=f.toBlock-this._maxFilterBlockRange;r>f.fromBlock&&(f.fromBlock=r),f.fromBlock<0&&(f.fromBlock=0);const c=this.getLogs(f).then(u=>{b._inflight=!1,u.length!==0&&u.forEach(l=>{l.blockNumber>b._lastBlockNumber&&(b._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(f,l)})}).catch(u=>{this.emit("error",u),b._inflight=!1});a.push(c)}break}}}),this._lastBlockNumber=n,Promise.all(a).then(()=>{this.emit("didPoll",e)}).catch(b=>{this.emit("error",b)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return n6(this,void 0,void 0,function*(){return m6.throwError("provider does not support network detection",R0.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return n6(this,void 0,void 0,function*(){const e=yield this._ready(),a=yield this.detectNetwork();if(e.chainId!==a.chainId){if(this.anyNetwork)return this._network=a,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",a,e),yield py(0),this._network;const n=m6.makeError("underlying network changed",R0.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:a});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=eb();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(a=>((this._fastBlockNumber==null||a>this._fastBlockNumber)&&(this._fastBlockNumber=a),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&e<this._fastBlockNumber||(this._fastQueryDate=eb(),(this._fastBlockNumber==null||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,a,n){return n6(this,void 0,void 0,function*(){return this._waitForTransaction(e,a??1,n||0,null)})}_waitForTransaction(e,a,n,b){return n6(this,void 0,void 0,function*(){const f=yield this.getTransactionReceipt(e);return(f?f.confirmations:0)>=a?f:new Promise((r,c)=>{const u=[];let l=!1;const y=function(){return l?!0:(l=!0,u.forEach(x=>{x()}),!1)},m=x=>{x.confirmations<a||y()||r(x)};if(this.on(e,m),u.push(()=>{this.removeListener(e,m)}),b){let x=b.startBlock,A=null;const M=v=>n6(this,void 0,void 0,function*(){l||(yield py(1e3),this.getTransactionCount(b.from).then(w=>n6(this,void 0,void 0,function*(){if(!l){if(w<=b.nonce)x=v;else{{const D=yield this.getTransaction(e);if(D&&D.blockNumber!=null)return}for(A==null&&(A=x-3,A<b.startBlock&&(A=b.startBlock));A<=v;){if(l)return;const D=yield this.getBlockWithTransactions(A);for(let N=0;N<D.transactions.length;N++){const T=D.transactions[N];if(T.hash===e)return;if(T.from===b.from&&T.nonce===b.nonce){if(l)return;const j=yield this.waitForTransaction(T.hash,a);if(y())return;let C="replaced";T.data===b.data&&T.to===b.to&&T.value.eq(b.value)?C="repriced":T.data==="0x"&&T.from===T.to&&T.value.isZero()&&(C="cancelled"),c(m6.makeError("transaction was replaced",R0.errors.TRANSACTION_REPLACED,{cancelled:C==="replaced"||C==="cancelled",reason:C,replacement:this._wrapTransaction(T),hash:e,receipt:j}));return}}A++}}l||this.once("block",M)}}),w=>{l||this.once("block",M)}))});if(l)return;this.once("block",M),u.push(()=>{this.removeListener("block",M)})}if(typeof n=="number"&&n>0){const x=setTimeout(()=>{y()||c(m6.makeError("timeout exceeded",R0.errors.TIMEOUT,{timeout:n}))},n);x.unref&&x.unref(),u.push(()=>{clearTimeout(x)})}})})}getBlockNumber(){return n6(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return g1.from(e)}catch(a){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:a})}})}getBalance(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getBalance",n);try{return g1.from(b)}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getBalance",params:n,result:b,error:f})}})}getTransactionCount(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getTransactionCount",n);try{return g1.from(b).toNumber()}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:b,error:f})}})}getCode(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(a)}),b=yield this.perform("getCode",n);try{return _1(b)}catch(f){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getCode",params:n,result:b,error:f})}})}getStorageAt(e,a,n){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const b=yield j5({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(a).then(r=>is(r))}),f=yield this.perform("getStorageAt",b);try{return _1(f)}catch(r){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"getStorageAt",params:b,result:f,error:r})}})}_wrapTransaction(e,a,n){if(a!=null&&$t(a)!==32)throw new Error("invalid response - sendTransaction");const b=e;return a!=null&&e.hash!==a&&m6.throwError("Transaction hash mismatch from Provider.sendTransaction.",R0.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:a}),b.wait=(f,r)=>n6(this,void 0,void 0,function*(){f==null&&(f=1),r==null&&(r=0);let c;f!==0&&n!=null&&(c={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const u=yield this._waitForTransaction(e.hash,f,r,c);return u==null&&f===0?null:(this._emitted["t:"+e.hash]=u.blockNumber,u.status===0&&m6.throwError("transaction failed",R0.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),u)}),b}sendTransaction(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield Promise.resolve(e).then(f=>_1(f)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const b=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const f=yield this.perform("sendTransaction",{signedTransaction:a});return this._wrapTransaction(n,f,b)}catch(f){throw f.transaction=n,f.transactionHash=n.hash,f}})}_getTransactionRequest(e){return n6(this,void 0,void 0,function*(){const a=yield e,n={};return["from","to"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?this._getAddress(f):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?g1.from(f):null))}),["type"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f??null))}),a.accessList&&(n.accessList=this.formatter.accessList(a.accessList)),["data"].forEach(b=>{a[b]!=null&&(n[b]=Promise.resolve(a[b]).then(f=>f?_1(f):null))}),this.formatter.transactionRequest(yield j5(n))})}_getFilter(e){return n6(this,void 0,void 0,function*(){e=yield e;const a={};return e.address!=null&&(a.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(a[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(a[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield j5(a))})}_call(e,a,n){return n6(this,void 0,void 0,function*(){n>=MS&&m6.throwError("CCIP read exceeded maximum redirections",R0.errors.SERVER_ERROR,{redirects:n,transaction:e});const b=e.to,f=yield this.perform("call",{transaction:e,blockTag:a});if(n>=0&&a==="latest"&&b!=null&&f.substring(0,10)==="0x556f1830"&&$t(f)%32===4)try{const r=ye(f,4),c=ye(r,0,32);g1.from(c).eq(b)||m6.throwError("CCIP Read sender did not match",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const u=[],l=g1.from(ye(r,32,64)).toNumber(),y=g1.from(ye(r,l,l+32)).toNumber(),m=ye(r,l+32);for(let D=0;D<y;D++){const N=$r(m,D*32);N==null&&m6.throwError("CCIP Read contained corrupt URL string",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f}),u.push(N)}const x=xb(r,64);g1.from(ye(r,100,128)).isZero()||m6.throwError("CCIP Read callback selector included junk",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const A=ye(r,96,100),M=xb(r,128),v=yield this.ccipReadFetch(e,x,u);v==null&&m6.throwError("CCIP Read disabled or provided no URLs",R0.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:f});const w={to:b,data:Xe([A,cA([v,M])])};return this._call(w,a,n+1)}catch(r){if(r.code===R0.errors.SERVER_ERROR)throw r}try{return _1(f)}catch(r){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:a},result:f,error:r})}})}call(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield j5({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(a),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1)})}estimateGas(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield j5({transaction:this._getTransactionRequest(e)}),n=yield this.perform("estimateGas",a);try{return g1.from(n)}catch(b){return m6.throwError("bad result from backend",R0.errors.SERVER_ERROR,{method:"estimateGas",params:a,result:n,error:b})}})}_getAddress(e){return n6(this,void 0,void 0,function*(){e=yield e,typeof e!="string"&&m6.throwArgumentError("invalid address or ENS name","name",e);const a=yield this.resolveName(e);return a==null&&m6.throwError("ENS name not configured",R0.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),a})}_getBlock(e,a){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let n=-128;const b={includeTransactions:!!a};if(z6(e,32))b.blockHash=e;else try{b.blockTag=yield this._getBlockTag(e),z6(b.blockTag)&&(n=parseInt(b.blockTag.substring(2),16))}catch{m6.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return bb(()=>n6(this,void 0,void 0,function*(){const f=yield this.perform("getBlock",b);if(f==null)return b.blockHash!=null&&this._emitted["b:"+b.blockHash]==null||b.blockTag!=null&&n>this._emitted.block?null:void 0;if(a){let r=null;for(let u=0;u<f.transactions.length;u++){const l=f.transactions[u];if(l.blockNumber==null)l.confirmations=0;else if(l.confirmations==null){r==null&&(r=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let y=r-l.blockNumber+1;y<=0&&(y=1),l.confirmations=y}}const c=this.formatter.blockWithTransactions(f);return c.transactions=c.transactions.map(u=>this._wrapTransaction(u)),c}return this.formatter.block(f)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const a={transactionHash:this.formatter.hash(e,!0)};return bb(()=>n6(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",a);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const b=this.formatter.transactionResponse(n);if(b.blockNumber==null)b.confirmations=0;else if(b.confirmations==null){let r=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-b.blockNumber+1;r<=0&&(r=1),b.confirmations=r}return this._wrapTransaction(b)}),{oncePoll:this})})}getTransactionReceipt(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const a={transactionHash:this.formatter.hash(e,!0)};return bb(()=>n6(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",a);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const b=this.formatter.receipt(n);if(b.blockNumber==null)b.confirmations=0;else if(b.confirmations==null){let r=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-b.blockNumber+1;r<=0&&(r=1),b.confirmations=r}return b}),{oncePoll:this})})}getLogs(e){return n6(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield j5({filter:this._getFilter(e)}),n=yield this.perform("getLogs",a);return n.forEach(b=>{b.removed==null&&(b.removed=!1)}),C1.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return n6(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return n6(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&m6.throwArgumentError("invalid BlockTag","blockTag",e);let a=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return a+=e,a<0&&(a=0),this.formatter.blockTag(a)}return this.formatter.blockTag(e)})}getResolver(e){return n6(this,void 0,void 0,function*(){let a=e;for(;;){if(a===""||a==="."||e!=="eth"&&a==="eth")return null;const n=yield this._getResolver(a,"getResolver");if(n!=null){const b=new gy(this,n,e);return a!==e&&!(yield b.supportsWildcard())?null:b}a=a.split(".").slice(1).join(".")}})}_getResolver(e,a){return n6(this,void 0,void 0,function*(){a==null&&(a="ENS");const n=yield this.getNetwork();n.ensAddress||m6.throwError("network does not support ENS",R0.errors.UNSUPPORTED_OPERATION,{operation:a,network:n.name});try{const b=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Kr(e).substring(2)});return this.formatter.callAddress(b)}catch{}return null})}resolveName(e){return n6(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(z6(e))throw n}typeof e!="string"&&m6.throwArgumentError("invalid ENS name","name",e);const a=yield this.getResolver(e);return a?yield a.getAddress():null})}lookupAddress(e){return n6(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const a=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(a,"lookupAddress");if(n==null)return null;const b=$r(yield this.call({to:n,data:"0x691f3431"+Kr(a).substring(2)}),0);return(yield this.resolveName(b))!=e?null:b})}getAvatar(e){return n6(this,void 0,void 0,function*(){let a=null;if(z6(e)){const f=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(f,"getAvatar");if(!r)return null;a=new gy(this,r,f);try{const c=yield a.getAvatar();if(c)return c.url}catch(c){if(c.code!==R0.errors.CALL_EXCEPTION)throw c}try{const c=$r(yield this.call({to:r,data:"0x691f3431"+Kr(f).substring(2)}),0);a=yield this.getResolver(c)}catch(c){if(c.code!==R0.errors.CALL_EXCEPTION)throw c;return null}}else if(a=yield this.getResolver(e),!a)return null;const n=yield a.getAvatar();return n==null?null:n.url})}perform(e,a){return m6.throwError(e+" not implemented",R0.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(a=>a.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(a=>a.pollable()).length>0}_addEventListener(e,a,n){const b=new IS(A9(e),a,n);return this._events.push(b),this._startEvent(b),this}on(e,a){return this._addEventListener(e,a,!1)}once(e,a){return this._addEventListener(e,a,!0)}emit(e,...a){let n=!1,b=[],f=A9(e);return this._events=this._events.filter(r=>r.tag!==f?!0:(setTimeout(()=>{r.listener.apply(this,a)},0),n=!0,r.once?(b.push(r),!1):!0)),b.forEach(r=>{this._stopEvent(r)}),n}listenerCount(e){if(!e)return this._events.length;let a=A9(e);return this._events.filter(n=>n.tag===a).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let a=A9(e);return this._events.filter(n=>n.tag===a).map(n=>n.listener)}off(e,a){if(a==null)return this.removeAllListeners(e);const n=[];let b=!1,f=A9(e);return this._events=this._events.filter(r=>r.tag!==f||r.listener!=a||b?!0:(b=!0,n.push(r),!1)),n.forEach(r=>{this._stopEvent(r)}),this}removeAllListeners(e){let a=[];if(e==null)a=this._events,this._events=[];else{const n=A9(e);this._events=this._events.filter(b=>b.tag!==n?!0:(a.push(b),!1))}return a.forEach(n=>{this._stopEvent(n)}),this}}var J4=function(t,e,a,n){function b(f){return f instanceof a?f:new a(function(r){r(f)})}return new(a||(a=Promise))(function(f,r){function c(y){try{l(n.next(y))}catch(m){r(m)}}function u(y){try{l(n.throw(y))}catch(m){r(m)}}function l(y){y.done?f(y.value):b(y.value).then(c,u)}l((n=n.apply(t,e||[])).next())})};const S5=new R0(Kd),DS=["call","estimateGas"];function cb(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const a=z6(t.data)?t.data:null;if(!e||a)return{message:t.message,data:a}}if(typeof t=="object"){for(const a in t){const n=cb(t[a],e);if(n)return n}return null}if(typeof t=="string")try{return cb(JSON.parse(t),e)}catch{}return null}function oA(t,e,a){const n=a.transaction||a.signedTransaction;if(t==="call"){const f=cb(e,!0);if(f)return f.data;S5.throwError("missing revert data in call exception; Transaction reverted without a reason string",R0.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let f=cb(e.body,!1);f==null&&(f=cb(e,!1)),f&&S5.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{reason:f.message,method:t,transaction:n,error:e})}let b=e.message;throw e.code===R0.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?b=e.error.message:typeof e.body=="string"?b=e.body:typeof e.responseText=="string"&&(b=e.responseText),b=(b||"").toLowerCase(),b.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&S5.throwError("insufficient funds for intrinsic transaction cost",R0.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),b.match(/nonce (is )?too low/i)&&S5.throwError("nonce has already been used",R0.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),b.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&S5.throwError("replacement fee too low",R0.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),b.match(/only replay-protected/i)&&S5.throwError("legacy pre-eip-155 transactions not supported",R0.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),DS.indexOf(t)>=0&&b.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&S5.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",R0.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Ay(t){return new Promise(function(e){setTimeout(e,t)})}function CS(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function tb(t){return t&&t.toLowerCase()}const h7={};class sA extends Ub{constructor(e,a,n){if(super(),e!==h7)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");p1(this,"provider",a),n==null&&(n=0),typeof n=="string"?(p1(this,"_address",this.provider.formatter.address(n)),p1(this,"_index",null)):typeof n=="number"?(p1(this,"_index",n),p1(this,"_address",null)):S5.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return S5.throwError("cannot alter JSON-RPC Signer connection",R0.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new kS(h7,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&S5.throwError("unknown account #"+this._index,R0.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=R5(e);const a=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=R5(e);n.from=a,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>J4(this,void 0,void 0,function*(){if(n==null)return null;const b=yield this.provider.resolveName(n);return b==null&&S5.throwArgumentError("provided ENS name resolves to null","tx.to",n),b}))),j5({tx:j5(e),sender:a}).then(({tx:n,sender:b})=>{n.from!=null?n.from.toLowerCase()!==b&&S5.throwArgumentError("from address mismatch","transaction",e):n.from=b;const f=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[f]).then(r=>r,r=>(typeof r.message=="string"&&r.message.match(/user denied/i)&&S5.throwError("user rejected transaction",R0.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),oA("sendTransaction",r,f)))})}signTransaction(e){return S5.throwError("signing transactions is unsupported",R0.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return J4(this,void 0,void 0,function*(){const a=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield bb(()=>J4(this,void 0,void 0,function*(){const b=yield this.provider.getTransaction(n);if(b!==null)return this.provider._wrapTransaction(b,n,a)}),{oncePoll:this.provider})}catch(b){throw b.transactionHash=n,b}})}signMessage(e){return J4(this,void 0,void 0,function*(){const a=typeof e=="string"?d4(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[_1(a),n.toLowerCase()])}catch(b){throw typeof b.message=="string"&&b.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),b}})}_legacySignMessage(e){return J4(this,void 0,void 0,function*(){const a=typeof e=="string"?d4(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),_1(a)])}catch(b){throw typeof b.message=="string"&&b.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),b}})}_signTypedData(e,a,n){return J4(this,void 0,void 0,function*(){const b=yield A8.resolveNames(e,a,n,r=>this.provider.resolveName(r)),f=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[f.toLowerCase(),JSON.stringify(A8.getPayload(b.domain,a,b.value))])}catch(r){throw typeof r.message=="string"&&r.message.match(/user denied/i)&&S5.throwError("user rejected signing",R0.errors.ACTION_REJECTED,{action:"_signTypedData",from:f,messageData:{domain:b.domain,types:a,value:b.value}}),r}})}unlock(e){return J4(this,void 0,void 0,function*(){const a=this.provider,n=yield this.getAddress();return a.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class kS extends sA{sendTransaction(e){return this.sendUncheckedTransaction(e).then(a=>({hash:a,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(a,n)}))}}const jS={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class SS extends ES{constructor(e,a){let n=a;n==null&&(n=new Promise((b,f)=>{setTimeout(()=>{this.detectNetwork().then(r=>{b(r)},r=>{f(r)})},0)})),super(n),e||(e=f4(this.constructor,"defaultUrl")()),typeof e=="string"?p1(this,"connection",Object.freeze({url:e})):p1(this,"connection",Object.freeze(R5(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return J4(this,void 0,void 0,function*(){yield Ay(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const a=f4(this.constructor,"getNetwork");try{return a(g1.from(e).toNumber())}catch(n){return S5.throwError("could not detect network",R0.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return S5.throwError("could not detect network",R0.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new sA(h7,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(a=>this.formatter.address(a)))}send(e,a){const n={method:e,params:a,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:nt(n),provider:this});const b=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(b&&this._cache[e])return this._cache[e];const f=hs(this.connection,JSON.stringify(n),CS).then(r=>(this.emit("debug",{action:"response",request:n,response:r,provider:this}),r),r=>{throw this.emit("debug",{action:"response",error:r,request:n,provider:this}),r});return b&&(this._cache[e]=f,setTimeout(()=>{this._cache[e]=null},0)),f}prepareRequest(e,a){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[tb(a.address),a.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tb(a.address),a.blockTag]];case"getCode":return["eth_getCode",[tb(a.address),a.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tb(a.address),e5(a.position,32),a.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[a.signedTransaction]];case"getBlock":return a.blockTag?["eth_getBlockByNumber",[a.blockTag,!!a.includeTransactions]]:a.blockHash?["eth_getBlockByHash",[a.blockHash,!!a.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[a.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[a.transactionHash]];case"call":return["eth_call",[f4(this.constructor,"hexlifyTransaction")(a.transaction,{from:!0}),a.blockTag]];case"estimateGas":return["eth_estimateGas",[f4(this.constructor,"hexlifyTransaction")(a.transaction,{from:!0})]];case"getLogs":return a.filter&&a.filter.address!=null&&(a.filter.address=tb(a.filter.address)),["eth_getLogs",[a.filter]]}return null}perform(e,a){return J4(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const b=a.transaction;if(b&&b.type!=null&&g1.from(b.type).isZero()&&b.maxFeePerGas==null&&b.maxPriorityFeePerGas==null){const f=yield this.getFeeData();f.maxFeePerGas==null&&f.maxPriorityFeePerGas==null&&(a=R5(a),a.transaction=R5(b),delete a.transaction.type)}}const n=this.prepareRequest(e,a);n==null&&S5.throwError(e+" not implemented",R0.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(b){return oA(e,b,a)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,a=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=a,a.then(function(n){function b(){e.send("eth_getFilterChanges",[n]).then(function(f){if(e._pendingFilter!=a)return null;let r=Promise.resolve();return f.forEach(function(c){e._emitted["t:"+c.toLowerCase()]="pending",r=r.then(function(){return e.getTransaction(c).then(function(u){return e.emit("pending",u),null})})}),r.then(function(){return Ay(1e3)})}).then(function(){if(e._pendingFilter!=a){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){b()},0),null}).catch(f=>{})}return b(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,a){const n=R5(jS);if(a)for(const f in a)a[f]&&(n[f]=!0);ZC(e,n);const b={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(f){if(e[f]==null)return;const r=is(g1.from(e[f]));f==="gasLimit"&&(f="gas"),b[f]=r}),["from","to","data"].forEach(function(f){e[f]!=null&&(b[f]=_1(e[f]))}),e.accessList&&(b.accessList=Fb(e.accessList)),b}}const My=new R0(Kd);let LS=1;function wy(t,e){const a="Web3LegacyFetcher";return function(n,b){const f={method:n,params:b,id:LS++,jsonrpc:"2.0"};return new Promise((r,c)=>{this.emit("debug",{action:"request",fetcher:a,request:nt(f),provider:this}),e(f,(u,l)=>{if(u)return this.emit("debug",{action:"response",fetcher:a,error:u,request:f,provider:this}),c(u);if(this.emit("debug",{action:"response",fetcher:a,request:f,response:l,provider:this}),l.error){const y=new Error(l.error.message);return y.code=l.error.code,y.data=l.error.data,c(y)}r(l.result)})})}}function zS(t){return function(e,a){a==null&&(a=[]);const n={method:e,params:a};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:nt(n),provider:this}),t.request(n).then(b=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:b,provider:this}),b),b=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:b,provider:this}),b})}}class Ib extends SS{constructor(e,a){e==null&&My.throwArgumentError("missing provider","provider",e);let n=null,b=null,f=null;typeof e=="function"?(n="unknown:",b=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),f=e,e.request?(n===""&&(n="eip-1193:"),b=zS(e)):e.sendAsync?b=wy(e,e.sendAsync.bind(e)):e.send?b=wy(e,e.send.bind(e)):My.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,a),p1(this,"jsonRpcFetchFunc",b),p1(this,"provider",f)}send(e,a){return this.jsonRpcFetchFunc(e,a)}}function OS(t,e){return Vr(t,e)}function xy(t){return OS(t,18)}const As={address:""},Yb=kd(As.address),f3={production:!1,feedbackDetailsMaxEndorsements:5,provider:void 0},Iy=kd({fontsLoaded:!1,bootstrapLoaded:!1}),_S=t=>{Object.assign(f3,t)};function dt(t,e){const a=f3.production?ts:as;return{apiUrl:t[W9]||void 0||a}}function BS(){return{socialLinkUrl:f3.production?FD:YD}}function X6({children:t,forwardedRef:e,className:a,style:n,excludeBootstrap:b,excludeFonts:f}){const r=n3(Iy),c=!f&&!r.fontsLoaded,u=!b&&!r.bootstrapLoaded,l={fontsLoaded:r.fontsLoaded||c,bootstrapLoaded:r.bootstrapLoaded||u};return P(Iy.Provider,{value:l,children:P(Yb.Provider,{value:As.address,children:P("div",{ref:e,className:a,children:[P("style",{children:[c&&P(Be,{children:'@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap";'}),u&&P(Be,{children:'@import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-reboot.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-grid.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-utilities.min.css";'}),n]}),t]})})})}x1.polygon_mainnet,x1.ethereum_testnet;x1.base_testnet,x1.base_mainnet,x1.lisk_testnet,x1.lisk_mainnet,x1.optimism_testnet,x1.optimism_mainnet,x1.aurora_testnet,x1.aurora_mainnet;function H4(t){return gg(_1(t))}const Se={[x1.polygon_mainnet]:{chainId:H4(137)},[x1.ethereum_testnet]:{chainId:H4(11155111)},[x1.lisk_mainnet]:{chainId:H4(1135)},[x1.lisk_testnet]:{chainId:H4(4202)},[x1.optimism_mainnet]:{chainId:H4(10)},[x1.optimism_testnet]:{chainId:H4(11155420)},[x1.aurora_mainnet]:{chainId:H4(1313161554)},[x1.aurora_testnet]:{chainId:H4(1313161555)},[x1.base_testnet]:{chainId:H4(84532)}},PS={[x1.polygon_mainnet]:{chainId:Se[x1.polygon_mainnet].chainId,chainName:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"]},[x1.ethereum_testnet]:{chainId:Se[x1.ethereum_testnet].chainId,chainName:"Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://1rpc.io/sepolia"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[x1.lisk_mainnet]:{chainId:Se[x1.lisk_mainnet].chainId,chainName:"Lisk",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.api.lisk.com"],blockExplorerUrls:["https://blockscout.lisk.com"]},[x1.lisk_testnet]:{chainId:Se[x1.lisk_testnet].chainId,chainName:"Lisk Sepolia Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia-api.lisk.com"],blockExplorerUrls:["https://sepolia-blockscout.lisk.com"]},[x1.optimism_mainnet]:{chainId:Se[x1.optimism_mainnet].chainId,chainName:"OP Mainnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[x1.optimism_testnet]:{chainId:Se[x1.optimism_testnet].chainId,chainName:"OP Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.optimism.io"],blockExplorerUrls:["https://sepolia-sequencer.optimism.io"]},[x1.base_testnet]:{chainId:Se[x1.base_testnet].chainId,chainName:"Base Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.base.org"],blockExplorerUrls:["https://base-sepolia.blockscout.com/"]}},US={[x1.polygon_mainnet]:"0xE62dc4c82a9749Bf2E40F73138B3CFee0a2EC89F",[x1.ethereum_testnet]:"0x537BE61c5EFB865Df53CA55eeA07ceEe5d5fB162",[x1.lisk_mainnet]:"0x3B2A3a6E8C087fe399a24e08D3Cab12f17e033C3",[x1.lisk_testnet]:"0x0125f1E709eC3dEA2aD8152826fD4b9496086B71",[x1.optimism_mainnet]:"0xb2e9dB661F992d2F3013e4AFcE01C72d52f58A37",[x1.optimism_testnet]:"0xbdF3b87B410C50Ba9620d8Ac416A81e6bF7296eF",[x1.aurora_mainnet]:"0xaE53DcC63d7895600e2510A986Dc2b65c953E26c",[x1.aurora_testnet]:"0x2ac7F081f8eB51ce393bA298e4C020b0DeF420E1",[x1.base_testnet]:"0xC72b7A6146d3D53B614A4769A1A1459882ED4B1A"};async function RS(t,e){const a=PS[e];if(!a)throw new Error(`Network configuration not found for ${e}`);try{await t.request({method:"wallet_addEthereumChain",params:[a]})}catch(n){throw n}}async function vy(t,e){const a=Se[e];if(!a)throw new Error(`Switch chain parameters not found for ${e}`);try{await t.request({method:"wallet_switchEthereumChain",params:[a]})}catch(n){throw n}}function QS(t){let e;return f3.production?e=FS(t):e=YS(t),e}function FS(t){switch(t){case Se[x1.lisk_mainnet].chainId:return x1.lisk_mainnet;case Se[x1.optimism_mainnet].chainId:return x1.optimism_mainnet;case Se[x1.aurora_mainnet].chainId:return x1.aurora_mainnet;default:return x1.polygon_mainnet}}function YS(t){const e=Se[x1.base_testnet].chainId;switch(t){case Se[x1.lisk_testnet].chainId:return x1.lisk_testnet;case Se[x1.optimism_testnet].chainId:return x1.optimism_testnet;case Se[x1.aurora_testnet].chainId:return x1.aurora_testnet;case e:return x1.base_testnet;default:return x1.ethereum_testnet}}async function GS(t){return QS(t)}function Ty(t){return US[t]}function K2(){return f3.provider}function hd(t){return{ids:{uuid:t}}}function Jd(t,e={}){return{...e,headers:{...e.headers||{},...WS(t)}}}function WS(t){return{Authorization:`Bearer ${t}`}}async function uA(t,e,a,n,b){const f=mg.stringify({sourceCriteria:JSON.stringify(hd(e)),targetType:a,targetCriterias:b?.map(l=>JSON.stringify(hd(l)))}),r=`${t}${Ob}${HD}?${f}`,c=Jd(n);return await K6.get(r,c)}async function lA(t,e,a,n,b,f){return K6.post(`${t}${Ob}${VD}`,{sourceCriteria:a,targetCriteria:n,transactionId:b,items:f},Jd(e)).then(r=>r).catch(r=>r)}async function pA(t,e,a,n){const b=hd(a),f=hd(n),r=mg.stringify({sourceCriteria:b,targetCriteria:f}),c=`${t}${Ob}${KD}?${r}`;return K6.get(c,Jd(e))}async function yA(t=null,e=null,a=!1){const n=t??(f3.production?ts:as),b=K2();if(!b&&!e)return null;const r=await new Ib(e||b).getSigner(),c=await r.getAddress(),u=await r.signMessage("Sign in at UTU"),{data:l}=await K6.post(`${n}${JD}`,{address:c,signature:u},{withCredentials:!!a});return l}async function mA(t,e=f3.production?ts:as){try{const a=await K2();if(!a||typeof a.request!="function")return console.warn("UTU provider missing while fetching UTT balance"),{balance:"N/A"};await a.request({method:"eth_requestAccounts"});const f=await(await new Ib(a).getSigner()).getAddress(),r=await K6.get(`${e}${XD}/${f}`,{headers:{Authorization:`Bearer ${t}`}});return{balance:typeof r.data=="number"?r.data:"N/A"}}catch(a){return console.error("Error fetching UTT balance:",a),{balance:"N/A",error:a instanceof Error?a:new Error(String(a))}}}const HS=async(t,e,a)=>{const n=VS(e);let b;if(n){const f=ZS(e);b={name:e,type:"domain",ids:{uuid:f,address:f,url:e}}}else{const f=e.toLowerCase();b={name:e,type:"Address",ids:{uuid:f,address:f}}}try{return K6.post(`${t}${Ob}${qD}`,{name:b.name,type:b.type,ids:{uuid:b.ids.uuid,address:b.ids.address}},Jd(a))}catch(f){throw console.error("Failed to initialize entity:",f),console.error("Entity data:",b),f}},VS=t=>t.startsWith("0x")&&t.length===42?!1:t.includes(".")&&!t.startsWith("0x");function ZS(t){let e;try{e=new URL(t).hostname}catch{try{e=new URL(`https://${t}`).hostname}catch{e=t}}return na(e).slice(0,42).toLowerCase()}function ma(){const[t,e]=B1(JS());return x5(()=>{function a(n){const{access_token:b}=n.detail??{};if(!b){e(null);return}e(b)}return window.addEventListener(dd,a),()=>{window.removeEventListener(dd,a)}},[]),{accessToken:t}}async function KS(t=null,e=null,a=!1){const n=await yA(t,e,a);return await localStorage.setItem(ns,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(dd,{detail:n})),n}function JS(){const t=localStorage.getItem(ns);if(t){const{access_token:e}=JSON.parse(t);if(!e)return null;try{const{exp:a}=eC(e);if(qS(a))return e}catch(a){return console.warn("Invalid stored UTU access token:",a),null}}return null}function qS(t){return Date.now()<t*1e3}function hA(){const[t,e]=B1(null);return x5(()=>{async function a(){const n={burnerconnect:{package:wE,options:{defaultNetwork:"100"}}},b=new gE({cacheProvider:!1,network:"mainnet",providerOptions:n});e(b)}a()},[e]),{web3Modal:t}}function XS(t){const e=t?.trim();return e?e.split(" "):void 0}function $S(t,e){const{accessToken:a}=ma();x5(()=>{async function n(){try{return await HS(t,e,a)}catch(b){console.log(b)}}n()})}function eL(t,e,a,n){const{accessToken:b}=ma(),[f,r]=B1(void 0);return x5(()=>{async function c(){if(!b){r(void 0);return}const u=await uA(t,e,a,b,XS(n));r(u.data.result)}c()},[b,t,e,a,n]),{rankingItems:f}}var Le=(t=>(t[t.idle=0]="idle",t[t.submitting=1]="submitting",t[t.success=2]="success",t[t.error=3]="error",t[t.notFound=4]="notFound",t))(Le||{});const tL=3e3;function gd(t){setTimeout(()=>t(0),tL)}function qd(t,e,a,n){const{accessToken:b}=ma(),[f,r]=B1(0),c=Ny(e),u=Ny(a);async function l(y){return r(1),lA(t,b,c,u,n,y).then(m=>(r(2),gd(r),m)).catch(m=>(r(3),gd(r),m))}return{sendFeedback:l,submitStatus:f}}function aL(t){const{accessToken:e}=ma(),[a,n]=B1([]);return x5(()=>{async function b(){if(!e){n([]);return}const f=await K6.get(`${t}${Ob}${ZD}`,rL(e));n(f.data.result)}b()},[n,t,e]),{badgeSets:a}}function nL(t,e,a){const{accessToken:n}=ma(),[b,f]=B1(void 0),[r,c]=B1(0);return x5(()=>{async function u(){c(1);try{const l=await pA(t,n,e,a);c(2),f(l.data.result.items)}catch(l){console.log(l),l?.response?.status===404?c(4):c(3),f(null)}}u()},[f,t,n,e,a]),{feedbackSummary:b,submitStatus:r}}function bL(t,e,a){const{accessToken:n}=ma(),[b,f]=B1({uploading:!1});return x5(()=>{if(!e)return;const r={read(){return e.read()}},c={resume:!1,endpoint:`${t}${GD}/upload`,headers:gA(n),chunkSize:28*1024,uploadLengthDeferred:!0,retryDelays:[0,3e3,5e3,1e4,2e4],metadata:{filename:"webcam.webm",filetype:"video/webm"},onError(){f({uploading:!1,errorMessage:"video was not successfully uploaded "})},onSuccess(){const l=fL(t,u.url);a(l),f({successMessage:"video was successfully uploaded"}),f({uploading:!1,publishedVideoUrl:l})}},u=new kD(r,c);u.start(),f({uploading:!0})},[n,e]),b}function fL(t,e){const a=e.split("/").pop();return`${t}${WD}/${a}`}function Ny(t){return{ids:{uuid:t}}}function rL(t,e={}){return{...e,headers:{...e.headers||{},...gA(t)}}}function gA(t){return{Authorization:`Bearer ${t}`}}const dL="::slotted(ul){list-style:none;padding:0;margin:0}";function iL(t){const{apiUrl:e}=dt(t),a=t[L5],n=t[H9],b=t[rg],{rankingItems:f}=eL(e,a,n,b),r=da();return x5(()=>{r.current&&f&&(r.current.data=f,setTimeout(()=>{r.current.dispatchEvent(new CustomEvent("loaded",{composed:!0,detail:{data:f}}))},0))},[r,f]),P(X6,{forwardedRef:r,className:"recommendation-root",style:dL,excludeBootstrap:!0,excludeFonts:!0,children:P("slot",{})})}const cL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.recommendation-title{margin-bottom:8px;font-family:sans-serif;letter-spacing:1px;font-size:17px;font-weight:500}.utu-recommendation{border-radius:5px;padding-right:1rem}.utu-recommendation-content{display:flex;margin-left:5px}.utu-recommendation-text{align-self:center;margin-left:20px}.utu-recommendation-text-light{color:#000}.utu-recommendation-text-dark{color:#fff}.summary-image-list{display:flex;justify-content:center;margin:1.5rem 0 1rem 2rem;padding-left:0;list-style:none}.summary-image-item{margin-left:-15px;height:2.5rem}.summary-image-item-light,.summary-image-item-dark{border:2px solid rgb(252,229,70)}';function g7(t){if(t&&t.current){const a=t.current.getRootNode().host.closest(fg);if(a)return a.shadowRoot.firstChild}return null}function Ey(t,e){const a=g7(t);return a&&a.data?a.data.find(n=>n.entity.uuid===e):null}function AA(t){const e=da(),a=t[ge],[n,b]=B1(!1),[f,r]=B1(Ey(e,a));t[t8]==="dark"&&b(!0);const c=n?"dark":"light";return x5(()=>{function u(){r(Ey(e,a))}if(e.current&&a){const l=g7(e);l&&l.addEventListener("loaded",u)}return()=>{const l=g7(e);l&&l.removeEventListener("loaded",u)}},[e,a]),P(X6,{forwardedRef:e,className:`utu-recommendation x-utu-section x-utu-section-no-border-${c}`,children:[P("style",{children:cL}),f?P("p",{className:"recommendation-title",children:"Recommendation"}):"",f&&P("div",{className:"utu-recommendation-content",children:[P("ul",{className:"summary-image-list",children:f.summaryImages.map(u=>P("li",{children:P("img",{className:`rounded-circle summary-image-item summary-image-item-${c}`,src:u,onError:l=>{l.target.onerror=null,l.target.src="",l.target.className="",l.target.alt=""},alt:"profile"})},u))}),P("div",{className:`utu-recommendation-text utu-recommendation-text-${c}`,children:f.summaryText})]})]})}const oL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.utu-feedback-form{width:100%;margin:auto;background-color:#fff;min-height:30rem}.utu-feedback-form_title_wrapper{width:100%;background-color:#fce546;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;font-family:sans-serif;padding:1rem 3rem}.utu-feedback-form_title{letter-spacing:1px;font-weight:500px;font-size:16px}.x-utu-feedback-form-text{letter-spacing:1px}.x-utu-feedback-form_body_1{background-color:#fffdf4;display:flex;justify-content:space-between;padding:1rem 32px}.x-utu-feedback-form_body_2{background-color:#fffdf4}.x-utu-feedback-details_divider{background-color:gray;height:100px;width:3px}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:46%}@media only screen and (max-width: 1000px){.utu-feedback-form_title_wrapper{text-align:center;width:100%;border-radius:0}}@media only screen and (max-width: 1300px){.x-utu-feedback-form_body_1{flex-direction:column}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:100%;text-align:center;padding:.5rem 0}.x-utu-feedback-details_title-text{width:50%;font-size:12px}}',MA='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.feedback-form-badge-wrapper{width:90%;height:8rem;display:flex;justify-content:center;padding:20px;border-radius:10px;margin-bottom:32px;background-color:#ffdd331a;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px}.badges-wrapper{margin-left:32px}.x-utu-badge-title-thumbs{display:flex}.button{cursor:pointer}.button:hover{background-color:#fdfdfd}.button:active{transform:translateY(1px)}.x-utu-badge-set-container{width:8rem;height:7rem;padding:1rem 1rem 1rem 0}.x-utu-badge-set-section{width:100%;display:flex;flex-direction:row;background-color:#ffdd331a;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;border-radius:10.07px}.x-utu-badge-section{width:80%}.x-utu-badge-disable{height:50px;width:50px;opacity:.6}.x-utu-badge-item-text{justify-content:center;align-items:center;color:#fff}.x-utu-badge-text{font-size:.7rem}.x-utu-badge-text-h3{text-align:center;margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}.x-utu-badge-text-h3-light{color:#000}.x-utu-badge-text-h3-dark{color:#fff}.x-utu-badge-img{width:2.2rem}.x-utu-badge-img-container{display:flex;justify-content:space-around;opacity:1}.x-utu-badge-img-big{width:4.5rem}.x-utu-badge-img-big-section{display:flex;align-items:center;justify-content:center;padding:1rem}.x-utu-badge-section-title{margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}@media only screen and (min-width: 768px){.x-utu-badge-section{padding-left:0;padding-right:0}}@media only screen and (min-width: 1210px){.x-utu-badge-section{padding-top:0}}',sL='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}';function Xd(){return P("svg",{style:sL,version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",className:"logo-size",viewBox:"0 0 841.89 401.471",xmlSpace:"preserve",children:P("g",{id:"Layer_2",children:P("g",{id:"Layer_1-2",children:[P("path",{fill:"#FFFFFF",d:"M565.858,0c263.37,4.676,263.323,395.802,0,400.243C302.487,395.709,302.532,4.397,565.858,0z"}),P("path",{fill:"#BBBBBB",d:`M0.005,224.144v-45.228c-0.005-2.54,2.051-4.603,4.591-4.607c0.019,0,0.038,0,0.057,0
|
|
347
347
|
c7.535,0.416,21.79-1.872,27.35,4.176c6.247,4.983,6.239,19.43,0,24.454c-4.912,5.359-15.871,4.127-22.758,4.215v16.991
|
|
348
348
|
C9.443,230.176-0.14,230.119,0.005,224.144z M9.26,198.834c6.479-0.119,18.55,1.96,17.854-8.119
|
|
349
349
|
c0.695-10.07-11.415-7.999-17.854-8.087V198.834z`}),P("path",{fill:"#BBBBBB",d:`M40.041,209.985c-1.848-25.798,36.885-25.901,34.957,0C76.878,235.775,38.241,235.671,40.041,209.985z
|
|
@@ -1156,7 +1156,7 @@ Valid keys: `+JSON.stringify(Object.keys(e0),null," "));var m0=T0(f0,g0,x0,O,l0
|
|
|
1156
1156
|
13.35,55.09,6.74,67.13,0.14c1.16-0.63,2.4,1.08,2.4,2.4v82.04c0,1.39-1.32,3.21-2.53,2.53L31,66.8
|
|
1157
1157
|
c-0.23-0.13-0.48-0.21-0.48-0.48V20.44C30.52,20.17,30.77,20.09,31,19.96L31,19.96z`})})})}function Cd(t,e,a,n){const[b,f]=B1(!1),[r,c]=B1(!0),[u,l]=B1(!1),y=da(null);pa(()=>{function w(){}return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const m=()=>{r?(y.current.pause(),c(!1)):(y.current.play(),c(!0))},x=()=>{u?(y.current.muted=!1,l(!1)):(y.current.muted=!0,l(!0))},A=async()=>{await y.current.requestFullscreen()};x5(()=>{y.current&&f(!0)},[t]);function M({stream:w}){const D=da(null);return x5(()=>{D.current&&w&&e&&(D.current.srcObject=w)},[w]),w?w.active?P("div",{className:"trust-video-container",children:P("video",{className:"trust-video preview-video",id:"trustVideoPreview",ref:D,autoPlay:!0,children:P("track",{kind:"captions"})})}):P("div",{className:"trust-video-wrapper trust-video-msg",children:P("p",{children:"No video preview to show at the moment. Kindly hold on!!"})}):P("div",{className:"trust-video-wrapper trust-video-msg",children:P("p",{children:"Kindly Press the button to start your webcam and record your message"})})}function v(){return t?P("div",{className:"trust-video-container",children:P("video",{className:"trust-video",id:"trustVideo",ref:y,autoPlay:!0,children:[P("source",{className:"trust-video",src:t,type:"video/mp4"}),P("source",{src:t,type:"video/webm"}),P("track",{kind:"captions"})]})}):P(M,{stream:a})}return P("div",{className:"trust-video-wrapper",children:[v(),n&&P("div",{className:`trust-video-controls ${b&&"show"}`,children:[P("button",{type:"button",className:"trust-video-btn trust-video-control",onClick:x,children:u?P(gU,{}):P(AU,{})}),!e&&P("button",{type:"button",className:"trust-video-btn trust-video-play-btn trust-video-control paused",onClick:m,children:r?P(mU,{}):P(yU,{})}),P("div",{className:"trust-video-progress"}),!e&&P("button",{type:"button",className:"trust-video-btn trust-video-control",onClick:A,children:[" ",P(hU,{})," "]})]}),P("section",{className:"logo-video-section",children:P("div",{className:"logo-video-position",children:P(Xd,{})})})]})}function MU(){return P("svg",{style:tM,className:"x-utu-spinner",id:"goo-loader",width:"90",height:"90","aria-label":"audio-loading",children:[P("filter",{id:"fancy-goo",children:[P("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"6",result:"blur"}),P("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),P("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]}),P("g",{filter:"url(#fancy-goo)",children:[P("animateTransform",{id:"mainAnim",attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 50 50",to:"359 50 50",dur:"1.2s",repeatCount:"indefinite"}),P("circle",{cx:"50%",cy:"40",r:"11",children:P("animate",{id:"cAnim1",attributeType:"XML",attributeName:"cy",dur:"0.6s",begin:"0;cAnim1.end+0.2s",calcMode:"spline",values:"40;20;40",keyTimes:"0;0.3;1",keySplines:"0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1"})}),P("circle",{cx:"50%",cy:"60",r:"11",children:P("animate",{id:"cAnim2",attributeType:"XML",attributeName:"cy",dur:"0.6s",begin:"0.4s;cAnim2.end+0.2s",calcMode:"spline",values:"60;80;60",keyTimes:"0;0.3;1",keySplines:"0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1"})})]})]})}function wU(){const[t,e]=B1(!0);return P("svg",{className:`x-utu-video-icon x-utu-video-icon-${t?"dark":"light"}`,viewBox:"0 0 512 512",children:P("path",{d:"M512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM256 352c-53 0-96-43-96-96s43-96 96-96s96 43 96 96s-43 96-96 96zm0 32c70.7 0 128-57.3 128-128s-57.3-128-128-128s-128 57.3-128 128s57.3 128 128 128zm0-96c17.7 0 32-14.3 32-32s-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32z"})})}const xU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.popup_children{height:55%;overflow:scroll}.popup_title{font-weight:400;font-size:16px;font-family:sans-serif;letter-spacing:1px}.x-utu-popup{width:65%;min-width:500px;margin:5% auto;display:flex;position:fixed;inset:0;z-index:2}.x-utu-popup-container{z-index:1001;width:100%}.x-utu-popup-icon-btn{padding:10px;margin-right:3%;font-size:2.8em;border:none;background:none;transition:all ease-out .3s}.x-utu-popup-icon-btn:hover{transform:scale(1.3);opacity:.6}.x-utu-popup-icon-btn-overlay{z-index:1001}.x-utu-popup-icon-btn-light{color:#000}.x-utu-popup-icon-btn-dark{color:#fff}.x-utu-popup-container{z-index:1001}.x-utu-popup-container-content{width:100%;display:flex;justify-content:flex-end;border-radius:10px 10px 0 0;background-color:#fff;padding-left:2rem}.x-utu-popup-container-dark,.x-utu-popup-container-light{background:transparent}.x-utu-popup-background{position:fixed;inset:0;background-color:#00000080;min-width:100%;min-height:100%}@media only screen and (min-width: 768px){.x-utu-popup{width:65%;min-width:500px;min-height:100%}.x-utu-popup-container{align-items:center;min-width:100%;min-height:120%}.x-utu-popup-container-content{align-items:center;margin-top:2%}}@media only screen and (max-width: 768px){.x-utu-popup-container-content{width:100%;background-color:#fcf8e5;justify-content:center}}';function Eb({onClose:t,children:e,closeButtonOverlay:a,themeColor:n,targetUuid:b,targetHumanReadable:f,targetType:r,title:c}){const[u,l]=B1(!1);n==="dark"&&l(!0);const y=u?"dark":"light";return P(X6,{className:"x-utu-popup",children:[P("style",{children:xU}),P("div",{className:`x-utu-popup-container x-utu-popup-container-${y}`,children:[P("div",{className:"x-utu-popup-container-content",children:P("button",{type:"button",className:`x-utu-popup-icon-btn x-utu-popup-icon-btn-${y} ${a&&"x-utu-popup-icon-btn-overlay"}`,onClick:t,children:"×"})}),P("div",{class:"popup_children",children:e})]}),P("div",{onClick:t,className:"x-utu-popup-background"})]})}function IU(t){const[e,a]=B1(null),[n,b]=B1(!1),[f,r]=B1(!1),[c,u]=B1(null),[l,y]=B1(!0),[m,x]=B1(!1),A=n3(Yb);t[L5]==="address"&&(t[L5]=A),t[t8]==="dark"&&x(!0);const{apiUrl:M}=dt(t),v=m?"dark":"light",w=R=>{R&&u(R)},{publishedVideoUrl:D,successMessage:N,errorMessage:T}=bL(M,e,w),{sendFeedback:j}=qd(M,t[L5],t[ge],t[Xt]);x5(()=>{console.count("sendFeedbackOnce"),c&&j({video:c})},[c]);const C=(R,z)=>D?Cd(D,!1,null,!0):Cd(null,!0,z);function G(){const R=new pU.ReadableStorage;return a(R.getReader()),R}const{status:W,startRecording:Z,stopRecording:d0,previewStream:n0}=uU.useReactMediaRecorder({audio:!0,video:!0,videoStorageFactory:G,timeslice:1e3});x5(()=>(console.log("hide controls"),y0&&y(!1),()=>{d0()}),[]);const y0=f||["stopping","acquiring_media"].includes(W),H=W==="idle",F=W==="recording",h=()=>{r(!0),d0(),a(null),b(!n),y(!1),console.log("status_onstop",W)},I=()=>{Z()};return console.log("status_onrecording",W),P(Eb,{closeButtonOverlay:!0,onClose:async()=>{await h(),d0(),t.onClose()},children:P(X6,{style:dM,className:"x-utu-video-screen-recording d-flex flex-column align-items-center justify-content-center",children:[C(W,n0),F&&P("button",{type:"button",className:`x-utu-video-btn-round-stop x-utu-video-btn-round-stop-${v} x-utu-video-btn-round btn-round-${v}`,onClick:h,children:P("div",{className:`x-utu-video-btn-stop-icon x-utu-video-btn-stop-icon-${v}`})}),H&&!D&&P("button",{type:"button",className:`
|
|
1158
1158
|
x-utu-video-btn-round-stop x-utu-video-btn-round-stop-${v} x-utu-video-btn-round x-utu-video-btn-round-${v}
|
|
1159
|
-
`,onClick:I,children:P(wU,{})}),y0&&!D&&P("button",{type:"button",className:`x-utu-video-btn-round-loading x-utu-video-btn-round x-utu-video-btn-round-${v}`,children:P("div",{className:`mb-2 mr-2 x-utu-video-btn-round-spinner x-utu-video-btn-round-spinner-${v}`,children:P(MU,{})})}),P("div",{className:"video-msg d-flex align-items-center",children:[N&&P("h3",{className:"x-utu-video-response-message my-4 text-white bg-success",children:[" ",N," "]}),T&&P("h3",{className:"x-utu-video-response-message my-4 text-white bg-danger",children:[" ",T," "]})]}),P("section",{className:"logo-position-video",children:P(Xd,{})})]})})}function vU(t){const[e,a]=B1(!1),[n,b]=B1(!1);t[t8]==="dark"&&b(!0);const f=n?"dark":"light";return P(X6,{className:`x-utu-video-container x-utu-section x-utu-section-${f}`,children:[P("style",{children:dM}),P("div",{className:"x-utu-video-wrapper",children:[P("button",{type:"button",style:{backgroundColor:t[r4]===void 0?null:`${t[r4]}`},className:`x-utu-video-btn-round x-utu-video-btn-round-${f}`,onClick:()=>{a(!0)},children:P(Bz,{})}),P("p",{className:`mx-3 x-utu-video-btn-round-text-${f}`,children:P("b",{children:"RECORD YOUR STORY"})}),e&&P(IU,{...t,onClose:()=>{a(!1)}})]})]})}function rw(t){const{apiUrl:e}=dt(t),a=t[H9],n=t[ge],b=t[Ud];$S(e,n);const r=(()=>{let c;switch(a){case"address":c=n;break;default:c=b}return c})();return P(X6,{className:"utu-feedback-form",children:[P("style",{children:[" ",oL," "]}),a?P("div",{className:"utu-feedback-form_title_wrapper",children:P("p",{className:"utu-feedback-form_title",children:[P("b",{children:" Give Feedback for: "})," ",r]})}):"",P("div",{className:"x-utu-feedback-form_body_1",children:[P("div",{className:"x-utu-feedback-form_body_recordvideo",children:P(vU,{...t})}),P("div",{className:"x-utu-feedback-form_body_StarRatinginput",children:P(_z,{...t})})]}),P("div",{className:"x-utu-feedback-form_body_2",children:[P(ZL,{...t}),P(Mz,{...t}),P(Tz,{...t})]})]})}const TU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-feedback-form-popup{width:100%;padding:.5rem;border-radius:10px;display:flex;flex-direction:column;align-items:stretch;justify-content:center}.x-utu-feedback-form-popup_btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#fce546}';function NU(t){const[e,a]=B1(!1);return x5(()=>{const n=()=>a(!0);return window.addEventListener("utu:leave-review",n),()=>window.removeEventListener("utu:leave-review",n)},[]),P(X6,{className:"x-utu-feedback-form-popup",children:[P("style",{children:[" ",TU," "]}),P("button",{type:"button",className:"x-utu-feedback-form-popup_btn",onClick:()=>a(!0),children:"Give feedback"}),e&&P(Eb,{title:"Feedback Form for:",onClose:()=>a(!1),...t,children:P(rw,{...t})})]})}const EU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-header{width:100%;padding:2rem 3rem;background-color:#fcf8e5;display:flex;justify-content:center;border-radius:10px}';function DU(){return P(X6,{children:[P("style",{children:EU}),P("section",{className:"x-utu-header x-utu-section",children:P("h3",{className:"x-utu-h3",children:" Feedback From Your Network "})})]})}const CU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-app-link{width:100%;text-align:center;justify-content:center;border-radius:10px;padding:.5rem;display:flex;flex-direction:column;align-items:stretch;background-color:#fcf8e5}.x-utu-app-link-btn{background-color:#fce546;width:100%}.x-utu-app-link-text{margin-top:.25rem}x-utu-app-a{text-decoration:none;color:#000}x-utu-app-a :hover{color:#000}';function kU(t){const{socialLinkUrl:e}=BS(),[a,n]=B1(!1),b=a?"dark":"light";return t[t8]==="dark"&&n(!0),P(X6,{className:`x-utu-app-link x-utu-section x-utu-section-no-border-${b}`,children:[P("style",{children:CU}),P("button",{className:"x-utu-app-link-btn x-utu-btn utu-btn-light",type:"button",style:{backgroundColor:t[r4]===void 0?null:`${t[r4]}`},children:P("a",{href:e,className:"x-utu-app-a",target:"_blank",rel:"noreferrer",children:P("h3",{className:"x-utu-h3 x-utu-app-link-text",children:"Connect to earn"})})})]})}const jU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-wallet-connect{width:100%;align-items:center;text-align:center;justify-content:center;background-color:#fcf8e5;border-radius:5px}.x-utu-wallet-connect-section{padding:.5rem}.x-utu-wallet-text-input-btn{width:100%;background-color:#fce546;margin-top:1rem}';function SU(){const{web3Modal:t}=hA();async function e(){const a=await t.connect(),f=(await new Ib(a).getSigner()).getAddress();As.address=await f}return P(X6,{className:"x-utu-wallet-connect",children:[P("style",{children:jU}),P("section",{className:"x-utu-wallet-connect-section",children:[P("p",{className:"x-utu-wallet-connect-text",children:"See UTU trust signals from your network"}),P("div",{children:P("button",{onClick:e,className:"x-utu-wallet-text-input-btn x-utu-btn",type:"submit",children:"Connect Wallet"})})]})]})}const LU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-disconnect-wallet-btn{width:100%;align-items:center;text-align:center;justify-content:center;background-color:#fcf8e5;border-radius:5px;padding:.5rem}.x-utu-disconnect-text-input-btn{width:100%;background-color:#fce546}';function zU(){const{web3Modal:t}=hA();async function e(){const a=await t.cachedProvider;await t.clearCachedProvider(),a?.disconnect&&typeof a.disconnect=="function"&&await a.disconnect(),a?.close&&typeof a.close=="function"&&await a.close(),await localStorage.removeItem("walletconnect"),window.location.reload()}return P(X6,{children:[P("style",{children:LU}),P("section",{className:"x-utu-disconnect-wallet-btn",children:P("div",{children:P("button",{onClick:e,className:"x-utu-disconnect-text-input-btn x-utu-btn",type:"submit",children:"Disconnect Wallet"})})})]})}const OU='.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.video-msg{position:absolute}.trust-video{border:none;position:relative;object-fit:cover;width:100%;height:100%;transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}.trust-video-container{width:25rem;height:40rem;position:relative}.trust-video-btn{padding:0!important;border:none!important;background:none!important}.trust-video-wrapper{width:100%;height:37rem;margin:auto;display:flex;flex-direction:column;justify-content:center;background-color:#fcf8e5;overflow:hidden;align-items:center;padding:2rem}.trust-video-wrapper:hover .trust-video-controls{visibility:visible;opacity:1}.trust-video-msg{display:flex;align-items:center}.trust-video-controls{position:relative;bottom:0;margin-top:-10%;transform:translateY(-30%);border-radius:10px;align-items:center;justify-content:space-between;visibility:hidden;opacity:0;transition:all .25s ease-out;display:none}.trust-video-controls.show{display:flex}.trust-video-play{border-color:transparent;transition:.3s;margin:auto;margin-left:3rem;margin-right:3rem;line-height:1.5em;width:4em;height:4em;padding:.6rem .3rem .6rem .6rem;cursor:pointer;opacity:1;background-color:#fd3;font-size:.9rem;border-radius:50%;font:normal normal normal 18px/1}.trust-video-play:before{content:""}.trust-video-play.paused:before{content:""}.trust-video-play-btn{border-color:transparent}.trust-video-pause{border-color:transparent;transition:.3s;margin:auto;margin-left:3rem;margin-right:3rem;line-height:1.5em;width:4em;height:4em;padding:.6rem .4rem .6rem .6rem;cursor:pointer;opacity:1;background-color:#fd3;font-size:.9rem;border-radius:50%;font:normal normal normal 18px/1}.trust-video-pause:before{content:""}.trust-video-pause.paused:before{content:""}.trust-video-pause-btn{border-color:transparent}.trust-video-volume{border-color:transparent;color:#2b333fb3;font-size:1em;padding:.6rem;border-radius:20%;line-height:1.5em;width:3em;height:3em;background-color:#ffdd33b3;left:20px}.trust-video-fullscreen{border-color:transparent;color:#2b333fb3;font-size:.65em;line-height:2.5rem;padding:.6rem;width:5em;border-radius:20%;margin-right:5%;background-color:#ffdd33b3;right:20px}@media only screen and (min-width: 1280px){.trust-video-play,.trust-video-pause{margin-left:5rem;margin-right:5rem}.trust-video-controls{height:10em}}@media only screen and (max-width: 526px){.trust-video-play,.trust-video-pause{width:3em;height:3em;padding:.5rem .3rem .5rem .5rem}.trust-video-volume{width:2em;height:2em;padding:.4rem}.trust-video-fullscreen{width:3em;padding:.4rem}.trust-video-controls{transform:translateY(-100%)}}p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-success,.submit-error{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-feedback-details{width:100%;margin:auto;background-color:#fff;height:30rem}.x-utu-feedback-details_title_wrapper{width:100%;background-color:#fce546;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;margin-bottom:1rem;font-family:sans-serif;padding:1rem 3rem}.x-utu-feedback-details-title{letter-spacing:1px;font-weight:500px;font-size:16px}.x-utu-feedback-details-text{letter-spacing:1px}.x-utu-feedback-details_body_0{width:100%;padding-top:3%;background-color:#fffdf4}.x-utu-feedback-details_body_1{width:100%;display:grid;grid-template-columns:1fr 1fr;background-color:#fffdf4;padding:4% 2% 32px;gap:1rem}.x-utu-feedback-details_body_2{width:100%;background-color:#fffdf4;padding-top:1%}.x-utu-feedback-details_body_VideoShow,.x-utu-feedback-details_body_StarRatingShow{width:100%}.x-utu-feedback-details_body_VideoShow>div,.x-utu-feedback-details_body_StarRatingShow>div{height:100%}.x-utu-feedback-details_body_VideoShow>div>div,.x-utu-feedback-details_body_StarRatingShow>div>div{height:100%}@media only screen and (max-width: 1300px){.x-utu-feedback-details_body_1{grid-template-columns:1fr;padding:4% 1.5rem 32px}.x-utu-feedback-details_body_VideoShow,.x-utu-feedback-details_body_StarRatingShow{width:100%;text-align:center;padding:.5rem 0}.x-utu-feedback-details_title-text{width:50%;font-size:12px}}@media only screen and (max-width: 600px){.x-utu-feedback-details_title-text{text-align:center;width:100%}}@media only screen and (max-width: 1000px){.x-utu-feedback-details_title_wrapper{text-align:center;width:100%;border-radius:0}}.x-utu-no-reviews-banner{width:100%;background-color:#fffdf4;border-bottom:1px solid rgba(0,0,0,.08);padding:1.5rem 2rem;box-sizing:border-box;margin-bottom:.5rem}.x-utu-no-reviews-banner_content{max-width:560px}.x-utu-no-reviews-banner_title{font-family:sans-serif;font-size:16px;font-weight:600;color:#1a1a1a;margin:0 0 .5rem;letter-spacing:.2px}.x-utu-no-reviews-banner_body{font-family:sans-serif;font-size:14px;color:#555;margin:0 0 1rem;line-height:1.5}.x-utu-no-reviews-banner_cta{display:inline-block;background-color:#fce546;color:#1a1a1a;border:none;border-radius:6px;padding:.5rem 1.25rem;font-family:sans-serif;font-size:14px;font-weight:600;cursor:pointer;letter-spacing:.3px;transition:background-color .15s ease}.x-utu-no-reviews-banner_cta:hover{background-color:#f5d800}@media only screen and (max-width: 600px){.x-utu-no-reviews-banner{padding:1.25rem 1rem}}',_U='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.feedback-details-endorsement-list{display:flex;align-items:center;width:calc(100% - .75rem);margin-right:.75rem;margin-bottom:8px;border-radius:10px;padding:.75rem 1rem;background-color:#ffdd3326;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;box-sizing:border-box;flex:1}.x-utu-feedback-details-endorsements{width:100%;padding:0 1.5rem;box-sizing:border-box}.x-utu-feedback-details-endorsements-wrapper{width:100%;display:flex;justify-content:start;white-space:nowrap;overflow-x:auto}.endorsement-title{margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar{width:10px;height:8px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-thumb{background:#fce546;border-radius:10px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-thumb:hover{background:#555}.x-utu-feedback-details-endorsements-body{display:flex;margin-right:1rem;margin-bottom:8px;border-radius:10px;padding:1.5rem;background-color:#ffdd3326;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px}.x-utu-feedback-details-endorsements-body_text{margin:0 .5rem;flex:1}.endor-text-section{width:50%}.endor-title{display:flex;justify-self:center;text-align:center}.endor-avatar{width:2rem}.endor-text{justify-content:space-around;padding-left:3rem;padding-right:0;font-size:1rem;align-items:center}.endor-text-light{color:#000}.endor-text-dark{color:#fff}.endor-text-body{display:flex}.endor-text-section{width:100%;display:flex;align-items:center;justify-content:center;margin-top:0;padding-top:1rem;padding-bottom:2rem}.endor-text-section-no-data{display:flex;justify-content:flex-start}.endor-text-stakes-no-data{display:flex;flex-direction:row;align-items:center;margin-top:2rem}.endor-text-stakes-item{font-size:1rem}.endor-text-stakes-item-light{color:#000}.endor-text-stakes-item-dark{color:#fff}.endor-text-stakes-item-2{font-size:.8rem}.endor-text-stakes-item-2-light{color:#000}.endor-text-stakes-item-2-dark{color:#fff}.endor-text-contacts-section{padding-left:1rem;padding-right:0;margin-top:1rem;font-size:.7rem;width:22rem;flex-wrap:wrap;text-align:left}.endor-text-contacts-section-light{color:#000}.endor-text-contacts-section-dark{color:#fff}.endor-text-contacts-body{font-size:.85rem;margin-top:0;display:flex;align-items:center;flex-wrap:wrap}.endor-text-truncate{display:inline-block;max-width:5rem;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.endor-text-image-item{margin-top:0;height:2.5rem;width:2.5rem;border-radius:50%;flex-shrink:0;object-fit:cover;border:2px solid rgb(252,229,70)}.endor-text-image-item-light,.endor-text-image-item-dark{border:2px solid rgb(252,229,70)}@media only screen and (min-width: 768px){.endor-title{display:flex;justify-self:center;text-align:center}.endor-text{padding-left:0}.endor-text-section{padding-bottom:1rem;margin-top:0}.endor-text-body{padding-left:0rem;padding-right:0rem}.endor-text-contacts-body{font-size:1rem}.endor-text-stakes-item{font-size:1.5rem}.endor-text-stakes-item-2{font-size:1rem}}@media only screen and (min-width: 768px){.endor-section{margin-top:2rem}}@media only screen and (min-width: 1481px){.endor-text-section{align-items:flex-start;justify-content:flex-start}}';function ef(t){const{children:e,submitStatus:a}=t;switch(a){case Le.submitting:return P("div",{className:"placeholder-card_wrapper",children:P("div",{className:"x-utu-description",children:[P("div",{className:"x-utu-icon x-utu-skeleton"}),P("div",{className:"x-utu-details",children:[P("div",{className:"x-utu-title x-utu-skeleton"}),P("div",{className:"x-utu-information x-utu-skeleton"})]})]})});case Le.error:return P("div",{className:"placeholder-card_wrapper",children:P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(wA,{})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"Something went wrong."}),P("div",{className:"placeholder-text-body",children:"We couldn't load reviews right now. Please try again later."})]})]})});default:return e}}const $m={twitter:"Twitter user",telegram:"Telegram user"},BU="User";function PU(t){if(!t)return{ref:"Someone"};for(const e in $m)if(t.properties[e])return{ref:$m[e],name:t.properties[e].name};return{ref:BU,name:t.name}}const UU={ref:"You"};function RU(t,e){const a=e.source,n=a.uuid===t,b=n?UU:PU(a),f=n?"have":"has";return P("p",{className:"endor-text-contacts-body ",children:[b.ref," ",b.name?.length>0&&P("span",{className:"endor-text-truncate",children:[P("b",{children:b.name})," "]}),f," endorsed ",P("b",{className:"mx-1",children:[e.endorsement?.value," UTT"]})]})}function QU(t){const[e,a]=B1(!1);t[t8]==="dark"&&a(!0);const n=e?"dark":"light",{endorsements:b}=t.feedbackSummary||{},f=b?.slice(0,f3.feedbackDetailsMaxEndorsements),r=u=>P("img",{className:`endor-text-image-item endor-text-image-item-${n}`,src:u||"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 490 490' fill='%23f9ca24'%3E%3Cpath d='M245 262c72 0 131-57 131-131S317 0 245 0 114 57 114 131s59 131 131 131zm0-221c50 0 91 41 91 90s-41 90-91 90-91-41-91-90 41-90 91-90z'/%3E%3Cpath d='M334 274c-9-2-17 0-22 6l-67 76-67-76c-5-6-15-8-22-6C62 306 0 383 0 469c0 12 9 21 21 21h448c12 0 21-9 21-21 0-86-62-163-156-195zM43 449c8-57 50-106 115-131l73 83c7 10 23 10 30 0l73-83c64 25 106 74 115 131H43z'/%3E%3C/svg%3E",alt:"endorsement",onError:l=>{l.target.onerror=null,l.target.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 490 490' fill='%23f9ca24'%3E%3Cpath d='M245 262c72 0 131-57 131-131S317 0 245 0 114 57 114 131s59 131 131 131zm0-221c50 0 91 41 91 90s-41 90-91 90-91-41-91-90 41-90 91-90z'/%3E%3Cpath d='M334 274c-9-2-17 0-22 6l-67 76-67-76c-5-6-15-8-22-6C62 306 0 383 0 469c0 12 9 21 21 21h448c12 0 21-9 21-21 0-86-62-163-156-195zM43 449c8-57 50-106 115-131l73 83c7 10 23 10 30 0l73-83c64 25 106 74 115 131H43z'/%3E%3C/svg%3E",l.target.className="endor-text-image-item",l.target.alt=""}}),c={largeDesktop:{breakpoint:{max:4e3,min:1e3},items:3},desktop:{breakpoint:{max:1e3,min:600},items:2},tablet:{breakpoint:{max:600,min:0},items:1}};return P(ef,{submitStatus:t.submitStatus,children:P(X6,{className:"x-utu-feedback-details-endorsements",excludeBootstrap:!0,excludeFonts:!0,children:[P("style",{children:[_U,ei]}),!b||b.length==0?P("div",{}):P("p",{className:"endorsement-title",children:"Endorsements from people in your network."}),!b||b.length==0?P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(hL,{...t})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"No endorsements available"}),P("div",{className:"placeholder-text-body",children:"When your people in your network endorse this entity they will appear here."})]})]}):P(ti,{responsive:c,arrows:f.length>1,children:f.map(u=>P("div",{className:"feedback-details-endorsement-list",children:[r(u.source?.image),P("div",{className:"x-utu-feedback-details-endorsements-body_text",children:RU(t[L5],u)})]}))})]})})}const FU=".x-utu-feedback-details-stars{height:100%;min-height:10rem;width:100%;background-color:#ffdd331a;border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:1.5rem 2rem;text-align:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}.star-ratings-section-title{font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px;margin-bottom:.75rem}.x-utu-feedback-details-stars-align{display:flex;justify-content:center;height:2rem;line-height:2rem}.x-utu-feedback-details-stars-avg{margin:0 1%;font-size:18px}.x-utu-feedback-details-stars-text{margin-top:.75rem;text-align:center;font-family:sans-serif;font-size:14px}";function YU(t){const{avg:e,summaryText:a}=t.feedbackSummary?.stars??{},n=e?Number(e).toFixed(2):null;return P(ef,{submitStatus:t.submitStatus,children:P(X6,{children:[P("style",{children:FU}),!t.feedbackSummary?.stars||!t.feedbackSummary?.stars.avg?P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(mL,{...t})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"No star ratings available"}),P("div",{className:"placeholder-text-body",children:"When people in your network leave star ratings for this entity they will appear here."})]})]}):P("section",{className:"x-utu-feedback-details-stars",children:[P("p",{className:"star-ratings-section-title",children:"Star ratings from people in your network."}),P("div",{className:"x-utu-feedback-details-stars-align",children:[P(rM,{count:5,value:e,size:30,color2:"#FFDD33",edit:!1,className:""}),P("p",{className:"x-utu-feedback-details-stars-avg",children:[" ",n," / 5.0 "]})]}),P("p",{className:"x-utu-feedback-details-stars-text",children:a})]})]})})}var fb={exports:{}};/**
|
|
1159
|
+
`,onClick:I,children:P(wU,{})}),y0&&!D&&P("button",{type:"button",className:`x-utu-video-btn-round-loading x-utu-video-btn-round x-utu-video-btn-round-${v}`,children:P("div",{className:`mb-2 mr-2 x-utu-video-btn-round-spinner x-utu-video-btn-round-spinner-${v}`,children:P(MU,{})})}),P("div",{className:"video-msg d-flex align-items-center",children:[N&&P("h3",{className:"x-utu-video-response-message my-4 text-white bg-success",children:[" ",N," "]}),T&&P("h3",{className:"x-utu-video-response-message my-4 text-white bg-danger",children:[" ",T," "]})]}),P("section",{className:"logo-position-video",children:P(Xd,{})})]})})}function vU(t){const[e,a]=B1(!1),[n,b]=B1(!1);t[t8]==="dark"&&b(!0);const f=n?"dark":"light";return P(X6,{className:`x-utu-video-container x-utu-section x-utu-section-${f}`,children:[P("style",{children:dM}),P("div",{className:"x-utu-video-wrapper",children:[P("button",{type:"button",style:{backgroundColor:t[r4]===void 0?null:`${t[r4]}`},className:`x-utu-video-btn-round x-utu-video-btn-round-${f}`,onClick:()=>{a(!0)},children:P(Bz,{})}),P("p",{className:`mx-3 x-utu-video-btn-round-text-${f}`,children:P("b",{children:"RECORD YOUR STORY"})}),e&&P(IU,{...t,onClose:()=>{a(!1)}})]})]})}function rw(t){const{apiUrl:e}=dt(t),a=t[H9],n=t[ge],b=t[Ud];$S(e,n);const r=(()=>{let c;switch(a){case"address":c=n;break;default:c=b}return c})();return P(X6,{className:"utu-feedback-form",children:[P("style",{children:[" ",oL," "]}),a?P("div",{className:"utu-feedback-form_title_wrapper",children:P("p",{className:"utu-feedback-form_title",children:[P("b",{children:" Give Feedback for: "})," ",r]})}):"",P("div",{className:"x-utu-feedback-form_body_1",children:[P("div",{className:"x-utu-feedback-form_body_recordvideo",children:P(vU,{...t})}),P("div",{className:"x-utu-feedback-form_body_StarRatinginput",children:P(_z,{...t})})]}),P("div",{className:"x-utu-feedback-form_body_2",children:[P(ZL,{...t}),P(Mz,{...t}),P(Tz,{...t})]})]})}const TU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-feedback-form-popup{width:100%;padding:.5rem;border-radius:10px;display:flex;flex-direction:column;align-items:stretch;justify-content:center}.x-utu-feedback-form-popup_btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#fce546}';function NU(t){const[e,a]=B1(!1);return x5(()=>{const n=()=>a(!0);return window.addEventListener("utu:leave-review",n),()=>window.removeEventListener("utu:leave-review",n)},[]),P(X6,{className:"x-utu-feedback-form-popup",children:[P("style",{children:[" ",TU," "]}),P("button",{type:"button",className:"x-utu-feedback-form-popup_btn",onClick:()=>a(!0),children:"Give feedback"}),e&&P(Eb,{title:"Feedback Form for:",onClose:()=>a(!1),...t,children:P(rw,{...t})})]})}const EU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-header{width:100%;padding:2rem 3rem;background-color:#fcf8e5;display:flex;justify-content:center;border-radius:10px}';function DU(){return P(X6,{children:[P("style",{children:EU}),P("section",{className:"x-utu-header x-utu-section",children:P("h3",{className:"x-utu-h3",children:" Feedback From Your Network "})})]})}const CU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-app-link{width:100%;text-align:center;justify-content:center;border-radius:10px;padding:.5rem;display:flex;flex-direction:column;align-items:stretch;background-color:#fcf8e5}.x-utu-app-link-btn{background-color:#fce546;width:100%}.x-utu-app-link-text{margin-top:.25rem}x-utu-app-a{text-decoration:none;color:#000}x-utu-app-a :hover{color:#000}';function kU(t){const{socialLinkUrl:e}=BS(),[a,n]=B1(!1),b=a?"dark":"light";return t[t8]==="dark"&&n(!0),P(X6,{className:`x-utu-app-link x-utu-section x-utu-section-no-border-${b}`,children:[P("style",{children:CU}),P("button",{className:"x-utu-app-link-btn x-utu-btn utu-btn-light",type:"button",style:{backgroundColor:t[r4]===void 0?null:`${t[r4]}`},children:P("a",{href:e,className:"x-utu-app-a",target:"_blank",rel:"noreferrer",children:P("h3",{className:"x-utu-h3 x-utu-app-link-text",children:"Connect to earn"})})})]})}const jU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-wallet-connect{width:100%;align-items:center;text-align:center;justify-content:center;background-color:#fcf8e5;border-radius:5px}.x-utu-wallet-connect-section{padding:.5rem}.x-utu-wallet-text-input-btn{width:100%;background-color:#fce546;margin-top:1rem}';function SU(){const{web3Modal:t}=hA();async function e(){const a=await t.connect(),f=(await new Ib(a).getSigner()).getAddress();As.address=await f}return P(X6,{className:"x-utu-wallet-connect",children:[P("style",{children:jU}),P("section",{className:"x-utu-wallet-connect-section",children:[P("p",{className:"x-utu-wallet-connect-text",children:"See UTU trust signals from your network"}),P("div",{children:P("button",{onClick:e,className:"x-utu-wallet-text-input-btn x-utu-btn",type:"submit",children:"Connect Wallet"})})]})]})}const LU='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-disconnect-wallet-btn{width:100%;align-items:center;text-align:center;justify-content:center;background-color:#fcf8e5;border-radius:5px;padding:.5rem}.x-utu-disconnect-text-input-btn{width:100%;background-color:#fce546}';function zU(){const{web3Modal:t}=hA();async function e(){const a=await t.cachedProvider;await t.clearCachedProvider(),a?.disconnect&&typeof a.disconnect=="function"&&await a.disconnect(),a?.close&&typeof a.close=="function"&&await a.close(),await localStorage.removeItem("walletconnect"),window.location.reload()}return P(X6,{children:[P("style",{children:LU}),P("section",{className:"x-utu-disconnect-wallet-btn",children:P("div",{children:P("button",{onClick:e,className:"x-utu-disconnect-text-input-btn x-utu-btn",type:"submit",children:"Disconnect Wallet"})})})]})}const OU='.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.video-msg{position:absolute}.trust-video{border:none;position:relative;object-fit:cover;width:100%;height:100%;transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}.trust-video-container{width:25rem;height:40rem;position:relative}.trust-video-btn{padding:0!important;border:none!important;background:none!important}.trust-video-wrapper{width:100%;height:37rem;margin:auto;display:flex;flex-direction:column;justify-content:center;background-color:#fcf8e5;overflow:hidden;align-items:center;padding:2rem}.trust-video-wrapper:hover .trust-video-controls{visibility:visible;opacity:1}.trust-video-msg{display:flex;align-items:center}.trust-video-controls{position:relative;bottom:0;margin-top:-10%;transform:translateY(-30%);border-radius:10px;align-items:center;justify-content:space-between;visibility:hidden;opacity:0;transition:all .25s ease-out;display:none}.trust-video-controls.show{display:flex}.trust-video-play{border-color:transparent;transition:.3s;margin:auto;margin-left:3rem;margin-right:3rem;line-height:1.5em;width:4em;height:4em;padding:.6rem .3rem .6rem .6rem;cursor:pointer;opacity:1;background-color:#fd3;font-size:.9rem;border-radius:50%;font:normal normal normal 18px/1}.trust-video-play:before{content:""}.trust-video-play.paused:before{content:""}.trust-video-play-btn{border-color:transparent}.trust-video-pause{border-color:transparent;transition:.3s;margin:auto;margin-left:3rem;margin-right:3rem;line-height:1.5em;width:4em;height:4em;padding:.6rem .4rem .6rem .6rem;cursor:pointer;opacity:1;background-color:#fd3;font-size:.9rem;border-radius:50%;font:normal normal normal 18px/1}.trust-video-pause:before{content:""}.trust-video-pause.paused:before{content:""}.trust-video-pause-btn{border-color:transparent}.trust-video-volume{border-color:transparent;color:#2b333fb3;font-size:1em;padding:.6rem;border-radius:20%;line-height:1.5em;width:3em;height:3em;background-color:#ffdd33b3;left:20px}.trust-video-fullscreen{border-color:transparent;color:#2b333fb3;font-size:.65em;line-height:2.5rem;padding:.6rem;width:5em;border-radius:20%;margin-right:5%;background-color:#ffdd33b3;right:20px}@media only screen and (min-width: 1280px){.trust-video-play,.trust-video-pause{margin-left:5rem;margin-right:5rem}.trust-video-controls{height:10em}}@media only screen and (max-width: 526px){.trust-video-play,.trust-video-pause{width:3em;height:3em;padding:.5rem .3rem .5rem .5rem}.trust-video-volume{width:2em;height:2em;padding:.4rem}.trust-video-fullscreen{width:3em;padding:.4rem}.trust-video-controls{transform:translateY(-100%)}}p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-success,.submit-error{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.x-utu-feedback-details{width:100%;margin:auto;background-color:#fff;min-height:30rem}.x-utu-feedback-details_title_wrapper{width:100%;background-color:#fce546;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;margin-bottom:1rem;font-family:sans-serif;padding:1rem 3rem}.x-utu-feedback-details-title{letter-spacing:1px;font-weight:500px;font-size:16px}.x-utu-feedback-details-text{letter-spacing:1px}.x-utu-feedback-details_body_0{width:100%;padding-top:3%;background-color:#fffdf4}.x-utu-feedback-details_body_1{width:100%;display:grid;grid-template-columns:1fr 1fr;background-color:#fffdf4;padding:4% 2% 32px;gap:1rem}.x-utu-feedback-details_body_2{width:100%;background-color:#fffdf4;padding-top:1%}.x-utu-feedback-details_body_VideoShow,.x-utu-feedback-details_body_StarRatingShow{width:100%}.x-utu-feedback-details_body_VideoShow>div,.x-utu-feedback-details_body_StarRatingShow>div{height:100%}.x-utu-feedback-details_body_VideoShow>div>div,.x-utu-feedback-details_body_StarRatingShow>div>div{height:100%}@media only screen and (max-width: 1300px){.x-utu-feedback-details_body_1{grid-template-columns:1fr;padding:4% 1.5rem 32px}.x-utu-feedback-details_body_VideoShow,.x-utu-feedback-details_body_StarRatingShow{width:100%;text-align:center;padding:.5rem 0}.x-utu-feedback-details_title-text{width:50%;font-size:12px}}@media only screen and (max-width: 600px){.x-utu-feedback-details_title-text{text-align:center;width:100%}}@media only screen and (max-width: 1000px){.x-utu-feedback-details_title_wrapper{text-align:center;width:100%;border-radius:0}}.x-utu-no-reviews-banner{width:100%;background-color:#fffdf4;border-bottom:1px solid rgba(0,0,0,.08);padding:1.5rem 2rem;box-sizing:border-box;margin-bottom:.5rem}.x-utu-no-reviews-banner_content{max-width:560px}.x-utu-no-reviews-banner_title{font-family:sans-serif;font-size:16px;font-weight:600;color:#1a1a1a;margin:0 0 .5rem;letter-spacing:.2px}.x-utu-no-reviews-banner_body{font-family:sans-serif;font-size:14px;color:#555;margin:0 0 1rem;line-height:1.5}.x-utu-no-reviews-banner_cta{display:inline-block;background-color:#fce546;color:#1a1a1a;border:none;border-radius:6px;padding:.5rem 1.25rem;font-family:sans-serif;font-size:14px;font-weight:600;cursor:pointer;letter-spacing:.3px;transition:background-color .15s ease}.x-utu-no-reviews-banner_cta:hover{background-color:#f5d800}@media only screen and (max-width: 600px){.x-utu-no-reviews-banner{padding:1.25rem 1rem}}',_U='p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,#fff0,#ffffff80,#fff0);background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;height:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd331a;min-height:10rem;border-radius:8px;border:1px solid rgba(0,0,0,.08);align-items:center;box-sizing:border-box}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.feedback-details-endorsement-list{display:flex;align-items:center;width:calc(100% - .75rem);margin-right:.75rem;margin-bottom:8px;border-radius:10px;padding:.75rem 1rem;background-color:#ffdd3326;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;box-sizing:border-box;flex:1}.x-utu-feedback-details-endorsements{width:100%;padding:0 1.5rem;box-sizing:border-box}.x-utu-feedback-details-endorsements-wrapper{width:100%;display:flex;justify-content:start;white-space:nowrap;overflow-x:auto}.endorsement-title{margin-bottom:8px;font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar{width:10px;height:8px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-thumb{background:#fce546;border-radius:10px}.x-utu-feedback-details-endorsements-wrapper::-webkit-scrollbar-thumb:hover{background:#555}.x-utu-feedback-details-endorsements-body{display:flex;margin-right:1rem;margin-bottom:8px;border-radius:10px;padding:1.5rem;background-color:#ffdd3326;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px}.x-utu-feedback-details-endorsements-body_text{margin:0 .5rem;flex:1}.endor-text-section{width:50%}.endor-title{display:flex;justify-self:center;text-align:center}.endor-avatar{width:2rem}.endor-text{justify-content:space-around;padding-left:3rem;padding-right:0;font-size:1rem;align-items:center}.endor-text-light{color:#000}.endor-text-dark{color:#fff}.endor-text-body{display:flex}.endor-text-section{width:100%;display:flex;align-items:center;justify-content:center;margin-top:0;padding-top:1rem;padding-bottom:2rem}.endor-text-section-no-data{display:flex;justify-content:flex-start}.endor-text-stakes-no-data{display:flex;flex-direction:row;align-items:center;margin-top:2rem}.endor-text-stakes-item{font-size:1rem}.endor-text-stakes-item-light{color:#000}.endor-text-stakes-item-dark{color:#fff}.endor-text-stakes-item-2{font-size:.8rem}.endor-text-stakes-item-2-light{color:#000}.endor-text-stakes-item-2-dark{color:#fff}.endor-text-contacts-section{padding-left:1rem;padding-right:0;margin-top:1rem;font-size:.7rem;width:22rem;flex-wrap:wrap;text-align:left}.endor-text-contacts-section-light{color:#000}.endor-text-contacts-section-dark{color:#fff}.endor-text-contacts-body{font-size:.85rem;margin-top:0;display:flex;align-items:center;flex-wrap:wrap}.endor-text-truncate{display:inline-block;max-width:5rem;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.endor-text-image-item{margin-top:0;height:2.5rem;width:2.5rem;border-radius:50%;flex-shrink:0;object-fit:cover;border:2px solid rgb(252,229,70)}.endor-text-image-item-light,.endor-text-image-item-dark{border:2px solid rgb(252,229,70)}@media only screen and (min-width: 768px){.endor-title{display:flex;justify-self:center;text-align:center}.endor-text{padding-left:0}.endor-text-section{padding-bottom:1rem;margin-top:0}.endor-text-body{padding-left:0rem;padding-right:0rem}.endor-text-contacts-body{font-size:1rem}.endor-text-stakes-item{font-size:1.5rem}.endor-text-stakes-item-2{font-size:1rem}}@media only screen and (min-width: 768px){.endor-section{margin-top:2rem}}@media only screen and (min-width: 1481px){.endor-text-section{align-items:flex-start;justify-content:flex-start}}';function ef(t){const{children:e,submitStatus:a}=t;switch(a){case Le.submitting:return P("div",{className:"placeholder-card_wrapper",children:P("div",{className:"x-utu-description",children:[P("div",{className:"x-utu-icon x-utu-skeleton"}),P("div",{className:"x-utu-details",children:[P("div",{className:"x-utu-title x-utu-skeleton"}),P("div",{className:"x-utu-information x-utu-skeleton"})]})]})});case Le.error:return P("div",{className:"placeholder-card_wrapper",children:P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(wA,{})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"Something went wrong."}),P("div",{className:"placeholder-text-body",children:"We couldn't load reviews right now. Please try again later."})]})]})});default:return e}}const $m={twitter:"Twitter user",telegram:"Telegram user"},BU="User";function PU(t){if(!t)return{ref:"Someone"};for(const e in $m)if(t.properties[e])return{ref:$m[e],name:t.properties[e].name};return{ref:BU,name:t.name}}const UU={ref:"You"};function RU(t,e){const a=e.source,n=a.uuid===t,b=n?UU:PU(a),f=n?"have":"has";return P("p",{className:"endor-text-contacts-body ",children:[b.ref," ",b.name?.length>0&&P("span",{className:"endor-text-truncate",children:[P("b",{children:b.name})," "]}),f," endorsed ",P("b",{className:"mx-1",children:[e.endorsement?.value," UTT"]})]})}function QU(t){const[e,a]=B1(!1);t[t8]==="dark"&&a(!0);const n=e?"dark":"light",{endorsements:b}=t.feedbackSummary||{},f=b?.slice(0,f3.feedbackDetailsMaxEndorsements),r=u=>P("img",{className:`endor-text-image-item endor-text-image-item-${n}`,src:u||"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 490 490' fill='%23f9ca24'%3E%3Cpath d='M245 262c72 0 131-57 131-131S317 0 245 0 114 57 114 131s59 131 131 131zm0-221c50 0 91 41 91 90s-41 90-91 90-91-41-91-90 41-90 91-90z'/%3E%3Cpath d='M334 274c-9-2-17 0-22 6l-67 76-67-76c-5-6-15-8-22-6C62 306 0 383 0 469c0 12 9 21 21 21h448c12 0 21-9 21-21 0-86-62-163-156-195zM43 449c8-57 50-106 115-131l73 83c7 10 23 10 30 0l73-83c64 25 106 74 115 131H43z'/%3E%3C/svg%3E",alt:"endorsement",onError:l=>{l.target.onerror=null,l.target.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 490 490' fill='%23f9ca24'%3E%3Cpath d='M245 262c72 0 131-57 131-131S317 0 245 0 114 57 114 131s59 131 131 131zm0-221c50 0 91 41 91 90s-41 90-91 90-91-41-91-90 41-90 91-90z'/%3E%3Cpath d='M334 274c-9-2-17 0-22 6l-67 76-67-76c-5-6-15-8-22-6C62 306 0 383 0 469c0 12 9 21 21 21h448c12 0 21-9 21-21 0-86-62-163-156-195zM43 449c8-57 50-106 115-131l73 83c7 10 23 10 30 0l73-83c64 25 106 74 115 131H43z'/%3E%3C/svg%3E",l.target.className="endor-text-image-item",l.target.alt=""}}),c={largeDesktop:{breakpoint:{max:4e3,min:1e3},items:3},desktop:{breakpoint:{max:1e3,min:600},items:2},tablet:{breakpoint:{max:600,min:0},items:1}};return P(ef,{submitStatus:t.submitStatus,children:P(X6,{className:"x-utu-feedback-details-endorsements",excludeBootstrap:!0,excludeFonts:!0,children:[P("style",{children:[_U,ei]}),!b||b.length==0?P("div",{}):P("p",{className:"endorsement-title",children:"Endorsements from people in your network."}),!b||b.length==0?P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(hL,{...t})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"No endorsements available"}),P("div",{className:"placeholder-text-body",children:"When your people in your network endorse this entity they will appear here."})]})]}):P(ti,{responsive:c,arrows:f.length>1,children:f.map(u=>P("div",{className:"feedback-details-endorsement-list",children:[r(u.source?.image),P("div",{className:"x-utu-feedback-details-endorsements-body_text",children:RU(t[L5],u)})]}))})]})})}const FU=".x-utu-feedback-details-stars{height:100%;min-height:10rem;width:100%;background-color:#ffdd331a;border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:1.5rem 2rem;text-align:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}.star-ratings-section-title{font-family:sans-serif;font-size:15px;font-weight:500;letter-spacing:1px;margin-bottom:.75rem}.x-utu-feedback-details-stars-align{display:flex;justify-content:center;height:2rem;line-height:2rem}.x-utu-feedback-details-stars-avg{margin:0 1%;font-size:18px}.x-utu-feedback-details-stars-text{margin-top:.75rem;text-align:center;font-family:sans-serif;font-size:14px}";function YU(t){const{avg:e,summaryText:a}=t.feedbackSummary?.stars??{},n=e?Number(e).toFixed(2):null;return P(ef,{submitStatus:t.submitStatus,children:P(X6,{children:[P("style",{children:FU}),!t.feedbackSummary?.stars||!t.feedbackSummary?.stars.avg?P("div",{className:"placeholder-card",children:[P("div",{className:"placeholder-icon",children:P(mL,{...t})}),P("div",{className:"placeholder-text-wrap",children:[P("div",{className:"placeholder-text-title",children:"No star ratings available"}),P("div",{className:"placeholder-text-body",children:"When people in your network leave star ratings for this entity they will appear here."})]})]}):P("section",{className:"x-utu-feedback-details-stars",children:[P("p",{className:"star-ratings-section-title",children:"Star ratings from people in your network."}),P("div",{className:"x-utu-feedback-details-stars-align",children:[P(rM,{count:5,value:e,size:30,color2:"#FFDD33",edit:!1,className:""}),P("p",{className:"x-utu-feedback-details-stars-avg",children:[" ",n," / 5.0 "]})]}),P("p",{className:"x-utu-feedback-details-stars-text",children:a})]})]})})}var fb={exports:{}};/**
|
|
1160
1160
|
* @license
|
|
1161
1161
|
* Lodash <https://lodash.com/>
|
|
1162
1162
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|