@dcl/vesting-dashboard 3.4.1-11501425816.commit-f9cd158 → 3.4.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.
@@ -124,7 +124,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
124
124
  *
125
125
  * @author Feross Aboukhadijeh <https://feross.org>
126
126
  * @license MIT
127
- */(function(_e){const et=base64Js,tt=ieee754,nt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_e.Buffer=pt,_e.SlowBuffer=Nt,_e.INSPECT_MAX_BYTES=50;const at=2147483647;_e.kMaxLength=at;const{Uint8Array:ot,ArrayBuffer:st,SharedArrayBuffer:ct}=globalThis;pt.TYPED_ARRAY_SUPPORT=dt(),!pt.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 dt(){try{const rr=new ot(1),Xt={foo:function(){return 42}};return Object.setPrototypeOf(Xt,ot.prototype),Object.setPrototypeOf(rr,Xt),rr.foo()===42}catch{return!1}}Object.defineProperty(pt.prototype,"parent",{enumerable:!0,get:function(){if(pt.isBuffer(this))return this.buffer}}),Object.defineProperty(pt.prototype,"offset",{enumerable:!0,get:function(){if(pt.isBuffer(this))return this.byteOffset}});function ht(rr){if(rr>at)throw new RangeError('The value "'+rr+'" is invalid for option "size"');const Xt=new ot(rr);return Object.setPrototypeOf(Xt,pt.prototype),Xt}function pt(rr,Xt,er){if(typeof rr=="number"){if(typeof Xt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return bt(rr)}return mt(rr,Xt,er)}pt.poolSize=8192;function mt(rr,Xt,er){if(typeof rr=="string")return $t(rr,Xt);if(st.isView(rr))return St(rr);if(rr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof rr);if(jr(rr,st)||rr&&jr(rr.buffer,st)||typeof ct<"u"&&(jr(rr,ct)||rr&&jr(rr.buffer,ct)))return Tt(rr,Xt,er);if(typeof rr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const lr=rr.valueOf&&rr.valueOf();if(lr!=null&&lr!==rr)return pt.from(lr,Xt,er);const _r=Pt(rr);if(_r)return _r;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof rr[Symbol.toPrimitive]=="function")return pt.from(rr[Symbol.toPrimitive]("string"),Xt,er);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof rr)}pt.from=function(rr,Xt,er){return mt(rr,Xt,er)},Object.setPrototypeOf(pt.prototype,ot.prototype),Object.setPrototypeOf(pt,ot);function yt(rr){if(typeof rr!="number")throw new TypeError('"size" argument must be of type number');if(rr<0)throw new RangeError('The value "'+rr+'" is invalid for option "size"')}function gt(rr,Xt,er){return yt(rr),rr<=0?ht(rr):Xt!==void 0?typeof er=="string"?ht(rr).fill(Xt,er):ht(rr).fill(Xt):ht(rr)}pt.alloc=function(rr,Xt,er){return gt(rr,Xt,er)};function bt(rr){return yt(rr),ht(rr<0?0:Ot(rr)|0)}pt.allocUnsafe=function(rr){return bt(rr)},pt.allocUnsafeSlow=function(rr){return bt(rr)};function $t(rr,Xt){if((typeof Xt!="string"||Xt==="")&&(Xt="utf8"),!pt.isEncoding(Xt))throw new TypeError("Unknown encoding: "+Xt);const er=Lt(rr,Xt)|0;let lr=ht(er);const _r=lr.write(rr,Xt);return _r!==er&&(lr=lr.slice(0,_r)),lr}function wt(rr){const Xt=rr.length<0?0:Ot(rr.length)|0,er=ht(Xt);for(let lr=0;lr<Xt;lr+=1)er[lr]=rr[lr]&255;return er}function St(rr){if(jr(rr,ot)){const Xt=new ot(rr);return Tt(Xt.buffer,Xt.byteOffset,Xt.byteLength)}return wt(rr)}function Tt(rr,Xt,er){if(Xt<0||rr.byteLength<Xt)throw new RangeError('"offset" is outside of buffer bounds');if(rr.byteLength<Xt+(er||0))throw new RangeError('"length" is outside of buffer bounds');let lr;return Xt===void 0&&er===void 0?lr=new ot(rr):er===void 0?lr=new ot(rr,Xt):lr=new ot(rr,Xt,er),Object.setPrototypeOf(lr,pt.prototype),lr}function Pt(rr){if(pt.isBuffer(rr)){const Xt=Ot(rr.length)|0,er=ht(Xt);return er.length===0||rr.copy(er,0,0,Xt),er}if(rr.length!==void 0)return typeof rr.length!="number"||Hr(rr.length)?ht(0):wt(rr);if(rr.type==="Buffer"&&Array.isArray(rr.data))return wt(rr.data)}function Ot(rr){if(rr>=at)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+at.toString(16)+" bytes");return rr|0}function Nt(rr){return+rr!=rr&&(rr=0),pt.alloc(+rr)}pt.isBuffer=function(Xt){return Xt!=null&&Xt._isBuffer===!0&&Xt!==pt.prototype},pt.compare=function(Xt,er){if(jr(Xt,ot)&&(Xt=pt.from(Xt,Xt.offset,Xt.byteLength)),jr(er,ot)&&(er=pt.from(er,er.offset,er.byteLength)),!pt.isBuffer(Xt)||!pt.isBuffer(er))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Xt===er)return 0;let lr=Xt.length,_r=er.length;for(let sn=0,xr=Math.min(lr,_r);sn<xr;++sn)if(Xt[sn]!==er[sn]){lr=Xt[sn],_r=er[sn];break}return lr<_r?-1:_r<lr?1:0},pt.isEncoding=function(Xt){switch(String(Xt).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}},pt.concat=function(Xt,er){if(!Array.isArray(Xt))throw new TypeError('"list" argument must be an Array of Buffers');if(Xt.length===0)return pt.alloc(0);let lr;if(er===void 0)for(er=0,lr=0;lr<Xt.length;++lr)er+=Xt[lr].length;const _r=pt.allocUnsafe(er);let sn=0;for(lr=0;lr<Xt.length;++lr){let xr=Xt[lr];if(jr(xr,ot))sn+xr.length>_r.length?(pt.isBuffer(xr)||(xr=pt.from(xr)),xr.copy(_r,sn)):ot.prototype.set.call(_r,xr,sn);else if(pt.isBuffer(xr))xr.copy(_r,sn);else throw new TypeError('"list" argument must be an Array of Buffers');sn+=xr.length}return _r};function Lt(rr,Xt){if(pt.isBuffer(rr))return rr.length;if(st.isView(rr)||jr(rr,st))return rr.byteLength;if(typeof rr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof rr);const er=rr.length,lr=arguments.length>2&&arguments[2]===!0;if(!lr&&er===0)return 0;let _r=!1;for(;;)switch(Xt){case"ascii":case"latin1":case"binary":return er;case"utf8":case"utf-8":return _n(rr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return er*2;case"hex":return er>>>1;case"base64":return xn(rr).length;default:if(_r)return lr?-1:_n(rr).length;Xt=(""+Xt).toLowerCase(),_r=!0}}pt.byteLength=Lt;function Bt(rr,Xt,er){let lr=!1;if((Xt===void 0||Xt<0)&&(Xt=0),Xt>this.length||((er===void 0||er>this.length)&&(er=this.length),er<=0)||(er>>>=0,Xt>>>=0,er<=Xt))return"";for(rr||(rr="utf8");;)switch(rr){case"hex":return jt(this,Xt,er);case"utf8":case"utf-8":return Dt(this,Xt,er);case"ascii":return _t(this,Xt,er);case"latin1":case"binary":return Mt(this,Xt,er);case"base64":return Ct(this,Xt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,Xt,er);default:if(lr)throw new TypeError("Unknown encoding: "+rr);rr=(rr+"").toLowerCase(),lr=!0}}pt.prototype._isBuffer=!0;function Ut(rr,Xt,er){const lr=rr[Xt];rr[Xt]=rr[er],rr[er]=lr}pt.prototype.swap16=function(){const Xt=this.length;if(Xt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let er=0;er<Xt;er+=2)Ut(this,er,er+1);return this},pt.prototype.swap32=function(){const Xt=this.length;if(Xt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let er=0;er<Xt;er+=4)Ut(this,er,er+3),Ut(this,er+1,er+2);return this},pt.prototype.swap64=function(){const Xt=this.length;if(Xt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let er=0;er<Xt;er+=8)Ut(this,er,er+7),Ut(this,er+1,er+6),Ut(this,er+2,er+5),Ut(this,er+3,er+4);return this},pt.prototype.toString=function(){const Xt=this.length;return Xt===0?"":arguments.length===0?Dt(this,0,Xt):Bt.apply(this,arguments)},pt.prototype.toLocaleString=pt.prototype.toString,pt.prototype.equals=function(Xt){if(!pt.isBuffer(Xt))throw new TypeError("Argument must be a Buffer");return this===Xt?!0:pt.compare(this,Xt)===0},pt.prototype.inspect=function(){let Xt="";const er=_e.INSPECT_MAX_BYTES;return Xt=this.toString("hex",0,er).replace(/(.{2})/g,"$1 ").trim(),this.length>er&&(Xt+=" ... "),"<Buffer "+Xt+">"},nt&&(pt.prototype[nt]=pt.prototype.inspect),pt.prototype.compare=function(Xt,er,lr,_r,sn){if(jr(Xt,ot)&&(Xt=pt.from(Xt,Xt.offset,Xt.byteLength)),!pt.isBuffer(Xt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Xt);if(er===void 0&&(er=0),lr===void 0&&(lr=Xt?Xt.length:0),_r===void 0&&(_r=0),sn===void 0&&(sn=this.length),er<0||lr>Xt.length||_r<0||sn>this.length)throw new RangeError("out of range index");if(_r>=sn&&er>=lr)return 0;if(_r>=sn)return-1;if(er>=lr)return 1;if(er>>>=0,lr>>>=0,_r>>>=0,sn>>>=0,this===Xt)return 0;let xr=sn-_r,Xr=lr-er;const Yn=Math.min(xr,Xr),dn=this.slice(_r,sn),yn=Xt.slice(er,lr);for(let Zn=0;Zn<Yn;++Zn)if(dn[Zn]!==yn[Zn]){xr=dn[Zn],Xr=yn[Zn];break}return xr<Xr?-1:Xr<xr?1:0};function Ft(rr,Xt,er,lr,_r){if(rr.length===0)return-1;if(typeof er=="string"?(lr=er,er=0):er>2147483647?er=2147483647:er<-2147483648&&(er=-2147483648),er=+er,Hr(er)&&(er=_r?0:rr.length-1),er<0&&(er=rr.length+er),er>=rr.length){if(_r)return-1;er=rr.length-1}else if(er<0)if(_r)er=0;else return-1;if(typeof Xt=="string"&&(Xt=pt.from(Xt,lr)),pt.isBuffer(Xt))return Xt.length===0?-1:zt(rr,Xt,er,lr,_r);if(typeof Xt=="number")return Xt=Xt&255,typeof ot.prototype.indexOf=="function"?_r?ot.prototype.indexOf.call(rr,Xt,er):ot.prototype.lastIndexOf.call(rr,Xt,er):zt(rr,[Xt],er,lr,_r);throw new TypeError("val must be string, number or Buffer")}function zt(rr,Xt,er,lr,_r){let sn=1,xr=rr.length,Xr=Xt.length;if(lr!==void 0&&(lr=String(lr).toLowerCase(),lr==="ucs2"||lr==="ucs-2"||lr==="utf16le"||lr==="utf-16le")){if(rr.length<2||Xt.length<2)return-1;sn=2,xr/=2,Xr/=2,er/=2}function Yn(yn,Zn){return sn===1?yn[Zn]:yn.readUInt16BE(Zn*sn)}let dn;if(_r){let yn=-1;for(dn=er;dn<xr;dn++)if(Yn(rr,dn)===Yn(Xt,yn===-1?0:dn-yn)){if(yn===-1&&(yn=dn),dn-yn+1===Xr)return yn*sn}else yn!==-1&&(dn-=dn-yn),yn=-1}else for(er+Xr>xr&&(er=xr-Xr),dn=er;dn>=0;dn--){let yn=!0;for(let Zn=0;Zn<Xr;Zn++)if(Yn(rr,dn+Zn)!==Yn(Xt,Zn)){yn=!1;break}if(yn)return dn}return-1}pt.prototype.includes=function(Xt,er,lr){return this.indexOf(Xt,er,lr)!==-1},pt.prototype.indexOf=function(Xt,er,lr){return Ft(this,Xt,er,lr,!0)},pt.prototype.lastIndexOf=function(Xt,er,lr){return Ft(this,Xt,er,lr,!1)};function It(rr,Xt,er,lr){er=Number(er)||0;const _r=rr.length-er;lr?(lr=Number(lr),lr>_r&&(lr=_r)):lr=_r;const sn=Xt.length;lr>sn/2&&(lr=sn/2);let xr;for(xr=0;xr<lr;++xr){const Xr=parseInt(Xt.substr(xr*2,2),16);if(Hr(Xr))return xr;rr[er+xr]=Xr}return xr}function vt(rr,Xt,er,lr){return pr(_n(Xt,rr.length-er),rr,er,lr)}function Et(rr,Xt,er,lr){return pr(Pr(Xt),rr,er,lr)}function At(rr,Xt,er,lr){return pr(xn(Xt),rr,er,lr)}function xt(rr,Xt,er,lr){return pr(Mr(Xt,rr.length-er),rr,er,lr)}pt.prototype.write=function(Xt,er,lr,_r){if(er===void 0)_r="utf8",lr=this.length,er=0;else if(lr===void 0&&typeof er=="string")_r=er,lr=this.length,er=0;else if(isFinite(er))er=er>>>0,isFinite(lr)?(lr=lr>>>0,_r===void 0&&(_r="utf8")):(_r=lr,lr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const sn=this.length-er;if((lr===void 0||lr>sn)&&(lr=sn),Xt.length>0&&(lr<0||er<0)||er>this.length)throw new RangeError("Attempt to write outside buffer bounds");_r||(_r="utf8");let xr=!1;for(;;)switch(_r){case"hex":return It(this,Xt,er,lr);case"utf8":case"utf-8":return vt(this,Xt,er,lr);case"ascii":case"latin1":case"binary":return Et(this,Xt,er,lr);case"base64":return At(this,Xt,er,lr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,Xt,er,lr);default:if(xr)throw new TypeError("Unknown encoding: "+_r);_r=(""+_r).toLowerCase(),xr=!0}},pt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ct(rr,Xt,er){return Xt===0&&er===rr.length?et.fromByteArray(rr):et.fromByteArray(rr.slice(Xt,er))}function Dt(rr,Xt,er){er=Math.min(rr.length,er);const lr=[];let _r=Xt;for(;_r<er;){const sn=rr[_r];let xr=null,Xr=sn>239?4:sn>223?3:sn>191?2:1;if(_r+Xr<=er){let Yn,dn,yn,Zn;switch(Xr){case 1:sn<128&&(xr=sn);break;case 2:Yn=rr[_r+1],(Yn&192)===128&&(Zn=(sn&31)<<6|Yn&63,Zn>127&&(xr=Zn));break;case 3:Yn=rr[_r+1],dn=rr[_r+2],(Yn&192)===128&&(dn&192)===128&&(Zn=(sn&15)<<12|(Yn&63)<<6|dn&63,Zn>2047&&(Zn<55296||Zn>57343)&&(xr=Zn));break;case 4:Yn=rr[_r+1],dn=rr[_r+2],yn=rr[_r+3],(Yn&192)===128&&(dn&192)===128&&(yn&192)===128&&(Zn=(sn&15)<<18|(Yn&63)<<12|(dn&63)<<6|yn&63,Zn>65535&&Zn<1114112&&(xr=Zn))}}xr===null?(xr=65533,Xr=1):xr>65535&&(xr-=65536,lr.push(xr>>>10&1023|55296),xr=56320|xr&1023),lr.push(xr),_r+=Xr}return Rt(lr)}const kt=4096;function Rt(rr){const Xt=rr.length;if(Xt<=kt)return String.fromCharCode.apply(String,rr);let er="",lr=0;for(;lr<Xt;)er+=String.fromCharCode.apply(String,rr.slice(lr,lr+=kt));return er}function _t(rr,Xt,er){let lr="";er=Math.min(rr.length,er);for(let _r=Xt;_r<er;++_r)lr+=String.fromCharCode(rr[_r]&127);return lr}function Mt(rr,Xt,er){let lr="";er=Math.min(rr.length,er);for(let _r=Xt;_r<er;++_r)lr+=String.fromCharCode(rr[_r]);return lr}function jt(rr,Xt,er){const lr=rr.length;(!Xt||Xt<0)&&(Xt=0),(!er||er<0||er>lr)&&(er=lr);let _r="";for(let sn=Xt;sn<er;++sn)_r+=Gr[rr[sn]];return _r}function qt(rr,Xt,er){const lr=rr.slice(Xt,er);let _r="";for(let sn=0;sn<lr.length-1;sn+=2)_r+=String.fromCharCode(lr[sn]+lr[sn+1]*256);return _r}pt.prototype.slice=function(Xt,er){const lr=this.length;Xt=~~Xt,er=er===void 0?lr:~~er,Xt<0?(Xt+=lr,Xt<0&&(Xt=0)):Xt>lr&&(Xt=lr),er<0?(er+=lr,er<0&&(er=0)):er>lr&&(er=lr),er<Xt&&(er=Xt);const _r=this.subarray(Xt,er);return Object.setPrototypeOf(_r,pt.prototype),_r};function Gt(rr,Xt,er){if(rr%1!==0||rr<0)throw new RangeError("offset is not uint");if(rr+Xt>er)throw new RangeError("Trying to access beyond buffer length")}pt.prototype.readUintLE=pt.prototype.readUIntLE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt],sn=1,xr=0;for(;++xr<er&&(sn*=256);)_r+=this[Xt+xr]*sn;return _r},pt.prototype.readUintBE=pt.prototype.readUIntBE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt+--er],sn=1;for(;er>0&&(sn*=256);)_r+=this[Xt+--er]*sn;return _r},pt.prototype.readUint8=pt.prototype.readUInt8=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,1,this.length),this[Xt]},pt.prototype.readUint16LE=pt.prototype.readUInt16LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,2,this.length),this[Xt]|this[Xt+1]<<8},pt.prototype.readUint16BE=pt.prototype.readUInt16BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,2,this.length),this[Xt]<<8|this[Xt+1]},pt.prototype.readUint32LE=pt.prototype.readUInt32LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),(this[Xt]|this[Xt+1]<<8|this[Xt+2]<<16)+this[Xt+3]*16777216},pt.prototype.readUint32BE=pt.prototype.readUInt32BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]*16777216+(this[Xt+1]<<16|this[Xt+2]<<8|this[Xt+3])},pt.prototype.readBigUInt64LE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=er+this[++Xt]*2**8+this[++Xt]*2**16+this[++Xt]*2**24,sn=this[++Xt]+this[++Xt]*2**8+this[++Xt]*2**16+lr*2**24;return BigInt(_r)+(BigInt(sn)<<BigInt(32))}),pt.prototype.readBigUInt64BE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=er*2**24+this[++Xt]*2**16+this[++Xt]*2**8+this[++Xt],sn=this[++Xt]*2**24+this[++Xt]*2**16+this[++Xt]*2**8+lr;return(BigInt(_r)<<BigInt(32))+BigInt(sn)}),pt.prototype.readIntLE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt],sn=1,xr=0;for(;++xr<er&&(sn*=256);)_r+=this[Xt+xr]*sn;return sn*=128,_r>=sn&&(_r-=Math.pow(2,8*er)),_r},pt.prototype.readIntBE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=er,sn=1,xr=this[Xt+--_r];for(;_r>0&&(sn*=256);)xr+=this[Xt+--_r]*sn;return sn*=128,xr>=sn&&(xr-=Math.pow(2,8*er)),xr},pt.prototype.readInt8=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,1,this.length),this[Xt]&128?(255-this[Xt]+1)*-1:this[Xt]},pt.prototype.readInt16LE=function(Xt,er){Xt=Xt>>>0,er||Gt(Xt,2,this.length);const lr=this[Xt]|this[Xt+1]<<8;return lr&32768?lr|4294901760:lr},pt.prototype.readInt16BE=function(Xt,er){Xt=Xt>>>0,er||Gt(Xt,2,this.length);const lr=this[Xt+1]|this[Xt]<<8;return lr&32768?lr|4294901760:lr},pt.prototype.readInt32LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]|this[Xt+1]<<8|this[Xt+2]<<16|this[Xt+3]<<24},pt.prototype.readInt32BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]<<24|this[Xt+1]<<16|this[Xt+2]<<8|this[Xt+3]},pt.prototype.readBigInt64LE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=this[Xt+4]+this[Xt+5]*2**8+this[Xt+6]*2**16+(lr<<24);return(BigInt(_r)<<BigInt(32))+BigInt(er+this[++Xt]*2**8+this[++Xt]*2**16+this[++Xt]*2**24)}),pt.prototype.readBigInt64BE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=(er<<24)+this[++Xt]*2**16+this[++Xt]*2**8+this[++Xt];return(BigInt(_r)<<BigInt(32))+BigInt(this[++Xt]*2**24+this[++Xt]*2**16+this[++Xt]*2**8+lr)}),pt.prototype.readFloatLE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),tt.read(this,Xt,!0,23,4)},pt.prototype.readFloatBE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),tt.read(this,Xt,!1,23,4)},pt.prototype.readDoubleLE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,8,this.length),tt.read(this,Xt,!0,52,8)},pt.prototype.readDoubleBE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,8,this.length),tt.read(this,Xt,!1,52,8)};function Ht(rr,Xt,er,lr,_r,sn){if(!pt.isBuffer(rr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Xt>_r||Xt<sn)throw new RangeError('"value" argument is out of bounds');if(er+lr>rr.length)throw new RangeError("Index out of range")}pt.prototype.writeUintLE=pt.prototype.writeUIntLE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,lr=lr>>>0,!_r){const Xr=Math.pow(2,8*lr)-1;Ht(this,Xt,er,lr,Xr,0)}let sn=1,xr=0;for(this[er]=Xt&255;++xr<lr&&(sn*=256);)this[er+xr]=Xt/sn&255;return er+lr},pt.prototype.writeUintBE=pt.prototype.writeUIntBE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,lr=lr>>>0,!_r){const Xr=Math.pow(2,8*lr)-1;Ht(this,Xt,er,lr,Xr,0)}let sn=lr-1,xr=1;for(this[er+sn]=Xt&255;--sn>=0&&(xr*=256);)this[er+sn]=Xt/xr&255;return er+lr},pt.prototype.writeUint8=pt.prototype.writeUInt8=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,1,255,0),this[er]=Xt&255,er+1},pt.prototype.writeUint16LE=pt.prototype.writeUInt16LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,65535,0),this[er]=Xt&255,this[er+1]=Xt>>>8,er+2},pt.prototype.writeUint16BE=pt.prototype.writeUInt16BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,65535,0),this[er]=Xt>>>8,this[er+1]=Xt&255,er+2},pt.prototype.writeUint32LE=pt.prototype.writeUInt32LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,4294967295,0),this[er+3]=Xt>>>24,this[er+2]=Xt>>>16,this[er+1]=Xt>>>8,this[er]=Xt&255,er+4},pt.prototype.writeUint32BE=pt.prototype.writeUInt32BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,4294967295,0),this[er]=Xt>>>24,this[er+1]=Xt>>>16,this[er+2]=Xt>>>8,this[er+3]=Xt&255,er+4};function Wt(rr,Xt,er,lr,_r){Tr(Xt,lr,_r,rr,er,7);let sn=Number(Xt&BigInt(4294967295));rr[er++]=sn,sn=sn>>8,rr[er++]=sn,sn=sn>>8,rr[er++]=sn,sn=sn>>8,rr[er++]=sn;let xr=Number(Xt>>BigInt(32)&BigInt(4294967295));return rr[er++]=xr,xr=xr>>8,rr[er++]=xr,xr=xr>>8,rr[er++]=xr,xr=xr>>8,rr[er++]=xr,er}function Vt(rr,Xt,er,lr,_r){Tr(Xt,lr,_r,rr,er,7);let sn=Number(Xt&BigInt(4294967295));rr[er+7]=sn,sn=sn>>8,rr[er+6]=sn,sn=sn>>8,rr[er+5]=sn,sn=sn>>8,rr[er+4]=sn;let xr=Number(Xt>>BigInt(32)&BigInt(4294967295));return rr[er+3]=xr,xr=xr>>8,rr[er+2]=xr,xr=xr>>8,rr[er+1]=xr,xr=xr>>8,rr[er]=xr,er+8}pt.prototype.writeBigUInt64LE=Jr(function(Xt,er=0){return Wt(this,Xt,er,BigInt(0),BigInt("0xffffffffffffffff"))}),pt.prototype.writeBigUInt64BE=Jr(function(Xt,er=0){return Vt(this,Xt,er,BigInt(0),BigInt("0xffffffffffffffff"))}),pt.prototype.writeIntLE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,!_r){const Yn=Math.pow(2,8*lr-1);Ht(this,Xt,er,lr,Yn-1,-Yn)}let sn=0,xr=1,Xr=0;for(this[er]=Xt&255;++sn<lr&&(xr*=256);)Xt<0&&Xr===0&&this[er+sn-1]!==0&&(Xr=1),this[er+sn]=(Xt/xr>>0)-Xr&255;return er+lr},pt.prototype.writeIntBE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,!_r){const Yn=Math.pow(2,8*lr-1);Ht(this,Xt,er,lr,Yn-1,-Yn)}let sn=lr-1,xr=1,Xr=0;for(this[er+sn]=Xt&255;--sn>=0&&(xr*=256);)Xt<0&&Xr===0&&this[er+sn+1]!==0&&(Xr=1),this[er+sn]=(Xt/xr>>0)-Xr&255;return er+lr},pt.prototype.writeInt8=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,1,127,-128),Xt<0&&(Xt=255+Xt+1),this[er]=Xt&255,er+1},pt.prototype.writeInt16LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,32767,-32768),this[er]=Xt&255,this[er+1]=Xt>>>8,er+2},pt.prototype.writeInt16BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,32767,-32768),this[er]=Xt>>>8,this[er+1]=Xt&255,er+2},pt.prototype.writeInt32LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,2147483647,-2147483648),this[er]=Xt&255,this[er+1]=Xt>>>8,this[er+2]=Xt>>>16,this[er+3]=Xt>>>24,er+4},pt.prototype.writeInt32BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,2147483647,-2147483648),Xt<0&&(Xt=4294967295+Xt+1),this[er]=Xt>>>24,this[er+1]=Xt>>>16,this[er+2]=Xt>>>8,this[er+3]=Xt&255,er+4},pt.prototype.writeBigInt64LE=Jr(function(Xt,er=0){return Wt(this,Xt,er,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),pt.prototype.writeBigInt64BE=Jr(function(Xt,er=0){return Vt(this,Xt,er,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Kt(rr,Xt,er,lr,_r,sn){if(er+lr>rr.length)throw new RangeError("Index out of range");if(er<0)throw new RangeError("Index out of range")}function Zt(rr,Xt,er,lr,_r){return Xt=+Xt,er=er>>>0,_r||Kt(rr,Xt,er,4),tt.write(rr,Xt,er,lr,23,4),er+4}pt.prototype.writeFloatLE=function(Xt,er,lr){return Zt(this,Xt,er,!0,lr)},pt.prototype.writeFloatBE=function(Xt,er,lr){return Zt(this,Xt,er,!1,lr)};function Qt(rr,Xt,er,lr,_r){return Xt=+Xt,er=er>>>0,_r||Kt(rr,Xt,er,8),tt.write(rr,Xt,er,lr,52,8),er+8}pt.prototype.writeDoubleLE=function(Xt,er,lr){return Qt(this,Xt,er,!0,lr)},pt.prototype.writeDoubleBE=function(Xt,er,lr){return Qt(this,Xt,er,!1,lr)},pt.prototype.copy=function(Xt,er,lr,_r){if(!pt.isBuffer(Xt))throw new TypeError("argument should be a Buffer");if(lr||(lr=0),!_r&&_r!==0&&(_r=this.length),er>=Xt.length&&(er=Xt.length),er||(er=0),_r>0&&_r<lr&&(_r=lr),_r===lr||Xt.length===0||this.length===0)return 0;if(er<0)throw new RangeError("targetStart out of bounds");if(lr<0||lr>=this.length)throw new RangeError("Index out of range");if(_r<0)throw new RangeError("sourceEnd out of bounds");_r>this.length&&(_r=this.length),Xt.length-er<_r-lr&&(_r=Xt.length-er+lr);const sn=_r-lr;return this===Xt&&typeof ot.prototype.copyWithin=="function"?this.copyWithin(er,lr,_r):ot.prototype.set.call(Xt,this.subarray(lr,_r),er),sn},pt.prototype.fill=function(Xt,er,lr,_r){if(typeof Xt=="string"){if(typeof er=="string"?(_r=er,er=0,lr=this.length):typeof lr=="string"&&(_r=lr,lr=this.length),_r!==void 0&&typeof _r!="string")throw new TypeError("encoding must be a string");if(typeof _r=="string"&&!pt.isEncoding(_r))throw new TypeError("Unknown encoding: "+_r);if(Xt.length===1){const xr=Xt.charCodeAt(0);(_r==="utf8"&&xr<128||_r==="latin1")&&(Xt=xr)}}else typeof Xt=="number"?Xt=Xt&255:typeof Xt=="boolean"&&(Xt=Number(Xt));if(er<0||this.length<er||this.length<lr)throw new RangeError("Out of range index");if(lr<=er)return this;er=er>>>0,lr=lr===void 0?this.length:lr>>>0,Xt||(Xt=0);let sn;if(typeof Xt=="number")for(sn=er;sn<lr;++sn)this[sn]=Xt;else{const xr=pt.isBuffer(Xt)?Xt:pt.from(Xt,_r),Xr=xr.length;if(Xr===0)throw new TypeError('The value "'+Xt+'" is invalid for argument "value"');for(sn=0;sn<lr-er;++sn)this[sn+er]=xr[sn%Xr]}return this};const Jt={};function Yt(rr,Xt,er){Jt[rr]=class extends er{constructor(){super(),Object.defineProperty(this,"message",{value:Xt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${rr}]`,this.stack,delete this.name}get code(){return rr}set code(_r){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_r,writable:!0})}toString(){return`${this.name} [${rr}]: ${this.message}`}}}Yt("ERR_BUFFER_OUT_OF_BOUNDS",function(rr){return rr?`${rr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Yt("ERR_INVALID_ARG_TYPE",function(rr,Xt){return`The "${rr}" argument must be of type number. Received type ${typeof Xt}`},TypeError),Yt("ERR_OUT_OF_RANGE",function(rr,Xt,er){let lr=`The value of "${rr}" is out of range.`,_r=er;return Number.isInteger(er)&&Math.abs(er)>2**32?_r=ir(String(er)):typeof er=="bigint"&&(_r=String(er),(er>BigInt(2)**BigInt(32)||er<-(BigInt(2)**BigInt(32)))&&(_r=ir(_r)),_r+="n"),lr+=` It must be ${Xt}. Received ${_r}`,lr},RangeError);function ir(rr){let Xt="",er=rr.length;const lr=rr[0]==="-"?1:0;for(;er>=lr+4;er-=3)Xt=`_${rr.slice(er-3,er)}${Xt}`;return`${rr.slice(0,er)}${Xt}`}function Sr(rr,Xt,er){br(Xt,"offset"),(rr[Xt]===void 0||rr[Xt+er]===void 0)&&vn(Xt,rr.length-(er+1))}function Tr(rr,Xt,er,lr,_r,sn){if(rr>er||rr<Xt){const xr=typeof Xt=="bigint"?"n":"";let Xr;throw sn>3?Xt===0||Xt===BigInt(0)?Xr=`>= 0${xr} and < 2${xr} ** ${(sn+1)*8}${xr}`:Xr=`>= -(2${xr} ** ${(sn+1)*8-1}${xr}) and < 2 ** ${(sn+1)*8-1}${xr}`:Xr=`>= ${Xt}${xr} and <= ${er}${xr}`,new Jt.ERR_OUT_OF_RANGE("value",Xr,rr)}Sr(lr,_r,sn)}function br(rr,Xt){if(typeof rr!="number")throw new Jt.ERR_INVALID_ARG_TYPE(Xt,"number",rr)}function vn(rr,Xt,er){throw Math.floor(rr)!==rr?(br(rr,er),new Jt.ERR_OUT_OF_RANGE(er||"offset","an integer",rr)):Xt<0?new Jt.ERR_BUFFER_OUT_OF_BOUNDS:new Jt.ERR_OUT_OF_RANGE(er||"offset",`>= ${er?1:0} and <= ${Xt}`,rr)}const Dr=/[^+/0-9A-Za-z-_]/g;function Ar(rr){if(rr=rr.split("=")[0],rr=rr.trim().replace(Dr,""),rr.length<2)return"";for(;rr.length%4!==0;)rr=rr+"=";return rr}function _n(rr,Xt){Xt=Xt||1/0;let er;const lr=rr.length;let _r=null;const sn=[];for(let xr=0;xr<lr;++xr){if(er=rr.charCodeAt(xr),er>55295&&er<57344){if(!_r){if(er>56319){(Xt-=3)>-1&&sn.push(239,191,189);continue}else if(xr+1===lr){(Xt-=3)>-1&&sn.push(239,191,189);continue}_r=er;continue}if(er<56320){(Xt-=3)>-1&&sn.push(239,191,189),_r=er;continue}er=(_r-55296<<10|er-56320)+65536}else _r&&(Xt-=3)>-1&&sn.push(239,191,189);if(_r=null,er<128){if((Xt-=1)<0)break;sn.push(er)}else if(er<2048){if((Xt-=2)<0)break;sn.push(er>>6|192,er&63|128)}else if(er<65536){if((Xt-=3)<0)break;sn.push(er>>12|224,er>>6&63|128,er&63|128)}else if(er<1114112){if((Xt-=4)<0)break;sn.push(er>>18|240,er>>12&63|128,er>>6&63|128,er&63|128)}else throw new Error("Invalid code point")}return sn}function Pr(rr){const Xt=[];for(let er=0;er<rr.length;++er)Xt.push(rr.charCodeAt(er)&255);return Xt}function Mr(rr,Xt){let er,lr,_r;const sn=[];for(let xr=0;xr<rr.length&&!((Xt-=2)<0);++xr)er=rr.charCodeAt(xr),lr=er>>8,_r=er%256,sn.push(_r),sn.push(lr);return sn}function xn(rr){return et.toByteArray(Ar(rr))}function pr(rr,Xt,er,lr){let _r;for(_r=0;_r<lr&&!(_r+er>=Xt.length||_r>=rr.length);++_r)Xt[_r+er]=rr[_r];return _r}function jr(rr,Xt){return rr instanceof Xt||rr!=null&&rr.constructor!=null&&rr.constructor.name!=null&&rr.constructor.name===Xt.name}function Hr(rr){return rr!==rr}const Gr=function(){const rr="0123456789abcdef",Xt=new Array(256);for(let er=0;er<16;++er){const lr=er*16;for(let _r=0;_r<16;++_r)Xt[lr+_r]=rr[er]+rr[_r]}return Xt}();function Jr(rr){return typeof BigInt>"u"?Qn:rr}function Qn(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer$C=buffer$1.Buffer,Blob$1=buffer$1.Blob,BlobOptions=buffer$1.BlobOptions,Buffer$1$1=buffer$1.Buffer,File$1=buffer$1.File,FileOptions=buffer$1.FileOptions,INSPECT_MAX_BYTES=buffer$1.INSPECT_MAX_BYTES,SlowBuffer=buffer$1.SlowBuffer,TranscodeEncoding=buffer$1.TranscodeEncoding,atob$1=buffer$1.atob,btoa$1=buffer$1.btoa,constants$2=buffer$1.constants,isAscii=buffer$1.isAscii,isUtf8=buffer$1.isUtf8,kMaxLength=buffer$1.kMaxLength,kStringMaxLength=buffer$1.kStringMaxLength,resolveObjectURL=buffer$1.resolveObjectURL,transcode=buffer$1.transcode,dist$h=Object.freeze(Object.defineProperty({__proto__:null,Blob:Blob$1,BlobOptions,Buffer:Buffer$1$1,File:File$1,FileOptions,INSPECT_MAX_BYTES,SlowBuffer,TranscodeEncoding,atob:atob$1,btoa:btoa$1,constants:constants$2,default:Buffer$C,isAscii,isUtf8,kMaxLength,kStringMaxLength,resolveObjectURL,transcode},Symbol.toStringTag,{value:"Module"}));var _instanceof={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer$C<"u"&&(tt.Buffer=Buffer$C),typeof Promise<"u"&&(tt.Promise=Promise);const nt=Object.assign(at,{CONSTRUCTORS:tt});function at(){return{keyword:"instanceof",schemaType:["string","array"],compile(st){if(typeof st=="string"){const ct=ot(st);return dt=>dt instanceof ct}if(Array.isArray(st)){const ct=st.map(ot);return dt=>{for(const ht of ct)if(dt instanceof ht)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function ot(st){const ct=tt[st];if(ct)return ct;throw new Error(`invalid "instanceof" keyword value ${st}`)}et.default=nt,_e.exports=nt})(_instanceof,_instanceof.exports);var _instanceofExports$1=_instanceof.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(_instanceofExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(_instanceof$1,_instanceof$1.exports);var _instanceofExports=_instanceof$1.exports,range$6={exports:{}},range$5={exports:{}},_range$1={};Object.defineProperty(_range$1,"__esModule",{value:!0});function getRangeDef(_e){return()=>({keyword:_e,type:"number",schemaType:"array",macro:function([tt,nt]){return et(tt,nt),_e==="range"?{minimum:tt,maximum:nt}:{exclusiveMinimum:tt,exclusiveMaximum:nt}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function et(tt,nt){if(tt>nt||_e==="exclusiveRange"&&tt===nt)throw new Error("There are no numbers in range")}}_range$1.default=getRangeDef;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_range$1).default)("range");et.default=at,_e.exports=at})(range$5,range$5.exports);var rangeExports$2=range$5.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(rangeExports$2),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(range$6,range$6.exports);var rangeExports$1=range$6.exports,exclusiveRange$1={exports:{}},exclusiveRange={exports:{}};(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_range$1).default)("exclusiveRange");et.default=at,_e.exports=at})(exclusiveRange,exclusiveRange.exports);var exclusiveRangeExports$1=exclusiveRange.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(exclusiveRangeExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(exclusiveRange$1,exclusiveRange$1.exports);var exclusiveRangeExports=exclusiveRange$1.exports,regexp$2={exports:{}},regexp$1={exports:{}},_util$1={};Object.defineProperty(_util$1,"__esModule",{value:!0});_util$1.usePattern=_util$1.metaSchemaRef=void 0;const codegen_1=codegen,META_SCHEMA_ID="http://json-schema.org/schema";function metaSchemaRef({defaultMeta:_e}={}){return _e===!1?{}:{$ref:_e||META_SCHEMA_ID}}_util$1.metaSchemaRef=metaSchemaRef;function usePattern({gen:_e,it:{opts:et}},tt,nt=et.unicodeRegExp?"u":""){const at=new RegExp(tt,nt);return _e.scopeValue("pattern",{key:at.toString(),ref:at,code:(0,codegen_1._)`new RegExp(${tt}, ${nt})`})}_util$1.usePattern=usePattern;(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},ot=/^\/(.*)\/([gimuy]*)$/;function st(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(ct){const{data:dt,schema:ht}=ct,pt=mt(ht);ct.pass((0,tt._)`${pt}.test(${dt})`);function mt(yt){if(typeof yt=="object")return(0,nt.usePattern)(ct,yt.pattern,yt.flags);const gt=ot.exec(yt);if(gt)return(0,nt.usePattern)(ct,gt[1],gt[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},at]}}}et.default=st,_e.exports=st})(regexp$1,regexp$1.exports);var regexpExports$1=regexp$1.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(regexpExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(regexp$2,regexp$2.exports);var regexpExports=regexp$2.exports,transform$1={exports:{}},transform={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt={trimStart:dt=>dt.trimStart(),trimEnd:dt=>dt.trimEnd(),trimLeft:dt=>dt.trimStart(),trimRight:dt=>dt.trimEnd(),trim:dt=>dt.trim(),toLowerCase:dt=>dt.toLowerCase(),toUpperCase:dt=>dt.toUpperCase(),toEnumCase:(dt,ht)=>(ht==null?void 0:ht.hash[ct(dt)])||dt},at=Object.assign(ot,{transform:nt});function ot(){return{keyword:"transform",schemaType:"array",before:"enum",code(dt){const{gen:ht,data:pt,schema:mt,parentSchema:yt,it:gt}=dt,{parentData:bt,parentDataProperty:$t}=gt,wt=mt;if(!wt.length)return;let St;if(wt.includes("toEnumCase")){const Pt=st(yt);St=ht.scopeValue("obj",{ref:Pt,code:(0,tt.stringify)(Pt)})}ht.if((0,tt._)`typeof ${pt} == "string" && ${bt} !== undefined`,()=>{ht.assign(pt,Tt(wt.slice())),ht.assign((0,tt._)`${bt}[${$t}]`,pt)});function Tt(Pt){if(!Pt.length)return pt;const Ot=Pt.pop();if(!(Ot in nt))throw new Error(`transform: unknown transformation ${Ot}`);const Nt=ht.scopeValue("func",{ref:nt[Ot],code:(0,tt._)`require("ajv-keywords/dist/definitions/transform").transform${(0,tt.getProperty)(Ot)}`}),Lt=Tt(Pt);return St&&Ot==="toEnumCase"?(0,tt._)`${Nt}(${Lt}, ${St})`:(0,tt._)`${Nt}(${Lt})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(nt)}}}}function st(dt){const ht={hash:{}};if(!dt.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const pt of dt.enum){if(typeof pt!="string")continue;const mt=ct(pt);if(ht.hash[mt])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');ht.hash[mt]=pt}return ht}function ct(dt){return dt.toLowerCase()}et.default=at,_e.exports=at})(transform,transform.exports);var transformExports$1=transform.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(transformExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(transform$1,transform$1.exports);var transformExports=transform$1.exports,uniqueItemProperties$1={exports:{}},uniqueItemProperties={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=fastDeepEqual,nt=["number","integer","string","boolean","null"];function at(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(st,ct){const dt=ot(st,ct);return ht=>{if(ht.length<=1)return!0;for(let pt=0;pt<st.length;pt++){const mt=st[pt];if(dt[pt]){const yt={};for(const gt of ht){if(!gt||typeof gt!="object")continue;let bt=gt[mt];if(!(bt&&typeof bt=="object")){if(typeof bt=="string"&&(bt='"'+bt),yt[bt])return!1;yt[bt]=!0}}}else for(let yt=ht.length;yt--;){const gt=ht[yt];if(!(!gt||typeof gt!="object"))for(let bt=yt;bt--;){const $t=ht[bt];if($t&&typeof $t=="object"&&tt(gt[mt],$t[mt]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}et.default=at;function ot(st,ct){return st.map(dt=>{var ht,pt,mt;const yt=(mt=(pt=(ht=ct.items)===null||ht===void 0?void 0:ht.properties)===null||pt===void 0?void 0:pt[dt])===null||mt===void 0?void 0:mt.type;return Array.isArray(yt)?!yt.includes("object")&&!yt.includes("array"):nt.includes(yt)})}_e.exports=at})(uniqueItemProperties,uniqueItemProperties.exports);var uniqueItemPropertiesExports$1=uniqueItemProperties.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(uniqueItemPropertiesExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(uniqueItemProperties$1,uniqueItemProperties$1.exports);var uniqueItemPropertiesExports=uniqueItemProperties$1.exports,allRequired$1={exports:{}},allRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});function tt(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(nt,at){if(!nt)return!0;const ot=Object.keys(at.properties);return ot.length===0?!0:{required:ot}},dependencies:["properties"]}}et.default=tt,_e.exports=tt})(allRequired,allRequired.exports);var allRequiredExports$1=allRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(allRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(allRequired$1,allRequired$1.exports);var allRequiredExports=allRequired$1.exports,anyRequired$1={exports:{}},anyRequired={exports:{}},_required={};Object.defineProperty(_required,"__esModule",{value:!0});function getRequiredDef(_e){return()=>({keyword:_e,type:"object",schemaType:"array",macro(et){return et.length===0?!0:et.length===1?{required:et}:{[_e==="anyRequired"?"anyOf":"oneOf"]:et.map(nt=>({required:[nt]}))}},metaSchema:{type:"array",items:{type:"string"}}})}_required.default=getRequiredDef;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_required).default)("anyRequired");et.default=at,_e.exports=at})(anyRequired,anyRequired.exports);var anyRequiredExports$1=anyRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(anyRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(anyRequired$1,anyRequired$1.exports);var anyRequiredExports=anyRequired$1.exports,oneRequired$1={exports:{}},oneRequired={exports:{}};(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_required).default)("oneRequired");et.default=at,_e.exports=at})(oneRequired,oneRequired.exports);var oneRequiredExports$1=oneRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(oneRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(oneRequired$1,oneRequired$1.exports);var oneRequiredExports=oneRequired$1.exports,patternRequired$1={exports:{}},patternRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={message:({params:{missingPattern:st}})=>(0,tt.str)`should have property matching pattern '${st}'`,params:({params:{missingPattern:st}})=>(0,tt._)`{missingPattern: ${st}}`};function ot(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:at,code(st){const{gen:ct,schema:dt,data:ht}=st;if(dt.length===0)return;const pt=ct.let("valid",!0);for(const yt of dt)mt(yt);function mt(yt){const gt=ct.let("matched",!1);ct.forIn("key",ht,bt=>{ct.assign(gt,(0,tt._)`${(0,nt.usePattern)(st,yt)}.test(${bt})`),ct.if(gt,()=>ct.break())}),st.setParams({missingPattern:yt}),ct.assign(pt,(0,tt.and)(pt,gt)),st.pass(pt)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}et.default=ot,_e.exports=ot})(patternRequired,patternRequired.exports);var patternRequiredExports$1=patternRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(patternRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(patternRequired$1,patternRequired$1.exports);var patternRequiredExports=patternRequired$1.exports,prohibited$1={exports:{}},prohibited={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});function tt(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(nt){return nt.length===0?!0:nt.length===1?{not:{required:nt}}:{not:{anyOf:nt.map(at=>({required:[at]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}et.default=tt,_e.exports=tt})(prohibited,prohibited.exports);var prohibitedExports$1=prohibited.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(prohibitedExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(prohibited$1,prohibited$1.exports);var prohibitedExports=prohibited$1.exports,deepProperties$1={exports:{}},deepProperties={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=_util$1;function nt(st){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(ct){const dt=[];for(const ht in ct)dt.push(at(ht,ct[ht]));return{allOf:dt}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,tt.metaSchemaRef)(st)}}}et.default=nt;function at(st,ct){const dt=st.split("/"),ht={};let pt=ht;for(let mt=1;mt<dt.length;mt++){let yt=dt[mt];const gt=mt===dt.length-1;yt=ot(yt);const bt=pt.properties={};let $t;if(/[0-9]+/.test(yt)){let wt=+yt;for($t=pt.items=[],pt.type=["object","array"];wt--;)$t.push({})}else pt.type="object";pt=gt?ct:{},bt[yt]=pt,$t&&$t.push(pt)}return ht}function ot(st){return st.replace(/~1/g,"/").replace(/~0/g,"~")}_e.exports=nt})(deepProperties,deepProperties.exports);var deepPropertiesExports$1=deepProperties.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(deepPropertiesExports$1),at=(ot,st)=>ot.addKeyword((0,nt.default)(st));et.default=at,_e.exports=at})(deepProperties$1,deepProperties$1.exports);var deepPropertiesExports=deepProperties$1.exports,deepRequired$1={exports:{}},deepRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen;function nt(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(ot){const{schema:st,data:ct}=ot,dt=st.map(pt=>(0,tt._)`(${ht(pt)}) === undefined`);ot.fail((0,tt.or)(...dt));function ht(pt){if(pt==="")throw new Error("empty JSON pointer not allowed");const mt=pt.split("/");let yt=ct;const gt=mt.map((bt,$t)=>$t?yt=(0,tt._)`${yt}${(0,tt.getProperty)(at(bt))}`:yt);return(0,tt.and)(...gt)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}et.default=nt;function at(ot){return ot.replace(/~1/g,"/").replace(/~0/g,"~")}_e.exports=nt})(deepRequired,deepRequired.exports);var deepRequiredExports$1=deepRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(deepRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(deepRequired$1,deepRequired$1.exports);var deepRequiredExports=deepRequired$1.exports,dynamicDefaults$1={exports:{}},dynamicDefaults={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt={},nt={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:pt=>{var mt;const yt=(mt=pt==null?void 0:pt.max)!==null&&mt!==void 0?mt:2;return()=>Math.floor(Math.random()*yt)},seq:pt=>{var mt;const yt=(mt=pt==null?void 0:pt.name)!==null&&mt!==void 0?mt:"";return tt[yt]||(tt[yt]=0),()=>tt[yt]++}},at=Object.assign(ot,{DEFAULTS:nt});function ot(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(pt,mt,yt){if(!yt.opts.useDefaults||yt.compositeRule)return()=>!0;const gt={};for(const $t in pt)gt[$t]=st(pt[$t]);const bt=yt.opts.useDefaults==="empty";return $t=>{for(const wt in pt)($t[wt]===void 0||bt&&($t[wt]===null||$t[wt]===""))&&($t[wt]=gt[wt]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function st(pt){return typeof pt=="object"?ct(pt):dt(pt)}function ct({func:pt,args:mt}){const yt=nt[pt];return ht(pt,yt),yt(mt)}function dt(pt=""){const mt=nt[pt];return ht(pt,mt),mt()}function ht(pt,mt){if(!mt)throw new Error(`invalid "dynamicDefaults" keyword property value: ${pt}`)}et.default=at,_e.exports=at})(dynamicDefaults,dynamicDefaults.exports);var dynamicDefaultsExports$1=dynamicDefaults.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(dynamicDefaultsExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(dynamicDefaults$1,dynamicDefaults$1.exports);var dynamicDefaultsExports=dynamicDefaults$1.exports,select$2={exports:{}},select$1={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={message:({params:{schemaProp:st}})=>st?(0,tt.str)`should match case "${st}" schema`:(0,tt.str)`should match default case schema`,params:({params:{schemaProp:st}})=>st?(0,tt._)`{failingCase: ${st}}`:(0,tt._)`{failingDefault: true}`};function ot(st){const ct=(0,nt.metaSchemaRef)(st);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:at,dependencies:["selectCases"],code(dt){const{gen:ht,schemaCode:pt,parentSchema:mt}=dt;dt.block$data(tt.nil,()=>{const yt=ht.let("valid",!0),gt=ht.name("_valid"),bt=ht.const("value",(0,tt._)`${pt} === null ? "null" : ${pt}`);ht.if(!1);for(const $t in mt.selectCases){dt.setParams({schemaProp:$t}),ht.elseIf((0,tt._)`"" + ${bt} == ${$t}`);const wt=dt.subschema({keyword:"selectCases",schemaProp:$t},gt);dt.mergeEvaluated(wt,tt.Name),ht.assign(yt,gt)}if(ht.else(),mt.selectDefault!==void 0){dt.setParams({schemaProp:void 0});const $t=dt.subschema({keyword:"selectDefault"},gt);dt.mergeEvaluated($t,tt.Name),ht.assign(yt,gt)}ht.endIf(),dt.pass(yt)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:ct}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:ct}]}et.default=ot,_e.exports=ot})(select$1,select$1.exports);var selectExports$1=select$1.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(selectExports$1),at=(ot,st)=>((0,nt.default)(st).forEach(ct=>ot.addKeyword(ct)),ot);et.default=at,_e.exports=at})(select$2,select$2.exports);var selectExports=select$2.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(Ot){return Ot&&Ot.__esModule?Ot:{default:Ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(_typeofExports),at=tt(_instanceofExports),ot=tt(rangeExports$1),st=tt(exclusiveRangeExports),ct=tt(regexpExports),dt=tt(transformExports),ht=tt(uniqueItemPropertiesExports),pt=tt(allRequiredExports),mt=tt(anyRequiredExports),yt=tt(oneRequiredExports),gt=tt(patternRequiredExports),bt=tt(prohibitedExports),$t=tt(deepPropertiesExports),wt=tt(deepRequiredExports),St=tt(dynamicDefaultsExports),Tt=tt(selectExports),Pt={typeof:nt.default,instanceof:at.default,range:ot.default,exclusiveRange:st.default,regexp:ct.default,transform:dt.default,uniqueItemProperties:ht.default,allRequired:pt.default,anyRequired:mt.default,oneRequired:yt.default,patternRequired:gt.default,prohibited:bt.default,deepProperties:$t.default,deepRequired:wt.default,dynamicDefaults:St.default,select:Tt.default};et.default=Pt,_e.exports=Pt})(keywords$4,keywords$4.exports);var keywordsExports=keywords$4.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(st){return st&&st.__esModule?st:{default:st}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(keywordsExports),at=(st,ct)=>{if(Array.isArray(ct)){for(const dt of ct)ot(dt)(st);return st}if(ct)return ot(ct)(st),st;for(ct in nt.default)ot(ct)(st);return st};at.get=ot;function ot(st){const ct=nt.default[st];if(!ct)throw new Error("Unknown keyword "+st);return ct}et.default=at,_e.exports=at,_e.exports.default=at})(dist$i,dist$i.exports);var distExports$4=dist$i.exports,dist$g={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=ajvExports,nt=codegen,at=code$2,ot=validate$2,st=errors,ct=names$2,dt="errorMessage",ht=new tt.Name("emUsed"),pt={required:"missingProperty",dependencies:"property",dependentRequired:"property"},mt=/\$\{[^}]+\}/,yt=/\$\{([^}]+)\}/g,gt=/^""\s*\+\s*|\s*\+\s*""$/g;function bt(wt){return{keyword:dt,schemaType:["string","object"],post:!0,code(St){const{gen:Tt,data:Pt,schema:Ot,schemaValue:Nt,it:Lt}=St;if(Lt.createErrors===!1)return;const Bt=Ot,Ut=nt.strConcat(ct.default.instancePath,Lt.errorPath);Tt.if(tt._`${ct.default.errors} > 0`,()=>{if(typeof Bt=="object"){const[qt,Gt]=zt(Bt);Gt&&It(Gt),qt&&vt(qt),Et(Ft(Bt))}const jt=typeof Bt=="string"?Bt:Bt._;jt&&At(jt),wt.keepErrors||xt()});function Ft({properties:jt,items:qt}){const Gt={};if(jt){Gt.props={};for(const Ht in jt)Gt.props[Ht]=[]}if(qt){Gt.items={};for(let Ht=0;Ht<qt.length;Ht++)Gt.items[Ht]=[]}return Gt}function zt(jt){let qt,Gt;for(const Ht in jt){if(Ht==="properties"||Ht==="items")continue;const Wt=jt[Ht];if(typeof Wt=="object"){qt||(qt={});const Vt=qt[Ht]={};for(const Kt in Wt)Vt[Kt]=[]}else Gt||(Gt={}),Gt[Ht]=[]}return[qt,Gt]}function It(jt){const qt=Tt.const("emErrors",tt.stringify(jt)),Gt=Tt.const("templates",Rt(jt,Ot));Tt.forOf("err",ct.default.vErrors,Kt=>Tt.if(Ct(Kt,qt),()=>Tt.code(tt._`${qt}[${Kt}.keyword].push(${Kt})`).assign(tt._`${Kt}.${ht}`,!0)));const{singleError:Ht}=wt;if(Ht){const Kt=Tt.let("message",tt._`""`),Zt=Tt.let("paramsErrors",tt._`[]`);Wt(Qt=>{Tt.if(Kt,()=>Tt.code(tt._`${Kt} += ${typeof Ht=="string"?Ht:";"}`)),Tt.code(tt._`${Kt} += ${Vt(Qt)}`),Tt.assign(Zt,tt._`${Zt}.concat(${qt}[${Qt}])`)}),st.reportError(St,{message:Kt,params:tt._`{errors: ${Zt}}`})}else Wt(Kt=>st.reportError(St,{message:Vt(Kt),params:tt._`{errors: ${qt}[${Kt}]}`}));function Wt(Kt){Tt.forIn("key",qt,Zt=>Tt.if(tt._`${qt}[${Zt}].length`,()=>Kt(Zt)))}function Vt(Kt){return tt._`${Kt} in ${Gt} ? ${Gt}[${Kt}]() : ${Nt}[${Kt}]`}}function vt(jt){const qt=Tt.const("emErrors",tt.stringify(jt)),Gt=[];for(const Zt in jt)Gt.push([Zt,Rt(jt[Zt],Ot[Zt])]);const Ht=Tt.const("templates",Tt.object(...Gt)),Wt=Tt.scopeValue("obj",{ref:pt,code:tt.stringify(pt)}),Vt=Tt.let("emPropParams"),Kt=Tt.let("emParamsErrors");Tt.forOf("err",ct.default.vErrors,Zt=>Tt.if(Ct(Zt,qt),()=>{Tt.assign(Vt,tt._`${Wt}[${Zt}.keyword]`),Tt.assign(Kt,tt._`${qt}[${Zt}.keyword][${Zt}.params[${Vt}]]`),Tt.if(Kt,()=>Tt.code(tt._`${Kt}.push(${Zt})`).assign(tt._`${Zt}.${ht}`,!0))})),Tt.forIn("key",qt,Zt=>Tt.forIn("keyProp",tt._`${qt}[${Zt}]`,Qt=>{Tt.assign(Kt,tt._`${qt}[${Zt}][${Qt}]`),Tt.if(tt._`${Kt}.length`,()=>{const Jt=Tt.const("tmpl",tt._`${Ht}[${Zt}] && ${Ht}[${Zt}][${Qt}]`);st.reportError(St,{message:tt._`${Jt} ? ${Jt}() : ${Nt}[${Zt}][${Qt}]`,params:tt._`{errors: ${Kt}}`})})}))}function Et(jt){const{props:qt,items:Gt}=jt;if(!qt&&!Gt)return;const Ht=tt._`typeof ${Pt} == "object"`,Wt=tt._`Array.isArray(${Pt})`,Vt=Tt.let("emErrors");let Kt,Zt;const Qt=Tt.let("templates");qt&&Gt?(Kt=Tt.let("emChildKwd"),Tt.if(Ht),Tt.if(Wt,()=>{Jt(Gt,Ot.items),Tt.assign(Kt,tt.str`items`)},()=>{Jt(qt,Ot.properties),Tt.assign(Kt,tt.str`properties`)}),Zt=tt._`[${Kt}]`):Gt?(Tt.if(Wt),Jt(Gt,Ot.items),Zt=tt._`.items`):qt&&(Tt.if(nt.and(Ht,nt.not(Wt))),Jt(qt,Ot.properties),Zt=tt._`.properties`),Tt.forOf("err",ct.default.vErrors,Yt=>Dt(Yt,Vt,ir=>Tt.code(tt._`${Vt}[${ir}].push(${Yt})`).assign(tt._`${Yt}.${ht}`,!0))),Tt.forIn("key",Vt,Yt=>Tt.if(tt._`${Vt}[${Yt}].length`,()=>{st.reportError(St,{message:tt._`${Yt} in ${Qt} ? ${Qt}[${Yt}]() : ${Nt}${Zt}[${Yt}]`,params:tt._`{errors: ${Vt}[${Yt}]}`}),Tt.assign(tt._`${ct.default.vErrors}[${ct.default.errors}-1].instancePath`,tt._`${Ut} + "/" + ${Yt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),Tt.endIf();function Jt(Yt,ir){Tt.assign(Vt,tt.stringify(Yt)),Tt.assign(Qt,Rt(Yt,ir))}}function At(jt){const qt=Tt.const("emErrs",tt._`[]`);Tt.forOf("err",ct.default.vErrors,Gt=>Tt.if(kt(Gt),()=>Tt.code(tt._`${qt}.push(${Gt})`).assign(tt._`${Gt}.${ht}`,!0))),Tt.if(tt._`${qt}.length`,()=>st.reportError(St,{message:_t(jt),params:tt._`{errors: ${qt}}`}))}function xt(){const jt=Tt.const("emErrs",tt._`[]`);Tt.forOf("err",ct.default.vErrors,qt=>Tt.if(tt._`!${qt}.${ht}`,()=>Tt.code(tt._`${jt}.push(${qt})`))),Tt.assign(ct.default.vErrors,jt).assign(ct.default.errors,tt._`${jt}.length`)}function Ct(jt,qt){return nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,tt._`${jt}.instancePath === ${Ut}`,tt._`${jt}.keyword in ${qt}`,tt._`${jt}.schemaPath.indexOf(${Lt.errSchemaPath}) === 0`,tt._`/^\\/[^\\/]*$/.test(${jt}.schemaPath.slice(${Lt.errSchemaPath.length}))`)}function Dt(jt,qt,Gt){Tt.if(nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,tt._`${jt}.instancePath.indexOf(${Ut}) === 0`),()=>{const Ht=Tt.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:tt._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Wt=Tt.const("emMatches",tt._`${Ht}.exec(${jt}.instancePath.slice(${Ut}.length))`),Vt=Tt.const("emChild",tt._`${Wt} && ${Wt}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);Tt.if(tt._`${Vt} !== undefined && ${Vt} in ${qt}`,()=>Gt(Vt))})}function kt(jt){return nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,nt.or(tt._`${jt}.instancePath === ${Ut}`,nt.and(tt._`${jt}.instancePath.indexOf(${Ut}) === 0`,tt._`${jt}.instancePath[${Ut}.length] === "/"`)),tt._`${jt}.schemaPath.indexOf(${Lt.errSchemaPath}) === 0`,tt._`${jt}.schemaPath[${Lt.errSchemaPath}.length] === "/"`)}function Rt(jt,qt){const Gt=[];for(const Ht in jt){const Wt=qt[Ht];mt.test(Wt)&&Gt.push([Ht,Mt(Wt)])}return Tt.object(...Gt)}function _t(jt){return mt.test(jt)?new at._Code(at.safeStringify(jt).replace(yt,(qt,Gt)=>`" + JSON.stringify(${ot.getData(Gt,Lt)}) + "`).replace(gt,"")):tt.stringify(jt)}function Mt(jt){return tt._`function(){return ${_t(jt)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const $t=(wt,St={})=>{if(!wt.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(wt.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return wt.addKeyword(bt(St))};et.default=$t,_e.exports=$t,_e.exports.default=$t})(dist$g,dist$g.exports);var distExports$3=dist$g.exports,__importDefault$1W=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(validation$6,"__esModule",{value:!0});validation$6.validateType=validation$6.generateLazyValidator=validation$6.Ajv=void 0;const ajv_1$4=__importDefault$1W(ajvExports);validation$6.Ajv=ajv_1$4.default;const ajv_keywords_1$4=__importDefault$1W(distExports$4),ajv_errors_1$4=__importDefault$1W(distExports$3);function generateLazyValidator$4(_e,et){let tt=null;const nt=(at,ot)=>{if(!tt){const st=new ajv_1$4.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$4.default)(st),(0,ajv_errors_1$4.default)(st,{singleError:!0}),et==null||et.forEach(ct=>st.addKeyword(ct)),tt=st.compile(_e),Object.defineProperty(nt,"errors",{get(){return tt==null?void 0:tt.errors}})}return tt(at,ot)};return nt}validation$6.generateLazyValidator=generateLazyValidator$4;function validateType$4(_e,et){return _e.validate(et)}validation$6.validateType=validateType$4;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Network=void 0;const et=validation$6;(function(tt){tt.ETHEREUM="ETHEREUM",tt.MATIC="MATIC",tt.AVALANCHE="AVALANCHE",tt.BSC="BINANCE SMART CHAIN",tt.OPTIMISM="OPTIMISM",tt.ARBITRUM="ARBITRUM",tt.FANTOM="FANTOM"})(_e.Network||(_e.Network={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Network||(_e.Network={}))})(network$5);const isLoadingType=(_e,et)=>_e.some(tt=>tt.type===et),CONNECT_WALLET_REQUEST="[Request] Connect Wallet",CONNECT_WALLET_SUCCESS="[Success] Connect Wallet",CONNECT_WALLET_FAILURE="[Failure] Connect Wallet",connectWalletRequest=()=>action(CONNECT_WALLET_REQUEST),connectWalletSuccess=_e=>action(CONNECT_WALLET_SUCCESS,{wallet:_e}),connectWalletFailure=_e=>action(CONNECT_WALLET_FAILURE,{error:_e}),ENABLE_WALLET_REQUEST="[Request] Enable Wallet",ENABLE_WALLET_SUCCESS="[Success] Enable Wallet",ENABLE_WALLET_FAILURE="[Failure] Enable Wallet",enableWalletRequest=_e=>action(ENABLE_WALLET_REQUEST,{providerType:_e}),enableWalletSuccess=_e=>action(ENABLE_WALLET_SUCCESS,{providerType:_e}),enableWalletFailure=_e=>action(ENABLE_WALLET_FAILURE,{error:_e}),CHANGE_ACCOUNT="Change Account",changeAccount=_e=>action(CHANGE_ACCOUNT,{wallet:_e}),CHANGE_NETWORK$1="Change Network",changeNetwork=_e=>action(CHANGE_NETWORK$1,{wallet:_e}),DISCONNECT_WALLET_REQUEST="[Request] Disconnect Wallet",DISCONNECT_WALLET_SUCCESS="[Success] Disconnect Wallet",DISCONNECT_WALLET_FAILURE="[Failure] Disconnect Wallet",disconnectWalletRequest=()=>action(DISCONNECT_WALLET_REQUEST),disconnectWalletSuccess=()=>action(DISCONNECT_WALLET_SUCCESS),disconnectWalletFailure=_e=>action(DISCONNECT_WALLET_FAILURE,{error:_e}),FETCH_WALLET_REQUEST="[Request] Fetch Wallet",FETCH_WALLET_SUCCESS="[Success] Fetch Wallet",FETCH_WALLET_FAILURE="[Failure] Fetch Wallet",fetchWalletRequest=()=>action(FETCH_WALLET_REQUEST),fetchWalletSuccess=_e=>action(FETCH_WALLET_SUCCESS,{wallet:_e}),fetchWalletFailure=_e=>action(FETCH_WALLET_FAILURE,{error:_e}),SWITCH_NETWORK_REQUEST="[Request] Switch Network",SWITCH_NETWORK_SUCCESS="[Success] Switch Network",SWITCH_NETWORK_FAILURE="[Failure] Switch Network",switchNetworkRequest=(_e,et)=>action(SWITCH_NETWORK_REQUEST,{chainId:_e,fromChainId:et}),switchNetworkSuccess=_e=>action(SWITCH_NETWORK_SUCCESS,{chainId:_e}),switchNetworkFailure=(_e,et)=>action(SWITCH_NETWORK_FAILURE,{chainId:_e,error:et}),SET_APP_CHAIN_ID="Set App ChainId",setAppChainId=_e=>action(SET_APP_CHAIN_ID,{chainId:_e}),getState$4=_e=>_e.wallet,getData$a=_e=>getState$4(_e).data,getLoading$2=_e=>getState$4(_e).loading,getError$1=_e=>getState$4(_e).error,isConnected=_e=>getData$a(_e)!==null,isConnecting=_e=>isLoadingType(getLoading$2(_e),CONNECT_WALLET_REQUEST),isEnabling=_e=>isLoadingType(getLoading$2(_e),ENABLE_WALLET_REQUEST),isDisconnecting=_e=>isLoadingType(getLoading$2(_e),DISCONNECT_WALLET_REQUEST),getAddress$2=_e=>isConnected(_e)?getData$a(_e).address:void 0,getChainId=_e=>isConnected(_e)?getData$a(_e).chainId:void 0,getNetwork$1=_e=>isConnected(_e)?getData$a(_e).network:void 0,getNetworks=_e=>isConnected(_e)?getData$a(_e).networks:void 0,isSwitchingNetwork=_e=>isLoadingType(getLoading$2(_e),SWITCH_NETWORK_REQUEST),getAppChainId=_e=>getState$4(_e).appChainId,getManaBalances=_e=>{if(!isConnected(_e))return;const et={},tt=[network$5.Network.ETHEREUM,network$5.Network.MATIC],nt=getNetworks(_e);for(const at of tt)nt[at]&&(et[at]=nt[at].mana);return et};var chainId$4={},validation$3={},__importDefault$1V=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(validation$3,"__esModule",{value:!0});validation$3.validateType=validation$3.generateLazyValidator=validation$3.Ajv=void 0;const ajv_1$3=__importDefault$1V(ajvExports);validation$3.Ajv=ajv_1$3.default;const ajv_keywords_1$3=__importDefault$1V(distExports$4),ajv_errors_1$3=__importDefault$1V(distExports$3);function generateLazyValidator$3(_e,et){let tt=null;const nt=(at,ot)=>{if(!tt){const st=new ajv_1$3.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$3.default)(st),(0,ajv_errors_1$3.default)(st,{singleError:!0}),et==null||et.forEach(ct=>st.addKeyword(ct)),tt=st.compile(_e),Object.defineProperty(nt,"errors",{get(){return tt==null?void 0:tt.errors}})}return tt(at,ot)};return nt}validation$3.generateLazyValidator=generateLazyValidator$3;function validateType$3(_e,et){return _e.validate(et)}validation$3.validateType=validateType$3;var chainName$4={},hasRequiredChainName$4;function requireChainName$4(){return hasRequiredChainName$4||(hasRequiredChainName$4=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getChainId=_e.ChainName=void 0;const et=validation$3,tt=requireChainId$4();var nt;(function(ot){ot.ETHEREUM_MAINNET="Ethereum Mainnet",ot.ETHEREUM_ROPSTEN="Ropsten",ot.ETHEREUM_RINKEBY="Rinkeby",ot.ETHEREUM_GOERLI="Goerli",ot.ETHEREUM_KOVAN="Kovan",ot.ETHEREUM_SEPOLIA="Sepolia",ot.MATIC_MAINNET="Polygon",ot.MATIC_MUMBAI="Mumbai",ot.MATIC_AMOY="Amoy",ot.AVALANCHE_MAINNET="Avalanche",ot.BINANCE_MAINNET="Binance Smart Chain",ot.ARBITRUM_MAINNET="Arbitrum",ot.OPTIMISM_MAINNET="Optimism",ot.FANTOM_MAINNET="Fantom"})(nt=_e.ChainName||(_e.ChainName={}));function at(ot){switch(ot){case nt.ETHEREUM_MAINNET:return tt.ChainId.ETHEREUM_MAINNET;case nt.ETHEREUM_ROPSTEN:return tt.ChainId.ETHEREUM_ROPSTEN;case nt.ETHEREUM_RINKEBY:return tt.ChainId.ETHEREUM_RINKEBY;case nt.ETHEREUM_GOERLI:return tt.ChainId.ETHEREUM_GOERLI;case nt.ETHEREUM_KOVAN:return tt.ChainId.ETHEREUM_KOVAN;case nt.ETHEREUM_SEPOLIA:return tt.ChainId.ETHEREUM_SEPOLIA;case nt.MATIC_MAINNET:return tt.ChainId.MATIC_MAINNET;case nt.MATIC_MUMBAI:return tt.ChainId.MATIC_MUMBAI;case nt.MATIC_AMOY:return tt.ChainId.MATIC_AMOY;case nt.AVALANCHE_MAINNET:return tt.ChainId.AVALANCHE_MAINNET;case nt.BINANCE_MAINNET:return tt.ChainId.BSC_MAINNET;case nt.ARBITRUM_MAINNET:return tt.ChainId.ARBITRUM_MAINNET;case nt.OPTIMISM_MAINNET:return tt.ChainId.OPTIMISM_MAINNET;case nt.FANTOM_MAINNET:return tt.ChainId.FANTOM_MAINNET;default:return null}}_e.getChainId=at,function(ot){ot.schema={type:"string",enum:Object.values(ot)},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(nt=_e.ChainName||(_e.ChainName={}))}(chainName$4)),chainName$4}var network$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Network=void 0;const et=validation$3;(function(tt){tt.ETHEREUM="ETHEREUM",tt.MATIC="MATIC",tt.AVALANCHE="AVALANCHE",tt.BSC="BINANCE SMART CHAIN",tt.OPTIMISM="OPTIMISM",tt.ARBITRUM="ARBITRUM",tt.FANTOM="FANTOM"})(_e.Network||(_e.Network={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Network||(_e.Network={}))})(network$4);var hasRequiredChainId$4;function requireChainId$4(){return hasRequiredChainId$4||(hasRequiredChainId$4=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getNetwork=_e.getNetworkMapping=_e.getURNProtocol=_e.getChainName=_e.ChainId=void 0;const et=validation$3,tt=requireChainName$4(),nt=network$4;var at;(function(ht){ht[ht.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",ht[ht.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",ht[ht.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",ht[ht.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",ht[ht.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",ht[ht.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",ht[ht.MATIC_MAINNET=137]="MATIC_MAINNET",ht[ht.MATIC_MUMBAI=80001]="MATIC_MUMBAI",ht[ht.MATIC_AMOY=80002]="MATIC_AMOY",ht[ht.BSC_MAINNET=56]="BSC_MAINNET",ht[ht.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",ht[ht.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",ht[ht.FANTOM_MAINNET=250]="FANTOM_MAINNET",ht[ht.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(at=_e.ChainId||(_e.ChainId={}));function ot(ht){switch(ht){case at.ETHEREUM_MAINNET:return tt.ChainName.ETHEREUM_MAINNET;case at.ETHEREUM_ROPSTEN:return tt.ChainName.ETHEREUM_ROPSTEN;case at.ETHEREUM_RINKEBY:return tt.ChainName.ETHEREUM_RINKEBY;case at.ETHEREUM_GOERLI:return tt.ChainName.ETHEREUM_GOERLI;case at.ETHEREUM_KOVAN:return tt.ChainName.ETHEREUM_KOVAN;case at.ETHEREUM_SEPOLIA:return tt.ChainName.ETHEREUM_SEPOLIA;case at.MATIC_MAINNET:return tt.ChainName.MATIC_MAINNET;case at.MATIC_MUMBAI:return tt.ChainName.MATIC_MUMBAI;case at.MATIC_AMOY:return tt.ChainName.MATIC_AMOY;case at.BSC_MAINNET:return tt.ChainName.BINANCE_MAINNET;case at.ARBITRUM_MAINNET:return tt.ChainName.ARBITRUM_MAINNET;case at.OPTIMISM_MAINNET:return tt.ChainName.OPTIMISM_MAINNET;case at.FANTOM_MAINNET:return tt.ChainName.FANTOM_MAINNET;case at.AVALANCHE_MAINNET:return tt.ChainName.AVALANCHE_MAINNET;default:return null}}_e.getChainName=ot;function st(ht){switch(ht){case at.ETHEREUM_MAINNET:return"ethereum";case at.ETHEREUM_ROPSTEN:return"ropsten";case at.ETHEREUM_RINKEBY:return"rinkeby";case at.ETHEREUM_GOERLI:return"goerli";case at.ETHEREUM_KOVAN:return"kovan";case at.ETHEREUM_SEPOLIA:return"sepolia";case at.MATIC_MAINNET:return"matic";case at.MATIC_MUMBAI:return"mumbai";case at.MATIC_AMOY:return"amoy";default:return""}}_e.getURNProtocol=st;function ct(ht){const pt={[nt.Network.BSC]:at.BSC_MAINNET,[nt.Network.OPTIMISM]:at.OPTIMISM_MAINNET,[nt.Network.ARBITRUM]:at.ARBITRUM_MAINNET,[nt.Network.FANTOM]:at.FANTOM_MAINNET,[nt.Network.AVALANCHE]:at.AVALANCHE_MAINNET};switch(ht){case at.ETHEREUM_MAINNET:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt);case at.ETHEREUM_ROPSTEN:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_ROPSTEN,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_RINKEBY:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_RINKEBY,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_GOERLI:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_GOERLI,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_KOVAN:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_KOVAN,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_SEPOLIA:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_SEPOLIA,[nt.Network.MATIC]:at.MATIC_AMOY},pt);case at.MATIC_MAINNET:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt);case at.MATIC_MUMBAI:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_MUMBAI,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.MATIC_AMOY:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_AMOY,[nt.Network.MATIC]:at.MATIC_AMOY},pt);default:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt)}}_e.getNetworkMapping=ct;function dt(ht){switch(ht){case at.ETHEREUM_MAINNET:case at.ETHEREUM_ROPSTEN:case at.ETHEREUM_GOERLI:case at.ETHEREUM_KOVAN:case at.ETHEREUM_RINKEBY:case at.ETHEREUM_SEPOLIA:return nt.Network.ETHEREUM;case at.MATIC_MAINNET:case at.MATIC_MUMBAI:case at.MATIC_AMOY:return nt.Network.MATIC;case at.BSC_MAINNET:return nt.Network.BSC;case at.OPTIMISM_MAINNET:return nt.Network.OPTIMISM;case at.ARBITRUM_MAINNET:return nt.Network.ARBITRUM;case at.FANTOM_MAINNET:return nt.Network.FANTOM;case at.AVALANCHE_MAINNET:return nt.Network.AVALANCHE}}_e.getNetwork=dt,function(ht){ht.schema={type:"number",enum:Object.values(ht)},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(at=_e.ChainId||(_e.ChainId={}))}(chainId$4)),chainId$4}var chainIdExports$1=requireChainId$4(),providerType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProviderType=void 0;const et=validation$3;(function(tt){tt.INJECTED="injected",tt.MAGIC="magic",tt.FORTMATIC="formatic",tt.NETWORK="network",tt.WALLET_CONNECT="wallet_connect",tt.WALLET_CONNECT_V2="wallet_connect_v2",tt.WALLET_LINK="wallet_link",tt.METAMASK_MOBILE="metamask_mobile",tt.AUTH_SERVER="auth_server"})(_e.ProviderType||(_e.ProviderType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProviderType||(_e.ProviderType={}))})(providerType$4);var ConnectorEvent;(function(_e){_e.Update="Web3ReactUpdate",_e.Error="Web3ReactError",_e.Deactivate="Web3ReactDeactivate"})(ConnectorEvent||(ConnectorEvent={}));var events$3={exports:{}},R$1=typeof Reflect=="object"?Reflect:null,ReflectApply=R$1&&typeof R$1.apply=="function"?R$1.apply:function(et,tt,nt){return Function.prototype.apply.call(et,tt,nt)},ReflectOwnKeys;R$1&&typeof R$1.ownKeys=="function"?ReflectOwnKeys=R$1.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(et){return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et))}:ReflectOwnKeys=function(et){return Object.getOwnPropertyNames(et)};function ProcessEmitWarning(_e){console&&console.warn&&console.warn(_e)}var NumberIsNaN=Number.isNaN||function(et){return et!==et};function EventEmitter$1(){EventEmitter$1.init.call(this)}events$3.exports=EventEmitter$1;events$3.exports.once=once$3;EventEmitter$1.EventEmitter=EventEmitter$1;EventEmitter$1.prototype._events=void 0;EventEmitter$1.prototype._eventsCount=0;EventEmitter$1.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(_e){if(typeof _e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _e)}Object.defineProperty(EventEmitter$1,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(_e){if(typeof _e!="number"||_e<0||NumberIsNaN(_e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_e+".");defaultMaxListeners=_e}});EventEmitter$1.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$1.prototype.setMaxListeners=function(et){if(typeof et!="number"||et<0||NumberIsNaN(et))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+et+".");return this._maxListeners=et,this};function _getMaxListeners(_e){return _e._maxListeners===void 0?EventEmitter$1.defaultMaxListeners:_e._maxListeners}EventEmitter$1.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$1.prototype.emit=function(et){for(var tt=[],nt=1;nt<arguments.length;nt++)tt.push(arguments[nt]);var at=et==="error",ot=this._events;if(ot!==void 0)at=at&&ot.error===void 0;else if(!at)return!1;if(at){var st;if(tt.length>0&&(st=tt[0]),st instanceof Error)throw st;var ct=new Error("Unhandled error."+(st?" ("+st.message+")":""));throw ct.context=st,ct}var dt=ot[et];if(dt===void 0)return!1;if(typeof dt=="function")ReflectApply(dt,this,tt);else for(var ht=dt.length,pt=arrayClone(dt,ht),nt=0;nt<ht;++nt)ReflectApply(pt[nt],this,tt);return!0};function _addListener(_e,et,tt,nt){var at,ot,st;if(checkListener(tt),ot=_e._events,ot===void 0?(ot=_e._events=Object.create(null),_e._eventsCount=0):(ot.newListener!==void 0&&(_e.emit("newListener",et,tt.listener?tt.listener:tt),ot=_e._events),st=ot[et]),st===void 0)st=ot[et]=tt,++_e._eventsCount;else if(typeof st=="function"?st=ot[et]=nt?[tt,st]:[st,tt]:nt?st.unshift(tt):st.push(tt),at=_getMaxListeners(_e),at>0&&st.length>at&&!st.warned){st.warned=!0;var ct=new Error("Possible EventEmitter memory leak detected. "+st.length+" "+String(et)+" listeners added. Use emitter.setMaxListeners() to increase limit");ct.name="MaxListenersExceededWarning",ct.emitter=_e,ct.type=et,ct.count=st.length,ProcessEmitWarning(ct)}return _e}EventEmitter$1.prototype.addListener=function(et,tt){return _addListener(this,et,tt,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function(et,tt){return _addListener(this,et,tt,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(_e,et,tt){var nt={fired:!1,wrapFn:void 0,target:_e,type:et,listener:tt},at=onceWrapper.bind(nt);return at.listener=tt,nt.wrapFn=at,at}EventEmitter$1.prototype.once=function(et,tt){return checkListener(tt),this.on(et,_onceWrap(this,et,tt)),this};EventEmitter$1.prototype.prependOnceListener=function(et,tt){return checkListener(tt),this.prependListener(et,_onceWrap(this,et,tt)),this};EventEmitter$1.prototype.removeListener=function(et,tt){var nt,at,ot,st,ct;if(checkListener(tt),at=this._events,at===void 0)return this;if(nt=at[et],nt===void 0)return this;if(nt===tt||nt.listener===tt)--this._eventsCount===0?this._events=Object.create(null):(delete at[et],at.removeListener&&this.emit("removeListener",et,nt.listener||tt));else if(typeof nt!="function"){for(ot=-1,st=nt.length-1;st>=0;st--)if(nt[st]===tt||nt[st].listener===tt){ct=nt[st].listener,ot=st;break}if(ot<0)return this;ot===0?nt.shift():spliceOne(nt,ot),nt.length===1&&(at[et]=nt[0]),at.removeListener!==void 0&&this.emit("removeListener",et,ct||tt)}return this};EventEmitter$1.prototype.off=EventEmitter$1.prototype.removeListener;EventEmitter$1.prototype.removeAllListeners=function(et){var tt,nt,at;if(nt=this._events,nt===void 0)return this;if(nt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):nt[et]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete nt[et]),this;if(arguments.length===0){var ot=Object.keys(nt),st;for(at=0;at<ot.length;++at)st=ot[at],st!=="removeListener"&&this.removeAllListeners(st);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(tt=nt[et],typeof tt=="function")this.removeListener(et,tt);else if(tt!==void 0)for(at=tt.length-1;at>=0;at--)this.removeListener(et,tt[at]);return this};function _listeners(_e,et,tt){var nt=_e._events;if(nt===void 0)return[];var at=nt[et];return at===void 0?[]:typeof at=="function"?tt?[at.listener||at]:[at]:tt?unwrapListeners(at):arrayClone(at,at.length)}EventEmitter$1.prototype.listeners=function(et){return _listeners(this,et,!0)};EventEmitter$1.prototype.rawListeners=function(et){return _listeners(this,et,!1)};EventEmitter$1.listenerCount=function(_e,et){return typeof _e.listenerCount=="function"?_e.listenerCount(et):listenerCount.call(_e,et)};EventEmitter$1.prototype.listenerCount=listenerCount;function listenerCount(_e){var et=this._events;if(et!==void 0){var tt=et[_e];if(typeof tt=="function")return 1;if(tt!==void 0)return tt.length}return 0}EventEmitter$1.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(_e,et){for(var tt=new Array(et),nt=0;nt<et;++nt)tt[nt]=_e[nt];return tt}function spliceOne(_e,et){for(;et+1<_e.length;et++)_e[et]=_e[et+1];_e.pop()}function unwrapListeners(_e){for(var et=new Array(_e.length),tt=0;tt<et.length;++tt)et[tt]=_e[tt].listener||_e[tt];return et}function once$3(_e,et){return new Promise(function(tt,nt){function at(st){_e.removeListener(et,ot),nt(st)}function ot(){typeof _e.removeListener=="function"&&_e.removeListener("error",at),tt([].slice.call(arguments))}eventTargetAgnosticAddListener(_e,et,ot,{once:!0}),et!=="error"&&addErrorHandlerIfEventEmitter(_e,at,{once:!0})})}function addErrorHandlerIfEventEmitter(_e,et,tt){typeof _e.on=="function"&&eventTargetAgnosticAddListener(_e,"error",et,tt)}function eventTargetAgnosticAddListener(_e,et,tt,nt){if(typeof _e.on=="function")nt.once?_e.once(et,tt):_e.on(et,tt);else if(typeof _e.addEventListener=="function")_e.addEventListener(et,function at(ot){nt.once&&_e.removeEventListener(et,at),tt(ot)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _e)}var eventsExports=events$3.exports;const it=getDefaultExportFromCjs$1(eventsExports);function _inheritsLoose$6(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}var AbstractConnector=function(_e){_inheritsLoose$6(et,_e);function et(nt){var at,ot=nt===void 0?{}:nt,st=ot.supportedChainIds;return at=_e.call(this)||this,at.supportedChainIds=st,at}var tt=et.prototype;return tt.emitUpdate=function(at){this.emit(ConnectorEvent.Update,at)},tt.emitError=function(at){this.emit(ConnectorEvent.Error,at)},tt.emitDeactivate=function(){this.emit(ConnectorEvent.Deactivate)},et}(eventsExports.EventEmitter);const scriptRel="modulepreload",assetsURL=function(_e){return"https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/"+_e},seen={},__vitePreload=function(et,tt,nt){if(!tt||tt.length===0)return et();const at=document.getElementsByTagName("link");return Promise.all(tt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const st=ot.endsWith(".css"),ct=st?'[rel="stylesheet"]':"";if(!!nt)for(let pt=at.length-1;pt>=0;pt--){const mt=at[pt];if(mt.href===ot&&(!st||mt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${ot}"]${ct}`))return;const ht=document.createElement("link");if(ht.rel=st?"stylesheet":scriptRel,st||(ht.as="script",ht.crossOrigin=""),ht.href=ot,document.head.appendChild(ht),st)return new Promise((pt,mt)=>{ht.addEventListener("load",pt),ht.addEventListener("error",()=>mt(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>et()).catch(ot=>{const st=new Event("vite:preloadError",{cancelable:!0});if(st.payload=ot,window.dispatchEvent(st),!st.defaultPrevented)throw ot})};var dist$f={},sdk$4={},ws$4={},sceneUpdate$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneUpdate=_e.SCENE_UPDATE=void 0;const et=validation$3;_e.SCENE_UPDATE="SCENE_UPDATE",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SceneUpdate||(_e.SceneUpdate={}))})(sceneUpdate$4);var update$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Update=_e.UPDATE=void 0;const et=validation$3;_e.UPDATE="update",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.UPDATE]}},required:["type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Update||(_e.Update={}))})(update$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(sceneUpdate$4,_e),tt(update$4,_e)})(ws$4);var project$4={},type$5={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProjectType=void 0;const et=validation$3;(function(tt){tt.SCENE="scene",tt.SMART_ITEM="smart-item",tt.PORTABLE_EXPERIENCE="portable-experience",tt.LIBRARY="library"})(_e.ProjectType||(_e.ProjectType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProjectType||(_e.ProjectType={}))})(type$5);var wearableJson$4={},rarity$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Rarity=void 0;const et=validation$3;(function(tt){tt.UNIQUE="unique",tt.MYTHIC="mythic",tt.EXOTIC="exotic",tt.LEGENDARY="legendary",tt.EPIC="epic",tt.RARE="rare",tt.UNCOMMON="uncommon",tt.COMMON="common"})(_e.Rarity||(_e.Rarity={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema);const nt={[tt.UNIQUE]:1,[tt.MYTHIC]:10,[tt.EXOTIC]:50,[tt.LEGENDARY]:100,[tt.EPIC]:1e3,[tt.RARE]:5e3,[tt.UNCOMMON]:1e4,[tt.COMMON]:1e5},at={[tt.UNIQUE]:"#FFE617",[tt.MYTHIC]:"#FB7DE3",[tt.EXOTIC]:"#E4FFB8",[tt.LEGENDARY]:"#A657ED",[tt.EPIC]:"#6397F2",[tt.RARE]:"#3AD682",[tt.UNCOMMON]:"#FF8563",[tt.COMMON]:"#D4E0E0"},ot={[tt.UNIQUE]:"#FFB626",[tt.MYTHIC]:"#FF63E1",[tt.EXOTIC]:"#CAFF73",[tt.LEGENDARY]:"#842DDA",[tt.EPIC]:"#3D85E6",[tt.RARE]:"#36CF75",[tt.UNCOMMON]:"#ED6D4F",[tt.COMMON]:"#ABC1C1"};function st(pt){return nt[pt]}tt.getMaxSupply=st;function ct(pt){return ot[pt]}tt.getColor=ct;function dt(){return[tt.UNIQUE,tt.MYTHIC,tt.EXOTIC,tt.LEGENDARY,tt.EPIC,tt.RARE,tt.UNCOMMON,tt.COMMON]}tt.getRarities=dt;function ht(pt){return[at[pt],ot[pt]]}tt.getGradient=ht}(_e.Rarity||(_e.Rarity={}))})(rarity$4);var wearableCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableCategory=void 0;const et=validation$3;(function(tt){tt.EYEBROWS="eyebrows",tt.EYES="eyes",tt.FACIAL_HAIR="facial_hair",tt.HAIR="hair",tt.BODY_SHAPE="body_shape",tt.MOUTH="mouth",tt.UPPER_BODY="upper_body",tt.LOWER_BODY="lower_body",tt.FEET="feet",tt.EARRING="earring",tt.EYEWEAR="eyewear",tt.HAT="hat",tt.HELMET="helmet",tt.MASK="mask",tt.TIARA="tiara",tt.TOP_HEAD="top_head",tt.SKIN="skin",tt.HANDS_WEAR="hands_wear"})(_e.WearableCategory||(_e.WearableCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableCategory||(_e.WearableCategory={}))})(wearableCategory$4);var representation$4={},bodyShape$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyShape=void 0;const et=validation$3;(function(tt){tt.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",tt.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(_e.BodyShape||(_e.BodyShape={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyShape||(_e.BodyShape={}))})(bodyShape$4);var hideableCategory$4={},bodyPartCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyPartCategory=void 0;const et=validation$3;(function(tt){tt.HEAD="head",tt.HANDS="hands"})(_e.BodyPartCategory||(_e.BodyPartCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyPartCategory||(_e.BodyPartCategory={}))})(bodyPartCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=void 0;const et=wearableCategory$4,tt=validation$3,nt=bodyPartCategory$4;(function(at){at.schema={oneOf:[Object.assign({},et.WearableCategory.schema),Object.assign({},nt.BodyPartCategory.schema)]},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.HideableWearableCategory||(_e.HideableWearableCategory={}))})(hideableCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableRepresentation=void 0;const et=validation$3,tt=bodyShape$4,nt=hideableCategory$4;(function(at){at.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:nt.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:nt.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},at.validate=(0,et.generateLazyValidator)(at.schema)})(_e.WearableRepresentation||(_e.WearableRepresentation={}))})(representation$4);var platform$5={},profile$9={},avatar$4={},misc$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.IPFSv1=_e.IPFSv2=_e.EthAddress=_e.Color3=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const nt=(0,et.generateLazyValidator)(tt.schema);tt.validate=at=>nt(at)})(_e.Color3||(_e.Color3={})),function(tt){tt.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.EthAddress||(_e.EthAddress={})),function(tt){tt.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv2||(_e.IPFSv2={})),function(tt){tt.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv1||(_e.IPFSv1={}))})(misc$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Avatar=_e.Link=_e.LinkUrl=_e.AvatarInfo=_e.Snapshots=void 0;const et=wearableCategory$4,tt=misc$4,nt=validation$3;var at;(function(dt){dt.schema={type:"object",required:["face256","body"],properties:{face256:tt.IPFSv2.schema,body:tt.IPFSv2.schema}},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(at=_e.Snapshots||(_e.Snapshots={}));var ot;(function(dt){dt.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:at.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(ot=_e.AvatarInfo||(_e.AvatarInfo={}));var st;(function(dt){dt.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const ht=new RegExp(dt.schema.pattern,"i");dt.validate=pt=>ht.test(pt)})(st=_e.LinkUrl||(_e.LinkUrl={}));var ct;(function(dt){dt.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:st.schema}}})(ct=_e.Link||(_e.Link={})),function(dt){dt.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:ct.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:tt.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:ot.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)}(_e.Avatar||(_e.Avatar={}))})(avatar$4);var profile$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Profile=void 0;const et=validation$3,tt=avatar$4;(function(nt){nt.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:tt.Avatar.schema}},additionalProperties:!0},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.Profile||(_e.Profile={}))})(profile$8);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(avatar$4,_e),tt(profile$8,_e)})(profile$9);var scene$9={},featureToggles$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.FeatureToggles=_e.portableExperiencesToggles=_e.toggles=void 0;const et=validation$3;_e.toggles=["enabled","disabled"],_e.portableExperiencesToggles=[..._e.toggles,"hideUi"],function(tt){tt.schema={type:"object",properties:{voiceChat:{type:"string",enum:_e.toggles,nullable:!0},portableExperiences:{type:"string",enum:_e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${_e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${_e.toggles.join(", ")}`,required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.FeatureToggles||(_e.FeatureToggles={}))})(featureToggles$4);var worldConfiguration$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WorldConfiguration=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.WorldConfiguration||(_e.WorldConfiguration={}))})(worldConfiguration$4);var sceneParcels$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneParcels=void 0;const et=validation$3;(function(tt){tt.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},tt.schemaValidator=(0,et.generateLazyValidator)(tt.schema),tt.validate=nt=>tt.schemaValidator(nt)&&nt.parcels.includes(nt.base)})(_e.SceneParcels||(_e.SceneParcels={}))})(sceneParcels$4);var scene$8={},displayable$4={};Object.defineProperty(displayable$4,"__esModule",{value:!0});displayable$4.displayableProperties=void 0;displayable$4.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var source$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Source=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Source||(_e.Source={}))})(source$4);var spawnPoint$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.SpawnPoint||(_e.SpawnPoint={}))})(spawnPoint$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Scene=_e.RequiredPermission=void 0;const et=validation$3,tt=displayable$4,nt=featureToggles$4,at=sceneParcels$4,ot=source$4,st=spawnPoint$4,ct=worldConfiguration$4;var dt;(function(ht){ht.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",ht.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",ht.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",ht.USE_WEB3_API="USE_WEB3_API",ht.USE_FETCH="USE_FETCH",ht.USE_WEBSOCKET="USE_WEBSOCKET",ht.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(dt=_e.RequiredPermission||(_e.RequiredPermission={})),function(ht){ht.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:at.SceneParcels.schema},tt.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},ot.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:st.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(dt)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},nt.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},ct.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:dt.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(_e.Scene||(_e.Scene={}))})(scene$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=_e.Source=_e.RequiredPermission=_e.Scene=_e.SceneParcels=_e.WorldConfiguration=_e.FeatureToggles=void 0;var et=featureToggles$4;Object.defineProperty(_e,"FeatureToggles",{enumerable:!0,get:function(){return et.FeatureToggles}});var tt=worldConfiguration$4;Object.defineProperty(_e,"WorldConfiguration",{enumerable:!0,get:function(){return tt.WorldConfiguration}});var nt=sceneParcels$4;Object.defineProperty(_e,"SceneParcels",{enumerable:!0,get:function(){return nt.SceneParcels}});var at=scene$8;Object.defineProperty(_e,"Scene",{enumerable:!0,get:function(){return at.Scene}}),Object.defineProperty(_e,"RequiredPermission",{enumerable:!0,get:function(){return at.RequiredPermission}});var ot=source$4;Object.defineProperty(_e,"Source",{enumerable:!0,get:function(){return ot.Source}});var st=spawnPoint$4;Object.defineProperty(_e,"SpawnPoint",{enumerable:!0,get:function(){return st.SpawnPoint}})})(scene$9);var item$9={},i18n$4={},locale$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Locale=void 0;const et=validation$3;(function(tt){tt.EN="en",tt.ES="es"})(_e.Locale||(_e.Locale={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Locale||(_e.Locale={}))})(locale$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.I18N=void 0;const et=validation$3,tt=locale$8;(function(nt){nt.schema={type:"object",properties:{code:tt.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.I18N||(_e.I18N={}))})(i18n$4);var metrics$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Metrics=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Metrics||(_e.Metrics={}))})(metrics$4);var standardProps$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isStandard=_e.standardProperties=void 0;const et=rarity$4,tt=validation$3;_e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:et.Rarity.schema};const nt={type:"object",properties:Object.assign({},_e.standardProperties),required:["collectionAddress","rarity"]},at=(0,tt.generateLazyValidator)(nt);function ot(st){return at(st)}_e.isStandard=ot})(standardProps$4);var thirdPartyProps$4={},merkleTree$4={},merkleProof$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MerkleProof=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MerkleProof||(_e.MerkleProof={}))})(merkleProof$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(merkleProof$4,_e)})(merkleTree$4);var linkedWearableProps={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Mapping=_e.MultipleMapping=_e.RangeMapping=_e.AnyMapping=_e.SingleMapping=_e.MappingType=void 0;const et=validation$3;var tt;(function(ct){ct.SINGLE="single",ct.ANY="any",ct.MULTIPLE="multiple",ct.RANGE="range"})(tt=_e.MappingType||(_e.MappingType={}));var nt;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(nt=_e.SingleMapping||(_e.SingleMapping={}));var at;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.ANY}},required:["type"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(at=_e.AnyMapping||(_e.AnyMapping={}));var ot;(function(ct){ct._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(ht,pt){if(!pt||!pt.from||!pt.to)return!1;let{to:mt,from:yt}=pt;return(typeof yt!="bigint"||typeof mt!="bigint")&&(yt=BigInt(yt),mt=BigInt(mt)),yt<=mt},errors:!1},ct.schema={type:"object",properties:{type:{type:"string",const:tt.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},ct.validate=(0,et.generateLazyValidator)(ct.schema,[ct._fromLessThanOrEqualTo])})(ot=_e.RangeMapping||(_e.RangeMapping={}));var st;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(st=_e.MultipleMapping||(_e.MultipleMapping={})),function(ct){ct.schema={type:"object",properties:{type:{type:"string",enum:Object.values(tt)}},required:["type"],oneOf:[nt.schema,at.schema,ot.schema,st.schema]},ct.validate=(0,et.generateLazyValidator)(ct.schema,[ot._fromLessThanOrEqualTo])}(_e.Mapping||(_e.Mapping={}))})(linkedWearableProps);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.thirdPartyProps=void 0;const et=validation$3,tt=merkleTree$4,nt=linkedWearableProps;_e.thirdPartyProps={merkleProof:tt.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:{type:"array",items:nt.Mapping.schema,minItems:1,maxItems:1,nullable:!0}};const at={type:"object",properties:Object.assign({},_e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},ot={keyword:"_containsHashingKeys",validate:(dt,ht)=>{var pt;const mt=ht;return!((pt=mt==null?void 0:mt.merkleProof)===null||pt===void 0)&&pt.hashingKeys?mt.merkleProof.hashingKeys.every(yt=>mt.hasOwnProperty(yt)):!1},errors:!1},st=(0,et.generateLazyValidator)(at,[ot,nt.RangeMapping._fromLessThanOrEqualTo]);function ct(dt){return st(dt)}_e.isThirdParty=ct})(thirdPartyProps$4);var wearable$9={},wearable$8={},baseItem$4={};Object.defineProperty(baseItem$4,"__esModule",{value:!0});baseItem$4.isBaseEmote=baseItem$4.isBaseAvatar=baseItem$4.requiredBaseItemProps=baseItem$4.baseItemProperties=void 0;const i18n_1$4=i18n$4,metrics_1$4=metrics$4,displayable_1$4=displayable$4;baseItem$4.baseItemProperties=Object.assign(Object.assign({},displayable_1$4.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:i18n_1$4.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},metrics_1$4.Metrics.schema),{nullable:!0})});baseItem$4.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function isBaseAvatar$4(_e){if(!_e||!_e.id)return!1;const et=_e.id.split(":"),tt=et[1]==="decentraland",nt=et[3]==="base-avatars";return et.length===5&&tt&&nt}baseItem$4.isBaseAvatar=isBaseAvatar$4;function isBaseEmote$2(_e){if(!_e||!_e.id)return!1;const et=_e.id.split(":");return et.length===5&&et[1]==="decentraland"&&et[3]==="base-emotes"}baseItem$4.isBaseEmote=isBaseEmote$2;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Wearable=void 0;const et=validation$3,tt=wearableCategory$4,nt=representation$4,at=baseItem$4,ot=standardProps$4,st=thirdPartyProps$4,ct=hideableCategory$4,dt=linkedWearableProps;(function(ht){ht.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},at.baseItemProperties),ot.standardProperties),st.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:ct.HideableWearableCategory.schema},hides:{type:"array",items:ct.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ct.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...at.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...at.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const pt={keyword:"_isThirdParty",validate:(yt,gt)=>!yt||(0,st.isThirdParty)(gt),errors:!1},mt={keyword:"_isBaseAvatar",validate:(yt,gt)=>!yt||(0,at.isBaseAvatar)(gt),errors:!1};ht.validate=(0,et.generateLazyValidator)(ht.schema,[pt,mt,dt.RangeMapping._fromLessThanOrEqualTo])})(_e.Wearable||(_e.Wearable={}))})(wearable$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=_e.BodyPartCategory=_e.WearableCategory=_e.Wearable=_e.WearableRepresentation=void 0;var et=representation$4;Object.defineProperty(_e,"WearableRepresentation",{enumerable:!0,get:function(){return et.WearableRepresentation}});var tt=wearable$8;Object.defineProperty(_e,"Wearable",{enumerable:!0,get:function(){return tt.Wearable}});var nt=wearableCategory$4;Object.defineProperty(_e,"WearableCategory",{enumerable:!0,get:function(){return nt.WearableCategory}});var at=bodyPartCategory$4;Object.defineProperty(_e,"BodyPartCategory",{enumerable:!0,get:function(){return at.BodyPartCategory}});var ot=hideableCategory$4;Object.defineProperty(_e,"HideableWearableCategory",{enumerable:!0,get:function(){return ot.HideableWearableCategory}})})(wearable$9);var emote$9={},emote$8={},emoteDataAdr74$4={},emoteCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteCategory=void 0;const et=validation$3;(function(tt){tt.DANCE="dance",tt.STUNT="stunt",tt.GREETINGS="greetings",tt.FUN="fun",tt.POSES="poses",tt.REACTIONS="reactions",tt.HORROR="horror",tt.MISCELLANEOUS="miscellaneous"})(_e.EmoteCategory||(_e.EmoteCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmoteCategory||(_e.EmoteCategory={}))})(emoteCategory$4);var representationAdr74$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteRepresentationADR74=void 0;const et=validation$3,tt=bodyShape$4;(function(nt){nt.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.EmoteRepresentationADR74||(_e.EmoteRepresentationADR74={}))})(representationAdr74$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteDataADR74=void 0;const et=emoteCategory$4,tt=validation$3,nt=representationAdr74$4;(function(at){at.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.EmoteRepresentationADR74.schema,minItems:1},category:et.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.EmoteDataADR74||(_e.EmoteDataADR74={}))})(emoteDataAdr74$4);var hasRequiredEmote$9;function requireEmote$9(){return hasRequiredEmote$9||(hasRequiredEmote$9=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Emote=void 0;const et=requireItem$4(),tt=validation$3,nt=baseItem$4,at=standardProps$4,ot=thirdPartyProps$4,st=emoteDataAdr74$4;(function(ct){ct.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},nt.baseItemProperties),at.standardProperties),ot.thirdPartyProps),{emoteDataADR74:st.EmoteDataADR74.schema}),additionalProperties:!0,required:[...nt.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const dt={keyword:"_isThirdParty",validate:(pt,mt)=>!pt||(0,et.isThirdParty)(mt),errors:!1},ht={keyword:"_isBaseEmote",validate:(pt,mt)=>!pt||(0,nt.isBaseEmote)(mt),errors:!1};ct.validate=(0,tt.generateLazyValidator)(ct.schema,[dt,ht,et.RangeMapping._fromLessThanOrEqualTo])})(_e.Emote||(_e.Emote={}))}(emote$8)),emote$8}var emotePlayMode$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=void 0;const et=validation$3;(function(tt){tt.SIMPLE="simple",tt.LOOP="loop"})(_e.EmotePlayMode||(_e.EmotePlayMode={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmotePlayMode||(_e.EmotePlayMode={}))})(emotePlayMode$4);var hasRequiredEmote$8;function requireEmote$8(){return hasRequiredEmote$8||(hasRequiredEmote$8=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=_e.EmoteCategory=_e.EmoteDataADR74=_e.EmoteRepresentationADR74=_e.Emote=void 0;var et=requireEmote$9();Object.defineProperty(_e,"Emote",{enumerable:!0,get:function(){return et.Emote}});var tt=representationAdr74$4;Object.defineProperty(_e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return tt.EmoteRepresentationADR74}});var nt=emoteDataAdr74$4;Object.defineProperty(_e,"EmoteDataADR74",{enumerable:!0,get:function(){return nt.EmoteDataADR74}});var at=emoteCategory$4;Object.defineProperty(_e,"EmoteCategory",{enumerable:!0,get:function(){return at.EmoteCategory}});var ot=emotePlayMode$4;Object.defineProperty(_e,"EmotePlayMode",{enumerable:!0,get:function(){return ot.EmotePlayMode}})}(emote$9)),emote$9}var hasRequiredItem$4;function requireItem$4(){return hasRequiredItem$4||(hasRequiredItem$4=1,function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,pt,mt,yt){yt===void 0&&(yt=mt);var gt=Object.getOwnPropertyDescriptor(pt,mt);(!gt||("get"in gt?!pt.__esModule:gt.writable||gt.configurable))&&(gt={enumerable:!0,get:function(){return pt[mt]}}),Object.defineProperty(ht,yt,gt)}:function(ht,pt,mt,yt){yt===void 0&&(yt=mt),ht[yt]=pt[mt]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,pt){for(var mt in ht)mt!=="default"&&!Object.prototype.hasOwnProperty.call(pt,mt)&&et(pt,ht,mt)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.isStandard=_e.BodyShape=_e.Metrics=_e.Locale=_e.I18N=void 0;var nt=i18n$4;Object.defineProperty(_e,"I18N",{enumerable:!0,get:function(){return nt.I18N}});var at=locale$8;Object.defineProperty(_e,"Locale",{enumerable:!0,get:function(){return at.Locale}});var ot=metrics$4;Object.defineProperty(_e,"Metrics",{enumerable:!0,get:function(){return ot.Metrics}});var st=bodyShape$4;Object.defineProperty(_e,"BodyShape",{enumerable:!0,get:function(){return st.BodyShape}});var ct=standardProps$4;Object.defineProperty(_e,"isStandard",{enumerable:!0,get:function(){return ct.isStandard}});var dt=thirdPartyProps$4;Object.defineProperty(_e,"isThirdParty",{enumerable:!0,get:function(){return dt.isThirdParty}}),tt(linkedWearableProps,_e),tt(wearable$9,_e),tt(requireEmote$8(),_e)}(item$9)),item$9}var syncDeployments$4={},authChain$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AuthChain=_e.AuthLink=_e.AuthLinkType=void 0;const et=validation$3;var tt;(function(at){at.SIGNER="SIGNER",at.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",at.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",at.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",at.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(tt=_e.AuthLinkType||(_e.AuthLinkType={}));var nt;(function(at){at.schema={type:"object",properties:{type:{type:"string",enum:Object.values(tt)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:tt.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},at.validate=(0,et.generateLazyValidator)(at.schema)})(nt=_e.AuthLink||(_e.AuthLink={})),function(at){at.schema={type:"array",items:nt.schema,minItems:1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.AuthChain||(_e.AuthChain={}))})(authChain$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PointerChangesSyncDeployment=_e.SnapshotSyncDeployment=void 0;const et=misc$4,tt=authChain$4,nt=validation$3;(function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)})(_e.SnapshotSyncDeployment||(_e.SnapshotSyncDeployment={})),function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.PointerChangesSyncDeployment||(_e.PointerChangesSyncDeployment={}))})(syncDeployments$4);var entity$4={},contentMapping$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ContentMapping=void 0;const et=misc$4,tt=validation$3;(function(nt){nt.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]}},required:["file","hash"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.ContentMapping||(_e.ContentMapping={}))})(contentMapping$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Entity=_e.EntityType=void 0;const et=misc$4,tt=contentMapping$4,nt=validation$3;(function(at){at.SCENE="scene",at.PROFILE="profile",at.WEARABLE="wearable",at.STORE="store",at.EMOTE="emote",at.OUTFITS="outfits"})(_e.EntityType||(_e.EntityType={})),function(at){at.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:tt.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.Entity||(_e.Entity={}))})(entity$4);var deploymentWithAuthChain$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.DeploymentWithAuthChain=void 0;const et=authChain$4,tt=validation$3;(function(nt){nt.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:et.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.DeploymentWithAuthChain||(_e.DeploymentWithAuthChain={}))})(deploymentWithAuthChain$4);var outfits$9={},outfits$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Outfits=_e.Outfit=void 0;const et=wearableCategory$4,tt=misc$4,nt=validation$3;var at;(function(ot){ot.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)})(at=_e.Outfit||(_e.Outfit={})),function(ot){ot.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:at.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)}(_e.Outfits||(_e.Outfits={}))})(outfits$8);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(outfits$8,_e)})(outfits$9);var notifications$5={},notifications$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NotificationType=void 0,function(et){et.BID_ACCEPTED="bid_accepted",et.BID_RECEIVED="bid_received",et.EVENTS_STARTED="events_started",et.EVENTS_STARTS_SOON="events_starts_soon",et.GOVERNANCE_ANNOUNCEMENT="governance_announcement",et.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",et.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",et.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",et.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",et.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",et.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",et.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",et.GOVERNANCE_TENDER_PASSED="governance_tender_passed",et.ITEM_SOLD="item_sold",et.LAND_RENTAL_ENDED="rental_ended",et.LAND_RENTED="rental_started",et.REWARD_ASSIGNED="reward_assignment",et.ROYALTIES_EARNED="royalties_earned",et.WORLDS_ACCESS_RESTORED="worlds_access_restored",et.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",et.WORLDS_MISSING_RESOURCES="worlds_missing_resources",et.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",et.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",et.BADGE_GRANTED="badge_granted"}(_e.NotificationType||(_e.NotificationType={}))})(notifications$4);var subscription$2={},subscriptionDetails$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SubscriptionDetails=void 0;const et=validation$3,tt=notifications$4,nt={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},at=Object.values(tt.NotificationType).reduce((ot,st)=>(ot[st]=nt,ot),{});(function(ot){ot.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(tt.NotificationType),additionalProperties:!1,properties:at}}},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(_e.SubscriptionDetails||(_e.SubscriptionDetails={}))})(subscriptionDetails$2);var email$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Email=void 0,function(et){et.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const tt=new RegExp(et.schema.pattern);et.validate=nt=>tt.test(nt)}(_e.Email||(_e.Email={}))})(email$2);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Subscription=void 0;const et=validation$3,tt=subscriptionDetails$2,nt=misc$4,at=email$2;(function(ot){ot.schema={type:"object",required:["address","details"],properties:{address:nt.EthAddress.schema,email:Object.assign(Object.assign({},at.Email.schema),{nullable:!0}),details:tt.SubscriptionDetails.schema}},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(_e.Subscription||(_e.Subscription={}))})(subscription$2);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(notifications$4,_e),tt(subscription$2,_e),tt(subscriptionDetails$2,_e)})(notifications$5);var events$2={},base$7={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EventType=void 0,function(et){et.BID_ACCEPTED="bid-accepted",et.BID_RECEIVED="bid-received",et.ITEM_SOLD="item-sold",et.RENTAL_ENDED="land-rental-ended",et.RENTAL_STARTED="land-rental-started",et.ROYALTIES_EARNED="royalties-earned"}(_e.EventType||(_e.EventType={}))})(base$7);var blockchain$2={};Object.defineProperty(blockchain$2,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(base$7,_e),tt(blockchain$2,_e)})(events$2);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(profile$9,_e),tt(scene$9,_e),tt(requireItem$4(),_e),tt(displayable$4,_e),tt(merkleTree$4,_e),tt(syncDeployments$4,_e),tt(entity$4,_e),tt(deploymentWithAuthChain$4,_e),tt(outfits$9,_e),tt(notifications$5,_e),tt(events$2,_e)})(platform$5);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableJson=void 0;const et=rarity$4,tt=wearableCategory$4,nt=representation$4,at=validation$3,ot=platform$5;(function(st){st.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},et.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:tt.WearableCategory.schema},hides:{type:"array",items:tt.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ot.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},st.validate=(0,at.generateLazyValidator)(st.schema)})(_e.WearableJson||(_e.WearableJson={}))})(wearableJson$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(type$5,_e),tt(wearableJson$4,_e)})(project$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(ws$4,_e),tt(project$4,_e)})(sdk$4);var bid$5={},listingStatus$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ListingStatus=void 0;const et=validation$3;(function(tt){tt.OPEN="open",tt.SOLD="sold",tt.CANCELLED="cancelled"})(_e.ListingStatus||(_e.ListingStatus={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ListingStatus||(_e.ListingStatus={}))})(listingStatus$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Bid=_e.BidSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=listingStatus$4,at=network$4;(function(ot){ot.RECENTLY_OFFERED="recently_offered",ot.RECENTLY_UPDATED="recently_updated",ot.MOST_EXPENSIVE="most_expensive"})(_e.BidSortBy||(_e.BidSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:nt.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Bid||(_e.Bid={}))})(bid$5);var account$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Account=_e.AccountSortBy=void 0;const et=validation$3;(function(tt){tt.MOST_SALES="most_sales",tt.MOST_PURCHASES="most_purchases",tt.MOST_SPENT="most_spent",tt.MOST_EARNED="most_earned",tt.MOST_ROYALTIES="most_royalties",tt.MOST_COLLECTIONS="most_collections"})(_e.AccountSortBy||(_e.AccountSortBy={})),function(tt){tt.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Account||(_e.Account={}))})(account$4);var collection$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Collection=_e.CollectionSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(at){at.NEWEST="newest",at.NAME="name",at.RECENTLY_REVIEWED="recently_reviewed",at.RECENTLY_LISTED="recently_listed",at.SIZE="size"})(_e.CollectionSortBy||(_e.CollectionSortBy={})),function(at){at.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Collection||(_e.Collection={}))})(collection$4);var contract$4={},nftCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFTCategory=void 0;const et=validation$3;(function(tt){tt.PARCEL="parcel",tt.ESTATE="estate",tt.WEARABLE="wearable",tt.ENS="ens",tt.EMOTE="emote"})(_e.NFTCategory||(_e.NFTCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.NFTCategory||(_e.NFTCategory={}))})(nftCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Contract=_e.ContractSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4,at=nftCategory$4;(function(ot){ot.NAME="name"})(_e.ContractSortBy||(_e.ContractSortBy={})),function(ot){ot.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:at.NFTCategory.schema,network:nt.Network.schema,chainId:tt.ChainId.schema},required:["name","address","category","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Contract||(_e.Contract={}))})(contract$4);var item$8={},nft$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFT=_e.NFTSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=platform$5,at=network$4,ot=nftCategory$4,st=rarity$4,ct=wearableCategory$4;(function(dt){dt.NAME="name",dt.NEWEST="newest",dt.RECENTLY_LISTED="recently_listed",dt.RECENTLY_SOLD="recently_sold",dt.CHEAPEST="cheapest",dt.RENTAL_LISTING_DATE="rental_listing_date",dt.RENTAL_DATE="rented_date",dt.MAX_RENTAL_PRICE="max_rental_price",dt.MIN_RENTAL_PRICE="min_rental_price"})(_e.NFTSortBy||(_e.NFTSortBy={})),function(dt){dt.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:ct.WearableCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:nt.EmoteCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:ot.NFTCategory.schema,network:at.Network.schema,chainId:tt.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},dt.validate=(0,et.generateLazyValidator)(dt.schema)}(_e.NFT||(_e.NFT={}))})(nft$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Item=_e.ItemSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4,at=nft$4,ot=nftCategory$4;(function(st){st.NAME="name",st.NEWEST="newest",st.RECENTLY_REVIEWED="recently_reviewed",st.RECENTLY_SOLD="recently_sold",st.RECENTLY_LISTED="recently_listed",st.CHEAPEST="cheapest"})(_e.ItemSortBy||(_e.ItemSortBy={})),function(st){st.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:ot.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:at.NFT.schema.properties.data,network:nt.Network.schema,chainId:tt.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},st.validate=(0,et.generateLazyValidator)(st.schema)}(_e.Item||(_e.Item={}))})(item$8);var metaTransactions$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MetaTransaction=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MetaTransaction||(_e.MetaTransaction={}))})(metaTransactions$4);var mint$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Mint=_e.MintSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(at){at.RECENTLY_MINTED="recently_minted",at.MOST_EXPENSIVE="most_expensive"})(_e.MintSortBy||(_e.MintSortBy={})),function(at){at.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Mint||(_e.Mint={}))})(mint$4);var catalog$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.CatalogSortDirection=_e.CatalogSortBy=void 0,function(et){et.NEWEST="newest",et.RECENTLY_SOLD="recently_sold",et.CHEAPEST="cheapest",et.MOST_EXPENSIVE="most_expensive",et.RECENTLY_LISTED="recently_listed"}(_e.CatalogSortBy||(_e.CatalogSortBy={})),function(et){et.ASC="asc",et.DESC="desc"}(_e.CatalogSortDirection||(_e.CatalogSortDirection={}))})(catalog$4);var order$5={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Order=_e.OrderSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=listingStatus$4,at=network$4;(function(ot){ot.RECENTLY_LISTED="recently_listed",ot.RECENTLY_UPDATED="recently_updated",ot.CHEAPEST="cheapest",ot.ISSUED_ID_ASC="issued_id_asc",ot.ISSUED_ID_DESC="issued_id_desc",ot.OLDEST="oldest"})(_e.OrderSortBy||(_e.OrderSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:nt.ListingStatus.schema,network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Order||(_e.Order={}))})(order$5);var saleType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SaleType=void 0;const et=validation$3;(function(tt){tt.ORDER="order",tt.BID="bid",tt.MINT="mint"})(_e.SaleType||(_e.SaleType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SaleType||(_e.SaleType={}))})(saleType$4);var sale$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Sale=_e.SaleSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=saleType$4,at=network$4;(function(ot){ot.RECENTLY_SOLD="recently_sold",ot.MOST_EXPENSIVE="most_expensive"})(_e.SaleSortBy||(_e.SaleSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},type:nt.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:at.Network.schema,chainId:tt.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Sale||(_e.Sale={}))})(sale$4);var trade$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.TradeAssetDirection=_e.TradeAssetType=_e.TradeType=void 0,function(et){et.BID="bid",et.PUBLIC_ORDER="public_order"}(_e.TradeType||(_e.TradeType={})),function(et){et[et.ERC20=1]="ERC20",et[et.ERC721=2]="ERC721",et[et.COLLECTION_ITEM=3]="COLLECTION_ITEM"}(_e.TradeAssetType||(_e.TradeAssetType={})),function(et){et.SENT="sent",et.RECEIVED="received"}(_e.TradeAssetDirection||(_e.TradeAssetDirection={}))})(trade$2);var rentalsListings$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.RentalListingCreation=_e.PeriodCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(ot){ot.OPEN="open",ot.CANCELLED="cancelled",ot.EXECUTED="executed",ot.CLAIMED="claimed"})(_e.RentalStatus||(_e.RentalStatus={})),function(ot){ot.ASC="asc",ot.DESC="desc"}(_e.RentalsListingSortDirection||(_e.RentalsListingSortDirection={})),function(ot){ot.PARCEL="parcel",ot.ESTATE="estate"}(_e.RentalsListingsFilterByCategory||(_e.RentalsListingsFilterByCategory={})),function(ot){ot.LAND_CREATION_DATE="land_creation_date",ot.RENTAL_LISTING_DATE="rental_listing_date",ot.RENTAL_DATE="rented_date",ot.NAME="name",ot.MAX_RENTAL_PRICE="max_rental_price",ot.MIN_RENTAL_PRICE="min_rental_price"}(_e.RentalsListingsSortBy||(_e.RentalsListingsSortBy={}));var at;(function(ot){ot.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(at=_e.PeriodCreation||(_e.PeriodCreation={})),function(ot){ot.schema={type:"object",properties:{network:nt.Network.schema,chainId:tt.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:at.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.RentalListingCreation||(_e.RentalListingCreation={}))})(rentalsListings$4);var analyticsDayData$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AnalyticsDayDataSortBy=void 0,function(et){et.DATE="date",et.MOST_SALES="most_sales"}(_e.AnalyticsDayDataSortBy||(_e.AnalyticsDayDataSortBy={}))})(analyticsDayData$4);var store$6={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Store=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Store||(_e.Store={}))})(store$6);var wearableGender$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.GenderFilterOption=_e.WearableGender=void 0;const et=validation$3;(function(tt){tt.MALE="male",tt.FEMALE="female"})(_e.WearableGender||(_e.WearableGender={})),function(tt){tt.MALE="male",tt.FEMALE="female",tt.UNISEX="unisex"}(_e.GenderFilterOption||(_e.GenderFilterOption={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableGender||(_e.WearableGender={}))})(wearableGender$4);var world$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.World=_e.isInsideWorldLimits=_e.getWorld=void 0;const et=validation$3;function tt(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}_e.getWorld=tt;function nt(at,ot){const st=tt().validWorldRanges;for(const ct of st)if(at>=ct.xMin&&at<=ct.xMax&&ot>=ct.yMin&&ot<=ct.yMax)return!0;return!1}_e.isInsideWorldLimits=nt,function(at){at.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.World||(_e.World={}))})(world$4);var preview$4={},previewCamera$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewCamera=void 0;const et=validation$3;(function(tt){tt.STATIC="static",tt.INTERACTIVE="interactive"})(_e.PreviewCamera||(_e.PreviewCamera={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewCamera||(_e.PreviewCamera={}))})(previewCamera$4);var previewConfig$4={};Object.defineProperty(previewConfig$4,"__esModule",{value:!0});var previewController$4={};Object.defineProperty(previewController$4,"__esModule",{value:!0});var previewEmoteEventType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmoteEventType=void 0;const et=validation$3;(function(tt){tt.ANIMATION_PLAY="animation_play",tt.ANIMATION_PAUSE="animation_pause",tt.ANIMATION_LOOP="animation_loop",tt.ANIMATION_END="animation_end",tt.ANIMATION_PLAYING="animation_playing"})(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={}))})(previewEmoteEventType$4);var previewEmote$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmote=void 0;const et=validation$3;(function(tt){tt.IDLE="idle",tt.WALK="walk",tt.RUN="run",tt.JUMP="jump",tt.CLAP="clap",tt.DAB="dab",tt.DANCE="dance",tt.FASHION="fashion",tt.FASHION_2="fashion-2",tt.FASHION_3="fashion-3",tt.FASHION_4="fashion-4",tt.LOVE="love",tt.MONEY="money",tt.FIST_PUMP="fist-pump",tt.HEAD_EXPLODE="head-explode",tt.WAVE="wave"})(_e.PreviewEmote||(_e.PreviewEmote={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmote||(_e.PreviewEmote={}))})(previewEmote$4);var previewMessage$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.sendMessage=_e.PreviewMessageType=void 0;const et=validation$3;(function(nt){nt.READY="ready",nt.LOAD="load",nt.ERROR="error",nt.UPDATE="update",nt.CONTROLLER_REQUEST="controller_request",nt.CONTROLLER_RESPONSE="controller_response",nt.EMOTE_EVENT="emote_event"})(_e.PreviewMessageType||(_e.PreviewMessageType={})),function(nt){nt.schema={type:"string",enum:Object.values(nt)},nt.validate=(0,et.generateLazyValidator)(nt.schema)}(_e.PreviewMessageType||(_e.PreviewMessageType={}));const tt=(nt,at,ot,st="*")=>{const ct={type:at,payload:ot};nt.postMessage(ct,st)};_e.sendMessage=tt})(previewMessage$4);var previewOptions$4={};Object.defineProperty(previewOptions$4,"__esModule",{value:!0});var previewProjection$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewProjection=void 0;const et=validation$3;(function(tt){tt.ORTHOGRAPHIC="orthographic",tt.PERSPECTIVE="perspective"})(_e.PreviewProjection||(_e.PreviewProjection={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewProjection||(_e.PreviewProjection={}))})(previewProjection$4);var previewType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewType=void 0;const et=validation$3;(function(tt){tt.TEXTURE="texture",tt.WEARABLE="wearable",tt.AVATAR="avatar"})(_e.PreviewType||(_e.PreviewType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewType||(_e.PreviewType={}))})(previewType$4);var wearableRepresentationDefinition$4={};Object.defineProperty(wearableRepresentationDefinition$4,"__esModule",{value:!0});var wearableRepresentationWithBlobs$4={};Object.defineProperty(wearableRepresentationWithBlobs$4,"__esModule",{value:!0});var wearableDefinition$4={};Object.defineProperty(wearableDefinition$4,"__esModule",{value:!0});var wearableWithBlobs$4={};Object.defineProperty(wearableWithBlobs$4,"__esModule",{value:!0});var emoteRepresentationDefinition$4={};Object.defineProperty(emoteRepresentationDefinition$4,"__esModule",{value:!0});var emoteRepresentationWithBlobs$4={};Object.defineProperty(emoteRepresentationWithBlobs$4,"__esModule",{value:!0});var emoteDefinition$4={};Object.defineProperty(emoteDefinition$4,"__esModule",{value:!0});var emoteWithBlobs$4={};Object.defineProperty(emoteWithBlobs$4,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(previewCamera$4,_e),tt(previewConfig$4,_e),tt(previewController$4,_e),tt(previewEmoteEventType$4,_e),tt(previewEmote$4,_e),tt(previewMessage$4,_e),tt(previewOptions$4,_e),tt(previewProjection$4,_e),tt(previewType$4,_e),tt(wearableRepresentationDefinition$4,_e),tt(wearableRepresentationWithBlobs$4,_e),tt(wearableDefinition$4,_e),tt(wearableWithBlobs$4,_e),tt(emoteRepresentationDefinition$4,_e),tt(emoteRepresentationWithBlobs$4,_e),tt(emoteDefinition$4,_e),tt(emoteWithBlobs$4,_e)})(preview$4);var linkerAuthorization$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.LinkerAuthorization=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.LinkerAuthorization||(_e.LinkerAuthorization={}))})(linkerAuthorization$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Ct,Dt,kt){kt===void 0&&(kt=Dt);var Rt=Object.getOwnPropertyDescriptor(Ct,Dt);(!Rt||("get"in Rt?!Ct.__esModule:Rt.writable||Rt.configurable))&&(Rt={enumerable:!0,get:function(){return Ct[Dt]}}),Object.defineProperty(xt,kt,Rt)}:function(xt,Ct,Dt,kt){kt===void 0&&(kt=Dt),xt[kt]=Ct[Dt]}),tt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(xt,Ct){Object.defineProperty(xt,"default",{enumerable:!0,value:Ct})}:function(xt,Ct){xt.default=Ct}),nt=commonjsGlobal&&commonjsGlobal.__importStar||function(xt){if(xt&&xt.__esModule)return xt;var Ct={};if(xt!=null)for(var Dt in xt)Dt!=="default"&&Object.prototype.hasOwnProperty.call(xt,Dt)&&et(Ct,xt,Dt);return tt(Ct,xt),Ct},at=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Ct){for(var Dt in xt)Dt!=="default"&&!Object.prototype.hasOwnProperty.call(Ct,Dt)&&et(Ct,xt,Dt)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.sdk=_e.isInsideWorldLimits=_e.getWorld=_e.World=_e.GenderFilterOption=_e.WearableGender=_e.Store=_e.AnalyticsDayDataSortBy=_e.PeriodCreation=_e.RentalListingCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=_e.TradeType=_e.TradeAssetType=_e.SaleSortBy=_e.Sale=_e.SaleType=_e.Rarity=_e.ProviderType=_e.OrderSortBy=_e.Order=_e.CatalogSortDirection=_e.CatalogSortBy=_e.NFTSortBy=_e.NFT=_e.NFTCategory=_e.Network=_e.MintSortBy=_e.Mint=_e.MetaTransaction=_e.ListingStatus=_e.ItemSortBy=_e.Item=_e.ContractSortBy=_e.Contract=_e.CollectionSortBy=_e.Collection=_e.getChainId=_e.ChainName=_e.getURNProtocol=_e.getChainName=_e.ChainId=_e.AccountSortBy=_e.Account=_e.BidSortBy=_e.Bid=void 0;const ot=nt(sdk$4);_e.sdk=ot,at(validation$3,_e);var st=bid$5;Object.defineProperty(_e,"Bid",{enumerable:!0,get:function(){return st.Bid}}),Object.defineProperty(_e,"BidSortBy",{enumerable:!0,get:function(){return st.BidSortBy}});var ct=account$4;Object.defineProperty(_e,"Account",{enumerable:!0,get:function(){return ct.Account}}),Object.defineProperty(_e,"AccountSortBy",{enumerable:!0,get:function(){return ct.AccountSortBy}});var dt=requireChainId$4();Object.defineProperty(_e,"ChainId",{enumerable:!0,get:function(){return dt.ChainId}}),Object.defineProperty(_e,"getChainName",{enumerable:!0,get:function(){return dt.getChainName}}),Object.defineProperty(_e,"getURNProtocol",{enumerable:!0,get:function(){return dt.getURNProtocol}});var ht=requireChainName$4();Object.defineProperty(_e,"ChainName",{enumerable:!0,get:function(){return ht.ChainName}}),Object.defineProperty(_e,"getChainId",{enumerable:!0,get:function(){return ht.getChainId}});var pt=collection$4;Object.defineProperty(_e,"Collection",{enumerable:!0,get:function(){return pt.Collection}}),Object.defineProperty(_e,"CollectionSortBy",{enumerable:!0,get:function(){return pt.CollectionSortBy}});var mt=contract$4;Object.defineProperty(_e,"Contract",{enumerable:!0,get:function(){return mt.Contract}}),Object.defineProperty(_e,"ContractSortBy",{enumerable:!0,get:function(){return mt.ContractSortBy}});var yt=item$8;Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return yt.Item}}),Object.defineProperty(_e,"ItemSortBy",{enumerable:!0,get:function(){return yt.ItemSortBy}});var gt=listingStatus$4;Object.defineProperty(_e,"ListingStatus",{enumerable:!0,get:function(){return gt.ListingStatus}});var bt=metaTransactions$4;Object.defineProperty(_e,"MetaTransaction",{enumerable:!0,get:function(){return bt.MetaTransaction}});var $t=mint$4;Object.defineProperty(_e,"Mint",{enumerable:!0,get:function(){return $t.Mint}}),Object.defineProperty(_e,"MintSortBy",{enumerable:!0,get:function(){return $t.MintSortBy}});var wt=network$4;Object.defineProperty(_e,"Network",{enumerable:!0,get:function(){return wt.Network}});var St=nftCategory$4;Object.defineProperty(_e,"NFTCategory",{enumerable:!0,get:function(){return St.NFTCategory}});var Tt=nft$4;Object.defineProperty(_e,"NFT",{enumerable:!0,get:function(){return Tt.NFT}}),Object.defineProperty(_e,"NFTSortBy",{enumerable:!0,get:function(){return Tt.NFTSortBy}});var Pt=catalog$4;Object.defineProperty(_e,"CatalogSortBy",{enumerable:!0,get:function(){return Pt.CatalogSortBy}}),Object.defineProperty(_e,"CatalogSortDirection",{enumerable:!0,get:function(){return Pt.CatalogSortDirection}});var Ot=order$5;Object.defineProperty(_e,"Order",{enumerable:!0,get:function(){return Ot.Order}}),Object.defineProperty(_e,"OrderSortBy",{enumerable:!0,get:function(){return Ot.OrderSortBy}});var Nt=providerType$4;Object.defineProperty(_e,"ProviderType",{enumerable:!0,get:function(){return Nt.ProviderType}});var Lt=rarity$4;Object.defineProperty(_e,"Rarity",{enumerable:!0,get:function(){return Lt.Rarity}});var Bt=saleType$4;Object.defineProperty(_e,"SaleType",{enumerable:!0,get:function(){return Bt.SaleType}});var Ut=sale$4;Object.defineProperty(_e,"Sale",{enumerable:!0,get:function(){return Ut.Sale}}),Object.defineProperty(_e,"SaleSortBy",{enumerable:!0,get:function(){return Ut.SaleSortBy}});var Ft=trade$2;Object.defineProperty(_e,"TradeAssetType",{enumerable:!0,get:function(){return Ft.TradeAssetType}}),Object.defineProperty(_e,"TradeType",{enumerable:!0,get:function(){return Ft.TradeType}});var zt=rentalsListings$4;Object.defineProperty(_e,"RentalStatus",{enumerable:!0,get:function(){return zt.RentalStatus}}),Object.defineProperty(_e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return zt.RentalsListingSortDirection}}),Object.defineProperty(_e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return zt.RentalsListingsFilterByCategory}}),Object.defineProperty(_e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return zt.RentalsListingsSortBy}}),Object.defineProperty(_e,"RentalListingCreation",{enumerable:!0,get:function(){return zt.RentalListingCreation}}),Object.defineProperty(_e,"PeriodCreation",{enumerable:!0,get:function(){return zt.PeriodCreation}});var It=analyticsDayData$4;Object.defineProperty(_e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return It.AnalyticsDayDataSortBy}});var vt=store$6;Object.defineProperty(_e,"Store",{enumerable:!0,get:function(){return vt.Store}});var Et=wearableGender$4;Object.defineProperty(_e,"WearableGender",{enumerable:!0,get:function(){return Et.WearableGender}}),Object.defineProperty(_e,"GenderFilterOption",{enumerable:!0,get:function(){return Et.GenderFilterOption}});var At=world$4;Object.defineProperty(_e,"World",{enumerable:!0,get:function(){return At.World}}),Object.defineProperty(_e,"getWorld",{enumerable:!0,get:function(){return At.getWorld}}),Object.defineProperty(_e,"isInsideWorldLimits",{enumerable:!0,get:function(){return At.isInsideWorldLimits}}),at(preview$4,_e),at(platform$5,_e),at(misc$4,_e),at(linkerAuthorization$4,_e),at(authChain$4,_e),at(contentMapping$4,_e),at(email$2,_e)})(dist$f);const configuration=Object.freeze({storageKey:"decentraland-connect-storage-key",[providerType$4.ProviderType.INJECTED]:{},[providerType$4.ProviderType.FORTMATIC]:{apiKeys:{[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:getRpcUrls(providerType$4.ProviderType.FORTMATIC)},[providerType$4.ProviderType.NETWORK]:{urls:getRpcUrls(providerType$4.ProviderType.NETWORK)},[providerType$4.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:getRpcUrls(providerType$4.ProviderType.WALLET_LINK)},[providerType$4.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:getRpcUrls(providerType$4.ProviderType.WALLET_CONNECT_V2),chains:{[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:{chains:[chainIdExports$1.ChainId.ETHEREUM_MAINNET],optionalChains:[chainIdExports$1.ChainId.MATIC_MAINNET,chainIdExports$1.ChainId.ARBITRUM_MAINNET,chainIdExports$1.ChainId.OPTIMISM_MAINNET,chainIdExports$1.ChainId.AVALANCHE_MAINNET,chainIdExports$1.ChainId.BSC_MAINNET,chainIdExports$1.ChainId.FANTOM_MAINNET]},[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:{chains:[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA],optionalChains:[chainIdExports$1.ChainId.MATIC_AMOY]}}},[providerType$4.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:getRpcUrls(providerType$4.ProviderType.MAGIC),chains:[chainIdExports$1.ChainId.ETHEREUM_MAINNET,chainIdExports$1.ChainId.ETHEREUM_SEPOLIA,chainIdExports$1.ChainId.MATIC_MAINNET,chainIdExports$1.ChainId.MATIC_AMOY,chainIdExports$1.ChainId.OPTIMISM_MAINNET,chainIdExports$1.ChainId.ARBITRUM_MAINNET,chainIdExports$1.ChainId.AVALANCHE_MAINNET,chainIdExports$1.ChainId.BSC_MAINNET,chainIdExports$1.ChainId.FANTOM_MAINNET]}});function getConfiguration(){return configuration}function getRpcUrls(_e){const et={[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[chainIdExports$1.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[chainIdExports$1.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[chainIdExports$1.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[chainIdExports$1.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[chainIdExports$1.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[chainIdExports$1.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[chainIdExports$1.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let tt="";switch(_e){case providerType$4.ProviderType.WALLET_LINK:tt="walletlink";break;case providerType$4.ProviderType.FORTMATIC:tt="fortmatic";break;case providerType$4.ProviderType.MAGIC:tt="magic";break;case providerType$4.ProviderType.WALLET_CONNECT_V2:tt="walletconnect-v2";break;case providerType$4.ProviderType.AUTH_SERVER:tt="auth-server";break}if(tt)for(const nt in et)et[nt]+=`?project=${tt}`;return et}class FortmaticConnector extends AbstractConnector{constructor(et){const tt=getConfiguration()[dist$f.ProviderType.FORTMATIC],nt=Object.keys(tt.apiKeys).map(at=>Number(at));if(!nt.includes(et))throw new Error(`Invariant error: Unsupported chainId ${et}`);super({supportedChainIds:nt}),this.apiKey=tt.apiKeys[et],this.chainId=et,this.rpcUrl=tt.urls[et]}async activate(){if(!this.fortmatic){const{default:tt}=await __vitePreload(()=>import("./fortmatic-cc7babf5.js").then(nt=>nt.f),[]);this.fortmatic=new tt(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const et=await this.fortmatic.getProvider().enable().then(tt=>tt[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:et}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(et=>et[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function warning$2(_e,et){}function _extends$L(){return _extends$L=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},_extends$L.apply(this,arguments)}function _inheritsLoose$5(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}function _getPrototypeOf$Y(_e){return _getPrototypeOf$Y=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$Y(_e)}function _setPrototypeOf$_(_e,et){return _setPrototypeOf$_=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$_(_e,et)}function isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _construct$1(_e,et,tt){return isNativeReflectConstruct()?_construct$1=Reflect.construct:_construct$1=function(at,ot,st){var ct=[null];ct.push.apply(ct,ot);var dt=Function.bind.apply(at,ct),ht=new dt;return st&&_setPrototypeOf$_(ht,st.prototype),ht},_construct$1.apply(null,arguments)}function _isNativeFunction$1(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _wrapNativeSuper$1(_e){var et=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper$1=function(nt){if(nt===null||!_isNativeFunction$1(nt))return nt;if(typeof nt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof et<"u"){if(et.has(nt))return et.get(nt);et.set(nt,at)}function at(){return _construct$1(nt,arguments,_getPrototypeOf$Y(this).constructor)}return at.prototype=Object.create(nt.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$_(at,nt)},_wrapNativeSuper$1(_e)}function _assertThisInitialized$Z(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function _catch(_e,et){try{var tt=_e()}catch(nt){return et(nt)}return tt&&tt.then?tt.then(void 0,et):tt}function parseSendReturn(_e){return _e.hasOwnProperty("result")?_e.result:_e}var NoEthereumProviderError=function(_e){_inheritsLoose$5(et,_e);function et(){var tt;return tt=_e.call(this)||this,tt.name=tt.constructor.name,tt.message="No Ethereum provider was found on window.ethereum.",tt}return et}(_wrapNativeSuper$1(Error)),UserRejectedRequestError=function(_e){_inheritsLoose$5(et,_e);function et(){var tt;return tt=_e.call(this)||this,tt.name=tt.constructor.name,tt.message="The user rejected the request.",tt}return et}(_wrapNativeSuper$1(Error)),InjectedConnector$1=function(_e){_inheritsLoose$5(et,_e);function et(nt){var at;return at=_e.call(this,nt)||this,at.handleNetworkChanged=at.handleNetworkChanged.bind(_assertThisInitialized$Z(at)),at.handleChainChanged=at.handleChainChanged.bind(_assertThisInitialized$Z(at)),at.handleAccountsChanged=at.handleAccountsChanged.bind(_assertThisInitialized$Z(at)),at.handleClose=at.handleClose.bind(_assertThisInitialized$Z(at)),at}var tt=et.prototype;return tt.handleChainChanged=function(at){this.emitUpdate({chainId:at,provider:window.ethereum})},tt.handleAccountsChanged=function(at){at.length===0?this.emitDeactivate():this.emitUpdate({account:at[0]})},tt.handleClose=function(at,ot){this.emitDeactivate()},tt.handleNetworkChanged=function(at){this.emitUpdate({chainId:at,provider:window.ethereum})},tt.activate=function(){try{var at=function(pt){if(ot)return pt;function mt(){return _extends$L({provider:window.ethereum},ct?{account:ct}:{})}var yt=function(){if(!ct)return Promise.resolve(window.ethereum.enable().then(function(gt){return gt&&parseSendReturn(gt)[0]})).then(function(gt){ct=gt})}();return yt&&yt.then?yt.then(mt):mt(yt)},ot=!1,st=this;if(!window.ethereum)throw new NoEthereumProviderError;window.ethereum.on&&(window.ethereum.on("chainChanged",st.handleChainChanged),window.ethereum.on("accountsChanged",st.handleAccountsChanged),window.ethereum.on("close",st.handleClose),window.ethereum.on("networkChanged",st.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var ct,dt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(ht){return parseSendReturn(ht)[0]})).then(function(ht){ct=ht})},function(ht){if(ht.code===4001)throw new UserRejectedRequestError});return Promise.resolve(dt&&dt.then?dt.then(at):at(dt))}catch(ht){return Promise.reject(ht)}},tt.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(at){return Promise.reject(at)}},tt.getChainId=function(){try{var at=function(){function dt(){if(!ot)try{ot=parseSendReturn(window.ethereum.send({method:"net_version"}))}catch{}return ot||(window.ethereum.isDapper?ot=parseSendReturn(window.ethereum.cachedResults.net_version):ot=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),ot}var ht=function(){if(!ot){var pt=_catch(function(){return Promise.resolve(window.ethereum.send("net_version").then(parseSendReturn)).then(function(mt){ot=mt})},function(){});if(pt&&pt.then)return pt.then(function(){})}}();return ht&&ht.then?ht.then(dt):dt(ht)};if(!window.ethereum)throw new NoEthereumProviderError;var ot,st=_catch(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(parseSendReturn)).then(function(ct){ot=ct})},function(){});return Promise.resolve(st&&st.then?st.then(at):at(st))}catch(ct){return Promise.reject(ct)}},tt.getAccount=function(){try{var at=function(){function dt(){return ot||(ot=parseSendReturn(window.ethereum.send({method:"eth_accounts"}))[0]),ot}var ht=function(){if(!ot){var pt=_catch(function(){return Promise.resolve(window.ethereum.enable().then(function(mt){return parseSendReturn(mt)[0]})).then(function(mt){ot=mt})},function(){});if(pt&&pt.then)return pt.then(function(){})}}();return ht&&ht.then?ht.then(dt):dt(ht)};if(!window.ethereum)throw new NoEthereumProviderError;var ot,st=_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(ct){return parseSendReturn(ct)[0]})).then(function(ct){ot=ct})},function(){});return Promise.resolve(st&&st.then?st.then(at):at(st))}catch(ct){return Promise.reject(ct)}},tt.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},tt.isAuthorized=function(){try{return window.ethereum?Promise.resolve(_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(at){return parseSendReturn(at).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(at){return Promise.reject(at)}},et}(AbstractConnector);class ErrorUnlockingWallet extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const UNLOCK_WALLET_TIMEOUT=60*1e3;class InjectedConnector extends InjectedConnector$1{constructor(et){super({supportedChainIds:[et]})}async activate(){const et=new Promise((nt,at)=>{setTimeout(()=>{at(new ErrorUnlockingWallet)},UNLOCK_WALLET_TIMEOUT)}),tt=super.activate();return Promise.race([tt,et])}}var prefix="Invariant failed";function invariant(_e,et){if(!_e)throw new Error(prefix)}function _inheritsLoose$4(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_setPrototypeOf$Z(_e,et)}function _getPrototypeOf$X(_e){return _getPrototypeOf$X=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$X(_e)}function _setPrototypeOf$Z(_e,et){return _setPrototypeOf$Z=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$Z(_e,et)}function _isNativeReflectConstruct$X(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _construct(_e,et,tt){return _isNativeReflectConstruct$X()?_construct=Reflect.construct:_construct=function(at,ot,st){var ct=[null];ct.push.apply(ct,ot);var dt=Function.bind.apply(at,ct),ht=new dt;return st&&_setPrototypeOf$Z(ht,st.prototype),ht},_construct.apply(null,arguments)}function _isNativeFunction(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _wrapNativeSuper(_e){var et=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(nt){if(nt===null||!_isNativeFunction(nt))return nt;if(typeof nt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof et<"u"){if(et.has(nt))return et.get(nt);et.set(nt,at)}function at(){return _construct(nt,arguments,_getPrototypeOf$X(this).constructor)}return at.prototype=Object.create(nt.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$Z(at,nt)},_wrapNativeSuper(_e)}var RequestError=function(_e){_inheritsLoose$4(et,_e);function et(tt,nt,at){var ot;return ot=_e.call(this)||this,ot.code=nt,ot.data=at,ot.name=ot.constructor.name,ot.message=tt,ot}return et}(_wrapNativeSuper(Error)),MiniRpcProvider=function(et,tt){var nt=this,at=this;this.isMetaMask=!1,this.sendAsync=function(st,ct){console.log("sendAsync",st.method,st.params),at.request(st.method,st.params).then(function(dt){return ct(null,{jsonrpc:"2.0",id:st.id,result:dt})}).catch(function(dt){return ct(dt,null)})},this.request=function(st,ct){try{return typeof st!="string"&&(ct=st.params,st=st.method),Promise.resolve(fetch(nt.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:st,params:ct}),headers:{"Content-Type":"application/json"}})).then(function(dt){if(!dt.ok)throw new RequestError(dt.status+": "+dt.statusText,-32e3);return Promise.resolve(dt.json()).then(function(ht){if("error"in ht){var pt,mt,yt;throw new RequestError(ht==null||(pt=ht.error)==null?void 0:pt.message,ht==null||(mt=ht.error)==null?void 0:mt.code,ht==null||(yt=ht.error)==null?void 0:yt.data)}else{if("result"in ht)return ht.result;throw new RequestError("Received unexpected JSON-RPC response to "+st+" request.",-32e3,ht)}})})}catch(dt){return Promise.reject(dt)}},this.chainId=et,this.url=tt;var ot=new URL(tt);this.host=ot.host,this.path=ot.pathname},NetworkConnector$1=function(_e){_inheritsLoose$4(et,_e);function et(nt){var at,ot=nt.urls,st=nt.defaultChainId;return st||Object.keys(ot).length===1||invariant(!1),at=_e.call(this,{supportedChainIds:Object.keys(ot).map(function(ct){return Number(ct)})})||this,at.currentChainId=st||Number(Object.keys(ot)[0]),at.providers=Object.keys(ot).reduce(function(ct,dt){return ct[Number(dt)]=new MiniRpcProvider(Number(dt),ot[Number(dt)]),ct},{}),at}var tt=et.prototype;return tt.activate=function(){try{var at=this;return Promise.resolve({provider:at.providers[at.currentChainId],chainId:at.currentChainId,account:null})}catch(ot){return Promise.reject(ot)}},tt.getProvider=function(){try{var at=this;return Promise.resolve(at.providers[at.currentChainId])}catch(ot){return Promise.reject(ot)}},tt.getChainId=function(){try{var at=this;return Promise.resolve(at.currentChainId)}catch(ot){return Promise.reject(ot)}},tt.getAccount=function(){return Promise.resolve(null)},tt.deactivate=function(){},tt.changeChainId=function(at){Object.keys(this.providers).includes(at.toString())||invariant(!1),this.currentChainId=at,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:at})},et}(AbstractConnector);class NetworkConnector extends NetworkConnector$1{constructor(et){super({urls:getConfiguration()[providerType$4.ProviderType.NETWORK].urls,defaultChainId:et})}}function _extends$K(){return _extends$K=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},_extends$K.apply(this,arguments)}function _inheritsLoose$3(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_setPrototypeOf$Y(_e,et)}function _setPrototypeOf$Y(_e,et){return _setPrototypeOf$Y=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$Y(_e,et)}function _assertThisInitialized$Y(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}var CHAIN_ID$2=1,WalletLinkConnector$1=function(_e){_inheritsLoose$3(et,_e);function et(nt){var at,ot=nt.url,st=nt.appName,ct=nt.appLogoUrl,dt=nt.darkMode,ht=nt.supportedChainIds;return at=_e.call(this,{supportedChainIds:ht})||this,at.url=ot,at.appName=st,at.appLogoUrl=ct,at.darkMode=dt||!1,at.handleChainChanged=at.handleChainChanged.bind(_assertThisInitialized$Y(at)),at.handleAccountsChanged=at.handleAccountsChanged.bind(_assertThisInitialized$Y(at)),at}var tt=et.prototype;return tt.activate=function(){try{var at=this,ot=function(){return Promise.resolve(at.provider.request({method:"eth_requestAccounts"})).then(function(dt){var ht=dt[0];return at.provider.on("chainChanged",at.handleChainChanged),at.provider.on("accountsChanged",at.handleAccountsChanged),{provider:at.provider,account:ht}})},st=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)at.provider=window.ethereum;else{var ct=function(){if(!at.walletLink)return Promise.resolve(__vitePreload(()=>import("./index-62d2e0b3.js").then(dt=>dt.i),[]).then(function(dt){var ht;return(ht=dt==null?void 0:dt.default)!=null?ht:dt})).then(function(dt){at.walletLink=new dt(_extends$K({appName:at.appName,darkMode:at.darkMode},at.appLogoUrl?{appLogoUrl:at.appLogoUrl}:{})),at.provider=at.walletLink.makeWeb3Provider(at.url,CHAIN_ID$2)})}();if(ct&&ct.then)return ct.then(function(){})}}();return Promise.resolve(st&&st.then?st.then(ot):ot(st))}catch(ct){return Promise.reject(ct)}},tt.getProvider=function(){try{var at=this;return Promise.resolve(at.provider)}catch(ot){return Promise.reject(ot)}},tt.getChainId=function(){try{var at=this;return Promise.resolve(at.provider.chainId)}catch(ot){return Promise.reject(ot)}},tt.getAccount=function(){try{var at=this;return Promise.resolve(at.provider.request({method:"eth_requestAccounts"})).then(function(ot){return ot[0]})}catch(ot){return Promise.reject(ot)}},tt.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},tt.close=function(){try{var at=this;return at.provider.close(),at.emitDeactivate(),Promise.resolve()}catch(ot){return Promise.reject(ot)}},tt.handleChainChanged=function(at){this.emitUpdate({chainId:at})},tt.handleAccountsChanged=function(at){this.emitUpdate({account:at[0]})},et}(AbstractConnector);class WalletLinkConnector extends WalletLinkConnector$1{constructor(et){const tt=getConfiguration()[dist$f.ProviderType.WALLET_LINK];super({url:tt.urls[et],appName:tt.appName,supportedChainIds:[et]})}}class WalletConnectV2Connector extends AbstractConnector{constructor(et){super({supportedChainIds:(()=>{const{chains:tt,optionalChains:nt}=WalletConnectV2Connector.configuration.chains[et];return[...tt,...nt]})()}),this.desiredChainId=et,this.activate=async()=>{const tt=await __vitePreload(()=>import("./index.es-760111fd.js"),[]).then(at=>{const{chains:ot,optionalChains:st}=WalletConnectV2Connector.configuration.chains[this.desiredChainId];return at.default.init({projectId:WalletConnectV2Connector.configuration.projectId,rpcMap:WalletConnectV2Connector.configuration.urls,chains:ot,optionalChains:st,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),nt=await tt.enable();return tt.on("accountsChanged",this.handleAccountsChanged),tt.on("chainChanged",this.handleChainChanged),tt.on("disconnect",this.handleDisconnect),this.provider=tt,{chainId:tt.chainId,account:nt[0],provider:tt}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>{var tt,nt;return(nt=(tt=this.provider)==null?void 0:tt.session)==null?void 0:nt.peer.metadata.name},this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=tt=>{this.emitUpdate({account:tt[0]})},this.handleChainChanged=tt=>{this.emitUpdate({chainId:tt})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}WalletConnectV2Connector.configuration=getConfiguration()[dist$f.ProviderType.WALLET_CONNECT_V2];WalletConnectV2Connector.clearStorage=_e=>{_e.removeRegExp(new RegExp("^wc@2:"))};class MagicConnector extends AbstractConnector{constructor(et){super({supportedChainIds:getConfiguration()[dist$f.ProviderType.MAGIC].chains}),this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const nt=await this.getProvider(),at=await nt.request({method:"eth_accounts"});return this.account=at[0]??null,{provider:nt,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const tt=await this.magic.wallet.getProvider();return{...tt,request:new Proxy(tt.request,{apply:async(nt,at,ot)=>{var st,ct,dt;if(((st=ot[0])==null?void 0:st.method)==="wallet_switchEthereumChain")try{const ht=parseInt((dt=(ct=ot[0])==null?void 0:ct.params[0])==null?void 0:dt.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(ht)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(ht),this.emitUpdate({chainId:ht}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return nt.bind(tt)(...ot)}}),sendAsync:new Proxy(tt.send,{apply:async(nt,at,ot)=>nt.bind(tt)(...ot)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async tt=>{const{Magic:nt}=await __vitePreload(()=>import("./index-3849c0d9.js"),["assets/index-3849c0d9.js","assets/index-9982ed00.js"]),{OAuthExtension:at}=await __vitePreload(()=>import("./index-353052d6.js"),["assets/index-353052d6.js","assets/index-9982ed00.js"]),ot=getConfiguration()[dist$f.ProviderType.MAGIC];return new nt(ot.apiKey,{extensions:[new at],network:{rpcUrl:ot.urls[tt],chainId:tt}})},this.chainId=et,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}const version$q="6.11.1";function checkType(_e,et,tt){const nt=et.split("|").map(ot=>ot.trim());for(let ot=0;ot<nt.length;ot++)switch(et){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof _e===et)return}const at=new Error(`invalid value for type ${et}`);throw at.code="INVALID_ARGUMENT",at.argument=`value.${tt}`,at.value=_e,at}async function resolveProperties$1(_e){const et=Object.keys(_e);return(await Promise.all(et.map(nt=>Promise.resolve(_e[nt])))).reduce((nt,at,ot)=>(nt[et[ot]]=at,nt),{})}function defineProperties$2(_e,et,tt){for(let nt in et){let at=et[nt];const ot=tt?tt[nt]:null;ot&&checkType(at,ot,nt),Object.defineProperty(_e,nt,{enumerable:!0,value:at,writable:!1})}}function stringify$4(_e){if(_e==null)return"null";if(Array.isArray(_e))return"[ "+_e.map(stringify$4).join(", ")+" ]";if(_e instanceof Uint8Array){const et="0123456789abcdef";let tt="0x";for(let nt=0;nt<_e.length;nt++)tt+=et[_e[nt]>>4],tt+=et[_e[nt]&15];return tt}if(typeof _e=="object"&&typeof _e.toJSON=="function")return stringify$4(_e.toJSON());switch(typeof _e){case"boolean":case"symbol":return _e.toString();case"bigint":return BigInt(_e).toString();case"number":return _e.toString();case"string":return JSON.stringify(_e);case"object":{const et=Object.keys(_e);return et.sort(),"{ "+et.map(tt=>`${stringify$4(tt)}: ${stringify$4(_e[tt])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function isError$3(_e,et){return _e&&_e.code===et}function isCallException(_e){return isError$3(_e,"CALL_EXCEPTION")}function makeError(_e,et,tt){let nt=_e;{const ot=[];if(tt){if("message"in tt||"code"in tt||"name"in tt)throw new Error(`value will overwrite populated values: ${stringify$4(tt)}`);for(const st in tt){if(st==="shortMessage")continue;const ct=tt[st];ot.push(st+"="+stringify$4(ct))}}ot.push(`code=${et}`),ot.push(`version=${version$q}`),ot.length&&(_e+=" ("+ot.join(", ")+")")}let at;switch(et){case"INVALID_ARGUMENT":at=new TypeError(_e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":at=new RangeError(_e);break;default:at=new Error(_e)}return defineProperties$2(at,{code:et}),tt&&Object.assign(at,tt),at.shortMessage==null&&defineProperties$2(at,{shortMessage:nt}),at}function assert$y(_e,et,tt,nt){if(!_e)throw makeError(et,tt,nt)}function assertArgument(_e,et,tt,nt){assert$y(_e,et,"INVALID_ARGUMENT",{argument:tt,value:nt})}function assertArgumentCount(_e,et,tt){tt==null&&(tt=""),tt&&(tt=": "+tt),assert$y(_e>=et,"missing arguemnt"+tt,"MISSING_ARGUMENT",{count:_e,expectedCount:et}),assert$y(_e<=et,"too many arguments"+tt,"UNEXPECTED_ARGUMENT",{count:_e,expectedCount:et})}const _normalizeForms=["NFD","NFC","NFKD","NFKC"].reduce((_e,et)=>{try{if("test".normalize(et)!=="test")throw new Error("bad");if(et==="NFD"){const tt=String.fromCharCode(233).normalize("NFD"),nt=String.fromCharCode(101,769);if(tt!==nt)throw new Error("broken")}_e.push(et)}catch{}return _e},[]);function assertNormalize(_e){assert$y(_normalizeForms.indexOf(_e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:_e}})}function assertPrivate(_e,et,tt){if(tt==null&&(tt=""),_e!==et){let nt=tt,at="new";tt&&(nt+=".",at+=" "+tt),assert$y(!1,`private constructor; use ${nt}from* methods`,"UNSUPPORTED_OPERATION",{operation:at})}}function _getBytes(_e,et,tt){if(_e instanceof Uint8Array)return tt?new Uint8Array(_e):_e;if(typeof _e=="string"&&_e.match(/^0x([0-9a-f][0-9a-f])*$/i)){const nt=new Uint8Array((_e.length-2)/2);let at=2;for(let ot=0;ot<nt.length;ot++)nt[ot]=parseInt(_e.substring(at,at+2),16),at+=2;return nt}assertArgument(!1,"invalid BytesLike value",et||"value",_e)}function getBytes(_e,et){return _getBytes(_e,et,!1)}function getBytesCopy(_e,et){return _getBytes(_e,et,!0)}function isHexString$1(_e,et){return!(typeof _e!="string"||!_e.match(/^0x[0-9A-Fa-f]*$/)||typeof et=="number"&&_e.length!==2+2*et||et===!0&&_e.length%2!==0)}function isBytesLike$1(_e){return isHexString$1(_e,!0)||_e instanceof Uint8Array}const HexCharacters$1="0123456789abcdef";function hexlify$1(_e){const et=getBytes(_e);let tt="0x";for(let nt=0;nt<et.length;nt++){const at=et[nt];tt+=HexCharacters$1[(at&240)>>4]+HexCharacters$1[at&15]}return tt}function concat$2(_e){return"0x"+_e.map(et=>hexlify$1(et).substring(2)).join("")}function dataLength(_e){return isHexString$1(_e,!0)?(_e.length-2)/2:getBytes(_e).length}function dataSlice(_e,et,tt){const nt=getBytes(_e);return tt!=null&&tt>nt.length&&assert$y(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:nt,length:nt.length,offset:tt}),hexlify$1(nt.slice(et??0,tt??nt.length))}function zeroPad$1(_e,et,tt){const nt=getBytes(_e);assert$y(et>=nt.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(nt),length:et,offset:et+1});const at=new Uint8Array(et);return at.fill(0),tt?at.set(nt,et-nt.length):at.set(nt,0),hexlify$1(at)}function zeroPadValue(_e,et){return zeroPad$1(_e,et,!0)}function zeroPadBytes(_e,et){return zeroPad$1(_e,et,!1)}const BN_0$9=BigInt(0),BN_1$3=BigInt(1),maxValue=9007199254740991;function fromTwos(_e,et){const tt=getUint(_e,"value"),nt=BigInt(getNumber(et,"width"));if(assert$y(tt>>nt===BN_0$9,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:_e}),tt>>nt-BN_1$3){const at=(BN_1$3<<nt)-BN_1$3;return-((~tt&at)+BN_1$3)}return tt}function toTwos(_e,et){let tt=getBigInt(_e,"value");const nt=BigInt(getNumber(et,"width")),at=BN_1$3<<nt-BN_1$3;if(tt<BN_0$9){tt=-tt,assert$y(tt<=at,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:_e});const ot=(BN_1$3<<nt)-BN_1$3;return(~tt&ot)+BN_1$3}else assert$y(tt<at,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:_e});return tt}function mask(_e,et){const tt=getUint(_e,"value"),nt=BigInt(getNumber(et,"bits"));return tt&(BN_1$3<<nt)-BN_1$3}function getBigInt(_e,et){switch(typeof _e){case"bigint":return _e;case"number":return assertArgument(Number.isInteger(_e),"underflow",et||"value",_e),assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),BigInt(_e);case"string":try{if(_e==="")throw new Error("empty string");return _e[0]==="-"&&_e[1]!=="-"?-BigInt(_e.substring(1)):BigInt(_e)}catch(tt){assertArgument(!1,`invalid BigNumberish string: ${tt.message}`,et||"value",_e)}}assertArgument(!1,"invalid BigNumberish value",et||"value",_e)}function getUint(_e,et){const tt=getBigInt(_e,et);return assert$y(tt>=BN_0$9,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:_e}),tt}const Nibbles$1="0123456789abcdef";function toBigInt(_e){if(_e instanceof Uint8Array){let et="0x0";for(const tt of _e)et+=Nibbles$1[tt>>4],et+=Nibbles$1[tt&15];return BigInt(et)}return getBigInt(_e)}function getNumber(_e,et){switch(typeof _e){case"bigint":return assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),Number(_e);case"number":return assertArgument(Number.isInteger(_e),"underflow",et||"value",_e),assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),_e;case"string":try{if(_e==="")throw new Error("empty string");return getNumber(BigInt(_e),et)}catch(tt){assertArgument(!1,`invalid numeric string: ${tt.message}`,et||"value",_e)}}assertArgument(!1,"invalid numeric value",et||"value",_e)}function toNumber$2(_e){return getNumber(toBigInt(_e))}function toBeHex(_e,et){let nt=getUint(_e,"value").toString(16);if(et==null)nt.length%2&&(nt="0"+nt);else{const at=getNumber(et,"width");for(assert$y(at*2>=nt.length,`value exceeds width (${at} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:_e});nt.length<at*2;)nt="0"+nt}return"0x"+nt}function toBeArray(_e){const et=getUint(_e,"value");if(et===BN_0$9)return new Uint8Array([]);let tt=et.toString(16);tt.length%2&&(tt="0"+tt);const nt=new Uint8Array(tt.length/2);for(let at=0;at<nt.length;at++){const ot=at*2;nt[at]=parseInt(tt.substring(ot,ot+2),16)}return nt}function toQuantity(_e){let et=hexlify$1(isBytesLike$1(_e)?_e:toBeArray(_e)).substring(2);for(;et.startsWith("0");)et=et.substring(1);return et===""&&(et="0"),"0x"+et}const Alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Lookup=null;function getAlpha(_e){if(Lookup==null){Lookup={};for(let tt=0;tt<Alphabet.length;tt++)Lookup[Alphabet[tt]]=BigInt(tt)}const et=Lookup[_e];return assertArgument(et!=null,"invalid base58 value","letter",_e),et}const BN_0$8=BigInt(0),BN_58=BigInt(58);function encodeBase58(_e){const et=getBytes(_e);let tt=toBigInt(et),nt="";for(;tt;)nt=Alphabet[Number(tt%BN_58)]+nt,tt/=BN_58;for(let at=0;at<et.length&&!et[at];at++)nt=Alphabet[0]+nt;return nt}function decodeBase58(_e){let et=BN_0$8;for(let tt=0;tt<_e.length;tt++)et*=BN_58,et+=getAlpha(_e[tt]);return et}function decodeBase64(_e){_e=atob(_e);const et=new Uint8Array(_e.length);for(let tt=0;tt<_e.length;tt++)et[tt]=_e.charCodeAt(tt);return getBytes(et)}function encodeBase64$1(_e){const et=getBytes(_e);let tt="";for(let nt=0;nt<et.length;nt++)tt+=String.fromCharCode(et[nt]);return btoa(tt)}var Du;class EventPayload{constructor(et,tt,nt){Qr(this,"filter");Qr(this,"emitter");In(this,Du,void 0);Yr(this,Du,tt),defineProperties$2(this,{emitter:et,filter:nt})}async removeListener(){$r(this,Du)!=null&&await this.emitter.off(this.filter,$r(this,Du))}}Du=new WeakMap;function errorFunc$1(_e,et,tt,nt,at){assertArgument(!1,`invalid codepoint at offset ${et}; ${_e}`,"bytes",tt)}function ignoreFunc$1(_e,et,tt,nt,at){if(_e==="BAD_PREFIX"||_e==="UNEXPECTED_CONTINUE"){let ot=0;for(let st=et+1;st<tt.length&&tt[st]>>6===2;st++)ot++;return ot}return _e==="OVERRUN"?tt.length-et-1:0}function replaceFunc$1(_e,et,tt,nt,at){return _e==="OVERLONG"?(assertArgument(typeof at=="number","invalid bad code point for replacement","badCodepoint",at),nt.push(at),0):(nt.push(65533),ignoreFunc$1(_e,et,tt))}const Utf8ErrorFuncs$1=Object.freeze({error:errorFunc$1,ignore:ignoreFunc$1,replace:replaceFunc$1});function getUtf8CodePoints$1(_e,et){et==null&&(et=Utf8ErrorFuncs$1.error);const tt=getBytes(_e,"bytes"),nt=[];let at=0;for(;at<tt.length;){const ot=tt[at++];if(!(ot>>7)){nt.push(ot);continue}let st=null,ct=null;if((ot&224)===192)st=1,ct=127;else if((ot&240)===224)st=2,ct=2047;else if((ot&248)===240)st=3,ct=65535;else{(ot&192)===128?at+=et("UNEXPECTED_CONTINUE",at-1,tt,nt):at+=et("BAD_PREFIX",at-1,tt,nt);continue}if(at-1+st>=tt.length){at+=et("OVERRUN",at-1,tt,nt);continue}let dt=ot&(1<<8-st-1)-1;for(let ht=0;ht<st;ht++){let pt=tt[at];if((pt&192)!=128){at+=et("MISSING_CONTINUE",at,tt,nt),dt=null;break}dt=dt<<6|pt&63,at++}if(dt!==null){if(dt>1114111){at+=et("OUT_OF_RANGE",at-1-st,tt,nt,dt);continue}if(dt>=55296&&dt<=57343){at+=et("UTF16_SURROGATE",at-1-st,tt,nt,dt);continue}if(dt<=ct){at+=et("OVERLONG",at-1-st,tt,nt,dt);continue}nt.push(dt)}}return nt}function toUtf8Bytes$1(_e,et){assertArgument(typeof _e=="string","invalid string value","str",_e),et!=null&&(assertNormalize(et),_e=_e.normalize(et));let tt=[];for(let nt=0;nt<_e.length;nt++){const at=_e.charCodeAt(nt);if(at<128)tt.push(at);else if(at<2048)tt.push(at>>6|192),tt.push(at&63|128);else if((at&64512)==55296){nt++;const ot=_e.charCodeAt(nt);assertArgument(nt<_e.length&&(ot&64512)===56320,"invalid surrogate pair","str",_e);const st=65536+((at&1023)<<10)+(ot&1023);tt.push(st>>18|240),tt.push(st>>12&63|128),tt.push(st>>6&63|128),tt.push(st&63|128)}else tt.push(at>>12|224),tt.push(at>>6&63|128),tt.push(at&63|128)}return new Uint8Array(tt)}function _toUtf8String$1(_e){return _e.map(et=>et<=65535?String.fromCharCode(et):(et-=65536,String.fromCharCode((et>>10&1023)+55296,(et&1023)+56320))).join("")}function toUtf8String$1(_e,et){return _toUtf8String$1(getUtf8CodePoints$1(_e,et))}function createGetUrl(_e){async function et(tt,nt){const at=tt.url.split(":")[0].toLowerCase();assert$y(at==="http"||at==="https",`unsupported protocol ${at}`,"UNSUPPORTED_OPERATION",{info:{protocol:at},operation:"request"}),assert$y(at==="https"||!tt.credentials||tt.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let ot;if(nt){const mt=new AbortController;ot=mt.signal,nt.addListener(()=>{mt.abort()})}const st={method:tt.method,headers:new Headers(Array.from(tt)),body:tt.body||void 0,signal:ot},ct=await fetch(tt.url,st),dt={};ct.headers.forEach((mt,yt)=>{dt[yt.toLowerCase()]=mt});const ht=await ct.arrayBuffer(),pt=ht==null?null:new Uint8Array(ht);return{statusCode:ct.status,statusMessage:ct.statusText,headers:dt,body:pt}}return et}const MAX_ATTEMPTS=12,SLOT_INTERVAL=250;let defaultGetUrlFunc=createGetUrl();const reData=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),reIpfs=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let locked$5=!1;async function dataGatewayFunc(_e,et){try{const tt=_e.match(reData);if(!tt)throw new Error("invalid data");return new FetchResponse(200,"OK",{"content-type":tt[1]||"text/plain"},tt[2]?decodeBase64(tt[3]):unpercent$1(tt[3]))}catch{return new FetchResponse(599,"BAD REQUEST (invalid data: URI)",{},null,new FetchRequest(_e))}}function getIpfsGatewayFunc(_e){async function et(tt,nt){try{const at=tt.match(reIpfs);if(!at)throw new Error("invalid link");return new FetchRequest(`${_e}${at[2]}`)}catch{return new FetchResponse(599,"BAD REQUEST (invalid IPFS URI)",{},null,new FetchRequest(tt))}}return et}const Gateways={data:dataGatewayFunc,ipfs:getIpfsGatewayFunc("https://gateway.ipfs.io/ipfs/")},fetchSignals=new WeakMap;var eu,Pl;class FetchCancelSignal{constructor(et){In(this,eu,void 0);In(this,Pl,void 0);Yr(this,eu,[]),Yr(this,Pl,!1),fetchSignals.set(et,()=>{if(!$r(this,Pl)){Yr(this,Pl,!0);for(const tt of $r(this,eu))setTimeout(()=>{tt()},0);Yr(this,eu,[])}})}addListener(et){assert$y(!$r(this,Pl),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),$r(this,eu).push(et)}get cancelled(){return $r(this,Pl)}checkSignal(){assert$y(!this.cancelled,"cancelled","CANCELLED",{})}}eu=new WeakMap,Pl=new WeakMap;function checkSignal(_e){if(_e==null)throw new Error("missing signal; should not happen");return _e.checkSignal(),_e}var Lu,ku,qs,cl,Bu,ju,ns,Ms,fl,tu,ru,nu,Vs,dl,Ml,au,Ap;const Pm=class Pm{constructor(et){In(this,au);In(this,Lu,void 0);In(this,ku,void 0);In(this,qs,void 0);In(this,cl,void 0);In(this,Bu,void 0);In(this,ju,void 0);In(this,ns,void 0);In(this,Ms,void 0);In(this,fl,void 0);In(this,tu,void 0);In(this,ru,void 0);In(this,nu,void 0);In(this,Vs,void 0);In(this,dl,void 0);In(this,Ml,void 0);Yr(this,ju,String(et)),Yr(this,Lu,!1),Yr(this,ku,!0),Yr(this,qs,{}),Yr(this,cl,""),Yr(this,Bu,3e5),Yr(this,dl,{slotInterval:SLOT_INTERVAL,maxAttempts:MAX_ATTEMPTS}),Yr(this,Ml,null)}get url(){return $r(this,ju)}set url(et){Yr(this,ju,String(et))}get body(){return $r(this,ns)==null?null:new Uint8Array($r(this,ns))}set body(et){if(et==null)Yr(this,ns,void 0),Yr(this,Ms,void 0);else if(typeof et=="string")Yr(this,ns,toUtf8Bytes$1(et)),Yr(this,Ms,"text/plain");else if(et instanceof Uint8Array)Yr(this,ns,et),Yr(this,Ms,"application/octet-stream");else if(typeof et=="object")Yr(this,ns,toUtf8Bytes$1(JSON.stringify(et))),Yr(this,Ms,"application/json");else throw new Error("invalid body")}hasBody(){return $r(this,ns)!=null}get method(){return $r(this,cl)?$r(this,cl):this.hasBody()?"POST":"GET"}set method(et){et==null&&(et=""),Yr(this,cl,String(et).toUpperCase())}get headers(){const et=Object.assign({},$r(this,qs));return $r(this,fl)&&(et.authorization=`Basic ${encodeBase64$1(toUtf8Bytes$1($r(this,fl)))}`),this.allowGzip&&(et["accept-encoding"]="gzip"),et["content-type"]==null&&$r(this,Ms)&&(et["content-type"]=$r(this,Ms)),this.body&&(et["content-length"]=String(this.body.length)),et}getHeader(et){return this.headers[et.toLowerCase()]}setHeader(et,tt){$r(this,qs)[String(et).toLowerCase()]=String(tt)}clearHeaders(){Yr(this,qs,{})}[Symbol.iterator](){const et=this.headers,tt=Object.keys(et);let nt=0;return{next:()=>{if(nt<tt.length){const at=tt[nt++];return{value:[at,et[at]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return $r(this,fl)||null}setCredentials(et,tt){assertArgument(!et.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Yr(this,fl,`${et}:${tt}`)}get allowGzip(){return $r(this,ku)}set allowGzip(et){Yr(this,ku,!!et)}get allowInsecureAuthentication(){return!!$r(this,Lu)}set allowInsecureAuthentication(et){Yr(this,Lu,!!et)}get timeout(){return $r(this,Bu)}set timeout(et){assertArgument(et>=0,"timeout must be non-zero","timeout",et),Yr(this,Bu,et)}get preflightFunc(){return $r(this,tu)||null}set preflightFunc(et){Yr(this,tu,et)}get processFunc(){return $r(this,ru)||null}set processFunc(et){Yr(this,ru,et)}get retryFunc(){return $r(this,nu)||null}set retryFunc(et){Yr(this,nu,et)}get getUrlFunc(){return $r(this,Ml)||defaultGetUrlFunc}set getUrlFunc(et){Yr(this,Ml,et)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${$r(this,ns)?hexlify$1($r(this,ns)):"null"}>`}setThrottleParams(et){et.slotInterval!=null&&($r(this,dl).slotInterval=et.slotInterval),et.maxAttempts!=null&&($r(this,dl).maxAttempts=et.maxAttempts)}send(){return assert$y($r(this,Vs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Yr(this,Vs,new FetchCancelSignal(this)),ga(this,au,Ap).call(this,0,getTime$3()+this.timeout,0,this,new FetchResponse(0,"",{},null,this))}cancel(){assert$y($r(this,Vs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const et=fetchSignals.get(this);if(!et)throw new Error("missing signal; should not happen");et()}redirect(et){const tt=this.url.split(":")[0].toLowerCase(),nt=et.split(":")[0].toLowerCase();assert$y(this.method==="GET"&&(tt!=="https"||nt!=="http")&&et.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(et)})`});const at=new Pm(et);return at.method="GET",at.allowGzip=this.allowGzip,at.timeout=this.timeout,Yr(at,qs,Object.assign({},$r(this,qs))),$r(this,ns)&&Yr(at,ns,new Uint8Array($r(this,ns))),Yr(at,Ms,$r(this,Ms)),at}clone(){const et=new Pm(this.url);return Yr(et,cl,$r(this,cl)),$r(this,ns)&&Yr(et,ns,$r(this,ns)),Yr(et,Ms,$r(this,Ms)),Yr(et,qs,Object.assign({},$r(this,qs))),Yr(et,fl,$r(this,fl)),this.allowGzip&&(et.allowGzip=!0),et.timeout=this.timeout,this.allowInsecureAuthentication&&(et.allowInsecureAuthentication=!0),Yr(et,tu,$r(this,tu)),Yr(et,ru,$r(this,ru)),Yr(et,nu,$r(this,nu)),Yr(et,Ml,$r(this,Ml)),et}static lockConfig(){locked$5=!0}static getGateway(et){return Gateways[et.toLowerCase()]||null}static registerGateway(et,tt){if(et=et.toLowerCase(),et==="http"||et==="https")throw new Error(`cannot intercept ${et}; use registerGetUrl`);if(locked$5)throw new Error("gateways locked");Gateways[et]=tt}static registerGetUrl(et){if(locked$5)throw new Error("gateways locked");defaultGetUrlFunc=et}static createGetUrlFunc(et){return createGetUrl()}static createDataGateway(){return dataGatewayFunc}static createIpfsGatewayFunc(et){return getIpfsGatewayFunc(et)}};Lu=new WeakMap,ku=new WeakMap,qs=new WeakMap,cl=new WeakMap,Bu=new WeakMap,ju=new WeakMap,ns=new WeakMap,Ms=new WeakMap,fl=new WeakMap,tu=new WeakMap,ru=new WeakMap,nu=new WeakMap,Vs=new WeakMap,dl=new WeakMap,Ml=new WeakMap,au=new WeakSet,Ap=async function(et,tt,nt,at,ot){var pt,mt,yt;if(et>=$r(this,dl).maxAttempts)return ot.makeServerError("exceeded maximum retry limit");assert$y(getTime$3()<=tt,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:at}),nt>0&&await wait$1(nt);let st=this.clone();const ct=(st.url.split(":")[0]||"").toLowerCase();if(ct in Gateways){const gt=await Gateways[ct](st.url,checkSignal($r(at,Vs)));if(gt instanceof FetchResponse){let bt=gt;if(this.processFunc){checkSignal($r(at,Vs));try{bt=await this.processFunc(st,bt)}catch($t){($t.throttle==null||typeof $t.stall!="number")&&bt.makeServerError("error in post-processing function",$t).assertOk()}}return bt}st=gt}this.preflightFunc&&(st=await this.preflightFunc(st));const dt=await this.getUrlFunc(st,checkSignal($r(at,Vs)));let ht=new FetchResponse(dt.statusCode,dt.statusMessage,dt.headers,dt.body,at);if(ht.statusCode===301||ht.statusCode===302){try{const gt=ht.headers.location||"";return ga(pt=st.redirect(gt),au,Ap).call(pt,et+1,tt,0,at,ht)}catch{}return ht}else if(ht.statusCode===429&&(this.retryFunc==null||await this.retryFunc(st,ht,et))){const gt=ht.headers["retry-after"];let bt=$r(this,dl).slotInterval*Math.trunc(Math.random()*Math.pow(2,et));return typeof gt=="string"&&gt.match(/^[1-9][0-9]*$/)&&(bt=parseInt(gt)),ga(mt=st.clone(),au,Ap).call(mt,et+1,tt,bt,at,ht)}if(this.processFunc){checkSignal($r(at,Vs));try{ht=await this.processFunc(st,ht)}catch(gt){(gt.throttle==null||typeof gt.stall!="number")&&ht.makeServerError("error in post-processing function",gt).assertOk();let bt=$r(this,dl).slotInterval*Math.trunc(Math.random()*Math.pow(2,et));return gt.stall>=0&&(bt=gt.stall),ga(yt=st.clone(),au,Ap).call(yt,et+1,tt,bt,at,ht)}}return ht};let FetchRequest=Pm;var Rp,Ip,Np,Cs,Fu,iu;const Ym=class Ym{constructor(et,tt,nt,at,ot){In(this,Rp,void 0);In(this,Ip,void 0);In(this,Np,void 0);In(this,Cs,void 0);In(this,Fu,void 0);In(this,iu,void 0);Yr(this,Rp,et),Yr(this,Ip,tt),Yr(this,Np,Object.keys(nt).reduce((st,ct)=>(st[ct.toLowerCase()]=String(nt[ct]),st),{})),Yr(this,Cs,at==null?null:new Uint8Array(at)),Yr(this,Fu,ot||null),Yr(this,iu,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${$r(this,Cs)?hexlify$1($r(this,Cs)):"null"}>`}get statusCode(){return $r(this,Rp)}get statusMessage(){return $r(this,Ip)}get headers(){return Object.assign({},$r(this,Np))}get body(){return $r(this,Cs)==null?null:new Uint8Array($r(this,Cs))}get bodyText(){try{return $r(this,Cs)==null?"":toUtf8String$1($r(this,Cs))}catch{assert$y(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{assert$y(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const et=this.headers,tt=Object.keys(et);let nt=0;return{next:()=>{if(nt<tt.length){const at=tt[nt++];return{value:[at,et[at]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(et,tt){let nt;et?nt=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${et})`:(et=`${this.statusCode} ${this.statusMessage}`,nt=`CLIENT ESCALATED SERVER ERROR (${et})`);const at=new Ym(599,nt,this.headers,this.body,$r(this,Fu)||void 0);return Yr(at,iu,{message:et,error:tt}),at}throwThrottleError(et,tt){tt==null?tt=-1:assertArgument(Number.isInteger(tt)&&tt>=0,"invalid stall timeout","stall",tt);const nt=new Error(et||"throttling requests");throw defineProperties$2(nt,{stall:tt,throttle:!0}),nt}getHeader(et){return this.headers[et.toLowerCase()]}hasBody(){return $r(this,Cs)!=null}get request(){return $r(this,Fu)}ok(){return $r(this,iu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:et,error:tt}=$r(this,iu);et===""&&(et=`server response ${this.statusCode} ${this.statusMessage}`);let nt=null;this.request&&(nt=this.request.url);let at=null;try{$r(this,Cs)&&(at=toUtf8String$1($r(this,Cs)))}catch{}assert$y(!1,et,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:tt,info:{requestUrl:nt,responseBody:at,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Rp=new WeakMap,Ip=new WeakMap,Np=new WeakMap,Cs=new WeakMap,Fu=new WeakMap,iu=new WeakMap;let FetchResponse=Ym;function getTime$3(){return new Date().getTime()}function unpercent$1(_e){return toUtf8Bytes$1(_e.replace(/%([0-9a-f][0-9a-f])/gi,(et,tt)=>String.fromCharCode(parseInt(tt,16))))}function wait$1(_e){return new Promise(et=>setTimeout(et,_e))}function hexlifyByte(_e){let et=_e.toString(16);for(;et.length<2;)et="0"+et;return"0x"+et}function unarrayifyInteger$1(_e,et,tt){let nt=0;for(let at=0;at<tt;at++)nt=nt*256+_e[et+at];return nt}function _decodeChildren$1(_e,et,tt,nt){const at=[];for(;tt<et+1+nt;){const ot=_decode$1(_e,tt);at.push(ot.result),tt+=ot.consumed,assert$y(tt<=et+1+nt,"child data too short","BUFFER_OVERRUN",{buffer:_e,length:nt,offset:et})}return{consumed:1+nt,result:at}}function _decode$1(_e,et){assert$y(_e.length!==0,"data too short","BUFFER_OVERRUN",{buffer:_e,length:0,offset:1});const tt=nt=>{assert$y(nt<=_e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:_e,length:_e.length,offset:nt})};if(_e[et]>=248){const nt=_e[et]-247;tt(et+1+nt);const at=unarrayifyInteger$1(_e,et+1,nt);return tt(et+1+nt+at),_decodeChildren$1(_e,et,et+1+nt,nt+at)}else if(_e[et]>=192){const nt=_e[et]-192;return tt(et+1+nt),_decodeChildren$1(_e,et,et+1,nt)}else if(_e[et]>=184){const nt=_e[et]-183;tt(et+1+nt);const at=unarrayifyInteger$1(_e,et+1,nt);tt(et+1+nt+at);const ot=hexlify$1(_e.slice(et+1+nt,et+1+nt+at));return{consumed:1+nt+at,result:ot}}else if(_e[et]>=128){const nt=_e[et]-128;tt(et+1+nt);const at=hexlify$1(_e.slice(et+1,et+1+nt));return{consumed:1+nt,result:at}}return{consumed:1,result:hexlifyByte(_e[et])}}function decodeRlp(_e){const et=getBytes(_e,"data"),tt=_decode$1(et,0);return assertArgument(tt.consumed===et.length,"unexpected junk after rlp payload","data",_e),tt.result}function arrayifyInteger$1(_e){const et=[];for(;_e;)et.unshift(_e&255),_e>>=8;return et}function _encode$1(_e){if(Array.isArray(_e)){let nt=[];if(_e.forEach(function(ot){nt=nt.concat(_encode$1(ot))}),nt.length<=55)return nt.unshift(192+nt.length),nt;const at=arrayifyInteger$1(nt.length);return at.unshift(247+at.length),at.concat(nt)}const et=Array.prototype.slice.call(getBytes(_e,"object"));if(et.length===1&&et[0]<=127)return et;if(et.length<=55)return et.unshift(128+et.length),et;const tt=arrayifyInteger$1(et.length);return tt.unshift(183+tt.length),tt.concat(et)}const nibbles="0123456789abcdef";function encodeRlp(_e){let et="0x";for(const tt of _encode$1(_e))et+=nibbles[tt>>4],et+=nibbles[tt&15];return et}function uuidV4(_e){const et=getBytes(_e,"randomBytes");et[6]=et[6]&15|64,et[8]=et[8]&63|128;const tt=hexlify$1(et);return[tt.substring(2,10),tt.substring(10,14),tt.substring(14,18),tt.substring(18,22),tt.substring(22,34)].join("-")}const WordSize=32,Padding=new Uint8Array(WordSize),passProperties$1=["then"],_guard$4={};function throwError$1(_e,et){const tt=new Error(`deferred error during ABI decoding triggered accessing ${_e}`);throw tt.error=et,tt}var Cl;const Op=class Op extends Array{constructor(...tt){const nt=tt[0];let at=tt[1],ot=(tt[2]||[]).slice(),st=!0;nt!==_guard$4&&(at=tt,ot=[],st=!1);super(at.length);In(this,Cl,void 0);at.forEach((dt,ht)=>{this[ht]=dt});const ct=ot.reduce((dt,ht)=>(typeof ht=="string"&&dt.set(ht,(dt.get(ht)||0)+1),dt),new Map);if(Yr(this,Cl,Object.freeze(at.map((dt,ht)=>{const pt=ot[ht];return pt!=null&&ct.get(pt)===1?pt:null}))),!!st)return Object.freeze(this),new Proxy(this,{get:(dt,ht,pt)=>{if(typeof ht=="string"){if(ht.match(/^[0-9]+$/)){const yt=getNumber(ht,"%index");if(yt<0||yt>=this.length)throw new RangeError("out of result range");const gt=dt[yt];return gt instanceof Error&&throwError$1(`index ${yt}`,gt),gt}if(passProperties$1.indexOf(ht)>=0)return Reflect.get(dt,ht,pt);const mt=dt[ht];if(mt instanceof Function)return function(...yt){return mt.apply(this===pt?dt:this,yt)};if(!(ht in dt))return dt.getValue.apply(this===pt?dt:this,[ht])}return Reflect.get(dt,ht,pt)}})}toArray(){const tt=[];return this.forEach((nt,at)=>{nt instanceof Error&&throwError$1(`index ${at}`,nt),tt.push(nt)}),tt}toObject(){return $r(this,Cl).reduce((tt,nt,at)=>(assert$y(nt!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),nt in tt||(tt[nt]=this.getValue(nt)),tt),{})}slice(tt,nt){tt==null&&(tt=0),tt<0&&(tt+=this.length,tt<0&&(tt=0)),nt==null&&(nt=this.length),nt<0&&(nt+=this.length,nt<0&&(nt=0)),nt>this.length&&(nt=this.length);const at=[],ot=[];for(let st=tt;st<nt;st++)at.push(this[st]),ot.push($r(this,Cl)[st]);return new Op(_guard$4,at,ot)}filter(tt,nt){const at=[],ot=[];for(let st=0;st<this.length;st++){const ct=this[st];ct instanceof Error&&throwError$1(`index ${st}`,ct),tt.call(nt,ct,st,this)&&(at.push(ct),ot.push($r(this,Cl)[st]))}return new Op(_guard$4,at,ot)}map(tt,nt){const at=[];for(let ot=0;ot<this.length;ot++){const st=this[ot];st instanceof Error&&throwError$1(`index ${ot}`,st),at.push(tt.call(nt,st,ot,this))}return at}getValue(tt){const nt=$r(this,Cl).indexOf(tt);if(nt===-1)return;const at=this[nt];return at instanceof Error&&throwError$1(`property ${JSON.stringify(tt)}`,at.error),at}static fromItems(tt,nt){return new Op(_guard$4,tt,nt)}};Cl=new WeakMap;let Result=Op;function getValue$7(_e){let et=toBeArray(_e);return assert$y(et.length<=WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:et,length:WordSize,offset:et.length}),et.length!==WordSize&&(et=getBytesCopy(concat$2([Padding.slice(et.length%WordSize),et]))),et}let Coder$1=class{constructor(et,tt,nt,at){Qr(this,"name");Qr(this,"type");Qr(this,"localName");Qr(this,"dynamic");defineProperties$2(this,{name:et,type:tt,localName:nt,dynamic:at},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(et,tt){assertArgument(!1,et,this.localName,tt)}};var pl,ou,Uu,_m,Qm;let Writer$1=(Qm=class{constructor(){In(this,Uu);In(this,pl,void 0);In(this,ou,void 0);Yr(this,pl,[]),Yr(this,ou,0)}get data(){return concat$2($r(this,pl))}get length(){return $r(this,ou)}appendWriter(et){return ga(this,Uu,_m).call(this,getBytesCopy(et.data))}writeBytes(et){let tt=getBytesCopy(et);const nt=tt.length%WordSize;return nt&&(tt=getBytesCopy(concat$2([tt,Padding.slice(nt)]))),ga(this,Uu,_m).call(this,tt)}writeValue(et){return ga(this,Uu,_m).call(this,getValue$7(et))}writeUpdatableValue(){const et=$r(this,pl).length;return $r(this,pl).push(Padding),Yr(this,ou,$r(this,ou)+WordSize),tt=>{$r(this,pl)[et]=getValue$7(tt)}}},pl=new WeakMap,ou=new WeakMap,Uu=new WeakSet,_m=function(et){return $r(this,pl).push(et),Yr(this,ou,$r(this,ou)+et.length),et.length},Qm);var $s,Os,su,lu,Ol,Dp,km,Mm,ey,Lp;let Reader$1=(Lp=class{constructor(et,tt,nt){In(this,Dp);In(this,Mm);Qr(this,"allowLoose");In(this,$s,void 0);In(this,Os,void 0);In(this,su,void 0);In(this,lu,void 0);In(this,Ol,void 0);defineProperties$2(this,{allowLoose:!!tt}),Yr(this,$s,getBytesCopy(et)),Yr(this,su,0),Yr(this,lu,null),Yr(this,Ol,nt??1024),Yr(this,Os,0)}get data(){return hexlify$1($r(this,$s))}get dataLength(){return $r(this,$s).length}get consumed(){return $r(this,Os)}get bytes(){return new Uint8Array($r(this,$s))}subReader(et){const tt=new Lp($r(this,$s).slice($r(this,Os)+et),this.allowLoose,$r(this,Ol));return Yr(tt,lu,this),tt}readBytes(et,tt){let nt=ga(this,Mm,ey).call(this,0,et,!!tt);return ga(this,Dp,km).call(this,et),Yr(this,Os,$r(this,Os)+nt.length),nt.slice(0,et)}readValue(){return toBigInt(this.readBytes(WordSize))}readIndex(){return toNumber$2(this.readBytes(WordSize))}},$s=new WeakMap,Os=new WeakMap,su=new WeakMap,lu=new WeakMap,Ol=new WeakMap,Dp=new WeakSet,km=function(et){var tt;if($r(this,lu))return ga(tt=$r(this,lu),Dp,km).call(tt,et);Yr(this,su,$r(this,su)+et),assert$y($r(this,Ol)<1||$r(this,su)<=$r(this,Ol)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${$r(this,Ol)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:getBytesCopy($r(this,$s)),offset:$r(this,Os),length:et,info:{bytesRead:$r(this,su),dataLength:this.dataLength}})},Mm=new WeakSet,ey=function(et,tt,nt){let at=Math.ceil(tt/WordSize)*WordSize;return $r(this,Os)+at>$r(this,$s).length&&(this.allowLoose&&nt&&$r(this,Os)+tt<=$r(this,$s).length?at=tt:assert$y(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:getBytesCopy($r(this,$s)),length:$r(this,$s).length,offset:$r(this,Os)+at})),$r(this,$s).slice($r(this,Os),$r(this,Os)+at)},Lp);const global$a=globalThis||void 0||self;function number$4(_e){if(!Number.isSafeInteger(_e)||_e<0)throw new Error(`Wrong positive integer: ${_e}`)}function bytes$1(_e,...et){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(et.length>0&&!et.includes(_e.length))throw new Error(`Expected Uint8Array of length ${et}, not of length=${_e.length}`)}function hash$9(_e){if(typeof _e!="function"||typeof _e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$4(_e.outputLen),number$4(_e.blockLen)}function exists$1(_e,et=!0){if(_e.destroyed)throw new Error("Hash instance has been destroyed");if(et&&_e.finished)throw new Error("Hash#digest() has already been called")}function output$2(_e,et){bytes$1(_e);const tt=et.outputLen;if(_e.length<tt)throw new Error(`digestInto() expects output buffer of length at least ${tt}`)}const crypto$5=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u8a$1=_e=>_e instanceof Uint8Array,u32=_e=>new Uint32Array(_e.buffer,_e.byteOffset,Math.floor(_e.byteLength/4)),createView=_e=>new DataView(_e.buffer,_e.byteOffset,_e.byteLength),rotr=(_e,et)=>_e<<32-et|_e>>>et,isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");const nextTick$3=async()=>{};async function asyncLoop(_e,et,tt){let nt=Date.now();for(let at=0;at<_e;at++){tt(at);const ot=Date.now()-nt;ot>=0&&ot<et||(await nextTick$3(),nt+=ot)}}function utf8ToBytes$1(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function toBytes(_e){if(typeof _e=="string"&&(_e=utf8ToBytes$1(_e)),!u8a$1(_e))throw new Error(`expected Uint8Array, got ${typeof _e}`);return _e}function concatBytes$1(..._e){const et=new Uint8Array(_e.reduce((nt,at)=>nt+at.length,0));let tt=0;return _e.forEach(nt=>{if(!u8a$1(nt))throw new Error("Uint8Array expected");et.set(nt,tt),tt+=nt.length}),et}let Hash$c=class{clone(){return this._cloneInto()}};const toStr$b={}.toString;function checkOpts(_e,et){if(et!==void 0&&toStr$b.call(et)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(_e,et)}function wrapConstructor$1(_e){const et=nt=>_e().update(toBytes(nt)).digest(),tt=_e();return et.outputLen=tt.outputLen,et.blockLen=tt.blockLen,et.create=()=>_e(),et}function randomBytes$5(_e=32){if(crypto$5&&typeof crypto$5.getRandomValues=="function")return crypto$5.getRandomValues(new Uint8Array(_e));throw new Error("crypto.getRandomValues must be defined")}class HMAC extends Hash$c{constructor(et,tt){super(),this.finished=!1,this.destroyed=!1,hash$9(et);const nt=toBytes(tt);if(this.iHash=et.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const at=this.blockLen,ot=new Uint8Array(at);ot.set(nt.length>at?et.create().update(nt).digest():nt);for(let st=0;st<ot.length;st++)ot[st]^=54;this.iHash.update(ot),this.oHash=et.create();for(let st=0;st<ot.length;st++)ot[st]^=106;this.oHash.update(ot),ot.fill(0)}update(et){return exists$1(this),this.iHash.update(et),this}digestInto(et){exists$1(this),bytes$1(et,this.outputLen),this.finished=!0,this.iHash.digestInto(et),this.oHash.update(et),this.oHash.digestInto(et),this.destroy()}digest(){const et=new Uint8Array(this.oHash.outputLen);return this.digestInto(et),et}_cloneInto(et){et||(et=Object.create(Object.getPrototypeOf(this),{}));const{oHash:tt,iHash:nt,finished:at,destroyed:ot,blockLen:st,outputLen:ct}=this;return et=et,et.finished=at,et.destroyed=ot,et.blockLen=st,et.outputLen=ct,et.oHash=tt._cloneInto(et.oHash),et.iHash=nt._cloneInto(et.iHash),et}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const hmac$2=(_e,et,tt)=>new HMAC(_e,et).update(tt).digest();hmac$2.create=(_e,et)=>new HMAC(_e,et);function pbkdf2Init(_e,et,tt,nt){hash$9(_e);const at=checkOpts({dkLen:32,asyncTick:10},nt),{c:ot,dkLen:st,asyncTick:ct}=at;if(number$4(ot),number$4(st),number$4(ct),ot<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const dt=toBytes(et),ht=toBytes(tt),pt=new Uint8Array(st),mt=hmac$2.create(_e,dt),yt=mt._cloneInto().update(ht);return{c:ot,dkLen:st,asyncTick:ct,DK:pt,PRF:mt,PRFSalt:yt}}function pbkdf2Output(_e,et,tt,nt,at){return _e.destroy(),et.destroy(),nt&&nt.destroy(),at.fill(0),tt}function pbkdf2$2(_e,et,tt,nt){const{c:at,dkLen:ot,DK:st,PRF:ct,PRFSalt:dt}=pbkdf2Init(_e,et,tt,nt);let ht;const pt=new Uint8Array(4),mt=createView(pt),yt=new Uint8Array(ct.outputLen);for(let gt=1,bt=0;bt<ot;gt++,bt+=ct.outputLen){const $t=st.subarray(bt,bt+ct.outputLen);mt.setInt32(0,gt,!1),(ht=dt._cloneInto(ht)).update(pt).digestInto(yt),$t.set(yt.subarray(0,$t.length));for(let wt=1;wt<at;wt++){ct._cloneInto(ht).update(yt).digestInto(yt);for(let St=0;St<$t.length;St++)$t[St]^=yt[St]}}return pbkdf2Output(ct,dt,st,ht,yt)}function setBigUint64$1(_e,et,tt,nt){if(typeof _e.setBigUint64=="function")return _e.setBigUint64(et,tt,nt);const at=BigInt(32),ot=BigInt(4294967295),st=Number(tt>>at&ot),ct=Number(tt&ot),dt=nt?4:0,ht=nt?0:4;_e.setUint32(et+dt,st,nt),_e.setUint32(et+ht,ct,nt)}let SHA2$1=class extends Hash$c{constructor(et,tt,nt,at){super(),this.blockLen=et,this.outputLen=tt,this.padOffset=nt,this.isLE=at,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(et),this.view=createView(this.buffer)}update(et){exists$1(this);const{view:tt,buffer:nt,blockLen:at}=this;et=toBytes(et);const ot=et.length;for(let st=0;st<ot;){const ct=Math.min(at-this.pos,ot-st);if(ct===at){const dt=createView(et);for(;at<=ot-st;st+=at)this.process(dt,st);continue}nt.set(et.subarray(st,st+ct),this.pos),this.pos+=ct,st+=ct,this.pos===at&&(this.process(tt,0),this.pos=0)}return this.length+=et.length,this.roundClean(),this}digestInto(et){exists$1(this),output$2(et,this),this.finished=!0;const{buffer:tt,view:nt,blockLen:at,isLE:ot}=this;let{pos:st}=this;tt[st++]=128,this.buffer.subarray(st).fill(0),this.padOffset>at-st&&(this.process(nt,0),st=0);for(let mt=st;mt<at;mt++)tt[mt]=0;setBigUint64$1(nt,at-8,BigInt(this.length*8),ot),this.process(nt,0);const ct=createView(et),dt=this.outputLen;if(dt%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const ht=dt/4,pt=this.get();if(ht>pt.length)throw new Error("_sha2: outputLen bigger than state");for(let mt=0;mt<ht;mt++)ct.setUint32(4*mt,pt[mt],ot)}digest(){const{buffer:et,outputLen:tt}=this;this.digestInto(et);const nt=et.slice(0,tt);return this.destroy(),nt}_cloneInto(et){et||(et=new this.constructor),et.set(...this.get());const{blockLen:tt,buffer:nt,length:at,finished:ot,destroyed:st,pos:ct}=this;return et.length=at,et.pos=ct,et.finished=ot,et.destroyed=st,at%tt&&et.buffer.set(nt),et}};const Chi$1=(_e,et,tt)=>_e&et^~_e&tt,Maj$1=(_e,et,tt)=>_e&et^_e&tt^et&tt,SHA256_K$1=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IV$1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SHA256_W$1=new Uint32Array(64);let SHA256$3=class extends SHA2$1{constructor(){super(64,32,8,!1),this.A=IV$1[0]|0,this.B=IV$1[1]|0,this.C=IV$1[2]|0,this.D=IV$1[3]|0,this.E=IV$1[4]|0,this.F=IV$1[5]|0,this.G=IV$1[6]|0,this.H=IV$1[7]|0}get(){const{A:et,B:tt,C:nt,D:at,E:ot,F:st,G:ct,H:dt}=this;return[et,tt,nt,at,ot,st,ct,dt]}set(et,tt,nt,at,ot,st,ct,dt){this.A=et|0,this.B=tt|0,this.C=nt|0,this.D=at|0,this.E=ot|0,this.F=st|0,this.G=ct|0,this.H=dt|0}process(et,tt){for(let mt=0;mt<16;mt++,tt+=4)SHA256_W$1[mt]=et.getUint32(tt,!1);for(let mt=16;mt<64;mt++){const yt=SHA256_W$1[mt-15],gt=SHA256_W$1[mt-2],bt=rotr(yt,7)^rotr(yt,18)^yt>>>3,$t=rotr(gt,17)^rotr(gt,19)^gt>>>10;SHA256_W$1[mt]=$t+SHA256_W$1[mt-7]+bt+SHA256_W$1[mt-16]|0}let{A:nt,B:at,C:ot,D:st,E:ct,F:dt,G:ht,H:pt}=this;for(let mt=0;mt<64;mt++){const yt=rotr(ct,6)^rotr(ct,11)^rotr(ct,25),gt=pt+yt+Chi$1(ct,dt,ht)+SHA256_K$1[mt]+SHA256_W$1[mt]|0,$t=(rotr(nt,2)^rotr(nt,13)^rotr(nt,22))+Maj$1(nt,at,ot)|0;pt=ht,ht=dt,dt=ct,ct=st+gt|0,st=ot,ot=at,at=nt,nt=gt+$t|0}nt=nt+this.A|0,at=at+this.B|0,ot=ot+this.C|0,st=st+this.D|0,ct=ct+this.E|0,dt=dt+this.F|0,ht=ht+this.G|0,pt=pt+this.H|0,this.set(nt,at,ot,st,ct,dt,ht,pt)}roundClean(){SHA256_W$1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const sha256$5=wrapConstructor$1(()=>new SHA256$3),U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(_e,et=!1){return et?{h:Number(_e&U32_MASK64),l:Number(_e>>_32n&U32_MASK64)}:{h:Number(_e>>_32n&U32_MASK64)|0,l:Number(_e&U32_MASK64)|0}}function split$3(_e,et=!1){let tt=new Uint32Array(_e.length),nt=new Uint32Array(_e.length);for(let at=0;at<_e.length;at++){const{h:ot,l:st}=fromBig(_e[at],et);[tt[at],nt[at]]=[ot,st]}return[tt,nt]}const toBig=(_e,et)=>BigInt(_e>>>0)<<_32n|BigInt(et>>>0),shrSH=(_e,et,tt)=>_e>>>tt,shrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrSH=(_e,et,tt)=>_e>>>tt|et<<32-tt,rotrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrBH=(_e,et,tt)=>_e<<64-tt|et>>>tt-32,rotrBL=(_e,et,tt)=>_e>>>tt-32|et<<64-tt,rotr32H=(_e,et)=>et,rotr32L=(_e,et)=>_e,rotlSH=(_e,et,tt)=>_e<<tt|et>>>32-tt,rotlSL=(_e,et,tt)=>et<<tt|_e>>>32-tt,rotlBH=(_e,et,tt)=>et<<tt-32|_e>>>64-tt,rotlBL=(_e,et,tt)=>_e<<tt-32|et>>>64-tt;function add$3(_e,et,tt,nt){const at=(et>>>0)+(nt>>>0);return{h:_e+tt+(at/2**32|0)|0,l:at|0}}const add3L=(_e,et,tt)=>(_e>>>0)+(et>>>0)+(tt>>>0),add3H=(_e,et,tt,nt)=>et+tt+nt+(_e/2**32|0)|0,add4L=(_e,et,tt,nt)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(nt>>>0),add4H=(_e,et,tt,nt,at)=>et+tt+nt+at+(_e/2**32|0)|0,add5L=(_e,et,tt,nt,at)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(nt>>>0)+(at>>>0),add5H=(_e,et,tt,nt,at,ot)=>et+tt+nt+at+ot+(_e/2**32|0)|0,u64={fromBig,split:split$3,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add:add$3,add3L,add3H,add4L,add4H,add5H,add5L},u64$1=u64,[SHA512_Kh,SHA512_Kl]=(()=>u64$1.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(_e=>BigInt(_e))))(),SHA512_W_H=new Uint32Array(80),SHA512_W_L=new Uint32Array(80);let SHA512$3=class extends SHA2$1{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:et,Al:tt,Bh:nt,Bl:at,Ch:ot,Cl:st,Dh:ct,Dl:dt,Eh:ht,El:pt,Fh:mt,Fl:yt,Gh:gt,Gl:bt,Hh:$t,Hl:wt}=this;return[et,tt,nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt]}set(et,tt,nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt){this.Ah=et|0,this.Al=tt|0,this.Bh=nt|0,this.Bl=at|0,this.Ch=ot|0,this.Cl=st|0,this.Dh=ct|0,this.Dl=dt|0,this.Eh=ht|0,this.El=pt|0,this.Fh=mt|0,this.Fl=yt|0,this.Gh=gt|0,this.Gl=bt|0,this.Hh=$t|0,this.Hl=wt|0}process(et,tt){for(let Pt=0;Pt<16;Pt++,tt+=4)SHA512_W_H[Pt]=et.getUint32(tt),SHA512_W_L[Pt]=et.getUint32(tt+=4);for(let Pt=16;Pt<80;Pt++){const Ot=SHA512_W_H[Pt-15]|0,Nt=SHA512_W_L[Pt-15]|0,Lt=u64$1.rotrSH(Ot,Nt,1)^u64$1.rotrSH(Ot,Nt,8)^u64$1.shrSH(Ot,Nt,7),Bt=u64$1.rotrSL(Ot,Nt,1)^u64$1.rotrSL(Ot,Nt,8)^u64$1.shrSL(Ot,Nt,7),Ut=SHA512_W_H[Pt-2]|0,Ft=SHA512_W_L[Pt-2]|0,zt=u64$1.rotrSH(Ut,Ft,19)^u64$1.rotrBH(Ut,Ft,61)^u64$1.shrSH(Ut,Ft,6),It=u64$1.rotrSL(Ut,Ft,19)^u64$1.rotrBL(Ut,Ft,61)^u64$1.shrSL(Ut,Ft,6),vt=u64$1.add4L(Bt,It,SHA512_W_L[Pt-7],SHA512_W_L[Pt-16]),Et=u64$1.add4H(vt,Lt,zt,SHA512_W_H[Pt-7],SHA512_W_H[Pt-16]);SHA512_W_H[Pt]=Et|0,SHA512_W_L[Pt]=vt|0}let{Ah:nt,Al:at,Bh:ot,Bl:st,Ch:ct,Cl:dt,Dh:ht,Dl:pt,Eh:mt,El:yt,Fh:gt,Fl:bt,Gh:$t,Gl:wt,Hh:St,Hl:Tt}=this;for(let Pt=0;Pt<80;Pt++){const Ot=u64$1.rotrSH(mt,yt,14)^u64$1.rotrSH(mt,yt,18)^u64$1.rotrBH(mt,yt,41),Nt=u64$1.rotrSL(mt,yt,14)^u64$1.rotrSL(mt,yt,18)^u64$1.rotrBL(mt,yt,41),Lt=mt&gt^~mt&$t,Bt=yt&bt^~yt&wt,Ut=u64$1.add5L(Tt,Nt,Bt,SHA512_Kl[Pt],SHA512_W_L[Pt]),Ft=u64$1.add5H(Ut,St,Ot,Lt,SHA512_Kh[Pt],SHA512_W_H[Pt]),zt=Ut|0,It=u64$1.rotrSH(nt,at,28)^u64$1.rotrBH(nt,at,34)^u64$1.rotrBH(nt,at,39),vt=u64$1.rotrSL(nt,at,28)^u64$1.rotrBL(nt,at,34)^u64$1.rotrBL(nt,at,39),Et=nt&ot^nt&ct^ot&ct,At=at&st^at&dt^st&dt;St=$t|0,Tt=wt|0,$t=gt|0,wt=bt|0,gt=mt|0,bt=yt|0,{h:mt,l:yt}=u64$1.add(ht|0,pt|0,Ft|0,zt|0),ht=ct|0,pt=dt|0,ct=ot|0,dt=st|0,ot=nt|0,st=at|0;const xt=u64$1.add3L(zt,vt,At);nt=u64$1.add3H(xt,Ft,It,Et),at=xt|0}({h:nt,l:at}=u64$1.add(this.Ah|0,this.Al|0,nt|0,at|0)),{h:ot,l:st}=u64$1.add(this.Bh|0,this.Bl|0,ot|0,st|0),{h:ct,l:dt}=u64$1.add(this.Ch|0,this.Cl|0,ct|0,dt|0),{h:ht,l:pt}=u64$1.add(this.Dh|0,this.Dl|0,ht|0,pt|0),{h:mt,l:yt}=u64$1.add(this.Eh|0,this.El|0,mt|0,yt|0),{h:gt,l:bt}=u64$1.add(this.Fh|0,this.Fl|0,gt|0,bt|0),{h:$t,l:wt}=u64$1.add(this.Gh|0,this.Gl|0,$t|0,wt|0),{h:St,l:Tt}=u64$1.add(this.Hh|0,this.Hl|0,St|0,Tt|0),this.set(nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt,St,Tt)}roundClean(){SHA512_W_H.fill(0),SHA512_W_L.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const sha512$2=wrapConstructor$1(()=>new SHA512$3);function getGlobal(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global$a<"u")return global$a;throw new Error("unable to locate global object")}const anyGlobal=getGlobal(),crypto$4=anyGlobal.crypto||anyGlobal.msCrypto;function createHash$3(_e){switch(_e){case"sha256":return sha256$5.create();case"sha512":return sha512$2.create()}assertArgument(!1,"invalid hashing algorithm name","algorithm",_e)}function createHmac(_e,et){const tt={sha256:sha256$5,sha512:sha512$2}[_e];return assertArgument(tt!=null,"invalid hmac algorithm","algorithm",_e),hmac$2.create(tt,et)}function pbkdf2Sync(_e,et,tt,nt,at){const ot={sha256:sha256$5,sha512:sha512$2}[at];return assertArgument(ot!=null,"invalid pbkdf2 algorithm","algorithm",at),pbkdf2$2(ot,_e,et,{c:tt,dkLen:nt})}function randomBytes$4(_e){assert$y(crypto$4!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),assertArgument(Number.isInteger(_e)&&_e>0&&_e<=1024,"invalid length","length",_e);const et=new Uint8Array(_e);return crypto$4.getRandomValues(et),et}let locked$4=!1;const _computeHmac=function(_e,et,tt){return createHmac(_e,et).update(tt).digest()};let __computeHmac=_computeHmac;function computeHmac(_e,et,tt){const nt=getBytes(et,"key"),at=getBytes(tt,"data");return hexlify$1(__computeHmac(_e,nt,at))}computeHmac._=_computeHmac;computeHmac.lock=function(){locked$4=!0};computeHmac.register=function(_e){if(locked$4)throw new Error("computeHmac is locked");__computeHmac=_e};Object.freeze(computeHmac);const[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]],_0n$4=BigInt(0),_1n$5=BigInt(1),_2n$3=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113);for(let _e=0,et=_1n$5,tt=1,nt=0;_e<24;_e++){[tt,nt]=[nt,(2*tt+3*nt)%5],SHA3_PI.push(2*(5*nt+tt)),SHA3_ROTL.push((_e+1)*(_e+2)/2%64);let at=_0n$4;for(let ot=0;ot<7;ot++)et=(et<<_1n$5^(et>>_7n)*_0x71n)%_256n,et&_2n$3&&(at^=_1n$5<<(_1n$5<<BigInt(ot))-_1n$5);_SHA3_IOTA.push(at)}const[SHA3_IOTA_H,SHA3_IOTA_L]=split$3(_SHA3_IOTA,!0),rotlH=(_e,et,tt)=>tt>32?rotlBH(_e,et,tt):rotlSH(_e,et,tt),rotlL=(_e,et,tt)=>tt>32?rotlBL(_e,et,tt):rotlSL(_e,et,tt);function keccakP(_e,et=24){const tt=new Uint32Array(10);for(let nt=24-et;nt<24;nt++){for(let st=0;st<10;st++)tt[st]=_e[st]^_e[st+10]^_e[st+20]^_e[st+30]^_e[st+40];for(let st=0;st<10;st+=2){const ct=(st+8)%10,dt=(st+2)%10,ht=tt[dt],pt=tt[dt+1],mt=rotlH(ht,pt,1)^tt[ct],yt=rotlL(ht,pt,1)^tt[ct+1];for(let gt=0;gt<50;gt+=10)_e[st+gt]^=mt,_e[st+gt+1]^=yt}let at=_e[2],ot=_e[3];for(let st=0;st<24;st++){const ct=SHA3_ROTL[st],dt=rotlH(at,ot,ct),ht=rotlL(at,ot,ct),pt=SHA3_PI[st];at=_e[pt],ot=_e[pt+1],_e[pt]=dt,_e[pt+1]=ht}for(let st=0;st<50;st+=10){for(let ct=0;ct<10;ct++)tt[ct]=_e[st+ct];for(let ct=0;ct<10;ct++)_e[st+ct]^=~tt[(ct+2)%10]&tt[(ct+4)%10]}_e[0]^=SHA3_IOTA_H[nt],_e[1]^=SHA3_IOTA_L[nt]}tt.fill(0)}class Keccak extends Hash$c{constructor(et,tt,nt,at=!1,ot=24){if(super(),this.blockLen=et,this.suffix=tt,this.outputLen=nt,this.enableXOF=at,this.rounds=ot,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,number$4(nt),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=u32(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(et){exists$1(this);const{blockLen:tt,state:nt}=this;et=toBytes(et);const at=et.length;for(let ot=0;ot<at;){const st=Math.min(tt-this.pos,at-ot);for(let ct=0;ct<st;ct++)nt[this.pos++]^=et[ot++];this.pos===tt&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:et,suffix:tt,pos:nt,blockLen:at}=this;et[nt]^=tt,tt&128&&nt===at-1&&this.keccak(),et[at-1]^=128,this.keccak()}writeInto(et){exists$1(this,!1),bytes$1(et),this.finish();const tt=this.state,{blockLen:nt}=this;for(let at=0,ot=et.length;at<ot;){this.posOut>=nt&&this.keccak();const st=Math.min(nt-this.posOut,ot-at);et.set(tt.subarray(this.posOut,this.posOut+st),at),this.posOut+=st,at+=st}return et}xofInto(et){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(et)}xof(et){return number$4(et),this.xofInto(new Uint8Array(et))}digestInto(et){if(output$2(et,this),this.finished)throw new Error("digest() was already called");return this.writeInto(et),this.destroy(),et}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(et){const{blockLen:tt,suffix:nt,outputLen:at,rounds:ot,enableXOF:st}=this;return et||(et=new Keccak(tt,nt,at,st,ot)),et.state32.set(this.state32),et.pos=this.pos,et.posOut=this.posOut,et.finished=this.finished,et.rounds=ot,et.suffix=nt,et.outputLen=at,et.enableXOF=st,et.destroyed=this.destroyed,et}}const gen=(_e,et,tt)=>wrapConstructor$1(()=>new Keccak(et,_e,tt)),keccak_256=gen(1,136,256/8);let locked$3=!1;const _keccak256=function(_e){return keccak_256(_e)};let __keccak256=_keccak256;function keccak256$1(_e){const et=getBytes(_e,"data");return hexlify$1(__keccak256(et))}keccak256$1._=_keccak256;keccak256$1.lock=function(){locked$3=!0};keccak256$1.register=function(_e){if(locked$3)throw new TypeError("keccak256 is locked");__keccak256=_e};Object.freeze(keccak256$1);const Rho=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Id=Uint8Array.from({length:16},(_e,et)=>et),Pi=Id.map(_e=>(9*_e+5)%16);let idxL=[Id],idxR=[Pi];for(let _e=0;_e<4;_e++)for(let et of[idxL,idxR])et.push(et[_e].map(tt=>Rho[tt]));const shifts=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(_e=>new Uint8Array(_e)),shiftsL=idxL.map((_e,et)=>_e.map(tt=>shifts[et][tt])),shiftsR=idxR.map((_e,et)=>_e.map(tt=>shifts[et][tt])),Kl=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Kr=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),rotl$3=(_e,et)=>_e<<et|_e>>>32-et;function f$4(_e,et,tt,nt){return _e===0?et^tt^nt:_e===1?et&tt|~et&nt:_e===2?(et|~tt)^nt:_e===3?et&nt|tt&~nt:et^(tt|~nt)}const BUF=new Uint32Array(16);let RIPEMD160$5=class extends SHA2$1{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:et,h1:tt,h2:nt,h3:at,h4:ot}=this;return[et,tt,nt,at,ot]}set(et,tt,nt,at,ot){this.h0=et|0,this.h1=tt|0,this.h2=nt|0,this.h3=at|0,this.h4=ot|0}process(et,tt){for(let gt=0;gt<16;gt++,tt+=4)BUF[gt]=et.getUint32(tt,!0);let nt=this.h0|0,at=nt,ot=this.h1|0,st=ot,ct=this.h2|0,dt=ct,ht=this.h3|0,pt=ht,mt=this.h4|0,yt=mt;for(let gt=0;gt<5;gt++){const bt=4-gt,$t=Kl[gt],wt=Kr[gt],St=idxL[gt],Tt=idxR[gt],Pt=shiftsL[gt],Ot=shiftsR[gt];for(let Nt=0;Nt<16;Nt++){const Lt=rotl$3(nt+f$4(gt,ot,ct,ht)+BUF[St[Nt]]+$t,Pt[Nt])+mt|0;nt=mt,mt=ht,ht=rotl$3(ct,10)|0,ct=ot,ot=Lt}for(let Nt=0;Nt<16;Nt++){const Lt=rotl$3(at+f$4(bt,st,dt,pt)+BUF[Tt[Nt]]+wt,Ot[Nt])+yt|0;at=yt,yt=pt,pt=rotl$3(dt,10)|0,dt=st,st=Lt}}this.set(this.h1+ct+pt|0,this.h2+ht+yt|0,this.h3+mt+at|0,this.h4+nt+st|0,this.h0+ot+dt|0)}roundClean(){BUF.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};const ripemd160$2=wrapConstructor$1(()=>new RIPEMD160$5);let locked$2=!1;const _ripemd160=function(_e){return ripemd160$2(_e)};let __ripemd160=_ripemd160;function ripemd160$1(_e){const et=getBytes(_e,"data");return hexlify$1(__ripemd160(et))}ripemd160$1._=_ripemd160;ripemd160$1.lock=function(){locked$2=!0};ripemd160$1.register=function(_e){if(locked$2)throw new TypeError("ripemd160 is locked");__ripemd160=_e};Object.freeze(ripemd160$1);let locked$1=!1;const _pbkdf2=function(_e,et,tt,nt,at){return pbkdf2Sync(_e,et,tt,nt,at)};let __pbkdf2=_pbkdf2;function pbkdf2$1(_e,et,tt,nt,at){const ot=getBytes(_e,"password"),st=getBytes(et,"salt");return hexlify$1(__pbkdf2(ot,st,tt,nt,at))}pbkdf2$1._=_pbkdf2;pbkdf2$1.lock=function(){locked$1=!0};pbkdf2$1.register=function(_e){if(locked$1)throw new Error("pbkdf2 is locked");__pbkdf2=_e};Object.freeze(pbkdf2$1);let locked=!1;const _randomBytes=function(_e){return new Uint8Array(randomBytes$4(_e))};let __randomBytes=_randomBytes;function randomBytes$3(_e){return __randomBytes(_e)}randomBytes$3._=_randomBytes;randomBytes$3.lock=function(){locked=!0};randomBytes$3.register=function(_e){if(locked)throw new Error("randomBytes is locked");__randomBytes=_e};Object.freeze(randomBytes$3);const rotl$2=(_e,et)=>_e<<et|_e>>>32-et;function XorAndSalsa(_e,et,tt,nt,at,ot){let st=_e[et++]^tt[nt++],ct=_e[et++]^tt[nt++],dt=_e[et++]^tt[nt++],ht=_e[et++]^tt[nt++],pt=_e[et++]^tt[nt++],mt=_e[et++]^tt[nt++],yt=_e[et++]^tt[nt++],gt=_e[et++]^tt[nt++],bt=_e[et++]^tt[nt++],$t=_e[et++]^tt[nt++],wt=_e[et++]^tt[nt++],St=_e[et++]^tt[nt++],Tt=_e[et++]^tt[nt++],Pt=_e[et++]^tt[nt++],Ot=_e[et++]^tt[nt++],Nt=_e[et++]^tt[nt++],Lt=st,Bt=ct,Ut=dt,Ft=ht,zt=pt,It=mt,vt=yt,Et=gt,At=bt,xt=$t,Ct=wt,Dt=St,kt=Tt,Rt=Pt,_t=Ot,Mt=Nt;for(let jt=0;jt<8;jt+=2)zt^=rotl$2(Lt+kt|0,7),At^=rotl$2(zt+Lt|0,9),kt^=rotl$2(At+zt|0,13),Lt^=rotl$2(kt+At|0,18),xt^=rotl$2(It+Bt|0,7),Rt^=rotl$2(xt+It|0,9),Bt^=rotl$2(Rt+xt|0,13),It^=rotl$2(Bt+Rt|0,18),_t^=rotl$2(Ct+vt|0,7),Ut^=rotl$2(_t+Ct|0,9),vt^=rotl$2(Ut+_t|0,13),Ct^=rotl$2(vt+Ut|0,18),Ft^=rotl$2(Mt+Dt|0,7),Et^=rotl$2(Ft+Mt|0,9),Dt^=rotl$2(Et+Ft|0,13),Mt^=rotl$2(Dt+Et|0,18),Bt^=rotl$2(Lt+Ft|0,7),Ut^=rotl$2(Bt+Lt|0,9),Ft^=rotl$2(Ut+Bt|0,13),Lt^=rotl$2(Ft+Ut|0,18),vt^=rotl$2(It+zt|0,7),Et^=rotl$2(vt+It|0,9),zt^=rotl$2(Et+vt|0,13),It^=rotl$2(zt+Et|0,18),Dt^=rotl$2(Ct+xt|0,7),At^=rotl$2(Dt+Ct|0,9),xt^=rotl$2(At+Dt|0,13),Ct^=rotl$2(xt+At|0,18),kt^=rotl$2(Mt+_t|0,7),Rt^=rotl$2(kt+Mt|0,9),_t^=rotl$2(Rt+kt|0,13),Mt^=rotl$2(_t+Rt|0,18);at[ot++]=st+Lt|0,at[ot++]=ct+Bt|0,at[ot++]=dt+Ut|0,at[ot++]=ht+Ft|0,at[ot++]=pt+zt|0,at[ot++]=mt+It|0,at[ot++]=yt+vt|0,at[ot++]=gt+Et|0,at[ot++]=bt+At|0,at[ot++]=$t+xt|0,at[ot++]=wt+Ct|0,at[ot++]=St+Dt|0,at[ot++]=Tt+kt|0,at[ot++]=Pt+Rt|0,at[ot++]=Ot+_t|0,at[ot++]=Nt+Mt|0}function BlockMix(_e,et,tt,nt,at){let ot=nt+0,st=nt+16*at;for(let ct=0;ct<16;ct++)tt[st+ct]=_e[et+(2*at-1)*16+ct];for(let ct=0;ct<at;ct++,ot+=16,et+=16)XorAndSalsa(tt,st,_e,et,tt,ot),ct>0&&(st+=16),XorAndSalsa(tt,ot,_e,et+=16,tt,st)}function scryptInit(_e,et,tt){const nt=checkOpts({dkLen:32,asyncTick:10,maxmem:1073742848},tt),{N:at,r:ot,p:st,dkLen:ct,asyncTick:dt,maxmem:ht,onProgress:pt}=nt;if(number$4(at),number$4(ot),number$4(st),number$4(ct),number$4(dt),number$4(ht),pt!==void 0&&typeof pt!="function")throw new Error("progressCb should be function");const mt=128*ot,yt=mt/4;if(at<=1||at&at-1||at>=2**(mt/8)||at>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(st<0||st>(2**32-1)*32/mt)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(ct<0||ct>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const gt=mt*(at+st);if(gt>ht)throw new Error(`Scrypt: parameters too large, ${gt} (128 * r * (N + p)) > ${ht} (maxmem)`);const bt=pbkdf2$2(sha256$5,_e,et,{c:1,dkLen:mt*st}),$t=u32(bt),wt=u32(new Uint8Array(mt*at)),St=u32(new Uint8Array(mt));let Tt=()=>{};if(pt){const Pt=2*at*st,Ot=Math.max(Math.floor(Pt/1e4),1);let Nt=0;Tt=()=>{Nt++,pt&&(!(Nt%Ot)||Nt===Pt)&&pt(Nt/Pt)}}return{N:at,r:ot,p:st,dkLen:ct,blockSize32:yt,V:wt,B32:$t,B:bt,tmp:St,blockMixCb:Tt,asyncTick:dt}}function scryptOutput(_e,et,tt,nt,at){const ot=pbkdf2$2(sha256$5,_e,tt,{c:1,dkLen:et});return tt.fill(0),nt.fill(0),at.fill(0),ot}function scrypt$1(_e,et,tt){const{N:nt,r:at,p:ot,dkLen:st,blockSize32:ct,V:dt,B32:ht,B:pt,tmp:mt,blockMixCb:yt}=scryptInit(_e,et,tt);for(let gt=0;gt<ot;gt++){const bt=ct*gt;for(let $t=0;$t<ct;$t++)dt[$t]=ht[bt+$t];for(let $t=0,wt=0;$t<nt-1;$t++)BlockMix(dt,wt,dt,wt+=ct,at),yt();BlockMix(dt,(nt-1)*ct,ht,bt,at),yt();for(let $t=0;$t<nt;$t++){const wt=ht[bt+ct-16]%nt;for(let St=0;St<ct;St++)mt[St]=ht[bt+St]^dt[wt*ct+St];BlockMix(mt,0,ht,bt,at),yt()}}return scryptOutput(_e,st,pt,dt,mt)}async function scryptAsync(_e,et,tt){const{N:nt,r:at,p:ot,dkLen:st,blockSize32:ct,V:dt,B32:ht,B:pt,tmp:mt,blockMixCb:yt,asyncTick:gt}=scryptInit(_e,et,tt);for(let bt=0;bt<ot;bt++){const $t=ct*bt;for(let St=0;St<ct;St++)dt[St]=ht[$t+St];let wt=0;await asyncLoop(nt-1,gt,()=>{BlockMix(dt,wt,dt,wt+=ct,at),yt()}),BlockMix(dt,(nt-1)*ct,ht,$t,at),yt(),await asyncLoop(nt,gt,()=>{const St=ht[$t+ct-16]%nt;for(let Tt=0;Tt<ct;Tt++)mt[Tt]=ht[$t+Tt]^dt[St*ct+Tt];BlockMix(mt,0,ht,$t,at),yt()})}return scryptOutput(_e,st,pt,dt,mt)}let lockedSync=!1,lockedAsync=!1;const _scryptAsync=async function(_e,et,tt,nt,at,ot,st){return await scryptAsync(_e,et,{N:tt,r:nt,p:at,dkLen:ot,onProgress:st})},_scryptSync=function(_e,et,tt,nt,at,ot){return scrypt$1(_e,et,{N:tt,r:nt,p:at,dkLen:ot})};let __scryptAsync=_scryptAsync,__scryptSync=_scryptSync;async function scrypt(_e,et,tt,nt,at,ot,st){const ct=getBytes(_e,"passwd"),dt=getBytes(et,"salt");return hexlify$1(await __scryptAsync(ct,dt,tt,nt,at,ot,st))}scrypt._=_scryptAsync;scrypt.lock=function(){lockedAsync=!0};scrypt.register=function(_e){if(lockedAsync)throw new Error("scrypt is locked");__scryptAsync=_e};Object.freeze(scrypt);function scryptSync(_e,et,tt,nt,at,ot){const st=getBytes(_e,"passwd"),ct=getBytes(et,"salt");return hexlify$1(__scryptSync(st,ct,tt,nt,at,ot))}scryptSync._=_scryptSync;scryptSync.lock=function(){lockedSync=!0};scryptSync.register=function(_e){if(lockedSync)throw new Error("scryptSync is locked");__scryptSync=_e};Object.freeze(scryptSync);const _sha256=function(_e){return createHash$3("sha256").update(_e).digest()};let __sha256=_sha256,locked256=!1;function sha256$4(_e){const et=getBytes(_e,"data");return hexlify$1(__sha256(et))}sha256$4._=_sha256;sha256$4.lock=function(){locked256=!0};sha256$4.register=function(_e){if(locked256)throw new Error("sha256 is locked");__sha256=_e};Object.freeze(sha256$4);Object.freeze(sha256$4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$3=BigInt(0),_1n$4=BigInt(1),_2n$2=BigInt(2),u8a=_e=>_e instanceof Uint8Array,hexes=Array.from({length:256},(_e,et)=>et.toString(16).padStart(2,"0"));function bytesToHex(_e){if(!u8a(_e))throw new Error("Uint8Array expected");let et="";for(let tt=0;tt<_e.length;tt++)et+=hexes[_e[tt]];return et}function numberToHexUnpadded(_e){const et=_e.toString(16);return et.length&1?`0${et}`:et}function hexToNumber$1(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);return BigInt(_e===""?"0":`0x${_e}`)}function hexToBytes(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);const et=_e.length;if(et%2)throw new Error("padded hex string expected, got unpadded hex of length "+et);const tt=new Uint8Array(et/2);for(let nt=0;nt<tt.length;nt++){const at=nt*2,ot=_e.slice(at,at+2),st=Number.parseInt(ot,16);if(Number.isNaN(st)||st<0)throw new Error("Invalid byte sequence");tt[nt]=st}return tt}function bytesToNumberBE(_e){return hexToNumber$1(bytesToHex(_e))}function bytesToNumberLE(_e){if(!u8a(_e))throw new Error("Uint8Array expected");return hexToNumber$1(bytesToHex(Uint8Array.from(_e).reverse()))}function numberToBytesBE(_e,et){return hexToBytes(_e.toString(16).padStart(et*2,"0"))}function numberToBytesLE(_e,et){return numberToBytesBE(_e,et).reverse()}function numberToVarBytesBE(_e){return hexToBytes(numberToHexUnpadded(_e))}function ensureBytes(_e,et,tt){let nt;if(typeof et=="string")try{nt=hexToBytes(et)}catch(ot){throw new Error(`${_e} must be valid hex string, got "${et}". Cause: ${ot}`)}else if(u8a(et))nt=Uint8Array.from(et);else throw new Error(`${_e} must be hex string or Uint8Array`);const at=nt.length;if(typeof tt=="number"&&at!==tt)throw new Error(`${_e} expected ${tt} bytes, got ${at}`);return nt}function concatBytes(..._e){const et=new Uint8Array(_e.reduce((nt,at)=>nt+at.length,0));let tt=0;return _e.forEach(nt=>{if(!u8a(nt))throw new Error("Uint8Array expected");et.set(nt,tt),tt+=nt.length}),et}function equalBytes(_e,et){if(_e.length!==et.length)return!1;for(let tt=0;tt<_e.length;tt++)if(_e[tt]!==et[tt])return!1;return!0}function utf8ToBytes(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function bitLen(_e){let et;for(et=0;_e>_0n$3;_e>>=_1n$4,et+=1);return et}function bitGet(_e,et){return _e>>BigInt(et)&_1n$4}const bitSet=(_e,et,tt)=>_e|(tt?_1n$4:_0n$3)<<BigInt(et),bitMask=_e=>(_2n$2<<BigInt(_e-1))-_1n$4,u8n=_e=>new Uint8Array(_e),u8fr=_e=>Uint8Array.from(_e);function createHmacDrbg(_e,et,tt){if(typeof _e!="number"||_e<2)throw new Error("hashLen must be a number");if(typeof et!="number"||et<2)throw new Error("qByteLen must be a number");if(typeof tt!="function")throw new Error("hmacFn must be a function");let nt=u8n(_e),at=u8n(_e),ot=0;const st=()=>{nt.fill(1),at.fill(0),ot=0},ct=(...mt)=>tt(at,nt,...mt),dt=(mt=u8n())=>{at=ct(u8fr([0]),mt),nt=ct(),mt.length!==0&&(at=ct(u8fr([1]),mt),nt=ct())},ht=()=>{if(ot++>=1e3)throw new Error("drbg: tried 1000 values");let mt=0;const yt=[];for(;mt<et;){nt=ct();const gt=nt.slice();yt.push(gt),mt+=nt.length}return concatBytes(...yt)};return(mt,yt)=>{st(),dt(mt);let gt;for(;!(gt=yt(ht()));)dt();return st(),gt}}const validatorFns={bigint:_e=>typeof _e=="bigint",function:_e=>typeof _e=="function",boolean:_e=>typeof _e=="boolean",string:_e=>typeof _e=="string",stringOrUint8Array:_e=>typeof _e=="string"||_e instanceof Uint8Array,isSafeInteger:_e=>Number.isSafeInteger(_e),array:_e=>Array.isArray(_e),field:(_e,et)=>et.Fp.isValid(_e),hash:_e=>typeof _e=="function"&&Number.isSafeInteger(_e.outputLen)};function validateObject(_e,et,tt={}){const nt=(at,ot,st)=>{const ct=validatorFns[ot];if(typeof ct!="function")throw new Error(`Invalid validator "${ot}", expected function`);const dt=_e[at];if(!(st&&dt===void 0)&&!ct(dt,_e))throw new Error(`Invalid param ${String(at)}=${dt} (${typeof dt}), expected ${ot}`)};for(const[at,ot]of Object.entries(et))nt(at,ot,!1);for(const[at,ot]of Object.entries(tt))nt(at,ot,!0);return _e}const ut=Object.freeze(Object.defineProperty({__proto__:null,bitGet,bitLen,bitMask,bitSet,bytesToHex,bytesToNumberBE,bytesToNumberLE,concatBytes,createHmacDrbg,ensureBytes,equalBytes,hexToBytes,hexToNumber:hexToNumber$1,numberToBytesBE,numberToBytesLE,numberToHexUnpadded,numberToVarBytesBE,utf8ToBytes,validateObject},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$2=BigInt(0),_1n$3=BigInt(1),_2n$1=BigInt(2),_3n$1=BigInt(3),_4n=BigInt(4),_5n=BigInt(5),_8n=BigInt(8);BigInt(9);BigInt(16);function mod$3(_e,et){const tt=_e%et;return tt>=_0n$2?tt:et+tt}function pow$1(_e,et,tt){if(tt<=_0n$2||et<_0n$2)throw new Error("Expected power/modulo > 0");if(tt===_1n$3)return _0n$2;let nt=_1n$3;for(;et>_0n$2;)et&_1n$3&&(nt=nt*_e%tt),_e=_e*_e%tt,et>>=_1n$3;return nt}function pow2(_e,et,tt){let nt=_e;for(;et-- >_0n$2;)nt*=nt,nt%=tt;return nt}function invert$2(_e,et){if(_e===_0n$2||et<=_0n$2)throw new Error(`invert: expected positive integers, got n=${_e} mod=${et}`);let tt=mod$3(_e,et),nt=et,at=_0n$2,ot=_1n$3;for(;tt!==_0n$2;){const ct=nt/tt,dt=nt%tt,ht=at-ot*ct;nt=tt,tt=dt,at=ot,ot=ht}if(nt!==_1n$3)throw new Error("invert: does not exist");return mod$3(at,et)}function tonelliShanks(_e){const et=(_e-_1n$3)/_2n$1;let tt,nt,at;for(tt=_e-_1n$3,nt=0;tt%_2n$1===_0n$2;tt/=_2n$1,nt++);for(at=_2n$1;at<_e&&pow$1(at,et,_e)!==_e-_1n$3;at++);if(nt===1){const st=(_e+_1n$3)/_4n;return function(dt,ht){const pt=dt.pow(ht,st);if(!dt.eql(dt.sqr(pt),ht))throw new Error("Cannot find square root");return pt}}const ot=(tt+_1n$3)/_2n$1;return function(ct,dt){if(ct.pow(dt,et)===ct.neg(ct.ONE))throw new Error("Cannot find square root");let ht=nt,pt=ct.pow(ct.mul(ct.ONE,at),tt),mt=ct.pow(dt,ot),yt=ct.pow(dt,tt);for(;!ct.eql(yt,ct.ONE);){if(ct.eql(yt,ct.ZERO))return ct.ZERO;let gt=1;for(let $t=ct.sqr(yt);gt<ht&&!ct.eql($t,ct.ONE);gt++)$t=ct.sqr($t);const bt=ct.pow(pt,_1n$3<<BigInt(ht-gt-1));pt=ct.sqr(bt),mt=ct.mul(mt,bt),yt=ct.mul(yt,pt),ht=gt}return mt}}function FpSqrt(_e){if(_e%_4n===_3n$1){const et=(_e+_1n$3)/_4n;return function(nt,at){const ot=nt.pow(at,et);if(!nt.eql(nt.sqr(ot),at))throw new Error("Cannot find square root");return ot}}if(_e%_8n===_5n){const et=(_e-_5n)/_8n;return function(nt,at){const ot=nt.mul(at,_2n$1),st=nt.pow(ot,et),ct=nt.mul(at,st),dt=nt.mul(nt.mul(ct,_2n$1),st),ht=nt.mul(ct,nt.sub(dt,nt.ONE));if(!nt.eql(nt.sqr(ht),at))throw new Error("Cannot find square root");return ht}}return tonelliShanks(_e)}const FIELD_FIELDS=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(_e){const et={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},tt=FIELD_FIELDS.reduce((nt,at)=>(nt[at]="function",nt),et);return validateObject(_e,tt)}function FpPow(_e,et,tt){if(tt<_0n$2)throw new Error("Expected power > 0");if(tt===_0n$2)return _e.ONE;if(tt===_1n$3)return et;let nt=_e.ONE,at=et;for(;tt>_0n$2;)tt&_1n$3&&(nt=_e.mul(nt,at)),at=_e.sqr(at),tt>>=_1n$3;return nt}function FpInvertBatch(_e,et){const tt=new Array(et.length),nt=et.reduce((ot,st,ct)=>_e.is0(st)?ot:(tt[ct]=ot,_e.mul(ot,st)),_e.ONE),at=_e.inv(nt);return et.reduceRight((ot,st,ct)=>_e.is0(st)?ot:(tt[ct]=_e.mul(ot,tt[ct]),_e.mul(ot,st)),at),tt}function nLength(_e,et){const tt=et!==void 0?et:_e.toString(2).length,nt=Math.ceil(tt/8);return{nBitLength:tt,nByteLength:nt}}function Field$3(_e,et,tt=!1,nt={}){if(_e<=_0n$2)throw new Error(`Expected Field ORDER > 0, got ${_e}`);const{nBitLength:at,nByteLength:ot}=nLength(_e,et);if(ot>2048)throw new Error("Field lengths over 2048 bytes are not supported");const st=FpSqrt(_e),ct=Object.freeze({ORDER:_e,BITS:at,BYTES:ot,MASK:bitMask(at),ZERO:_0n$2,ONE:_1n$3,create:dt=>mod$3(dt,_e),isValid:dt=>{if(typeof dt!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof dt}`);return _0n$2<=dt&&dt<_e},is0:dt=>dt===_0n$2,isOdd:dt=>(dt&_1n$3)===_1n$3,neg:dt=>mod$3(-dt,_e),eql:(dt,ht)=>dt===ht,sqr:dt=>mod$3(dt*dt,_e),add:(dt,ht)=>mod$3(dt+ht,_e),sub:(dt,ht)=>mod$3(dt-ht,_e),mul:(dt,ht)=>mod$3(dt*ht,_e),pow:(dt,ht)=>FpPow(ct,dt,ht),div:(dt,ht)=>mod$3(dt*invert$2(ht,_e),_e),sqrN:dt=>dt*dt,addN:(dt,ht)=>dt+ht,subN:(dt,ht)=>dt-ht,mulN:(dt,ht)=>dt*ht,inv:dt=>invert$2(dt,_e),sqrt:nt.sqrt||(dt=>st(ct,dt)),invertBatch:dt=>FpInvertBatch(ct,dt),cmov:(dt,ht,pt)=>pt?ht:dt,toBytes:dt=>tt?numberToBytesLE(dt,ot):numberToBytesBE(dt,ot),fromBytes:dt=>{if(dt.length!==ot)throw new Error(`Fp.fromBytes: expected ${ot}, got ${dt.length}`);return tt?bytesToNumberLE(dt):bytesToNumberBE(dt)}});return Object.freeze(ct)}function getFieldBytesLength(_e){if(typeof _e!="bigint")throw new Error("field order must be bigint");const et=_e.toString(2).length;return Math.ceil(et/8)}function getMinHashLength(_e){const et=getFieldBytesLength(_e);return et+Math.ceil(et/2)}function mapHashToField(_e,et,tt=!1){const nt=_e.length,at=getFieldBytesLength(et),ot=getMinHashLength(et);if(nt<16||nt<ot||nt>1024)throw new Error(`expected ${ot}-1024 bytes of input, got ${nt}`);const st=tt?bytesToNumberBE(_e):bytesToNumberLE(_e),ct=mod$3(st,et-_1n$3)+_1n$3;return tt?numberToBytesLE(ct,at):numberToBytesBE(ct,at)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$1=BigInt(0),_1n$2=BigInt(1);function wNAF(_e,et){const tt=(at,ot)=>{const st=ot.negate();return at?st:ot},nt=at=>{const ot=Math.ceil(et/at)+1,st=2**(at-1);return{windows:ot,windowSize:st}};return{constTimeNegate:tt,unsafeLadder(at,ot){let st=_e.ZERO,ct=at;for(;ot>_0n$1;)ot&_1n$2&&(st=st.add(ct)),ct=ct.double(),ot>>=_1n$2;return st},precomputeWindow(at,ot){const{windows:st,windowSize:ct}=nt(ot),dt=[];let ht=at,pt=ht;for(let mt=0;mt<st;mt++){pt=ht,dt.push(pt);for(let yt=1;yt<ct;yt++)pt=pt.add(ht),dt.push(pt);ht=pt.double()}return dt},wNAF(at,ot,st){const{windows:ct,windowSize:dt}=nt(at);let ht=_e.ZERO,pt=_e.BASE;const mt=BigInt(2**at-1),yt=2**at,gt=BigInt(at);for(let bt=0;bt<ct;bt++){const $t=bt*dt;let wt=Number(st&mt);st>>=gt,wt>dt&&(wt-=yt,st+=_1n$2);const St=$t,Tt=$t+Math.abs(wt)-1,Pt=bt%2!==0,Ot=wt<0;wt===0?pt=pt.add(tt(Pt,ot[St])):ht=ht.add(tt(Ot,ot[Tt]))}return{p:ht,f:pt}},wNAFCached(at,ot,st,ct){const dt=at._WINDOW_SIZE||1;let ht=ot.get(at);return ht||(ht=this.precomputeWindow(at,dt),dt!==1&&ot.set(at,ct(ht))),this.wNAF(dt,ht,st)}}}function validateBasic(_e){return validateField(_e.Fp),validateObject(_e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nLength(_e.n,_e.nBitLength),..._e,p:_e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validatePointOpts(_e){const et=validateBasic(_e);validateObject(et,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:tt,Fp:nt,a:at}=et;if(tt){if(!nt.eql(at,nt.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof tt!="object"||typeof tt.beta!="bigint"||typeof tt.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...et})}const{bytesToNumberBE:b2n,hexToBytes:h2b}=ut,DER={Err:class extends Error{constructor(et=""){super(et)}},_parseInt(_e){const{Err:et}=DER;if(_e.length<2||_e[0]!==2)throw new et("Invalid signature integer tag");const tt=_e[1],nt=_e.subarray(2,tt+2);if(!tt||nt.length!==tt)throw new et("Invalid signature integer: wrong length");if(nt[0]&128)throw new et("Invalid signature integer: negative");if(nt[0]===0&&!(nt[1]&128))throw new et("Invalid signature integer: unnecessary leading zero");return{d:b2n(nt),l:_e.subarray(tt+2)}},toSig(_e){const{Err:et}=DER,tt=typeof _e=="string"?h2b(_e):_e;if(!(tt instanceof Uint8Array))throw new Error("ui8a expected");let nt=tt.length;if(nt<2||tt[0]!=48)throw new et("Invalid signature tag");if(tt[1]!==nt-2)throw new et("Invalid signature: incorrect length");const{d:at,l:ot}=DER._parseInt(tt.subarray(2)),{d:st,l:ct}=DER._parseInt(ot);if(ct.length)throw new et("Invalid signature: left bytes after parsing");return{r:at,s:st}},hexFromSig(_e){const et=ht=>Number.parseInt(ht[0],16)&8?"00"+ht:ht,tt=ht=>{const pt=ht.toString(16);return pt.length&1?`0${pt}`:pt},nt=et(tt(_e.s)),at=et(tt(_e.r)),ot=nt.length/2,st=at.length/2,ct=tt(ot),dt=tt(st);return`30${tt(st+ot+4)}02${dt}${at}02${ct}${nt}`}},_0n=BigInt(0),_1n$1=BigInt(1);BigInt(2);const _3n=BigInt(3);BigInt(4);function weierstrassPoints(_e){const et=validatePointOpts(_e),{Fp:tt}=et,nt=et.toBytes||((bt,$t,wt)=>{const St=$t.toAffine();return concatBytes(Uint8Array.from([4]),tt.toBytes(St.x),tt.toBytes(St.y))}),at=et.fromBytes||(bt=>{const $t=bt.subarray(1),wt=tt.fromBytes($t.subarray(0,tt.BYTES)),St=tt.fromBytes($t.subarray(tt.BYTES,2*tt.BYTES));return{x:wt,y:St}});function ot(bt){const{a:$t,b:wt}=et,St=tt.sqr(bt),Tt=tt.mul(St,bt);return tt.add(tt.add(Tt,tt.mul(bt,$t)),wt)}if(!tt.eql(tt.sqr(et.Gy),ot(et.Gx)))throw new Error("bad generator point: equation left != right");function st(bt){return typeof bt=="bigint"&&_0n<bt&&bt<et.n}function ct(bt){if(!st(bt))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function dt(bt){const{allowedPrivateKeyLengths:$t,nByteLength:wt,wrapPrivateKey:St,n:Tt}=et;if($t&&typeof bt!="bigint"){if(bt instanceof Uint8Array&&(bt=bytesToHex(bt)),typeof bt!="string"||!$t.includes(bt.length))throw new Error("Invalid key");bt=bt.padStart(wt*2,"0")}let Pt;try{Pt=typeof bt=="bigint"?bt:bytesToNumberBE(ensureBytes("private key",bt,wt))}catch{throw new Error(`private key must be ${wt} bytes, hex or bigint, not ${typeof bt}`)}return St&&(Pt=mod$3(Pt,Tt)),ct(Pt),Pt}const ht=new Map;function pt(bt){if(!(bt instanceof mt))throw new Error("ProjectivePoint expected")}class mt{constructor($t,wt,St){if(this.px=$t,this.py=wt,this.pz=St,$t==null||!tt.isValid($t))throw new Error("x required");if(wt==null||!tt.isValid(wt))throw new Error("y required");if(St==null||!tt.isValid(St))throw new Error("z required")}static fromAffine($t){const{x:wt,y:St}=$t||{};if(!$t||!tt.isValid(wt)||!tt.isValid(St))throw new Error("invalid affine point");if($t instanceof mt)throw new Error("projective point not allowed");const Tt=Pt=>tt.eql(Pt,tt.ZERO);return Tt(wt)&&Tt(St)?mt.ZERO:new mt(wt,St,tt.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ($t){const wt=tt.invertBatch($t.map(St=>St.pz));return $t.map((St,Tt)=>St.toAffine(wt[Tt])).map(mt.fromAffine)}static fromHex($t){const wt=mt.fromAffine(at(ensureBytes("pointHex",$t)));return wt.assertValidity(),wt}static fromPrivateKey($t){return mt.BASE.multiply(dt($t))}_setWindowSize($t){this._WINDOW_SIZE=$t,ht.delete(this)}assertValidity(){if(this.is0()){if(et.allowInfinityPoint&&!tt.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:$t,y:wt}=this.toAffine();if(!tt.isValid($t)||!tt.isValid(wt))throw new Error("bad point: x or y not FE");const St=tt.sqr(wt),Tt=ot($t);if(!tt.eql(St,Tt))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:$t}=this.toAffine();if(tt.isOdd)return!tt.isOdd($t);throw new Error("Field doesn't support isOdd")}equals($t){pt($t);const{px:wt,py:St,pz:Tt}=this,{px:Pt,py:Ot,pz:Nt}=$t,Lt=tt.eql(tt.mul(wt,Nt),tt.mul(Pt,Tt)),Bt=tt.eql(tt.mul(St,Nt),tt.mul(Ot,Tt));return Lt&&Bt}negate(){return new mt(this.px,tt.neg(this.py),this.pz)}double(){const{a:$t,b:wt}=et,St=tt.mul(wt,_3n),{px:Tt,py:Pt,pz:Ot}=this;let Nt=tt.ZERO,Lt=tt.ZERO,Bt=tt.ZERO,Ut=tt.mul(Tt,Tt),Ft=tt.mul(Pt,Pt),zt=tt.mul(Ot,Ot),It=tt.mul(Tt,Pt);return It=tt.add(It,It),Bt=tt.mul(Tt,Ot),Bt=tt.add(Bt,Bt),Nt=tt.mul($t,Bt),Lt=tt.mul(St,zt),Lt=tt.add(Nt,Lt),Nt=tt.sub(Ft,Lt),Lt=tt.add(Ft,Lt),Lt=tt.mul(Nt,Lt),Nt=tt.mul(It,Nt),Bt=tt.mul(St,Bt),zt=tt.mul($t,zt),It=tt.sub(Ut,zt),It=tt.mul($t,It),It=tt.add(It,Bt),Bt=tt.add(Ut,Ut),Ut=tt.add(Bt,Ut),Ut=tt.add(Ut,zt),Ut=tt.mul(Ut,It),Lt=tt.add(Lt,Ut),zt=tt.mul(Pt,Ot),zt=tt.add(zt,zt),Ut=tt.mul(zt,It),Nt=tt.sub(Nt,Ut),Bt=tt.mul(zt,Ft),Bt=tt.add(Bt,Bt),Bt=tt.add(Bt,Bt),new mt(Nt,Lt,Bt)}add($t){pt($t);const{px:wt,py:St,pz:Tt}=this,{px:Pt,py:Ot,pz:Nt}=$t;let Lt=tt.ZERO,Bt=tt.ZERO,Ut=tt.ZERO;const Ft=et.a,zt=tt.mul(et.b,_3n);let It=tt.mul(wt,Pt),vt=tt.mul(St,Ot),Et=tt.mul(Tt,Nt),At=tt.add(wt,St),xt=tt.add(Pt,Ot);At=tt.mul(At,xt),xt=tt.add(It,vt),At=tt.sub(At,xt),xt=tt.add(wt,Tt);let Ct=tt.add(Pt,Nt);return xt=tt.mul(xt,Ct),Ct=tt.add(It,Et),xt=tt.sub(xt,Ct),Ct=tt.add(St,Tt),Lt=tt.add(Ot,Nt),Ct=tt.mul(Ct,Lt),Lt=tt.add(vt,Et),Ct=tt.sub(Ct,Lt),Ut=tt.mul(Ft,xt),Lt=tt.mul(zt,Et),Ut=tt.add(Lt,Ut),Lt=tt.sub(vt,Ut),Ut=tt.add(vt,Ut),Bt=tt.mul(Lt,Ut),vt=tt.add(It,It),vt=tt.add(vt,It),Et=tt.mul(Ft,Et),xt=tt.mul(zt,xt),vt=tt.add(vt,Et),Et=tt.sub(It,Et),Et=tt.mul(Ft,Et),xt=tt.add(xt,Et),It=tt.mul(vt,xt),Bt=tt.add(Bt,It),It=tt.mul(Ct,xt),Lt=tt.mul(At,Lt),Lt=tt.sub(Lt,It),It=tt.mul(At,vt),Ut=tt.mul(Ct,Ut),Ut=tt.add(Ut,It),new mt(Lt,Bt,Ut)}subtract($t){return this.add($t.negate())}is0(){return this.equals(mt.ZERO)}wNAF($t){return gt.wNAFCached(this,ht,$t,wt=>{const St=tt.invertBatch(wt.map(Tt=>Tt.pz));return wt.map((Tt,Pt)=>Tt.toAffine(St[Pt])).map(mt.fromAffine)})}multiplyUnsafe($t){const wt=mt.ZERO;if($t===_0n)return wt;if(ct($t),$t===_1n$1)return this;const{endo:St}=et;if(!St)return gt.unsafeLadder(this,$t);let{k1neg:Tt,k1:Pt,k2neg:Ot,k2:Nt}=St.splitScalar($t),Lt=wt,Bt=wt,Ut=this;for(;Pt>_0n||Nt>_0n;)Pt&_1n$1&&(Lt=Lt.add(Ut)),Nt&_1n$1&&(Bt=Bt.add(Ut)),Ut=Ut.double(),Pt>>=_1n$1,Nt>>=_1n$1;return Tt&&(Lt=Lt.negate()),Ot&&(Bt=Bt.negate()),Bt=new mt(tt.mul(Bt.px,St.beta),Bt.py,Bt.pz),Lt.add(Bt)}multiply($t){ct($t);let wt=$t,St,Tt;const{endo:Pt}=et;if(Pt){const{k1neg:Ot,k1:Nt,k2neg:Lt,k2:Bt}=Pt.splitScalar(wt);let{p:Ut,f:Ft}=this.wNAF(Nt),{p:zt,f:It}=this.wNAF(Bt);Ut=gt.constTimeNegate(Ot,Ut),zt=gt.constTimeNegate(Lt,zt),zt=new mt(tt.mul(zt.px,Pt.beta),zt.py,zt.pz),St=Ut.add(zt),Tt=Ft.add(It)}else{const{p:Ot,f:Nt}=this.wNAF(wt);St=Ot,Tt=Nt}return mt.normalizeZ([St,Tt])[0]}multiplyAndAddUnsafe($t,wt,St){const Tt=mt.BASE,Pt=(Nt,Lt)=>Lt===_0n||Lt===_1n$1||!Nt.equals(Tt)?Nt.multiplyUnsafe(Lt):Nt.multiply(Lt),Ot=Pt(this,wt).add(Pt($t,St));return Ot.is0()?void 0:Ot}toAffine($t){const{px:wt,py:St,pz:Tt}=this,Pt=this.is0();$t==null&&($t=Pt?tt.ONE:tt.inv(Tt));const Ot=tt.mul(wt,$t),Nt=tt.mul(St,$t),Lt=tt.mul(Tt,$t);if(Pt)return{x:tt.ZERO,y:tt.ZERO};if(!tt.eql(Lt,tt.ONE))throw new Error("invZ was invalid");return{x:Ot,y:Nt}}isTorsionFree(){const{h:$t,isTorsionFree:wt}=et;if($t===_1n$1)return!0;if(wt)return wt(mt,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:$t,clearCofactor:wt}=et;return $t===_1n$1?this:wt?wt(mt,this):this.multiplyUnsafe(et.h)}toRawBytes($t=!0){return this.assertValidity(),nt(mt,this,$t)}toHex($t=!0){return bytesToHex(this.toRawBytes($t))}}mt.BASE=new mt(et.Gx,et.Gy,tt.ONE),mt.ZERO=new mt(tt.ZERO,tt.ONE,tt.ZERO);const yt=et.nBitLength,gt=wNAF(mt,et.endo?Math.ceil(yt/2):yt);return{CURVE:et,ProjectivePoint:mt,normPrivateKeyToScalar:dt,weierstrassEquation:ot,isWithinCurveOrder:st}}function validateOpts(_e){const et=validateBasic(_e);return validateObject(et,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...et})}function weierstrass(_e){const et=validateOpts(_e),{Fp:tt,n:nt}=et,at=tt.BYTES+1,ot=2*tt.BYTES+1;function st(xt){return _0n<xt&&xt<tt.ORDER}function ct(xt){return mod$3(xt,nt)}function dt(xt){return invert$2(xt,nt)}const{ProjectivePoint:ht,normPrivateKeyToScalar:pt,weierstrassEquation:mt,isWithinCurveOrder:yt}=weierstrassPoints({...et,toBytes(xt,Ct,Dt){const kt=Ct.toAffine(),Rt=tt.toBytes(kt.x),_t=concatBytes;return Dt?_t(Uint8Array.from([Ct.hasEvenY()?2:3]),Rt):_t(Uint8Array.from([4]),Rt,tt.toBytes(kt.y))},fromBytes(xt){const Ct=xt.length,Dt=xt[0],kt=xt.subarray(1);if(Ct===at&&(Dt===2||Dt===3)){const Rt=bytesToNumberBE(kt);if(!st(Rt))throw new Error("Point is not on curve");const _t=mt(Rt);let Mt=tt.sqrt(_t);const jt=(Mt&_1n$1)===_1n$1;return(Dt&1)===1!==jt&&(Mt=tt.neg(Mt)),{x:Rt,y:Mt}}else if(Ct===ot&&Dt===4){const Rt=tt.fromBytes(kt.subarray(0,tt.BYTES)),_t=tt.fromBytes(kt.subarray(tt.BYTES,2*tt.BYTES));return{x:Rt,y:_t}}else throw new Error(`Point of length ${Ct} was invalid. Expected ${at} compressed bytes or ${ot} uncompressed bytes`)}}),gt=xt=>bytesToHex(numberToBytesBE(xt,et.nByteLength));function bt(xt){const Ct=nt>>_1n$1;return xt>Ct}function $t(xt){return bt(xt)?ct(-xt):xt}const wt=(xt,Ct,Dt)=>bytesToNumberBE(xt.slice(Ct,Dt));class St{constructor(Ct,Dt,kt){this.r=Ct,this.s=Dt,this.recovery=kt,this.assertValidity()}static fromCompact(Ct){const Dt=et.nByteLength;return Ct=ensureBytes("compactSignature",Ct,Dt*2),new St(wt(Ct,0,Dt),wt(Ct,Dt,2*Dt))}static fromDER(Ct){const{r:Dt,s:kt}=DER.toSig(ensureBytes("DER",Ct));return new St(Dt,kt)}assertValidity(){if(!yt(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!yt(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(Ct){return new St(this.r,this.s,Ct)}recoverPublicKey(Ct){const{r:Dt,s:kt,recovery:Rt}=this,_t=Bt(ensureBytes("msgHash",Ct));if(Rt==null||![0,1,2,3].includes(Rt))throw new Error("recovery id invalid");const Mt=Rt===2||Rt===3?Dt+et.n:Dt;if(Mt>=tt.ORDER)throw new Error("recovery id 2 or 3 invalid");const jt=Rt&1?"03":"02",qt=ht.fromHex(jt+gt(Mt)),Gt=dt(Mt),Ht=ct(-_t*Gt),Wt=ct(kt*Gt),Vt=ht.BASE.multiplyAndAddUnsafe(qt,Ht,Wt);if(!Vt)throw new Error("point at infinify");return Vt.assertValidity(),Vt}hasHighS(){return bt(this.s)}normalizeS(){return this.hasHighS()?new St(this.r,ct(-this.s),this.recovery):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){return DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return gt(this.r)+gt(this.s)}}const Tt={isValidPrivateKey(xt){try{return pt(xt),!0}catch{return!1}},normPrivateKeyToScalar:pt,randomPrivateKey:()=>{const xt=getMinHashLength(et.n);return mapHashToField(et.randomBytes(xt),et.n)},precompute(xt=8,Ct=ht.BASE){return Ct._setWindowSize(xt),Ct.multiply(BigInt(3)),Ct}};function Pt(xt,Ct=!0){return ht.fromPrivateKey(xt).toRawBytes(Ct)}function Ot(xt){const Ct=xt instanceof Uint8Array,Dt=typeof xt=="string",kt=(Ct||Dt)&&xt.length;return Ct?kt===at||kt===ot:Dt?kt===2*at||kt===2*ot:xt instanceof ht}function Nt(xt,Ct,Dt=!0){if(Ot(xt))throw new Error("first arg must be private key");if(!Ot(Ct))throw new Error("second arg must be public key");return ht.fromHex(Ct).multiply(pt(xt)).toRawBytes(Dt)}const Lt=et.bits2int||function(xt){const Ct=bytesToNumberBE(xt),Dt=xt.length*8-et.nBitLength;return Dt>0?Ct>>BigInt(Dt):Ct},Bt=et.bits2int_modN||function(xt){return ct(Lt(xt))},Ut=bitMask(et.nBitLength);function Ft(xt){if(typeof xt!="bigint")throw new Error("bigint expected");if(!(_0n<=xt&&xt<Ut))throw new Error(`bigint expected < 2^${et.nBitLength}`);return numberToBytesBE(xt,et.nByteLength)}function zt(xt,Ct,Dt=It){if(["recovered","canonical"].some(Zt=>Zt in Dt))throw new Error("sign() legacy options not supported");const{hash:kt,randomBytes:Rt}=et;let{lowS:_t,prehash:Mt,extraEntropy:jt}=Dt;_t==null&&(_t=!0),xt=ensureBytes("msgHash",xt),Mt&&(xt=ensureBytes("prehashed msgHash",kt(xt)));const qt=Bt(xt),Gt=pt(Ct),Ht=[Ft(Gt),Ft(qt)];if(jt!=null){const Zt=jt===!0?Rt(tt.BYTES):jt;Ht.push(ensureBytes("extraEntropy",Zt))}const Wt=concatBytes(...Ht),Vt=qt;function Kt(Zt){const Qt=Lt(Zt);if(!yt(Qt))return;const Jt=dt(Qt),Yt=ht.BASE.multiply(Qt).toAffine(),ir=ct(Yt.x);if(ir===_0n)return;const Sr=ct(Jt*ct(Vt+ir*Gt));if(Sr===_0n)return;let Tr=(Yt.x===ir?0:2)|Number(Yt.y&_1n$1),br=Sr;return _t&&bt(Sr)&&(br=$t(Sr),Tr^=1),new St(ir,br,Tr)}return{seed:Wt,k2sig:Kt}}const It={lowS:et.lowS,prehash:!1},vt={lowS:et.lowS,prehash:!1};function Et(xt,Ct,Dt=It){const{seed:kt,k2sig:Rt}=zt(xt,Ct,Dt),_t=et;return createHmacDrbg(_t.hash.outputLen,_t.nByteLength,_t.hmac)(kt,Rt)}ht.BASE._setWindowSize(8);function At(xt,Ct,Dt,kt=vt){var Yt;const Rt=xt;if(Ct=ensureBytes("msgHash",Ct),Dt=ensureBytes("publicKey",Dt),"strict"in kt)throw new Error("options.strict was renamed to lowS");const{lowS:_t,prehash:Mt}=kt;let jt,qt;try{if(typeof Rt=="string"||Rt instanceof Uint8Array)try{jt=St.fromDER(Rt)}catch(ir){if(!(ir instanceof DER.Err))throw ir;jt=St.fromCompact(Rt)}else if(typeof Rt=="object"&&typeof Rt.r=="bigint"&&typeof Rt.s=="bigint"){const{r:ir,s:Sr}=Rt;jt=new St(ir,Sr)}else throw new Error("PARSE");qt=ht.fromHex(Dt)}catch(ir){if(ir.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(_t&&jt.hasHighS())return!1;Mt&&(Ct=et.hash(Ct));const{r:Gt,s:Ht}=jt,Wt=Bt(Ct),Vt=dt(Ht),Kt=ct(Wt*Vt),Zt=ct(Gt*Vt),Qt=(Yt=ht.BASE.multiplyAndAddUnsafe(qt,Kt,Zt))==null?void 0:Yt.toAffine();return Qt?ct(Qt.x)===Gt:!1}return{CURVE:et,getPublicKey:Pt,getSharedSecret:Nt,sign:Et,verify:At,ProjectivePoint:ht,Signature:St,utils:Tt}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function getHash(_e){return{hash:_e,hmac:(et,...tt)=>hmac$2(_e,et,concatBytes$1(...tt)),randomBytes:randomBytes$5}}function createCurve(_e,et){const tt=nt=>weierstrass({..._e,...getHash(nt)});return Object.freeze({...tt(et),create:tt})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_1n=BigInt(1),_2n=BigInt(2),divNearest=(_e,et)=>(_e+et/_2n)/et;function sqrtMod(_e){const et=secp256k1P,tt=BigInt(3),nt=BigInt(6),at=BigInt(11),ot=BigInt(22),st=BigInt(23),ct=BigInt(44),dt=BigInt(88),ht=_e*_e*_e%et,pt=ht*ht*_e%et,mt=pow2(pt,tt,et)*pt%et,yt=pow2(mt,tt,et)*pt%et,gt=pow2(yt,_2n,et)*ht%et,bt=pow2(gt,at,et)*gt%et,$t=pow2(bt,ot,et)*bt%et,wt=pow2($t,ct,et)*$t%et,St=pow2(wt,dt,et)*wt%et,Tt=pow2(St,ct,et)*$t%et,Pt=pow2(Tt,tt,et)*pt%et,Ot=pow2(Pt,st,et)*bt%et,Nt=pow2(Ot,nt,et)*ht%et,Lt=pow2(Nt,_2n,et);if(!Fp.eql(Fp.sqr(Lt),_e))throw new Error("Cannot find square root");return Lt}const Fp=Field$3(secp256k1P,void 0,void 0,{sqrt:sqrtMod}),secp256k1$3=createCurve({a:BigInt(0),b:BigInt(7),Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:_e=>{const et=secp256k1N,tt=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),nt=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),at=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ot=tt,st=BigInt("0x100000000000000000000000000000000"),ct=divNearest(ot*_e,et),dt=divNearest(-nt*_e,et);let ht=mod$3(_e-ct*tt-dt*at,et),pt=mod$3(-ct*nt-dt*ot,et);const mt=ht>st,yt=pt>st;if(mt&&(ht=et-ht),yt&&(pt=et-pt),ht>st||pt>st)throw new Error("splitScalar: Endomorphism failed, k="+_e);return{k1neg:mt,k1:ht,k2neg:yt,k2:pt}}}},sha256$5);BigInt(0);secp256k1$3.ProjectivePoint;const ZeroAddress="0x0000000000000000000000000000000000000000",ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000",MessagePrefix=`Ethereum Signed Message:
127
+ */(function(_e){const et=base64Js,tt=ieee754,nt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_e.Buffer=pt,_e.SlowBuffer=Nt,_e.INSPECT_MAX_BYTES=50;const at=2147483647;_e.kMaxLength=at;const{Uint8Array:ot,ArrayBuffer:st,SharedArrayBuffer:ct}=globalThis;pt.TYPED_ARRAY_SUPPORT=dt(),!pt.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 dt(){try{const rr=new ot(1),Xt={foo:function(){return 42}};return Object.setPrototypeOf(Xt,ot.prototype),Object.setPrototypeOf(rr,Xt),rr.foo()===42}catch{return!1}}Object.defineProperty(pt.prototype,"parent",{enumerable:!0,get:function(){if(pt.isBuffer(this))return this.buffer}}),Object.defineProperty(pt.prototype,"offset",{enumerable:!0,get:function(){if(pt.isBuffer(this))return this.byteOffset}});function ht(rr){if(rr>at)throw new RangeError('The value "'+rr+'" is invalid for option "size"');const Xt=new ot(rr);return Object.setPrototypeOf(Xt,pt.prototype),Xt}function pt(rr,Xt,er){if(typeof rr=="number"){if(typeof Xt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return bt(rr)}return mt(rr,Xt,er)}pt.poolSize=8192;function mt(rr,Xt,er){if(typeof rr=="string")return $t(rr,Xt);if(st.isView(rr))return St(rr);if(rr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof rr);if(jr(rr,st)||rr&&jr(rr.buffer,st)||typeof ct<"u"&&(jr(rr,ct)||rr&&jr(rr.buffer,ct)))return Tt(rr,Xt,er);if(typeof rr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const lr=rr.valueOf&&rr.valueOf();if(lr!=null&&lr!==rr)return pt.from(lr,Xt,er);const _r=Pt(rr);if(_r)return _r;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof rr[Symbol.toPrimitive]=="function")return pt.from(rr[Symbol.toPrimitive]("string"),Xt,er);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof rr)}pt.from=function(rr,Xt,er){return mt(rr,Xt,er)},Object.setPrototypeOf(pt.prototype,ot.prototype),Object.setPrototypeOf(pt,ot);function yt(rr){if(typeof rr!="number")throw new TypeError('"size" argument must be of type number');if(rr<0)throw new RangeError('The value "'+rr+'" is invalid for option "size"')}function gt(rr,Xt,er){return yt(rr),rr<=0?ht(rr):Xt!==void 0?typeof er=="string"?ht(rr).fill(Xt,er):ht(rr).fill(Xt):ht(rr)}pt.alloc=function(rr,Xt,er){return gt(rr,Xt,er)};function bt(rr){return yt(rr),ht(rr<0?0:Ot(rr)|0)}pt.allocUnsafe=function(rr){return bt(rr)},pt.allocUnsafeSlow=function(rr){return bt(rr)};function $t(rr,Xt){if((typeof Xt!="string"||Xt==="")&&(Xt="utf8"),!pt.isEncoding(Xt))throw new TypeError("Unknown encoding: "+Xt);const er=Lt(rr,Xt)|0;let lr=ht(er);const _r=lr.write(rr,Xt);return _r!==er&&(lr=lr.slice(0,_r)),lr}function wt(rr){const Xt=rr.length<0?0:Ot(rr.length)|0,er=ht(Xt);for(let lr=0;lr<Xt;lr+=1)er[lr]=rr[lr]&255;return er}function St(rr){if(jr(rr,ot)){const Xt=new ot(rr);return Tt(Xt.buffer,Xt.byteOffset,Xt.byteLength)}return wt(rr)}function Tt(rr,Xt,er){if(Xt<0||rr.byteLength<Xt)throw new RangeError('"offset" is outside of buffer bounds');if(rr.byteLength<Xt+(er||0))throw new RangeError('"length" is outside of buffer bounds');let lr;return Xt===void 0&&er===void 0?lr=new ot(rr):er===void 0?lr=new ot(rr,Xt):lr=new ot(rr,Xt,er),Object.setPrototypeOf(lr,pt.prototype),lr}function Pt(rr){if(pt.isBuffer(rr)){const Xt=Ot(rr.length)|0,er=ht(Xt);return er.length===0||rr.copy(er,0,0,Xt),er}if(rr.length!==void 0)return typeof rr.length!="number"||Hr(rr.length)?ht(0):wt(rr);if(rr.type==="Buffer"&&Array.isArray(rr.data))return wt(rr.data)}function Ot(rr){if(rr>=at)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+at.toString(16)+" bytes");return rr|0}function Nt(rr){return+rr!=rr&&(rr=0),pt.alloc(+rr)}pt.isBuffer=function(Xt){return Xt!=null&&Xt._isBuffer===!0&&Xt!==pt.prototype},pt.compare=function(Xt,er){if(jr(Xt,ot)&&(Xt=pt.from(Xt,Xt.offset,Xt.byteLength)),jr(er,ot)&&(er=pt.from(er,er.offset,er.byteLength)),!pt.isBuffer(Xt)||!pt.isBuffer(er))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Xt===er)return 0;let lr=Xt.length,_r=er.length;for(let sn=0,xr=Math.min(lr,_r);sn<xr;++sn)if(Xt[sn]!==er[sn]){lr=Xt[sn],_r=er[sn];break}return lr<_r?-1:_r<lr?1:0},pt.isEncoding=function(Xt){switch(String(Xt).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}},pt.concat=function(Xt,er){if(!Array.isArray(Xt))throw new TypeError('"list" argument must be an Array of Buffers');if(Xt.length===0)return pt.alloc(0);let lr;if(er===void 0)for(er=0,lr=0;lr<Xt.length;++lr)er+=Xt[lr].length;const _r=pt.allocUnsafe(er);let sn=0;for(lr=0;lr<Xt.length;++lr){let xr=Xt[lr];if(jr(xr,ot))sn+xr.length>_r.length?(pt.isBuffer(xr)||(xr=pt.from(xr)),xr.copy(_r,sn)):ot.prototype.set.call(_r,xr,sn);else if(pt.isBuffer(xr))xr.copy(_r,sn);else throw new TypeError('"list" argument must be an Array of Buffers');sn+=xr.length}return _r};function Lt(rr,Xt){if(pt.isBuffer(rr))return rr.length;if(st.isView(rr)||jr(rr,st))return rr.byteLength;if(typeof rr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof rr);const er=rr.length,lr=arguments.length>2&&arguments[2]===!0;if(!lr&&er===0)return 0;let _r=!1;for(;;)switch(Xt){case"ascii":case"latin1":case"binary":return er;case"utf8":case"utf-8":return _n(rr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return er*2;case"hex":return er>>>1;case"base64":return xn(rr).length;default:if(_r)return lr?-1:_n(rr).length;Xt=(""+Xt).toLowerCase(),_r=!0}}pt.byteLength=Lt;function Bt(rr,Xt,er){let lr=!1;if((Xt===void 0||Xt<0)&&(Xt=0),Xt>this.length||((er===void 0||er>this.length)&&(er=this.length),er<=0)||(er>>>=0,Xt>>>=0,er<=Xt))return"";for(rr||(rr="utf8");;)switch(rr){case"hex":return jt(this,Xt,er);case"utf8":case"utf-8":return Dt(this,Xt,er);case"ascii":return _t(this,Xt,er);case"latin1":case"binary":return Mt(this,Xt,er);case"base64":return Ct(this,Xt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,Xt,er);default:if(lr)throw new TypeError("Unknown encoding: "+rr);rr=(rr+"").toLowerCase(),lr=!0}}pt.prototype._isBuffer=!0;function Ut(rr,Xt,er){const lr=rr[Xt];rr[Xt]=rr[er],rr[er]=lr}pt.prototype.swap16=function(){const Xt=this.length;if(Xt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let er=0;er<Xt;er+=2)Ut(this,er,er+1);return this},pt.prototype.swap32=function(){const Xt=this.length;if(Xt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let er=0;er<Xt;er+=4)Ut(this,er,er+3),Ut(this,er+1,er+2);return this},pt.prototype.swap64=function(){const Xt=this.length;if(Xt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let er=0;er<Xt;er+=8)Ut(this,er,er+7),Ut(this,er+1,er+6),Ut(this,er+2,er+5),Ut(this,er+3,er+4);return this},pt.prototype.toString=function(){const Xt=this.length;return Xt===0?"":arguments.length===0?Dt(this,0,Xt):Bt.apply(this,arguments)},pt.prototype.toLocaleString=pt.prototype.toString,pt.prototype.equals=function(Xt){if(!pt.isBuffer(Xt))throw new TypeError("Argument must be a Buffer");return this===Xt?!0:pt.compare(this,Xt)===0},pt.prototype.inspect=function(){let Xt="";const er=_e.INSPECT_MAX_BYTES;return Xt=this.toString("hex",0,er).replace(/(.{2})/g,"$1 ").trim(),this.length>er&&(Xt+=" ... "),"<Buffer "+Xt+">"},nt&&(pt.prototype[nt]=pt.prototype.inspect),pt.prototype.compare=function(Xt,er,lr,_r,sn){if(jr(Xt,ot)&&(Xt=pt.from(Xt,Xt.offset,Xt.byteLength)),!pt.isBuffer(Xt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Xt);if(er===void 0&&(er=0),lr===void 0&&(lr=Xt?Xt.length:0),_r===void 0&&(_r=0),sn===void 0&&(sn=this.length),er<0||lr>Xt.length||_r<0||sn>this.length)throw new RangeError("out of range index");if(_r>=sn&&er>=lr)return 0;if(_r>=sn)return-1;if(er>=lr)return 1;if(er>>>=0,lr>>>=0,_r>>>=0,sn>>>=0,this===Xt)return 0;let xr=sn-_r,Xr=lr-er;const Yn=Math.min(xr,Xr),dn=this.slice(_r,sn),yn=Xt.slice(er,lr);for(let Zn=0;Zn<Yn;++Zn)if(dn[Zn]!==yn[Zn]){xr=dn[Zn],Xr=yn[Zn];break}return xr<Xr?-1:Xr<xr?1:0};function Ft(rr,Xt,er,lr,_r){if(rr.length===0)return-1;if(typeof er=="string"?(lr=er,er=0):er>2147483647?er=2147483647:er<-2147483648&&(er=-2147483648),er=+er,Hr(er)&&(er=_r?0:rr.length-1),er<0&&(er=rr.length+er),er>=rr.length){if(_r)return-1;er=rr.length-1}else if(er<0)if(_r)er=0;else return-1;if(typeof Xt=="string"&&(Xt=pt.from(Xt,lr)),pt.isBuffer(Xt))return Xt.length===0?-1:zt(rr,Xt,er,lr,_r);if(typeof Xt=="number")return Xt=Xt&255,typeof ot.prototype.indexOf=="function"?_r?ot.prototype.indexOf.call(rr,Xt,er):ot.prototype.lastIndexOf.call(rr,Xt,er):zt(rr,[Xt],er,lr,_r);throw new TypeError("val must be string, number or Buffer")}function zt(rr,Xt,er,lr,_r){let sn=1,xr=rr.length,Xr=Xt.length;if(lr!==void 0&&(lr=String(lr).toLowerCase(),lr==="ucs2"||lr==="ucs-2"||lr==="utf16le"||lr==="utf-16le")){if(rr.length<2||Xt.length<2)return-1;sn=2,xr/=2,Xr/=2,er/=2}function Yn(yn,Zn){return sn===1?yn[Zn]:yn.readUInt16BE(Zn*sn)}let dn;if(_r){let yn=-1;for(dn=er;dn<xr;dn++)if(Yn(rr,dn)===Yn(Xt,yn===-1?0:dn-yn)){if(yn===-1&&(yn=dn),dn-yn+1===Xr)return yn*sn}else yn!==-1&&(dn-=dn-yn),yn=-1}else for(er+Xr>xr&&(er=xr-Xr),dn=er;dn>=0;dn--){let yn=!0;for(let Zn=0;Zn<Xr;Zn++)if(Yn(rr,dn+Zn)!==Yn(Xt,Zn)){yn=!1;break}if(yn)return dn}return-1}pt.prototype.includes=function(Xt,er,lr){return this.indexOf(Xt,er,lr)!==-1},pt.prototype.indexOf=function(Xt,er,lr){return Ft(this,Xt,er,lr,!0)},pt.prototype.lastIndexOf=function(Xt,er,lr){return Ft(this,Xt,er,lr,!1)};function It(rr,Xt,er,lr){er=Number(er)||0;const _r=rr.length-er;lr?(lr=Number(lr),lr>_r&&(lr=_r)):lr=_r;const sn=Xt.length;lr>sn/2&&(lr=sn/2);let xr;for(xr=0;xr<lr;++xr){const Xr=parseInt(Xt.substr(xr*2,2),16);if(Hr(Xr))return xr;rr[er+xr]=Xr}return xr}function vt(rr,Xt,er,lr){return pr(_n(Xt,rr.length-er),rr,er,lr)}function Et(rr,Xt,er,lr){return pr(Pr(Xt),rr,er,lr)}function At(rr,Xt,er,lr){return pr(xn(Xt),rr,er,lr)}function xt(rr,Xt,er,lr){return pr(Mr(Xt,rr.length-er),rr,er,lr)}pt.prototype.write=function(Xt,er,lr,_r){if(er===void 0)_r="utf8",lr=this.length,er=0;else if(lr===void 0&&typeof er=="string")_r=er,lr=this.length,er=0;else if(isFinite(er))er=er>>>0,isFinite(lr)?(lr=lr>>>0,_r===void 0&&(_r="utf8")):(_r=lr,lr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const sn=this.length-er;if((lr===void 0||lr>sn)&&(lr=sn),Xt.length>0&&(lr<0||er<0)||er>this.length)throw new RangeError("Attempt to write outside buffer bounds");_r||(_r="utf8");let xr=!1;for(;;)switch(_r){case"hex":return It(this,Xt,er,lr);case"utf8":case"utf-8":return vt(this,Xt,er,lr);case"ascii":case"latin1":case"binary":return Et(this,Xt,er,lr);case"base64":return At(this,Xt,er,lr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,Xt,er,lr);default:if(xr)throw new TypeError("Unknown encoding: "+_r);_r=(""+_r).toLowerCase(),xr=!0}},pt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ct(rr,Xt,er){return Xt===0&&er===rr.length?et.fromByteArray(rr):et.fromByteArray(rr.slice(Xt,er))}function Dt(rr,Xt,er){er=Math.min(rr.length,er);const lr=[];let _r=Xt;for(;_r<er;){const sn=rr[_r];let xr=null,Xr=sn>239?4:sn>223?3:sn>191?2:1;if(_r+Xr<=er){let Yn,dn,yn,Zn;switch(Xr){case 1:sn<128&&(xr=sn);break;case 2:Yn=rr[_r+1],(Yn&192)===128&&(Zn=(sn&31)<<6|Yn&63,Zn>127&&(xr=Zn));break;case 3:Yn=rr[_r+1],dn=rr[_r+2],(Yn&192)===128&&(dn&192)===128&&(Zn=(sn&15)<<12|(Yn&63)<<6|dn&63,Zn>2047&&(Zn<55296||Zn>57343)&&(xr=Zn));break;case 4:Yn=rr[_r+1],dn=rr[_r+2],yn=rr[_r+3],(Yn&192)===128&&(dn&192)===128&&(yn&192)===128&&(Zn=(sn&15)<<18|(Yn&63)<<12|(dn&63)<<6|yn&63,Zn>65535&&Zn<1114112&&(xr=Zn))}}xr===null?(xr=65533,Xr=1):xr>65535&&(xr-=65536,lr.push(xr>>>10&1023|55296),xr=56320|xr&1023),lr.push(xr),_r+=Xr}return Rt(lr)}const kt=4096;function Rt(rr){const Xt=rr.length;if(Xt<=kt)return String.fromCharCode.apply(String,rr);let er="",lr=0;for(;lr<Xt;)er+=String.fromCharCode.apply(String,rr.slice(lr,lr+=kt));return er}function _t(rr,Xt,er){let lr="";er=Math.min(rr.length,er);for(let _r=Xt;_r<er;++_r)lr+=String.fromCharCode(rr[_r]&127);return lr}function Mt(rr,Xt,er){let lr="";er=Math.min(rr.length,er);for(let _r=Xt;_r<er;++_r)lr+=String.fromCharCode(rr[_r]);return lr}function jt(rr,Xt,er){const lr=rr.length;(!Xt||Xt<0)&&(Xt=0),(!er||er<0||er>lr)&&(er=lr);let _r="";for(let sn=Xt;sn<er;++sn)_r+=Gr[rr[sn]];return _r}function qt(rr,Xt,er){const lr=rr.slice(Xt,er);let _r="";for(let sn=0;sn<lr.length-1;sn+=2)_r+=String.fromCharCode(lr[sn]+lr[sn+1]*256);return _r}pt.prototype.slice=function(Xt,er){const lr=this.length;Xt=~~Xt,er=er===void 0?lr:~~er,Xt<0?(Xt+=lr,Xt<0&&(Xt=0)):Xt>lr&&(Xt=lr),er<0?(er+=lr,er<0&&(er=0)):er>lr&&(er=lr),er<Xt&&(er=Xt);const _r=this.subarray(Xt,er);return Object.setPrototypeOf(_r,pt.prototype),_r};function Gt(rr,Xt,er){if(rr%1!==0||rr<0)throw new RangeError("offset is not uint");if(rr+Xt>er)throw new RangeError("Trying to access beyond buffer length")}pt.prototype.readUintLE=pt.prototype.readUIntLE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt],sn=1,xr=0;for(;++xr<er&&(sn*=256);)_r+=this[Xt+xr]*sn;return _r},pt.prototype.readUintBE=pt.prototype.readUIntBE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt+--er],sn=1;for(;er>0&&(sn*=256);)_r+=this[Xt+--er]*sn;return _r},pt.prototype.readUint8=pt.prototype.readUInt8=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,1,this.length),this[Xt]},pt.prototype.readUint16LE=pt.prototype.readUInt16LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,2,this.length),this[Xt]|this[Xt+1]<<8},pt.prototype.readUint16BE=pt.prototype.readUInt16BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,2,this.length),this[Xt]<<8|this[Xt+1]},pt.prototype.readUint32LE=pt.prototype.readUInt32LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),(this[Xt]|this[Xt+1]<<8|this[Xt+2]<<16)+this[Xt+3]*16777216},pt.prototype.readUint32BE=pt.prototype.readUInt32BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]*16777216+(this[Xt+1]<<16|this[Xt+2]<<8|this[Xt+3])},pt.prototype.readBigUInt64LE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=er+this[++Xt]*2**8+this[++Xt]*2**16+this[++Xt]*2**24,sn=this[++Xt]+this[++Xt]*2**8+this[++Xt]*2**16+lr*2**24;return BigInt(_r)+(BigInt(sn)<<BigInt(32))}),pt.prototype.readBigUInt64BE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=er*2**24+this[++Xt]*2**16+this[++Xt]*2**8+this[++Xt],sn=this[++Xt]*2**24+this[++Xt]*2**16+this[++Xt]*2**8+lr;return(BigInt(_r)<<BigInt(32))+BigInt(sn)}),pt.prototype.readIntLE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=this[Xt],sn=1,xr=0;for(;++xr<er&&(sn*=256);)_r+=this[Xt+xr]*sn;return sn*=128,_r>=sn&&(_r-=Math.pow(2,8*er)),_r},pt.prototype.readIntBE=function(Xt,er,lr){Xt=Xt>>>0,er=er>>>0,lr||Gt(Xt,er,this.length);let _r=er,sn=1,xr=this[Xt+--_r];for(;_r>0&&(sn*=256);)xr+=this[Xt+--_r]*sn;return sn*=128,xr>=sn&&(xr-=Math.pow(2,8*er)),xr},pt.prototype.readInt8=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,1,this.length),this[Xt]&128?(255-this[Xt]+1)*-1:this[Xt]},pt.prototype.readInt16LE=function(Xt,er){Xt=Xt>>>0,er||Gt(Xt,2,this.length);const lr=this[Xt]|this[Xt+1]<<8;return lr&32768?lr|4294901760:lr},pt.prototype.readInt16BE=function(Xt,er){Xt=Xt>>>0,er||Gt(Xt,2,this.length);const lr=this[Xt+1]|this[Xt]<<8;return lr&32768?lr|4294901760:lr},pt.prototype.readInt32LE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]|this[Xt+1]<<8|this[Xt+2]<<16|this[Xt+3]<<24},pt.prototype.readInt32BE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),this[Xt]<<24|this[Xt+1]<<16|this[Xt+2]<<8|this[Xt+3]},pt.prototype.readBigInt64LE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=this[Xt+4]+this[Xt+5]*2**8+this[Xt+6]*2**16+(lr<<24);return(BigInt(_r)<<BigInt(32))+BigInt(er+this[++Xt]*2**8+this[++Xt]*2**16+this[++Xt]*2**24)}),pt.prototype.readBigInt64BE=Jr(function(Xt){Xt=Xt>>>0,br(Xt,"offset");const er=this[Xt],lr=this[Xt+7];(er===void 0||lr===void 0)&&vn(Xt,this.length-8);const _r=(er<<24)+this[++Xt]*2**16+this[++Xt]*2**8+this[++Xt];return(BigInt(_r)<<BigInt(32))+BigInt(this[++Xt]*2**24+this[++Xt]*2**16+this[++Xt]*2**8+lr)}),pt.prototype.readFloatLE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),tt.read(this,Xt,!0,23,4)},pt.prototype.readFloatBE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,4,this.length),tt.read(this,Xt,!1,23,4)},pt.prototype.readDoubleLE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,8,this.length),tt.read(this,Xt,!0,52,8)},pt.prototype.readDoubleBE=function(Xt,er){return Xt=Xt>>>0,er||Gt(Xt,8,this.length),tt.read(this,Xt,!1,52,8)};function Ht(rr,Xt,er,lr,_r,sn){if(!pt.isBuffer(rr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Xt>_r||Xt<sn)throw new RangeError('"value" argument is out of bounds');if(er+lr>rr.length)throw new RangeError("Index out of range")}pt.prototype.writeUintLE=pt.prototype.writeUIntLE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,lr=lr>>>0,!_r){const Xr=Math.pow(2,8*lr)-1;Ht(this,Xt,er,lr,Xr,0)}let sn=1,xr=0;for(this[er]=Xt&255;++xr<lr&&(sn*=256);)this[er+xr]=Xt/sn&255;return er+lr},pt.prototype.writeUintBE=pt.prototype.writeUIntBE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,lr=lr>>>0,!_r){const Xr=Math.pow(2,8*lr)-1;Ht(this,Xt,er,lr,Xr,0)}let sn=lr-1,xr=1;for(this[er+sn]=Xt&255;--sn>=0&&(xr*=256);)this[er+sn]=Xt/xr&255;return er+lr},pt.prototype.writeUint8=pt.prototype.writeUInt8=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,1,255,0),this[er]=Xt&255,er+1},pt.prototype.writeUint16LE=pt.prototype.writeUInt16LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,65535,0),this[er]=Xt&255,this[er+1]=Xt>>>8,er+2},pt.prototype.writeUint16BE=pt.prototype.writeUInt16BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,65535,0),this[er]=Xt>>>8,this[er+1]=Xt&255,er+2},pt.prototype.writeUint32LE=pt.prototype.writeUInt32LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,4294967295,0),this[er+3]=Xt>>>24,this[er+2]=Xt>>>16,this[er+1]=Xt>>>8,this[er]=Xt&255,er+4},pt.prototype.writeUint32BE=pt.prototype.writeUInt32BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,4294967295,0),this[er]=Xt>>>24,this[er+1]=Xt>>>16,this[er+2]=Xt>>>8,this[er+3]=Xt&255,er+4};function Wt(rr,Xt,er,lr,_r){Tr(Xt,lr,_r,rr,er,7);let sn=Number(Xt&BigInt(4294967295));rr[er++]=sn,sn=sn>>8,rr[er++]=sn,sn=sn>>8,rr[er++]=sn,sn=sn>>8,rr[er++]=sn;let xr=Number(Xt>>BigInt(32)&BigInt(4294967295));return rr[er++]=xr,xr=xr>>8,rr[er++]=xr,xr=xr>>8,rr[er++]=xr,xr=xr>>8,rr[er++]=xr,er}function Vt(rr,Xt,er,lr,_r){Tr(Xt,lr,_r,rr,er,7);let sn=Number(Xt&BigInt(4294967295));rr[er+7]=sn,sn=sn>>8,rr[er+6]=sn,sn=sn>>8,rr[er+5]=sn,sn=sn>>8,rr[er+4]=sn;let xr=Number(Xt>>BigInt(32)&BigInt(4294967295));return rr[er+3]=xr,xr=xr>>8,rr[er+2]=xr,xr=xr>>8,rr[er+1]=xr,xr=xr>>8,rr[er]=xr,er+8}pt.prototype.writeBigUInt64LE=Jr(function(Xt,er=0){return Wt(this,Xt,er,BigInt(0),BigInt("0xffffffffffffffff"))}),pt.prototype.writeBigUInt64BE=Jr(function(Xt,er=0){return Vt(this,Xt,er,BigInt(0),BigInt("0xffffffffffffffff"))}),pt.prototype.writeIntLE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,!_r){const Yn=Math.pow(2,8*lr-1);Ht(this,Xt,er,lr,Yn-1,-Yn)}let sn=0,xr=1,Xr=0;for(this[er]=Xt&255;++sn<lr&&(xr*=256);)Xt<0&&Xr===0&&this[er+sn-1]!==0&&(Xr=1),this[er+sn]=(Xt/xr>>0)-Xr&255;return er+lr},pt.prototype.writeIntBE=function(Xt,er,lr,_r){if(Xt=+Xt,er=er>>>0,!_r){const Yn=Math.pow(2,8*lr-1);Ht(this,Xt,er,lr,Yn-1,-Yn)}let sn=lr-1,xr=1,Xr=0;for(this[er+sn]=Xt&255;--sn>=0&&(xr*=256);)Xt<0&&Xr===0&&this[er+sn+1]!==0&&(Xr=1),this[er+sn]=(Xt/xr>>0)-Xr&255;return er+lr},pt.prototype.writeInt8=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,1,127,-128),Xt<0&&(Xt=255+Xt+1),this[er]=Xt&255,er+1},pt.prototype.writeInt16LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,32767,-32768),this[er]=Xt&255,this[er+1]=Xt>>>8,er+2},pt.prototype.writeInt16BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,2,32767,-32768),this[er]=Xt>>>8,this[er+1]=Xt&255,er+2},pt.prototype.writeInt32LE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,2147483647,-2147483648),this[er]=Xt&255,this[er+1]=Xt>>>8,this[er+2]=Xt>>>16,this[er+3]=Xt>>>24,er+4},pt.prototype.writeInt32BE=function(Xt,er,lr){return Xt=+Xt,er=er>>>0,lr||Ht(this,Xt,er,4,2147483647,-2147483648),Xt<0&&(Xt=4294967295+Xt+1),this[er]=Xt>>>24,this[er+1]=Xt>>>16,this[er+2]=Xt>>>8,this[er+3]=Xt&255,er+4},pt.prototype.writeBigInt64LE=Jr(function(Xt,er=0){return Wt(this,Xt,er,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),pt.prototype.writeBigInt64BE=Jr(function(Xt,er=0){return Vt(this,Xt,er,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Kt(rr,Xt,er,lr,_r,sn){if(er+lr>rr.length)throw new RangeError("Index out of range");if(er<0)throw new RangeError("Index out of range")}function Zt(rr,Xt,er,lr,_r){return Xt=+Xt,er=er>>>0,_r||Kt(rr,Xt,er,4),tt.write(rr,Xt,er,lr,23,4),er+4}pt.prototype.writeFloatLE=function(Xt,er,lr){return Zt(this,Xt,er,!0,lr)},pt.prototype.writeFloatBE=function(Xt,er,lr){return Zt(this,Xt,er,!1,lr)};function Qt(rr,Xt,er,lr,_r){return Xt=+Xt,er=er>>>0,_r||Kt(rr,Xt,er,8),tt.write(rr,Xt,er,lr,52,8),er+8}pt.prototype.writeDoubleLE=function(Xt,er,lr){return Qt(this,Xt,er,!0,lr)},pt.prototype.writeDoubleBE=function(Xt,er,lr){return Qt(this,Xt,er,!1,lr)},pt.prototype.copy=function(Xt,er,lr,_r){if(!pt.isBuffer(Xt))throw new TypeError("argument should be a Buffer");if(lr||(lr=0),!_r&&_r!==0&&(_r=this.length),er>=Xt.length&&(er=Xt.length),er||(er=0),_r>0&&_r<lr&&(_r=lr),_r===lr||Xt.length===0||this.length===0)return 0;if(er<0)throw new RangeError("targetStart out of bounds");if(lr<0||lr>=this.length)throw new RangeError("Index out of range");if(_r<0)throw new RangeError("sourceEnd out of bounds");_r>this.length&&(_r=this.length),Xt.length-er<_r-lr&&(_r=Xt.length-er+lr);const sn=_r-lr;return this===Xt&&typeof ot.prototype.copyWithin=="function"?this.copyWithin(er,lr,_r):ot.prototype.set.call(Xt,this.subarray(lr,_r),er),sn},pt.prototype.fill=function(Xt,er,lr,_r){if(typeof Xt=="string"){if(typeof er=="string"?(_r=er,er=0,lr=this.length):typeof lr=="string"&&(_r=lr,lr=this.length),_r!==void 0&&typeof _r!="string")throw new TypeError("encoding must be a string");if(typeof _r=="string"&&!pt.isEncoding(_r))throw new TypeError("Unknown encoding: "+_r);if(Xt.length===1){const xr=Xt.charCodeAt(0);(_r==="utf8"&&xr<128||_r==="latin1")&&(Xt=xr)}}else typeof Xt=="number"?Xt=Xt&255:typeof Xt=="boolean"&&(Xt=Number(Xt));if(er<0||this.length<er||this.length<lr)throw new RangeError("Out of range index");if(lr<=er)return this;er=er>>>0,lr=lr===void 0?this.length:lr>>>0,Xt||(Xt=0);let sn;if(typeof Xt=="number")for(sn=er;sn<lr;++sn)this[sn]=Xt;else{const xr=pt.isBuffer(Xt)?Xt:pt.from(Xt,_r),Xr=xr.length;if(Xr===0)throw new TypeError('The value "'+Xt+'" is invalid for argument "value"');for(sn=0;sn<lr-er;++sn)this[sn+er]=xr[sn%Xr]}return this};const Jt={};function Yt(rr,Xt,er){Jt[rr]=class extends er{constructor(){super(),Object.defineProperty(this,"message",{value:Xt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${rr}]`,this.stack,delete this.name}get code(){return rr}set code(_r){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_r,writable:!0})}toString(){return`${this.name} [${rr}]: ${this.message}`}}}Yt("ERR_BUFFER_OUT_OF_BOUNDS",function(rr){return rr?`${rr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Yt("ERR_INVALID_ARG_TYPE",function(rr,Xt){return`The "${rr}" argument must be of type number. Received type ${typeof Xt}`},TypeError),Yt("ERR_OUT_OF_RANGE",function(rr,Xt,er){let lr=`The value of "${rr}" is out of range.`,_r=er;return Number.isInteger(er)&&Math.abs(er)>2**32?_r=ir(String(er)):typeof er=="bigint"&&(_r=String(er),(er>BigInt(2)**BigInt(32)||er<-(BigInt(2)**BigInt(32)))&&(_r=ir(_r)),_r+="n"),lr+=` It must be ${Xt}. Received ${_r}`,lr},RangeError);function ir(rr){let Xt="",er=rr.length;const lr=rr[0]==="-"?1:0;for(;er>=lr+4;er-=3)Xt=`_${rr.slice(er-3,er)}${Xt}`;return`${rr.slice(0,er)}${Xt}`}function Sr(rr,Xt,er){br(Xt,"offset"),(rr[Xt]===void 0||rr[Xt+er]===void 0)&&vn(Xt,rr.length-(er+1))}function Tr(rr,Xt,er,lr,_r,sn){if(rr>er||rr<Xt){const xr=typeof Xt=="bigint"?"n":"";let Xr;throw sn>3?Xt===0||Xt===BigInt(0)?Xr=`>= 0${xr} and < 2${xr} ** ${(sn+1)*8}${xr}`:Xr=`>= -(2${xr} ** ${(sn+1)*8-1}${xr}) and < 2 ** ${(sn+1)*8-1}${xr}`:Xr=`>= ${Xt}${xr} and <= ${er}${xr}`,new Jt.ERR_OUT_OF_RANGE("value",Xr,rr)}Sr(lr,_r,sn)}function br(rr,Xt){if(typeof rr!="number")throw new Jt.ERR_INVALID_ARG_TYPE(Xt,"number",rr)}function vn(rr,Xt,er){throw Math.floor(rr)!==rr?(br(rr,er),new Jt.ERR_OUT_OF_RANGE(er||"offset","an integer",rr)):Xt<0?new Jt.ERR_BUFFER_OUT_OF_BOUNDS:new Jt.ERR_OUT_OF_RANGE(er||"offset",`>= ${er?1:0} and <= ${Xt}`,rr)}const Dr=/[^+/0-9A-Za-z-_]/g;function Ar(rr){if(rr=rr.split("=")[0],rr=rr.trim().replace(Dr,""),rr.length<2)return"";for(;rr.length%4!==0;)rr=rr+"=";return rr}function _n(rr,Xt){Xt=Xt||1/0;let er;const lr=rr.length;let _r=null;const sn=[];for(let xr=0;xr<lr;++xr){if(er=rr.charCodeAt(xr),er>55295&&er<57344){if(!_r){if(er>56319){(Xt-=3)>-1&&sn.push(239,191,189);continue}else if(xr+1===lr){(Xt-=3)>-1&&sn.push(239,191,189);continue}_r=er;continue}if(er<56320){(Xt-=3)>-1&&sn.push(239,191,189),_r=er;continue}er=(_r-55296<<10|er-56320)+65536}else _r&&(Xt-=3)>-1&&sn.push(239,191,189);if(_r=null,er<128){if((Xt-=1)<0)break;sn.push(er)}else if(er<2048){if((Xt-=2)<0)break;sn.push(er>>6|192,er&63|128)}else if(er<65536){if((Xt-=3)<0)break;sn.push(er>>12|224,er>>6&63|128,er&63|128)}else if(er<1114112){if((Xt-=4)<0)break;sn.push(er>>18|240,er>>12&63|128,er>>6&63|128,er&63|128)}else throw new Error("Invalid code point")}return sn}function Pr(rr){const Xt=[];for(let er=0;er<rr.length;++er)Xt.push(rr.charCodeAt(er)&255);return Xt}function Mr(rr,Xt){let er,lr,_r;const sn=[];for(let xr=0;xr<rr.length&&!((Xt-=2)<0);++xr)er=rr.charCodeAt(xr),lr=er>>8,_r=er%256,sn.push(_r),sn.push(lr);return sn}function xn(rr){return et.toByteArray(Ar(rr))}function pr(rr,Xt,er,lr){let _r;for(_r=0;_r<lr&&!(_r+er>=Xt.length||_r>=rr.length);++_r)Xt[_r+er]=rr[_r];return _r}function jr(rr,Xt){return rr instanceof Xt||rr!=null&&rr.constructor!=null&&rr.constructor.name!=null&&rr.constructor.name===Xt.name}function Hr(rr){return rr!==rr}const Gr=function(){const rr="0123456789abcdef",Xt=new Array(256);for(let er=0;er<16;++er){const lr=er*16;for(let _r=0;_r<16;++_r)Xt[lr+_r]=rr[er]+rr[_r]}return Xt}();function Jr(rr){return typeof BigInt>"u"?Qn:rr}function Qn(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer$C=buffer$1.Buffer,Blob$1=buffer$1.Blob,BlobOptions=buffer$1.BlobOptions,Buffer$1$1=buffer$1.Buffer,File$1=buffer$1.File,FileOptions=buffer$1.FileOptions,INSPECT_MAX_BYTES=buffer$1.INSPECT_MAX_BYTES,SlowBuffer=buffer$1.SlowBuffer,TranscodeEncoding=buffer$1.TranscodeEncoding,atob$1=buffer$1.atob,btoa$1=buffer$1.btoa,constants$2=buffer$1.constants,isAscii=buffer$1.isAscii,isUtf8=buffer$1.isUtf8,kMaxLength=buffer$1.kMaxLength,kStringMaxLength=buffer$1.kStringMaxLength,resolveObjectURL=buffer$1.resolveObjectURL,transcode=buffer$1.transcode,dist$h=Object.freeze(Object.defineProperty({__proto__:null,Blob:Blob$1,BlobOptions,Buffer:Buffer$1$1,File:File$1,FileOptions,INSPECT_MAX_BYTES,SlowBuffer,TranscodeEncoding,atob:atob$1,btoa:btoa$1,constants:constants$2,default:Buffer$C,isAscii,isUtf8,kMaxLength,kStringMaxLength,resolveObjectURL,transcode},Symbol.toStringTag,{value:"Module"}));var _instanceof={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer$C<"u"&&(tt.Buffer=Buffer$C),typeof Promise<"u"&&(tt.Promise=Promise);const nt=Object.assign(at,{CONSTRUCTORS:tt});function at(){return{keyword:"instanceof",schemaType:["string","array"],compile(st){if(typeof st=="string"){const ct=ot(st);return dt=>dt instanceof ct}if(Array.isArray(st)){const ct=st.map(ot);return dt=>{for(const ht of ct)if(dt instanceof ht)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function ot(st){const ct=tt[st];if(ct)return ct;throw new Error(`invalid "instanceof" keyword value ${st}`)}et.default=nt,_e.exports=nt})(_instanceof,_instanceof.exports);var _instanceofExports$1=_instanceof.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(_instanceofExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(_instanceof$1,_instanceof$1.exports);var _instanceofExports=_instanceof$1.exports,range$6={exports:{}},range$5={exports:{}},_range$1={};Object.defineProperty(_range$1,"__esModule",{value:!0});function getRangeDef(_e){return()=>({keyword:_e,type:"number",schemaType:"array",macro:function([tt,nt]){return et(tt,nt),_e==="range"?{minimum:tt,maximum:nt}:{exclusiveMinimum:tt,exclusiveMaximum:nt}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function et(tt,nt){if(tt>nt||_e==="exclusiveRange"&&tt===nt)throw new Error("There are no numbers in range")}}_range$1.default=getRangeDef;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_range$1).default)("range");et.default=at,_e.exports=at})(range$5,range$5.exports);var rangeExports$2=range$5.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(rangeExports$2),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(range$6,range$6.exports);var rangeExports$1=range$6.exports,exclusiveRange$1={exports:{}},exclusiveRange={exports:{}};(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_range$1).default)("exclusiveRange");et.default=at,_e.exports=at})(exclusiveRange,exclusiveRange.exports);var exclusiveRangeExports$1=exclusiveRange.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(exclusiveRangeExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(exclusiveRange$1,exclusiveRange$1.exports);var exclusiveRangeExports=exclusiveRange$1.exports,regexp$2={exports:{}},regexp$1={exports:{}},_util$1={};Object.defineProperty(_util$1,"__esModule",{value:!0});_util$1.usePattern=_util$1.metaSchemaRef=void 0;const codegen_1=codegen,META_SCHEMA_ID="http://json-schema.org/schema";function metaSchemaRef({defaultMeta:_e}={}){return _e===!1?{}:{$ref:_e||META_SCHEMA_ID}}_util$1.metaSchemaRef=metaSchemaRef;function usePattern({gen:_e,it:{opts:et}},tt,nt=et.unicodeRegExp?"u":""){const at=new RegExp(tt,nt);return _e.scopeValue("pattern",{key:at.toString(),ref:at,code:(0,codegen_1._)`new RegExp(${tt}, ${nt})`})}_util$1.usePattern=usePattern;(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},ot=/^\/(.*)\/([gimuy]*)$/;function st(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(ct){const{data:dt,schema:ht}=ct,pt=mt(ht);ct.pass((0,tt._)`${pt}.test(${dt})`);function mt(yt){if(typeof yt=="object")return(0,nt.usePattern)(ct,yt.pattern,yt.flags);const gt=ot.exec(yt);if(gt)return(0,nt.usePattern)(ct,gt[1],gt[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},at]}}}et.default=st,_e.exports=st})(regexp$1,regexp$1.exports);var regexpExports$1=regexp$1.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(regexpExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(regexp$2,regexp$2.exports);var regexpExports=regexp$2.exports,transform$1={exports:{}},transform={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt={trimStart:dt=>dt.trimStart(),trimEnd:dt=>dt.trimEnd(),trimLeft:dt=>dt.trimStart(),trimRight:dt=>dt.trimEnd(),trim:dt=>dt.trim(),toLowerCase:dt=>dt.toLowerCase(),toUpperCase:dt=>dt.toUpperCase(),toEnumCase:(dt,ht)=>(ht==null?void 0:ht.hash[ct(dt)])||dt},at=Object.assign(ot,{transform:nt});function ot(){return{keyword:"transform",schemaType:"array",before:"enum",code(dt){const{gen:ht,data:pt,schema:mt,parentSchema:yt,it:gt}=dt,{parentData:bt,parentDataProperty:$t}=gt,wt=mt;if(!wt.length)return;let St;if(wt.includes("toEnumCase")){const Pt=st(yt);St=ht.scopeValue("obj",{ref:Pt,code:(0,tt.stringify)(Pt)})}ht.if((0,tt._)`typeof ${pt} == "string" && ${bt} !== undefined`,()=>{ht.assign(pt,Tt(wt.slice())),ht.assign((0,tt._)`${bt}[${$t}]`,pt)});function Tt(Pt){if(!Pt.length)return pt;const Ot=Pt.pop();if(!(Ot in nt))throw new Error(`transform: unknown transformation ${Ot}`);const Nt=ht.scopeValue("func",{ref:nt[Ot],code:(0,tt._)`require("ajv-keywords/dist/definitions/transform").transform${(0,tt.getProperty)(Ot)}`}),Lt=Tt(Pt);return St&&Ot==="toEnumCase"?(0,tt._)`${Nt}(${Lt}, ${St})`:(0,tt._)`${Nt}(${Lt})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(nt)}}}}function st(dt){const ht={hash:{}};if(!dt.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const pt of dt.enum){if(typeof pt!="string")continue;const mt=ct(pt);if(ht.hash[mt])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');ht.hash[mt]=pt}return ht}function ct(dt){return dt.toLowerCase()}et.default=at,_e.exports=at})(transform,transform.exports);var transformExports$1=transform.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(transformExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(transform$1,transform$1.exports);var transformExports=transform$1.exports,uniqueItemProperties$1={exports:{}},uniqueItemProperties={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=fastDeepEqual,nt=["number","integer","string","boolean","null"];function at(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(st,ct){const dt=ot(st,ct);return ht=>{if(ht.length<=1)return!0;for(let pt=0;pt<st.length;pt++){const mt=st[pt];if(dt[pt]){const yt={};for(const gt of ht){if(!gt||typeof gt!="object")continue;let bt=gt[mt];if(!(bt&&typeof bt=="object")){if(typeof bt=="string"&&(bt='"'+bt),yt[bt])return!1;yt[bt]=!0}}}else for(let yt=ht.length;yt--;){const gt=ht[yt];if(!(!gt||typeof gt!="object"))for(let bt=yt;bt--;){const $t=ht[bt];if($t&&typeof $t=="object"&&tt(gt[mt],$t[mt]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}et.default=at;function ot(st,ct){return st.map(dt=>{var ht,pt,mt;const yt=(mt=(pt=(ht=ct.items)===null||ht===void 0?void 0:ht.properties)===null||pt===void 0?void 0:pt[dt])===null||mt===void 0?void 0:mt.type;return Array.isArray(yt)?!yt.includes("object")&&!yt.includes("array"):nt.includes(yt)})}_e.exports=at})(uniqueItemProperties,uniqueItemProperties.exports);var uniqueItemPropertiesExports$1=uniqueItemProperties.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(uniqueItemPropertiesExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(uniqueItemProperties$1,uniqueItemProperties$1.exports);var uniqueItemPropertiesExports=uniqueItemProperties$1.exports,allRequired$1={exports:{}},allRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});function tt(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(nt,at){if(!nt)return!0;const ot=Object.keys(at.properties);return ot.length===0?!0:{required:ot}},dependencies:["properties"]}}et.default=tt,_e.exports=tt})(allRequired,allRequired.exports);var allRequiredExports$1=allRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(allRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(allRequired$1,allRequired$1.exports);var allRequiredExports=allRequired$1.exports,anyRequired$1={exports:{}},anyRequired={exports:{}},_required={};Object.defineProperty(_required,"__esModule",{value:!0});function getRequiredDef(_e){return()=>({keyword:_e,type:"object",schemaType:"array",macro(et){return et.length===0?!0:et.length===1?{required:et}:{[_e==="anyRequired"?"anyOf":"oneOf"]:et.map(nt=>({required:[nt]}))}},metaSchema:{type:"array",items:{type:"string"}}})}_required.default=getRequiredDef;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_required).default)("anyRequired");et.default=at,_e.exports=at})(anyRequired,anyRequired.exports);var anyRequiredExports$1=anyRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(anyRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(anyRequired$1,anyRequired$1.exports);var anyRequiredExports=anyRequired$1.exports,oneRequired$1={exports:{}},oneRequired={exports:{}};(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const at=(0,tt(_required).default)("oneRequired");et.default=at,_e.exports=at})(oneRequired,oneRequired.exports);var oneRequiredExports$1=oneRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(oneRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(oneRequired$1,oneRequired$1.exports);var oneRequiredExports=oneRequired$1.exports,patternRequired$1={exports:{}},patternRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={message:({params:{missingPattern:st}})=>(0,tt.str)`should have property matching pattern '${st}'`,params:({params:{missingPattern:st}})=>(0,tt._)`{missingPattern: ${st}}`};function ot(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:at,code(st){const{gen:ct,schema:dt,data:ht}=st;if(dt.length===0)return;const pt=ct.let("valid",!0);for(const yt of dt)mt(yt);function mt(yt){const gt=ct.let("matched",!1);ct.forIn("key",ht,bt=>{ct.assign(gt,(0,tt._)`${(0,nt.usePattern)(st,yt)}.test(${bt})`),ct.if(gt,()=>ct.break())}),st.setParams({missingPattern:yt}),ct.assign(pt,(0,tt.and)(pt,gt)),st.pass(pt)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}et.default=ot,_e.exports=ot})(patternRequired,patternRequired.exports);var patternRequiredExports$1=patternRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(patternRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(patternRequired$1,patternRequired$1.exports);var patternRequiredExports=patternRequired$1.exports,prohibited$1={exports:{}},prohibited={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});function tt(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(nt){return nt.length===0?!0:nt.length===1?{not:{required:nt}}:{not:{anyOf:nt.map(at=>({required:[at]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}et.default=tt,_e.exports=tt})(prohibited,prohibited.exports);var prohibitedExports$1=prohibited.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(prohibitedExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(prohibited$1,prohibited$1.exports);var prohibitedExports=prohibited$1.exports,deepProperties$1={exports:{}},deepProperties={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=_util$1;function nt(st){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(ct){const dt=[];for(const ht in ct)dt.push(at(ht,ct[ht]));return{allOf:dt}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,tt.metaSchemaRef)(st)}}}et.default=nt;function at(st,ct){const dt=st.split("/"),ht={};let pt=ht;for(let mt=1;mt<dt.length;mt++){let yt=dt[mt];const gt=mt===dt.length-1;yt=ot(yt);const bt=pt.properties={};let $t;if(/[0-9]+/.test(yt)){let wt=+yt;for($t=pt.items=[],pt.type=["object","array"];wt--;)$t.push({})}else pt.type="object";pt=gt?ct:{},bt[yt]=pt,$t&&$t.push(pt)}return ht}function ot(st){return st.replace(/~1/g,"/").replace(/~0/g,"~")}_e.exports=nt})(deepProperties,deepProperties.exports);var deepPropertiesExports$1=deepProperties.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(deepPropertiesExports$1),at=(ot,st)=>ot.addKeyword((0,nt.default)(st));et.default=at,_e.exports=at})(deepProperties$1,deepProperties$1.exports);var deepPropertiesExports=deepProperties$1.exports,deepRequired$1={exports:{}},deepRequired={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen;function nt(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(ot){const{schema:st,data:ct}=ot,dt=st.map(pt=>(0,tt._)`(${ht(pt)}) === undefined`);ot.fail((0,tt.or)(...dt));function ht(pt){if(pt==="")throw new Error("empty JSON pointer not allowed");const mt=pt.split("/");let yt=ct;const gt=mt.map((bt,$t)=>$t?yt=(0,tt._)`${yt}${(0,tt.getProperty)(at(bt))}`:yt);return(0,tt.and)(...gt)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}et.default=nt;function at(ot){return ot.replace(/~1/g,"/").replace(/~0/g,"~")}_e.exports=nt})(deepRequired,deepRequired.exports);var deepRequiredExports$1=deepRequired.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(deepRequiredExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(deepRequired$1,deepRequired$1.exports);var deepRequiredExports=deepRequired$1.exports,dynamicDefaults$1={exports:{}},dynamicDefaults={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt={},nt={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:pt=>{var mt;const yt=(mt=pt==null?void 0:pt.max)!==null&&mt!==void 0?mt:2;return()=>Math.floor(Math.random()*yt)},seq:pt=>{var mt;const yt=(mt=pt==null?void 0:pt.name)!==null&&mt!==void 0?mt:"";return tt[yt]||(tt[yt]=0),()=>tt[yt]++}},at=Object.assign(ot,{DEFAULTS:nt});function ot(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(pt,mt,yt){if(!yt.opts.useDefaults||yt.compositeRule)return()=>!0;const gt={};for(const $t in pt)gt[$t]=st(pt[$t]);const bt=yt.opts.useDefaults==="empty";return $t=>{for(const wt in pt)($t[wt]===void 0||bt&&($t[wt]===null||$t[wt]===""))&&($t[wt]=gt[wt]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function st(pt){return typeof pt=="object"?ct(pt):dt(pt)}function ct({func:pt,args:mt}){const yt=nt[pt];return ht(pt,yt),yt(mt)}function dt(pt=""){const mt=nt[pt];return ht(pt,mt),mt()}function ht(pt,mt){if(!mt)throw new Error(`invalid "dynamicDefaults" keyword property value: ${pt}`)}et.default=at,_e.exports=at})(dynamicDefaults,dynamicDefaults.exports);var dynamicDefaultsExports$1=dynamicDefaults.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(dynamicDefaultsExports$1),at=ot=>ot.addKeyword((0,nt.default)());et.default=at,_e.exports=at})(dynamicDefaults$1,dynamicDefaults$1.exports);var dynamicDefaultsExports=dynamicDefaults$1.exports,select$2={exports:{}},select$1={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=codegen,nt=_util$1,at={message:({params:{schemaProp:st}})=>st?(0,tt.str)`should match case "${st}" schema`:(0,tt.str)`should match default case schema`,params:({params:{schemaProp:st}})=>st?(0,tt._)`{failingCase: ${st}}`:(0,tt._)`{failingDefault: true}`};function ot(st){const ct=(0,nt.metaSchemaRef)(st);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:at,dependencies:["selectCases"],code(dt){const{gen:ht,schemaCode:pt,parentSchema:mt}=dt;dt.block$data(tt.nil,()=>{const yt=ht.let("valid",!0),gt=ht.name("_valid"),bt=ht.const("value",(0,tt._)`${pt} === null ? "null" : ${pt}`);ht.if(!1);for(const $t in mt.selectCases){dt.setParams({schemaProp:$t}),ht.elseIf((0,tt._)`"" + ${bt} == ${$t}`);const wt=dt.subschema({keyword:"selectCases",schemaProp:$t},gt);dt.mergeEvaluated(wt,tt.Name),ht.assign(yt,gt)}if(ht.else(),mt.selectDefault!==void 0){dt.setParams({schemaProp:void 0});const $t=dt.subschema({keyword:"selectDefault"},gt);dt.mergeEvaluated($t,tt.Name),ht.assign(yt,gt)}ht.endIf(),dt.pass(yt)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:ct}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:ct}]}et.default=ot,_e.exports=ot})(select$1,select$1.exports);var selectExports$1=select$1.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(ot){return ot&&ot.__esModule?ot:{default:ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(selectExports$1),at=(ot,st)=>((0,nt.default)(st).forEach(ct=>ot.addKeyword(ct)),ot);et.default=at,_e.exports=at})(select$2,select$2.exports);var selectExports=select$2.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(Ot){return Ot&&Ot.__esModule?Ot:{default:Ot}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(_typeofExports),at=tt(_instanceofExports),ot=tt(rangeExports$1),st=tt(exclusiveRangeExports),ct=tt(regexpExports),dt=tt(transformExports),ht=tt(uniqueItemPropertiesExports),pt=tt(allRequiredExports),mt=tt(anyRequiredExports),yt=tt(oneRequiredExports),gt=tt(patternRequiredExports),bt=tt(prohibitedExports),$t=tt(deepPropertiesExports),wt=tt(deepRequiredExports),St=tt(dynamicDefaultsExports),Tt=tt(selectExports),Pt={typeof:nt.default,instanceof:at.default,range:ot.default,exclusiveRange:st.default,regexp:ct.default,transform:dt.default,uniqueItemProperties:ht.default,allRequired:pt.default,anyRequired:mt.default,oneRequired:yt.default,patternRequired:gt.default,prohibited:bt.default,deepProperties:$t.default,deepRequired:wt.default,dynamicDefaults:St.default,select:Tt.default};et.default=Pt,_e.exports=Pt})(keywords$4,keywords$4.exports);var keywordsExports=keywords$4.exports;(function(_e,et){var tt=commonjsGlobal&&commonjsGlobal.__importDefault||function(st){return st&&st.__esModule?st:{default:st}};Object.defineProperty(et,"__esModule",{value:!0});const nt=tt(keywordsExports),at=(st,ct)=>{if(Array.isArray(ct)){for(const dt of ct)ot(dt)(st);return st}if(ct)return ot(ct)(st),st;for(ct in nt.default)ot(ct)(st);return st};at.get=ot;function ot(st){const ct=nt.default[st];if(!ct)throw new Error("Unknown keyword "+st);return ct}et.default=at,_e.exports=at,_e.exports.default=at})(dist$i,dist$i.exports);var distExports$4=dist$i.exports,dist$g={exports:{}};(function(_e,et){Object.defineProperty(et,"__esModule",{value:!0});const tt=ajvExports,nt=codegen,at=code$2,ot=validate$2,st=errors,ct=names$2,dt="errorMessage",ht=new tt.Name("emUsed"),pt={required:"missingProperty",dependencies:"property",dependentRequired:"property"},mt=/\$\{[^}]+\}/,yt=/\$\{([^}]+)\}/g,gt=/^""\s*\+\s*|\s*\+\s*""$/g;function bt(wt){return{keyword:dt,schemaType:["string","object"],post:!0,code(St){const{gen:Tt,data:Pt,schema:Ot,schemaValue:Nt,it:Lt}=St;if(Lt.createErrors===!1)return;const Bt=Ot,Ut=nt.strConcat(ct.default.instancePath,Lt.errorPath);Tt.if(tt._`${ct.default.errors} > 0`,()=>{if(typeof Bt=="object"){const[qt,Gt]=zt(Bt);Gt&&It(Gt),qt&&vt(qt),Et(Ft(Bt))}const jt=typeof Bt=="string"?Bt:Bt._;jt&&At(jt),wt.keepErrors||xt()});function Ft({properties:jt,items:qt}){const Gt={};if(jt){Gt.props={};for(const Ht in jt)Gt.props[Ht]=[]}if(qt){Gt.items={};for(let Ht=0;Ht<qt.length;Ht++)Gt.items[Ht]=[]}return Gt}function zt(jt){let qt,Gt;for(const Ht in jt){if(Ht==="properties"||Ht==="items")continue;const Wt=jt[Ht];if(typeof Wt=="object"){qt||(qt={});const Vt=qt[Ht]={};for(const Kt in Wt)Vt[Kt]=[]}else Gt||(Gt={}),Gt[Ht]=[]}return[qt,Gt]}function It(jt){const qt=Tt.const("emErrors",tt.stringify(jt)),Gt=Tt.const("templates",Rt(jt,Ot));Tt.forOf("err",ct.default.vErrors,Kt=>Tt.if(Ct(Kt,qt),()=>Tt.code(tt._`${qt}[${Kt}.keyword].push(${Kt})`).assign(tt._`${Kt}.${ht}`,!0)));const{singleError:Ht}=wt;if(Ht){const Kt=Tt.let("message",tt._`""`),Zt=Tt.let("paramsErrors",tt._`[]`);Wt(Qt=>{Tt.if(Kt,()=>Tt.code(tt._`${Kt} += ${typeof Ht=="string"?Ht:";"}`)),Tt.code(tt._`${Kt} += ${Vt(Qt)}`),Tt.assign(Zt,tt._`${Zt}.concat(${qt}[${Qt}])`)}),st.reportError(St,{message:Kt,params:tt._`{errors: ${Zt}}`})}else Wt(Kt=>st.reportError(St,{message:Vt(Kt),params:tt._`{errors: ${qt}[${Kt}]}`}));function Wt(Kt){Tt.forIn("key",qt,Zt=>Tt.if(tt._`${qt}[${Zt}].length`,()=>Kt(Zt)))}function Vt(Kt){return tt._`${Kt} in ${Gt} ? ${Gt}[${Kt}]() : ${Nt}[${Kt}]`}}function vt(jt){const qt=Tt.const("emErrors",tt.stringify(jt)),Gt=[];for(const Zt in jt)Gt.push([Zt,Rt(jt[Zt],Ot[Zt])]);const Ht=Tt.const("templates",Tt.object(...Gt)),Wt=Tt.scopeValue("obj",{ref:pt,code:tt.stringify(pt)}),Vt=Tt.let("emPropParams"),Kt=Tt.let("emParamsErrors");Tt.forOf("err",ct.default.vErrors,Zt=>Tt.if(Ct(Zt,qt),()=>{Tt.assign(Vt,tt._`${Wt}[${Zt}.keyword]`),Tt.assign(Kt,tt._`${qt}[${Zt}.keyword][${Zt}.params[${Vt}]]`),Tt.if(Kt,()=>Tt.code(tt._`${Kt}.push(${Zt})`).assign(tt._`${Zt}.${ht}`,!0))})),Tt.forIn("key",qt,Zt=>Tt.forIn("keyProp",tt._`${qt}[${Zt}]`,Qt=>{Tt.assign(Kt,tt._`${qt}[${Zt}][${Qt}]`),Tt.if(tt._`${Kt}.length`,()=>{const Jt=Tt.const("tmpl",tt._`${Ht}[${Zt}] && ${Ht}[${Zt}][${Qt}]`);st.reportError(St,{message:tt._`${Jt} ? ${Jt}() : ${Nt}[${Zt}][${Qt}]`,params:tt._`{errors: ${Kt}}`})})}))}function Et(jt){const{props:qt,items:Gt}=jt;if(!qt&&!Gt)return;const Ht=tt._`typeof ${Pt} == "object"`,Wt=tt._`Array.isArray(${Pt})`,Vt=Tt.let("emErrors");let Kt,Zt;const Qt=Tt.let("templates");qt&&Gt?(Kt=Tt.let("emChildKwd"),Tt.if(Ht),Tt.if(Wt,()=>{Jt(Gt,Ot.items),Tt.assign(Kt,tt.str`items`)},()=>{Jt(qt,Ot.properties),Tt.assign(Kt,tt.str`properties`)}),Zt=tt._`[${Kt}]`):Gt?(Tt.if(Wt),Jt(Gt,Ot.items),Zt=tt._`.items`):qt&&(Tt.if(nt.and(Ht,nt.not(Wt))),Jt(qt,Ot.properties),Zt=tt._`.properties`),Tt.forOf("err",ct.default.vErrors,Yt=>Dt(Yt,Vt,ir=>Tt.code(tt._`${Vt}[${ir}].push(${Yt})`).assign(tt._`${Yt}.${ht}`,!0))),Tt.forIn("key",Vt,Yt=>Tt.if(tt._`${Vt}[${Yt}].length`,()=>{st.reportError(St,{message:tt._`${Yt} in ${Qt} ? ${Qt}[${Yt}]() : ${Nt}${Zt}[${Yt}]`,params:tt._`{errors: ${Vt}[${Yt}]}`}),Tt.assign(tt._`${ct.default.vErrors}[${ct.default.errors}-1].instancePath`,tt._`${Ut} + "/" + ${Yt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),Tt.endIf();function Jt(Yt,ir){Tt.assign(Vt,tt.stringify(Yt)),Tt.assign(Qt,Rt(Yt,ir))}}function At(jt){const qt=Tt.const("emErrs",tt._`[]`);Tt.forOf("err",ct.default.vErrors,Gt=>Tt.if(kt(Gt),()=>Tt.code(tt._`${qt}.push(${Gt})`).assign(tt._`${Gt}.${ht}`,!0))),Tt.if(tt._`${qt}.length`,()=>st.reportError(St,{message:_t(jt),params:tt._`{errors: ${qt}}`}))}function xt(){const jt=Tt.const("emErrs",tt._`[]`);Tt.forOf("err",ct.default.vErrors,qt=>Tt.if(tt._`!${qt}.${ht}`,()=>Tt.code(tt._`${jt}.push(${qt})`))),Tt.assign(ct.default.vErrors,jt).assign(ct.default.errors,tt._`${jt}.length`)}function Ct(jt,qt){return nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,tt._`${jt}.instancePath === ${Ut}`,tt._`${jt}.keyword in ${qt}`,tt._`${jt}.schemaPath.indexOf(${Lt.errSchemaPath}) === 0`,tt._`/^\\/[^\\/]*$/.test(${jt}.schemaPath.slice(${Lt.errSchemaPath.length}))`)}function Dt(jt,qt,Gt){Tt.if(nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,tt._`${jt}.instancePath.indexOf(${Ut}) === 0`),()=>{const Ht=Tt.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:tt._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Wt=Tt.const("emMatches",tt._`${Ht}.exec(${jt}.instancePath.slice(${Ut}.length))`),Vt=Tt.const("emChild",tt._`${Wt} && ${Wt}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);Tt.if(tt._`${Vt} !== undefined && ${Vt} in ${qt}`,()=>Gt(Vt))})}function kt(jt){return nt.and(tt._`${jt}.keyword !== ${dt}`,tt._`!${jt}.${ht}`,nt.or(tt._`${jt}.instancePath === ${Ut}`,nt.and(tt._`${jt}.instancePath.indexOf(${Ut}) === 0`,tt._`${jt}.instancePath[${Ut}.length] === "/"`)),tt._`${jt}.schemaPath.indexOf(${Lt.errSchemaPath}) === 0`,tt._`${jt}.schemaPath[${Lt.errSchemaPath}.length] === "/"`)}function Rt(jt,qt){const Gt=[];for(const Ht in jt){const Wt=qt[Ht];mt.test(Wt)&&Gt.push([Ht,Mt(Wt)])}return Tt.object(...Gt)}function _t(jt){return mt.test(jt)?new at._Code(at.safeStringify(jt).replace(yt,(qt,Gt)=>`" + JSON.stringify(${ot.getData(Gt,Lt)}) + "`).replace(gt,"")):tt.stringify(jt)}function Mt(jt){return tt._`function(){return ${_t(jt)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const $t=(wt,St={})=>{if(!wt.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(wt.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return wt.addKeyword(bt(St))};et.default=$t,_e.exports=$t,_e.exports.default=$t})(dist$g,dist$g.exports);var distExports$3=dist$g.exports,__importDefault$1W=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(validation$6,"__esModule",{value:!0});validation$6.validateType=validation$6.generateLazyValidator=validation$6.Ajv=void 0;const ajv_1$4=__importDefault$1W(ajvExports);validation$6.Ajv=ajv_1$4.default;const ajv_keywords_1$4=__importDefault$1W(distExports$4),ajv_errors_1$4=__importDefault$1W(distExports$3);function generateLazyValidator$4(_e,et){let tt=null;const nt=(at,ot)=>{if(!tt){const st=new ajv_1$4.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$4.default)(st),(0,ajv_errors_1$4.default)(st,{singleError:!0}),et==null||et.forEach(ct=>st.addKeyword(ct)),tt=st.compile(_e),Object.defineProperty(nt,"errors",{get(){return tt==null?void 0:tt.errors}})}return tt(at,ot)};return nt}validation$6.generateLazyValidator=generateLazyValidator$4;function validateType$4(_e,et){return _e.validate(et)}validation$6.validateType=validateType$4;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Network=void 0;const et=validation$6;(function(tt){tt.ETHEREUM="ETHEREUM",tt.MATIC="MATIC",tt.AVALANCHE="AVALANCHE",tt.BSC="BINANCE SMART CHAIN",tt.OPTIMISM="OPTIMISM",tt.ARBITRUM="ARBITRUM",tt.FANTOM="FANTOM"})(_e.Network||(_e.Network={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Network||(_e.Network={}))})(network$5);const isLoadingType=(_e,et)=>_e.some(tt=>tt.type===et),CONNECT_WALLET_REQUEST="[Request] Connect Wallet",CONNECT_WALLET_SUCCESS="[Success] Connect Wallet",CONNECT_WALLET_FAILURE="[Failure] Connect Wallet",connectWalletRequest=()=>action(CONNECT_WALLET_REQUEST),connectWalletSuccess=_e=>action(CONNECT_WALLET_SUCCESS,{wallet:_e}),connectWalletFailure=_e=>action(CONNECT_WALLET_FAILURE,{error:_e}),ENABLE_WALLET_REQUEST="[Request] Enable Wallet",ENABLE_WALLET_SUCCESS="[Success] Enable Wallet",ENABLE_WALLET_FAILURE="[Failure] Enable Wallet",enableWalletRequest=_e=>action(ENABLE_WALLET_REQUEST,{providerType:_e}),enableWalletSuccess=_e=>action(ENABLE_WALLET_SUCCESS,{providerType:_e}),enableWalletFailure=_e=>action(ENABLE_WALLET_FAILURE,{error:_e}),CHANGE_ACCOUNT="Change Account",changeAccount=_e=>action(CHANGE_ACCOUNT,{wallet:_e}),CHANGE_NETWORK$1="Change Network",changeNetwork=_e=>action(CHANGE_NETWORK$1,{wallet:_e}),DISCONNECT_WALLET_REQUEST="[Request] Disconnect Wallet",DISCONNECT_WALLET_SUCCESS="[Success] Disconnect Wallet",DISCONNECT_WALLET_FAILURE="[Failure] Disconnect Wallet",disconnectWalletRequest=()=>action(DISCONNECT_WALLET_REQUEST),disconnectWalletSuccess=()=>action(DISCONNECT_WALLET_SUCCESS),disconnectWalletFailure=_e=>action(DISCONNECT_WALLET_FAILURE,{error:_e}),FETCH_WALLET_REQUEST="[Request] Fetch Wallet",FETCH_WALLET_SUCCESS="[Success] Fetch Wallet",FETCH_WALLET_FAILURE="[Failure] Fetch Wallet",fetchWalletRequest=()=>action(FETCH_WALLET_REQUEST),fetchWalletSuccess=_e=>action(FETCH_WALLET_SUCCESS,{wallet:_e}),fetchWalletFailure=_e=>action(FETCH_WALLET_FAILURE,{error:_e}),SWITCH_NETWORK_REQUEST="[Request] Switch Network",SWITCH_NETWORK_SUCCESS="[Success] Switch Network",SWITCH_NETWORK_FAILURE="[Failure] Switch Network",switchNetworkRequest=(_e,et)=>action(SWITCH_NETWORK_REQUEST,{chainId:_e,fromChainId:et}),switchNetworkSuccess=_e=>action(SWITCH_NETWORK_SUCCESS,{chainId:_e}),switchNetworkFailure=(_e,et)=>action(SWITCH_NETWORK_FAILURE,{chainId:_e,error:et}),SET_APP_CHAIN_ID="Set App ChainId",setAppChainId=_e=>action(SET_APP_CHAIN_ID,{chainId:_e}),getState$4=_e=>_e.wallet,getData$a=_e=>getState$4(_e).data,getLoading$2=_e=>getState$4(_e).loading,getError$1=_e=>getState$4(_e).error,isConnected=_e=>getData$a(_e)!==null,isConnecting=_e=>isLoadingType(getLoading$2(_e),CONNECT_WALLET_REQUEST),isEnabling=_e=>isLoadingType(getLoading$2(_e),ENABLE_WALLET_REQUEST),isDisconnecting=_e=>isLoadingType(getLoading$2(_e),DISCONNECT_WALLET_REQUEST),getAddress$2=_e=>isConnected(_e)?getData$a(_e).address:void 0,getChainId=_e=>isConnected(_e)?getData$a(_e).chainId:void 0,getNetwork$1=_e=>isConnected(_e)?getData$a(_e).network:void 0,getNetworks=_e=>isConnected(_e)?getData$a(_e).networks:void 0,isSwitchingNetwork=_e=>isLoadingType(getLoading$2(_e),SWITCH_NETWORK_REQUEST),getAppChainId=_e=>getState$4(_e).appChainId,getManaBalances=_e=>{if(!isConnected(_e))return;const et={},tt=[network$5.Network.ETHEREUM,network$5.Network.MATIC],nt=getNetworks(_e);for(const at of tt)nt[at]&&(et[at]=nt[at].mana);return et};var chainId$4={},validation$3={},__importDefault$1V=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(validation$3,"__esModule",{value:!0});validation$3.validateType=validation$3.generateLazyValidator=validation$3.Ajv=void 0;const ajv_1$3=__importDefault$1V(ajvExports);validation$3.Ajv=ajv_1$3.default;const ajv_keywords_1$3=__importDefault$1V(distExports$4),ajv_errors_1$3=__importDefault$1V(distExports$3);function generateLazyValidator$3(_e,et){let tt=null;const nt=(at,ot)=>{if(!tt){const st=new ajv_1$3.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$3.default)(st),(0,ajv_errors_1$3.default)(st,{singleError:!0}),et==null||et.forEach(ct=>st.addKeyword(ct)),tt=st.compile(_e),Object.defineProperty(nt,"errors",{get(){return tt==null?void 0:tt.errors}})}return tt(at,ot)};return nt}validation$3.generateLazyValidator=generateLazyValidator$3;function validateType$3(_e,et){return _e.validate(et)}validation$3.validateType=validateType$3;var chainName$4={},hasRequiredChainName$4;function requireChainName$4(){return hasRequiredChainName$4||(hasRequiredChainName$4=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getChainId=_e.ChainName=void 0;const et=validation$3,tt=requireChainId$4();var nt;(function(ot){ot.ETHEREUM_MAINNET="Ethereum Mainnet",ot.ETHEREUM_ROPSTEN="Ropsten",ot.ETHEREUM_RINKEBY="Rinkeby",ot.ETHEREUM_GOERLI="Goerli",ot.ETHEREUM_KOVAN="Kovan",ot.ETHEREUM_SEPOLIA="Sepolia",ot.MATIC_MAINNET="Polygon",ot.MATIC_MUMBAI="Mumbai",ot.MATIC_AMOY="Amoy",ot.AVALANCHE_MAINNET="Avalanche",ot.BINANCE_MAINNET="Binance Smart Chain",ot.ARBITRUM_MAINNET="Arbitrum",ot.OPTIMISM_MAINNET="Optimism",ot.FANTOM_MAINNET="Fantom"})(nt=_e.ChainName||(_e.ChainName={}));function at(ot){switch(ot){case nt.ETHEREUM_MAINNET:return tt.ChainId.ETHEREUM_MAINNET;case nt.ETHEREUM_ROPSTEN:return tt.ChainId.ETHEREUM_ROPSTEN;case nt.ETHEREUM_RINKEBY:return tt.ChainId.ETHEREUM_RINKEBY;case nt.ETHEREUM_GOERLI:return tt.ChainId.ETHEREUM_GOERLI;case nt.ETHEREUM_KOVAN:return tt.ChainId.ETHEREUM_KOVAN;case nt.ETHEREUM_SEPOLIA:return tt.ChainId.ETHEREUM_SEPOLIA;case nt.MATIC_MAINNET:return tt.ChainId.MATIC_MAINNET;case nt.MATIC_MUMBAI:return tt.ChainId.MATIC_MUMBAI;case nt.MATIC_AMOY:return tt.ChainId.MATIC_AMOY;case nt.AVALANCHE_MAINNET:return tt.ChainId.AVALANCHE_MAINNET;case nt.BINANCE_MAINNET:return tt.ChainId.BSC_MAINNET;case nt.ARBITRUM_MAINNET:return tt.ChainId.ARBITRUM_MAINNET;case nt.OPTIMISM_MAINNET:return tt.ChainId.OPTIMISM_MAINNET;case nt.FANTOM_MAINNET:return tt.ChainId.FANTOM_MAINNET;default:return null}}_e.getChainId=at,function(ot){ot.schema={type:"string",enum:Object.values(ot)},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(nt=_e.ChainName||(_e.ChainName={}))}(chainName$4)),chainName$4}var network$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Network=void 0;const et=validation$3;(function(tt){tt.ETHEREUM="ETHEREUM",tt.MATIC="MATIC",tt.AVALANCHE="AVALANCHE",tt.BSC="BINANCE SMART CHAIN",tt.OPTIMISM="OPTIMISM",tt.ARBITRUM="ARBITRUM",tt.FANTOM="FANTOM"})(_e.Network||(_e.Network={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Network||(_e.Network={}))})(network$4);var hasRequiredChainId$4;function requireChainId$4(){return hasRequiredChainId$4||(hasRequiredChainId$4=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getNetwork=_e.getNetworkMapping=_e.getURNProtocol=_e.getChainName=_e.ChainId=void 0;const et=validation$3,tt=requireChainName$4(),nt=network$4;var at;(function(ht){ht[ht.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",ht[ht.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",ht[ht.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",ht[ht.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",ht[ht.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",ht[ht.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",ht[ht.MATIC_MAINNET=137]="MATIC_MAINNET",ht[ht.MATIC_MUMBAI=80001]="MATIC_MUMBAI",ht[ht.MATIC_AMOY=80002]="MATIC_AMOY",ht[ht.BSC_MAINNET=56]="BSC_MAINNET",ht[ht.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",ht[ht.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",ht[ht.FANTOM_MAINNET=250]="FANTOM_MAINNET",ht[ht.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(at=_e.ChainId||(_e.ChainId={}));function ot(ht){switch(ht){case at.ETHEREUM_MAINNET:return tt.ChainName.ETHEREUM_MAINNET;case at.ETHEREUM_ROPSTEN:return tt.ChainName.ETHEREUM_ROPSTEN;case at.ETHEREUM_RINKEBY:return tt.ChainName.ETHEREUM_RINKEBY;case at.ETHEREUM_GOERLI:return tt.ChainName.ETHEREUM_GOERLI;case at.ETHEREUM_KOVAN:return tt.ChainName.ETHEREUM_KOVAN;case at.ETHEREUM_SEPOLIA:return tt.ChainName.ETHEREUM_SEPOLIA;case at.MATIC_MAINNET:return tt.ChainName.MATIC_MAINNET;case at.MATIC_MUMBAI:return tt.ChainName.MATIC_MUMBAI;case at.MATIC_AMOY:return tt.ChainName.MATIC_AMOY;case at.BSC_MAINNET:return tt.ChainName.BINANCE_MAINNET;case at.ARBITRUM_MAINNET:return tt.ChainName.ARBITRUM_MAINNET;case at.OPTIMISM_MAINNET:return tt.ChainName.OPTIMISM_MAINNET;case at.FANTOM_MAINNET:return tt.ChainName.FANTOM_MAINNET;case at.AVALANCHE_MAINNET:return tt.ChainName.AVALANCHE_MAINNET;default:return null}}_e.getChainName=ot;function st(ht){switch(ht){case at.ETHEREUM_MAINNET:return"ethereum";case at.ETHEREUM_ROPSTEN:return"ropsten";case at.ETHEREUM_RINKEBY:return"rinkeby";case at.ETHEREUM_GOERLI:return"goerli";case at.ETHEREUM_KOVAN:return"kovan";case at.ETHEREUM_SEPOLIA:return"sepolia";case at.MATIC_MAINNET:return"matic";case at.MATIC_MUMBAI:return"mumbai";case at.MATIC_AMOY:return"amoy";default:return""}}_e.getURNProtocol=st;function ct(ht){const pt={[nt.Network.BSC]:at.BSC_MAINNET,[nt.Network.OPTIMISM]:at.OPTIMISM_MAINNET,[nt.Network.ARBITRUM]:at.ARBITRUM_MAINNET,[nt.Network.FANTOM]:at.FANTOM_MAINNET,[nt.Network.AVALANCHE]:at.AVALANCHE_MAINNET};switch(ht){case at.ETHEREUM_MAINNET:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt);case at.ETHEREUM_ROPSTEN:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_ROPSTEN,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_RINKEBY:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_RINKEBY,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_GOERLI:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_GOERLI,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_KOVAN:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_KOVAN,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.ETHEREUM_SEPOLIA:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_SEPOLIA,[nt.Network.MATIC]:at.MATIC_AMOY},pt);case at.MATIC_MAINNET:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt);case at.MATIC_MUMBAI:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_MUMBAI,[nt.Network.MATIC]:at.MATIC_MUMBAI},pt);case at.MATIC_AMOY:return Object.assign({[nt.Network.ETHEREUM]:at.MATIC_AMOY,[nt.Network.MATIC]:at.MATIC_AMOY},pt);default:return Object.assign({[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET},pt)}}_e.getNetworkMapping=ct;function dt(ht){switch(ht){case at.ETHEREUM_MAINNET:case at.ETHEREUM_ROPSTEN:case at.ETHEREUM_GOERLI:case at.ETHEREUM_KOVAN:case at.ETHEREUM_RINKEBY:case at.ETHEREUM_SEPOLIA:return nt.Network.ETHEREUM;case at.MATIC_MAINNET:case at.MATIC_MUMBAI:case at.MATIC_AMOY:return nt.Network.MATIC;case at.BSC_MAINNET:return nt.Network.BSC;case at.OPTIMISM_MAINNET:return nt.Network.OPTIMISM;case at.ARBITRUM_MAINNET:return nt.Network.ARBITRUM;case at.FANTOM_MAINNET:return nt.Network.FANTOM;case at.AVALANCHE_MAINNET:return nt.Network.AVALANCHE}}_e.getNetwork=dt,function(ht){ht.schema={type:"number",enum:Object.values(ht)},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(at=_e.ChainId||(_e.ChainId={}))}(chainId$4)),chainId$4}var chainIdExports$1=requireChainId$4(),providerType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProviderType=void 0;const et=validation$3;(function(tt){tt.INJECTED="injected",tt.MAGIC="magic",tt.FORTMATIC="formatic",tt.NETWORK="network",tt.WALLET_CONNECT="wallet_connect",tt.WALLET_CONNECT_V2="wallet_connect_v2",tt.WALLET_LINK="wallet_link",tt.METAMASK_MOBILE="metamask_mobile",tt.AUTH_SERVER="auth_server"})(_e.ProviderType||(_e.ProviderType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProviderType||(_e.ProviderType={}))})(providerType$4);var ConnectorEvent;(function(_e){_e.Update="Web3ReactUpdate",_e.Error="Web3ReactError",_e.Deactivate="Web3ReactDeactivate"})(ConnectorEvent||(ConnectorEvent={}));var events$3={exports:{}},R$1=typeof Reflect=="object"?Reflect:null,ReflectApply=R$1&&typeof R$1.apply=="function"?R$1.apply:function(et,tt,nt){return Function.prototype.apply.call(et,tt,nt)},ReflectOwnKeys;R$1&&typeof R$1.ownKeys=="function"?ReflectOwnKeys=R$1.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(et){return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et))}:ReflectOwnKeys=function(et){return Object.getOwnPropertyNames(et)};function ProcessEmitWarning(_e){console&&console.warn&&console.warn(_e)}var NumberIsNaN=Number.isNaN||function(et){return et!==et};function EventEmitter$1(){EventEmitter$1.init.call(this)}events$3.exports=EventEmitter$1;events$3.exports.once=once$3;EventEmitter$1.EventEmitter=EventEmitter$1;EventEmitter$1.prototype._events=void 0;EventEmitter$1.prototype._eventsCount=0;EventEmitter$1.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(_e){if(typeof _e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _e)}Object.defineProperty(EventEmitter$1,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(_e){if(typeof _e!="number"||_e<0||NumberIsNaN(_e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_e+".");defaultMaxListeners=_e}});EventEmitter$1.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$1.prototype.setMaxListeners=function(et){if(typeof et!="number"||et<0||NumberIsNaN(et))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+et+".");return this._maxListeners=et,this};function _getMaxListeners(_e){return _e._maxListeners===void 0?EventEmitter$1.defaultMaxListeners:_e._maxListeners}EventEmitter$1.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$1.prototype.emit=function(et){for(var tt=[],nt=1;nt<arguments.length;nt++)tt.push(arguments[nt]);var at=et==="error",ot=this._events;if(ot!==void 0)at=at&&ot.error===void 0;else if(!at)return!1;if(at){var st;if(tt.length>0&&(st=tt[0]),st instanceof Error)throw st;var ct=new Error("Unhandled error."+(st?" ("+st.message+")":""));throw ct.context=st,ct}var dt=ot[et];if(dt===void 0)return!1;if(typeof dt=="function")ReflectApply(dt,this,tt);else for(var ht=dt.length,pt=arrayClone(dt,ht),nt=0;nt<ht;++nt)ReflectApply(pt[nt],this,tt);return!0};function _addListener(_e,et,tt,nt){var at,ot,st;if(checkListener(tt),ot=_e._events,ot===void 0?(ot=_e._events=Object.create(null),_e._eventsCount=0):(ot.newListener!==void 0&&(_e.emit("newListener",et,tt.listener?tt.listener:tt),ot=_e._events),st=ot[et]),st===void 0)st=ot[et]=tt,++_e._eventsCount;else if(typeof st=="function"?st=ot[et]=nt?[tt,st]:[st,tt]:nt?st.unshift(tt):st.push(tt),at=_getMaxListeners(_e),at>0&&st.length>at&&!st.warned){st.warned=!0;var ct=new Error("Possible EventEmitter memory leak detected. "+st.length+" "+String(et)+" listeners added. Use emitter.setMaxListeners() to increase limit");ct.name="MaxListenersExceededWarning",ct.emitter=_e,ct.type=et,ct.count=st.length,ProcessEmitWarning(ct)}return _e}EventEmitter$1.prototype.addListener=function(et,tt){return _addListener(this,et,tt,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function(et,tt){return _addListener(this,et,tt,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(_e,et,tt){var nt={fired:!1,wrapFn:void 0,target:_e,type:et,listener:tt},at=onceWrapper.bind(nt);return at.listener=tt,nt.wrapFn=at,at}EventEmitter$1.prototype.once=function(et,tt){return checkListener(tt),this.on(et,_onceWrap(this,et,tt)),this};EventEmitter$1.prototype.prependOnceListener=function(et,tt){return checkListener(tt),this.prependListener(et,_onceWrap(this,et,tt)),this};EventEmitter$1.prototype.removeListener=function(et,tt){var nt,at,ot,st,ct;if(checkListener(tt),at=this._events,at===void 0)return this;if(nt=at[et],nt===void 0)return this;if(nt===tt||nt.listener===tt)--this._eventsCount===0?this._events=Object.create(null):(delete at[et],at.removeListener&&this.emit("removeListener",et,nt.listener||tt));else if(typeof nt!="function"){for(ot=-1,st=nt.length-1;st>=0;st--)if(nt[st]===tt||nt[st].listener===tt){ct=nt[st].listener,ot=st;break}if(ot<0)return this;ot===0?nt.shift():spliceOne(nt,ot),nt.length===1&&(at[et]=nt[0]),at.removeListener!==void 0&&this.emit("removeListener",et,ct||tt)}return this};EventEmitter$1.prototype.off=EventEmitter$1.prototype.removeListener;EventEmitter$1.prototype.removeAllListeners=function(et){var tt,nt,at;if(nt=this._events,nt===void 0)return this;if(nt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):nt[et]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete nt[et]),this;if(arguments.length===0){var ot=Object.keys(nt),st;for(at=0;at<ot.length;++at)st=ot[at],st!=="removeListener"&&this.removeAllListeners(st);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(tt=nt[et],typeof tt=="function")this.removeListener(et,tt);else if(tt!==void 0)for(at=tt.length-1;at>=0;at--)this.removeListener(et,tt[at]);return this};function _listeners(_e,et,tt){var nt=_e._events;if(nt===void 0)return[];var at=nt[et];return at===void 0?[]:typeof at=="function"?tt?[at.listener||at]:[at]:tt?unwrapListeners(at):arrayClone(at,at.length)}EventEmitter$1.prototype.listeners=function(et){return _listeners(this,et,!0)};EventEmitter$1.prototype.rawListeners=function(et){return _listeners(this,et,!1)};EventEmitter$1.listenerCount=function(_e,et){return typeof _e.listenerCount=="function"?_e.listenerCount(et):listenerCount.call(_e,et)};EventEmitter$1.prototype.listenerCount=listenerCount;function listenerCount(_e){var et=this._events;if(et!==void 0){var tt=et[_e];if(typeof tt=="function")return 1;if(tt!==void 0)return tt.length}return 0}EventEmitter$1.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(_e,et){for(var tt=new Array(et),nt=0;nt<et;++nt)tt[nt]=_e[nt];return tt}function spliceOne(_e,et){for(;et+1<_e.length;et++)_e[et]=_e[et+1];_e.pop()}function unwrapListeners(_e){for(var et=new Array(_e.length),tt=0;tt<et.length;++tt)et[tt]=_e[tt].listener||_e[tt];return et}function once$3(_e,et){return new Promise(function(tt,nt){function at(st){_e.removeListener(et,ot),nt(st)}function ot(){typeof _e.removeListener=="function"&&_e.removeListener("error",at),tt([].slice.call(arguments))}eventTargetAgnosticAddListener(_e,et,ot,{once:!0}),et!=="error"&&addErrorHandlerIfEventEmitter(_e,at,{once:!0})})}function addErrorHandlerIfEventEmitter(_e,et,tt){typeof _e.on=="function"&&eventTargetAgnosticAddListener(_e,"error",et,tt)}function eventTargetAgnosticAddListener(_e,et,tt,nt){if(typeof _e.on=="function")nt.once?_e.once(et,tt):_e.on(et,tt);else if(typeof _e.addEventListener=="function")_e.addEventListener(et,function at(ot){nt.once&&_e.removeEventListener(et,at),tt(ot)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _e)}var eventsExports=events$3.exports;const it=getDefaultExportFromCjs$1(eventsExports);function _inheritsLoose$6(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}var AbstractConnector=function(_e){_inheritsLoose$6(et,_e);function et(nt){var at,ot=nt===void 0?{}:nt,st=ot.supportedChainIds;return at=_e.call(this)||this,at.supportedChainIds=st,at}var tt=et.prototype;return tt.emitUpdate=function(at){this.emit(ConnectorEvent.Update,at)},tt.emitError=function(at){this.emit(ConnectorEvent.Error,at)},tt.emitDeactivate=function(){this.emit(ConnectorEvent.Deactivate)},et}(eventsExports.EventEmitter);const scriptRel="modulepreload",assetsURL=function(_e){return"https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/"+_e},seen={},__vitePreload=function(et,tt,nt){if(!tt||tt.length===0)return et();const at=document.getElementsByTagName("link");return Promise.all(tt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const st=ot.endsWith(".css"),ct=st?'[rel="stylesheet"]':"";if(!!nt)for(let pt=at.length-1;pt>=0;pt--){const mt=at[pt];if(mt.href===ot&&(!st||mt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${ot}"]${ct}`))return;const ht=document.createElement("link");if(ht.rel=st?"stylesheet":scriptRel,st||(ht.as="script",ht.crossOrigin=""),ht.href=ot,document.head.appendChild(ht),st)return new Promise((pt,mt)=>{ht.addEventListener("load",pt),ht.addEventListener("error",()=>mt(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>et()).catch(ot=>{const st=new Event("vite:preloadError",{cancelable:!0});if(st.payload=ot,window.dispatchEvent(st),!st.defaultPrevented)throw ot})};var dist$f={},sdk$4={},ws$4={},sceneUpdate$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneUpdate=_e.SCENE_UPDATE=void 0;const et=validation$3;_e.SCENE_UPDATE="SCENE_UPDATE",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SceneUpdate||(_e.SceneUpdate={}))})(sceneUpdate$4);var update$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Update=_e.UPDATE=void 0;const et=validation$3;_e.UPDATE="update",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.UPDATE]}},required:["type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Update||(_e.Update={}))})(update$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(sceneUpdate$4,_e),tt(update$4,_e)})(ws$4);var project$4={},type$5={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProjectType=void 0;const et=validation$3;(function(tt){tt.SCENE="scene",tt.SMART_ITEM="smart-item",tt.PORTABLE_EXPERIENCE="portable-experience",tt.LIBRARY="library"})(_e.ProjectType||(_e.ProjectType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProjectType||(_e.ProjectType={}))})(type$5);var wearableJson$4={},rarity$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Rarity=void 0;const et=validation$3;(function(tt){tt.UNIQUE="unique",tt.MYTHIC="mythic",tt.EXOTIC="exotic",tt.LEGENDARY="legendary",tt.EPIC="epic",tt.RARE="rare",tt.UNCOMMON="uncommon",tt.COMMON="common"})(_e.Rarity||(_e.Rarity={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema);const nt={[tt.UNIQUE]:1,[tt.MYTHIC]:10,[tt.EXOTIC]:50,[tt.LEGENDARY]:100,[tt.EPIC]:1e3,[tt.RARE]:5e3,[tt.UNCOMMON]:1e4,[tt.COMMON]:1e5},at={[tt.UNIQUE]:"#FFE617",[tt.MYTHIC]:"#FB7DE3",[tt.EXOTIC]:"#E4FFB8",[tt.LEGENDARY]:"#A657ED",[tt.EPIC]:"#6397F2",[tt.RARE]:"#3AD682",[tt.UNCOMMON]:"#FF8563",[tt.COMMON]:"#D4E0E0"},ot={[tt.UNIQUE]:"#FFB626",[tt.MYTHIC]:"#FF63E1",[tt.EXOTIC]:"#CAFF73",[tt.LEGENDARY]:"#842DDA",[tt.EPIC]:"#3D85E6",[tt.RARE]:"#36CF75",[tt.UNCOMMON]:"#ED6D4F",[tt.COMMON]:"#ABC1C1"};function st(pt){return nt[pt]}tt.getMaxSupply=st;function ct(pt){return ot[pt]}tt.getColor=ct;function dt(){return[tt.UNIQUE,tt.MYTHIC,tt.EXOTIC,tt.LEGENDARY,tt.EPIC,tt.RARE,tt.UNCOMMON,tt.COMMON]}tt.getRarities=dt;function ht(pt){return[at[pt],ot[pt]]}tt.getGradient=ht}(_e.Rarity||(_e.Rarity={}))})(rarity$4);var wearableCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableCategory=void 0;const et=validation$3;(function(tt){tt.EYEBROWS="eyebrows",tt.EYES="eyes",tt.FACIAL_HAIR="facial_hair",tt.HAIR="hair",tt.BODY_SHAPE="body_shape",tt.MOUTH="mouth",tt.UPPER_BODY="upper_body",tt.LOWER_BODY="lower_body",tt.FEET="feet",tt.EARRING="earring",tt.EYEWEAR="eyewear",tt.HAT="hat",tt.HELMET="helmet",tt.MASK="mask",tt.TIARA="tiara",tt.TOP_HEAD="top_head",tt.SKIN="skin",tt.HANDS_WEAR="hands_wear"})(_e.WearableCategory||(_e.WearableCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableCategory||(_e.WearableCategory={}))})(wearableCategory$4);var representation$4={},bodyShape$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyShape=void 0;const et=validation$3;(function(tt){tt.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",tt.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(_e.BodyShape||(_e.BodyShape={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyShape||(_e.BodyShape={}))})(bodyShape$4);var hideableCategory$4={},bodyPartCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyPartCategory=void 0;const et=validation$3;(function(tt){tt.HEAD="head",tt.HANDS="hands"})(_e.BodyPartCategory||(_e.BodyPartCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyPartCategory||(_e.BodyPartCategory={}))})(bodyPartCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=void 0;const et=wearableCategory$4,tt=validation$3,nt=bodyPartCategory$4;(function(at){at.schema={oneOf:[Object.assign({},et.WearableCategory.schema),Object.assign({},nt.BodyPartCategory.schema)]},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.HideableWearableCategory||(_e.HideableWearableCategory={}))})(hideableCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableRepresentation=void 0;const et=validation$3,tt=bodyShape$4,nt=hideableCategory$4;(function(at){at.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:nt.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:nt.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},at.validate=(0,et.generateLazyValidator)(at.schema)})(_e.WearableRepresentation||(_e.WearableRepresentation={}))})(representation$4);var platform$5={},profile$9={},avatar$4={},misc$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.IPFSv1=_e.IPFSv2=_e.EthAddress=_e.Color3=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const nt=(0,et.generateLazyValidator)(tt.schema);tt.validate=at=>nt(at)})(_e.Color3||(_e.Color3={})),function(tt){tt.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.EthAddress||(_e.EthAddress={})),function(tt){tt.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv2||(_e.IPFSv2={})),function(tt){tt.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv1||(_e.IPFSv1={}))})(misc$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Avatar=_e.Link=_e.LinkUrl=_e.AvatarInfo=_e.Snapshots=void 0;const et=wearableCategory$4,tt=misc$4,nt=validation$3;var at;(function(dt){dt.schema={type:"object",required:["face256","body"],properties:{face256:tt.IPFSv2.schema,body:tt.IPFSv2.schema}},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(at=_e.Snapshots||(_e.Snapshots={}));var ot;(function(dt){dt.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:at.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(ot=_e.AvatarInfo||(_e.AvatarInfo={}));var st;(function(dt){dt.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const ht=new RegExp(dt.schema.pattern,"i");dt.validate=pt=>ht.test(pt)})(st=_e.LinkUrl||(_e.LinkUrl={}));var ct;(function(dt){dt.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:st.schema}}})(ct=_e.Link||(_e.Link={})),function(dt){dt.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:ct.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:tt.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:ot.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)}(_e.Avatar||(_e.Avatar={}))})(avatar$4);var profile$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Profile=void 0;const et=validation$3,tt=avatar$4;(function(nt){nt.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:tt.Avatar.schema}},additionalProperties:!0},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.Profile||(_e.Profile={}))})(profile$8);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(avatar$4,_e),tt(profile$8,_e)})(profile$9);var scene$9={},featureToggles$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.FeatureToggles=_e.portableExperiencesToggles=_e.toggles=void 0;const et=validation$3;_e.toggles=["enabled","disabled"],_e.portableExperiencesToggles=[..._e.toggles,"hideUi"],function(tt){tt.schema={type:"object",properties:{voiceChat:{type:"string",enum:_e.toggles,nullable:!0},portableExperiences:{type:"string",enum:_e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${_e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${_e.toggles.join(", ")}`,required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.FeatureToggles||(_e.FeatureToggles={}))})(featureToggles$4);var worldConfiguration$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WorldConfiguration=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.WorldConfiguration||(_e.WorldConfiguration={}))})(worldConfiguration$4);var sceneParcels$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneParcels=void 0;const et=validation$3;(function(tt){tt.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},tt.schemaValidator=(0,et.generateLazyValidator)(tt.schema),tt.validate=nt=>tt.schemaValidator(nt)&&nt.parcels.includes(nt.base)})(_e.SceneParcels||(_e.SceneParcels={}))})(sceneParcels$4);var scene$8={},displayable$4={};Object.defineProperty(displayable$4,"__esModule",{value:!0});displayable$4.displayableProperties=void 0;displayable$4.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var source$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Source=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Source||(_e.Source={}))})(source$4);var spawnPoint$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.SpawnPoint||(_e.SpawnPoint={}))})(spawnPoint$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Scene=_e.RequiredPermission=void 0;const et=validation$3,tt=displayable$4,nt=featureToggles$4,at=sceneParcels$4,ot=source$4,st=spawnPoint$4,ct=worldConfiguration$4;var dt;(function(ht){ht.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",ht.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",ht.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",ht.USE_WEB3_API="USE_WEB3_API",ht.USE_FETCH="USE_FETCH",ht.USE_WEBSOCKET="USE_WEBSOCKET",ht.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(dt=_e.RequiredPermission||(_e.RequiredPermission={})),function(ht){ht.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:at.SceneParcels.schema},tt.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},ot.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:st.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(dt)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},nt.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},ct.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:dt.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(_e.Scene||(_e.Scene={}))})(scene$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=_e.Source=_e.RequiredPermission=_e.Scene=_e.SceneParcels=_e.WorldConfiguration=_e.FeatureToggles=void 0;var et=featureToggles$4;Object.defineProperty(_e,"FeatureToggles",{enumerable:!0,get:function(){return et.FeatureToggles}});var tt=worldConfiguration$4;Object.defineProperty(_e,"WorldConfiguration",{enumerable:!0,get:function(){return tt.WorldConfiguration}});var nt=sceneParcels$4;Object.defineProperty(_e,"SceneParcels",{enumerable:!0,get:function(){return nt.SceneParcels}});var at=scene$8;Object.defineProperty(_e,"Scene",{enumerable:!0,get:function(){return at.Scene}}),Object.defineProperty(_e,"RequiredPermission",{enumerable:!0,get:function(){return at.RequiredPermission}});var ot=source$4;Object.defineProperty(_e,"Source",{enumerable:!0,get:function(){return ot.Source}});var st=spawnPoint$4;Object.defineProperty(_e,"SpawnPoint",{enumerable:!0,get:function(){return st.SpawnPoint}})})(scene$9);var item$9={},i18n$4={},locale$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Locale=void 0;const et=validation$3;(function(tt){tt.EN="en",tt.ES="es"})(_e.Locale||(_e.Locale={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Locale||(_e.Locale={}))})(locale$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.I18N=void 0;const et=validation$3,tt=locale$8;(function(nt){nt.schema={type:"object",properties:{code:tt.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.I18N||(_e.I18N={}))})(i18n$4);var metrics$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Metrics=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Metrics||(_e.Metrics={}))})(metrics$4);var standardProps$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isStandard=_e.standardProperties=void 0;const et=rarity$4,tt=validation$3;_e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:et.Rarity.schema};const nt={type:"object",properties:Object.assign({},_e.standardProperties),required:["collectionAddress","rarity"]},at=(0,tt.generateLazyValidator)(nt);function ot(st){return at(st)}_e.isStandard=ot})(standardProps$4);var thirdPartyProps$4={},merkleTree$4={},merkleProof$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MerkleProof=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MerkleProof||(_e.MerkleProof={}))})(merkleProof$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(merkleProof$4,_e)})(merkleTree$4);var linkedWearableProps={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Mapping=_e.MultipleMapping=_e.RangeMapping=_e.AnyMapping=_e.SingleMapping=_e.MappingType=void 0;const et=validation$3;var tt;(function(ct){ct.SINGLE="single",ct.ANY="any",ct.MULTIPLE="multiple",ct.RANGE="range"})(tt=_e.MappingType||(_e.MappingType={}));var nt;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(nt=_e.SingleMapping||(_e.SingleMapping={}));var at;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.ANY}},required:["type"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(at=_e.AnyMapping||(_e.AnyMapping={}));var ot;(function(ct){ct._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(ht,pt){if(!pt||!pt.from||!pt.to)return!1;let{to:mt,from:yt}=pt;return(typeof yt!="bigint"||typeof mt!="bigint")&&(yt=BigInt(yt),mt=BigInt(mt)),yt<=mt},errors:!1},ct.schema={type:"object",properties:{type:{type:"string",const:tt.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},ct.validate=(0,et.generateLazyValidator)(ct.schema,[ct._fromLessThanOrEqualTo])})(ot=_e.RangeMapping||(_e.RangeMapping={}));var st;(function(ct){ct.schema={type:"object",properties:{type:{type:"string",const:tt.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},ct.validate=(0,et.generateLazyValidator)(ct.schema)})(st=_e.MultipleMapping||(_e.MultipleMapping={})),function(ct){ct.schema={type:"object",properties:{type:{type:"string",enum:Object.values(tt)}},required:["type"],oneOf:[nt.schema,at.schema,ot.schema,st.schema]},ct.validate=(0,et.generateLazyValidator)(ct.schema,[ot._fromLessThanOrEqualTo])}(_e.Mapping||(_e.Mapping={}))})(linkedWearableProps);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.thirdPartyProps=void 0;const et=validation$3,tt=merkleTree$4,nt=linkedWearableProps;_e.thirdPartyProps={merkleProof:tt.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:{type:"array",items:nt.Mapping.schema,minItems:1,maxItems:1,nullable:!0}};const at={type:"object",properties:Object.assign({},_e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},ot={keyword:"_containsHashingKeys",validate:(dt,ht)=>{var pt;const mt=ht;return!((pt=mt==null?void 0:mt.merkleProof)===null||pt===void 0)&&pt.hashingKeys?mt.merkleProof.hashingKeys.every(yt=>mt.hasOwnProperty(yt)):!1},errors:!1},st=(0,et.generateLazyValidator)(at,[ot,nt.RangeMapping._fromLessThanOrEqualTo]);function ct(dt){return st(dt)}_e.isThirdParty=ct})(thirdPartyProps$4);var wearable$9={},wearable$8={},baseItem$4={};Object.defineProperty(baseItem$4,"__esModule",{value:!0});baseItem$4.isBaseEmote=baseItem$4.isBaseAvatar=baseItem$4.requiredBaseItemProps=baseItem$4.baseItemProperties=void 0;const i18n_1$4=i18n$4,metrics_1$4=metrics$4,displayable_1$4=displayable$4;baseItem$4.baseItemProperties=Object.assign(Object.assign({},displayable_1$4.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:i18n_1$4.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},metrics_1$4.Metrics.schema),{nullable:!0})});baseItem$4.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function isBaseAvatar$4(_e){if(!_e||!_e.id)return!1;const et=_e.id.split(":"),tt=et[1]==="decentraland",nt=et[3]==="base-avatars";return et.length===5&&tt&&nt}baseItem$4.isBaseAvatar=isBaseAvatar$4;function isBaseEmote$2(_e){if(!_e||!_e.id)return!1;const et=_e.id.split(":");return et.length===5&&et[1]==="decentraland"&&et[3]==="base-emotes"}baseItem$4.isBaseEmote=isBaseEmote$2;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Wearable=void 0;const et=validation$3,tt=wearableCategory$4,nt=representation$4,at=baseItem$4,ot=standardProps$4,st=thirdPartyProps$4,ct=hideableCategory$4,dt=linkedWearableProps;(function(ht){ht.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},at.baseItemProperties),ot.standardProperties),st.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:ct.HideableWearableCategory.schema},hides:{type:"array",items:ct.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ct.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...at.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...at.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const pt={keyword:"_isThirdParty",validate:(yt,gt)=>!yt||(0,st.isThirdParty)(gt),errors:!1},mt={keyword:"_isBaseAvatar",validate:(yt,gt)=>!yt||(0,at.isBaseAvatar)(gt),errors:!1};ht.validate=(0,et.generateLazyValidator)(ht.schema,[pt,mt,dt.RangeMapping._fromLessThanOrEqualTo])})(_e.Wearable||(_e.Wearable={}))})(wearable$8);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=_e.BodyPartCategory=_e.WearableCategory=_e.Wearable=_e.WearableRepresentation=void 0;var et=representation$4;Object.defineProperty(_e,"WearableRepresentation",{enumerable:!0,get:function(){return et.WearableRepresentation}});var tt=wearable$8;Object.defineProperty(_e,"Wearable",{enumerable:!0,get:function(){return tt.Wearable}});var nt=wearableCategory$4;Object.defineProperty(_e,"WearableCategory",{enumerable:!0,get:function(){return nt.WearableCategory}});var at=bodyPartCategory$4;Object.defineProperty(_e,"BodyPartCategory",{enumerable:!0,get:function(){return at.BodyPartCategory}});var ot=hideableCategory$4;Object.defineProperty(_e,"HideableWearableCategory",{enumerable:!0,get:function(){return ot.HideableWearableCategory}})})(wearable$9);var emote$9={},emote$8={},emoteDataAdr74$4={},emoteCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteCategory=void 0;const et=validation$3;(function(tt){tt.DANCE="dance",tt.STUNT="stunt",tt.GREETINGS="greetings",tt.FUN="fun",tt.POSES="poses",tt.REACTIONS="reactions",tt.HORROR="horror",tt.MISCELLANEOUS="miscellaneous"})(_e.EmoteCategory||(_e.EmoteCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmoteCategory||(_e.EmoteCategory={}))})(emoteCategory$4);var representationAdr74$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteRepresentationADR74=void 0;const et=validation$3,tt=bodyShape$4;(function(nt){nt.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.EmoteRepresentationADR74||(_e.EmoteRepresentationADR74={}))})(representationAdr74$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteDataADR74=void 0;const et=emoteCategory$4,tt=validation$3,nt=representationAdr74$4;(function(at){at.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.EmoteRepresentationADR74.schema,minItems:1},category:et.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.EmoteDataADR74||(_e.EmoteDataADR74={}))})(emoteDataAdr74$4);var hasRequiredEmote$9;function requireEmote$9(){return hasRequiredEmote$9||(hasRequiredEmote$9=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Emote=void 0;const et=requireItem$4(),tt=validation$3,nt=baseItem$4,at=standardProps$4,ot=thirdPartyProps$4,st=emoteDataAdr74$4;(function(ct){ct.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},nt.baseItemProperties),at.standardProperties),ot.thirdPartyProps),{emoteDataADR74:st.EmoteDataADR74.schema}),additionalProperties:!0,required:[...nt.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const dt={keyword:"_isThirdParty",validate:(pt,mt)=>!pt||(0,et.isThirdParty)(mt),errors:!1},ht={keyword:"_isBaseEmote",validate:(pt,mt)=>!pt||(0,nt.isBaseEmote)(mt),errors:!1};ct.validate=(0,tt.generateLazyValidator)(ct.schema,[dt,ht,et.RangeMapping._fromLessThanOrEqualTo])})(_e.Emote||(_e.Emote={}))}(emote$8)),emote$8}var emotePlayMode$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=void 0;const et=validation$3;(function(tt){tt.SIMPLE="simple",tt.LOOP="loop"})(_e.EmotePlayMode||(_e.EmotePlayMode={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmotePlayMode||(_e.EmotePlayMode={}))})(emotePlayMode$4);var hasRequiredEmote$8;function requireEmote$8(){return hasRequiredEmote$8||(hasRequiredEmote$8=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=_e.EmoteCategory=_e.EmoteDataADR74=_e.EmoteRepresentationADR74=_e.Emote=void 0;var et=requireEmote$9();Object.defineProperty(_e,"Emote",{enumerable:!0,get:function(){return et.Emote}});var tt=representationAdr74$4;Object.defineProperty(_e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return tt.EmoteRepresentationADR74}});var nt=emoteDataAdr74$4;Object.defineProperty(_e,"EmoteDataADR74",{enumerable:!0,get:function(){return nt.EmoteDataADR74}});var at=emoteCategory$4;Object.defineProperty(_e,"EmoteCategory",{enumerable:!0,get:function(){return at.EmoteCategory}});var ot=emotePlayMode$4;Object.defineProperty(_e,"EmotePlayMode",{enumerable:!0,get:function(){return ot.EmotePlayMode}})}(emote$9)),emote$9}var hasRequiredItem$4;function requireItem$4(){return hasRequiredItem$4||(hasRequiredItem$4=1,function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,pt,mt,yt){yt===void 0&&(yt=mt);var gt=Object.getOwnPropertyDescriptor(pt,mt);(!gt||("get"in gt?!pt.__esModule:gt.writable||gt.configurable))&&(gt={enumerable:!0,get:function(){return pt[mt]}}),Object.defineProperty(ht,yt,gt)}:function(ht,pt,mt,yt){yt===void 0&&(yt=mt),ht[yt]=pt[mt]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,pt){for(var mt in ht)mt!=="default"&&!Object.prototype.hasOwnProperty.call(pt,mt)&&et(pt,ht,mt)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.isStandard=_e.BodyShape=_e.Metrics=_e.Locale=_e.I18N=void 0;var nt=i18n$4;Object.defineProperty(_e,"I18N",{enumerable:!0,get:function(){return nt.I18N}});var at=locale$8;Object.defineProperty(_e,"Locale",{enumerable:!0,get:function(){return at.Locale}});var ot=metrics$4;Object.defineProperty(_e,"Metrics",{enumerable:!0,get:function(){return ot.Metrics}});var st=bodyShape$4;Object.defineProperty(_e,"BodyShape",{enumerable:!0,get:function(){return st.BodyShape}});var ct=standardProps$4;Object.defineProperty(_e,"isStandard",{enumerable:!0,get:function(){return ct.isStandard}});var dt=thirdPartyProps$4;Object.defineProperty(_e,"isThirdParty",{enumerable:!0,get:function(){return dt.isThirdParty}}),tt(linkedWearableProps,_e),tt(wearable$9,_e),tt(requireEmote$8(),_e)}(item$9)),item$9}var syncDeployments$4={},authChain$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AuthChain=_e.AuthLink=_e.AuthLinkType=void 0;const et=validation$3;var tt;(function(at){at.SIGNER="SIGNER",at.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",at.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",at.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",at.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(tt=_e.AuthLinkType||(_e.AuthLinkType={}));var nt;(function(at){at.schema={type:"object",properties:{type:{type:"string",enum:Object.values(tt)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:tt.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},at.validate=(0,et.generateLazyValidator)(at.schema)})(nt=_e.AuthLink||(_e.AuthLink={})),function(at){at.schema={type:"array",items:nt.schema,minItems:1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.AuthChain||(_e.AuthChain={}))})(authChain$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PointerChangesSyncDeployment=_e.SnapshotSyncDeployment=void 0;const et=misc$4,tt=authChain$4,nt=validation$3;(function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)})(_e.SnapshotSyncDeployment||(_e.SnapshotSyncDeployment={})),function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.PointerChangesSyncDeployment||(_e.PointerChangesSyncDeployment={}))})(syncDeployments$4);var entity$4={},contentMapping$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ContentMapping=void 0;const et=misc$4,tt=validation$3;(function(nt){nt.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]}},required:["file","hash"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.ContentMapping||(_e.ContentMapping={}))})(contentMapping$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Entity=_e.EntityType=void 0;const et=misc$4,tt=contentMapping$4,nt=validation$3;(function(at){at.SCENE="scene",at.PROFILE="profile",at.WEARABLE="wearable",at.STORE="store",at.EMOTE="emote",at.OUTFITS="outfits"})(_e.EntityType||(_e.EntityType={})),function(at){at.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:tt.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.Entity||(_e.Entity={}))})(entity$4);var deploymentWithAuthChain$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.DeploymentWithAuthChain=void 0;const et=authChain$4,tt=validation$3;(function(nt){nt.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:et.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.DeploymentWithAuthChain||(_e.DeploymentWithAuthChain={}))})(deploymentWithAuthChain$4);var outfits$9={},outfits$8={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Outfits=_e.Outfit=void 0;const et=wearableCategory$4,tt=misc$4,nt=validation$3;var at;(function(ot){ot.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)})(at=_e.Outfit||(_e.Outfit={})),function(ot){ot.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:at.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)}(_e.Outfits||(_e.Outfits={}))})(outfits$8);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(outfits$8,_e)})(outfits$9);var notifications$5={},notifications$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NotificationType=void 0,function(et){et.BID_ACCEPTED="bid_accepted",et.BID_RECEIVED="bid_received",et.EVENTS_STARTED="events_started",et.EVENTS_STARTS_SOON="events_starts_soon",et.GOVERNANCE_ANNOUNCEMENT="governance_announcement",et.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",et.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",et.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",et.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",et.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",et.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",et.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",et.GOVERNANCE_TENDER_PASSED="governance_tender_passed",et.ITEM_SOLD="item_sold",et.LAND_RENTAL_ENDED="rental_ended",et.LAND_RENTED="rental_started",et.REWARD_ASSIGNED="reward_assignment",et.ROYALTIES_EARNED="royalties_earned",et.WORLDS_ACCESS_RESTORED="worlds_access_restored",et.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",et.WORLDS_MISSING_RESOURCES="worlds_missing_resources",et.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",et.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",et.BADGE_GRANTED="badge_granted"}(_e.NotificationType||(_e.NotificationType={}))})(notifications$4);var subscription$2={},subscriptionDetails$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SubscriptionDetails=void 0;const et=validation$3,tt=notifications$4,nt={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},at=Object.values(tt.NotificationType).reduce((ot,st)=>(ot[st]=nt,ot),{});(function(ot){ot.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(tt.NotificationType),additionalProperties:!1,properties:at}}},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(_e.SubscriptionDetails||(_e.SubscriptionDetails={}))})(subscriptionDetails$2);var email$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Email=void 0,function(et){et.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const tt=new RegExp(et.schema.pattern);et.validate=nt=>tt.test(nt)}(_e.Email||(_e.Email={}))})(email$2);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Subscription=void 0;const et=validation$3,tt=subscriptionDetails$2,nt=misc$4,at=email$2;(function(ot){ot.schema={type:"object",required:["address","details"],properties:{address:nt.EthAddress.schema,email:Object.assign(Object.assign({},at.Email.schema),{nullable:!0}),details:tt.SubscriptionDetails.schema}},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(_e.Subscription||(_e.Subscription={}))})(subscription$2);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(notifications$4,_e),tt(subscription$2,_e),tt(subscriptionDetails$2,_e)})(notifications$5);var events$2={},base$7={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EventType=void 0,function(et){et.BID_ACCEPTED="bid-accepted",et.BID_RECEIVED="bid-received",et.ITEM_SOLD="item-sold",et.RENTAL_ENDED="land-rental-ended",et.RENTAL_STARTED="land-rental-started",et.ROYALTIES_EARNED="royalties-earned"}(_e.EventType||(_e.EventType={}))})(base$7);var blockchain$2={};Object.defineProperty(blockchain$2,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(base$7,_e),tt(blockchain$2,_e)})(events$2);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(profile$9,_e),tt(scene$9,_e),tt(requireItem$4(),_e),tt(displayable$4,_e),tt(merkleTree$4,_e),tt(syncDeployments$4,_e),tt(entity$4,_e),tt(deploymentWithAuthChain$4,_e),tt(outfits$9,_e),tt(notifications$5,_e),tt(events$2,_e)})(platform$5);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableJson=void 0;const et=rarity$4,tt=wearableCategory$4,nt=representation$4,at=validation$3,ot=platform$5;(function(st){st.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},et.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:tt.WearableCategory.schema},hides:{type:"array",items:tt.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ot.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},st.validate=(0,at.generateLazyValidator)(st.schema)})(_e.WearableJson||(_e.WearableJson={}))})(wearableJson$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(type$5,_e),tt(wearableJson$4,_e)})(project$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(ws$4,_e),tt(project$4,_e)})(sdk$4);var bid$5={},listingStatus$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ListingStatus=void 0;const et=validation$3;(function(tt){tt.OPEN="open",tt.SOLD="sold",tt.CANCELLED="cancelled"})(_e.ListingStatus||(_e.ListingStatus={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ListingStatus||(_e.ListingStatus={}))})(listingStatus$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Bid=_e.BidSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=listingStatus$4,at=network$4;(function(ot){ot.RECENTLY_OFFERED="recently_offered",ot.RECENTLY_UPDATED="recently_updated",ot.MOST_EXPENSIVE="most_expensive"})(_e.BidSortBy||(_e.BidSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:nt.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Bid||(_e.Bid={}))})(bid$5);var account$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Account=_e.AccountSortBy=void 0;const et=validation$3;(function(tt){tt.MOST_SALES="most_sales",tt.MOST_PURCHASES="most_purchases",tt.MOST_SPENT="most_spent",tt.MOST_EARNED="most_earned",tt.MOST_ROYALTIES="most_royalties",tt.MOST_COLLECTIONS="most_collections"})(_e.AccountSortBy||(_e.AccountSortBy={})),function(tt){tt.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Account||(_e.Account={}))})(account$4);var collection$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Collection=_e.CollectionSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(at){at.NEWEST="newest",at.NAME="name",at.RECENTLY_REVIEWED="recently_reviewed",at.RECENTLY_LISTED="recently_listed",at.SIZE="size"})(_e.CollectionSortBy||(_e.CollectionSortBy={})),function(at){at.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Collection||(_e.Collection={}))})(collection$4);var contract$4={},nftCategory$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFTCategory=void 0;const et=validation$3;(function(tt){tt.PARCEL="parcel",tt.ESTATE="estate",tt.WEARABLE="wearable",tt.ENS="ens",tt.EMOTE="emote"})(_e.NFTCategory||(_e.NFTCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.NFTCategory||(_e.NFTCategory={}))})(nftCategory$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Contract=_e.ContractSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4,at=nftCategory$4;(function(ot){ot.NAME="name"})(_e.ContractSortBy||(_e.ContractSortBy={})),function(ot){ot.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:at.NFTCategory.schema,network:nt.Network.schema,chainId:tt.ChainId.schema},required:["name","address","category","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Contract||(_e.Contract={}))})(contract$4);var item$8={},nft$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFT=_e.NFTSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=platform$5,at=network$4,ot=nftCategory$4,st=rarity$4,ct=wearableCategory$4;(function(dt){dt.NAME="name",dt.NEWEST="newest",dt.RECENTLY_LISTED="recently_listed",dt.RECENTLY_SOLD="recently_sold",dt.CHEAPEST="cheapest",dt.RENTAL_LISTING_DATE="rental_listing_date",dt.RENTAL_DATE="rented_date",dt.MAX_RENTAL_PRICE="max_rental_price",dt.MIN_RENTAL_PRICE="min_rental_price"})(_e.NFTSortBy||(_e.NFTSortBy={})),function(dt){dt.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:ct.WearableCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:nt.EmoteCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:ot.NFTCategory.schema,network:at.Network.schema,chainId:tt.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},dt.validate=(0,et.generateLazyValidator)(dt.schema)}(_e.NFT||(_e.NFT={}))})(nft$4);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Item=_e.ItemSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4,at=nft$4,ot=nftCategory$4;(function(st){st.NAME="name",st.NEWEST="newest",st.RECENTLY_REVIEWED="recently_reviewed",st.RECENTLY_SOLD="recently_sold",st.RECENTLY_LISTED="recently_listed",st.CHEAPEST="cheapest"})(_e.ItemSortBy||(_e.ItemSortBy={})),function(st){st.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:ot.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:at.NFT.schema.properties.data,network:nt.Network.schema,chainId:tt.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},st.validate=(0,et.generateLazyValidator)(st.schema)}(_e.Item||(_e.Item={}))})(item$8);var metaTransactions$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MetaTransaction=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MetaTransaction||(_e.MetaTransaction={}))})(metaTransactions$4);var mint$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Mint=_e.MintSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(at){at.RECENTLY_MINTED="recently_minted",at.MOST_EXPENSIVE="most_expensive"})(_e.MintSortBy||(_e.MintSortBy={})),function(at){at.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Mint||(_e.Mint={}))})(mint$4);var catalog$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.CatalogSortDirection=_e.CatalogSortBy=void 0,function(et){et.NEWEST="newest",et.RECENTLY_SOLD="recently_sold",et.CHEAPEST="cheapest",et.MOST_EXPENSIVE="most_expensive",et.RECENTLY_LISTED="recently_listed"}(_e.CatalogSortBy||(_e.CatalogSortBy={})),function(et){et.ASC="asc",et.DESC="desc"}(_e.CatalogSortDirection||(_e.CatalogSortDirection={}))})(catalog$4);var order$5={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Order=_e.OrderSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=listingStatus$4,at=network$4;(function(ot){ot.RECENTLY_LISTED="recently_listed",ot.RECENTLY_UPDATED="recently_updated",ot.CHEAPEST="cheapest",ot.ISSUED_ID_ASC="issued_id_asc",ot.ISSUED_ID_DESC="issued_id_desc",ot.OLDEST="oldest"})(_e.OrderSortBy||(_e.OrderSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:nt.ListingStatus.schema,network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Order||(_e.Order={}))})(order$5);var saleType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SaleType=void 0;const et=validation$3;(function(tt){tt.ORDER="order",tt.BID="bid",tt.MINT="mint"})(_e.SaleType||(_e.SaleType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SaleType||(_e.SaleType={}))})(saleType$4);var sale$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Sale=_e.SaleSortBy=void 0;const et=validation$3,tt=requireChainId$4(),nt=saleType$4,at=network$4;(function(ot){ot.RECENTLY_SOLD="recently_sold",ot.MOST_EXPENSIVE="most_expensive"})(_e.SaleSortBy||(_e.SaleSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},type:nt.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:at.Network.schema,chainId:tt.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Sale||(_e.Sale={}))})(sale$4);var trade$2={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.TradeAssetDirection=_e.TradeAssetType=_e.TradeType=void 0,function(et){et.BID="bid",et.PUBLIC_ORDER="public_order"}(_e.TradeType||(_e.TradeType={})),function(et){et[et.ERC20=1]="ERC20",et[et.ERC721=2]="ERC721",et[et.COLLECTION_ITEM=3]="COLLECTION_ITEM"}(_e.TradeAssetType||(_e.TradeAssetType={})),function(et){et.SENT="sent",et.RECEIVED="received"}(_e.TradeAssetDirection||(_e.TradeAssetDirection={}))})(trade$2);var rentalsListings$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.RentalListingCreation=_e.PeriodCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=void 0;const et=validation$3,tt=requireChainId$4(),nt=network$4;(function(ot){ot.OPEN="open",ot.CANCELLED="cancelled",ot.EXECUTED="executed",ot.CLAIMED="claimed"})(_e.RentalStatus||(_e.RentalStatus={})),function(ot){ot.ASC="asc",ot.DESC="desc"}(_e.RentalsListingSortDirection||(_e.RentalsListingSortDirection={})),function(ot){ot.PARCEL="parcel",ot.ESTATE="estate"}(_e.RentalsListingsFilterByCategory||(_e.RentalsListingsFilterByCategory={})),function(ot){ot.LAND_CREATION_DATE="land_creation_date",ot.RENTAL_LISTING_DATE="rental_listing_date",ot.RENTAL_DATE="rented_date",ot.NAME="name",ot.MAX_RENTAL_PRICE="max_rental_price",ot.MIN_RENTAL_PRICE="min_rental_price"}(_e.RentalsListingsSortBy||(_e.RentalsListingsSortBy={}));var at;(function(ot){ot.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(at=_e.PeriodCreation||(_e.PeriodCreation={})),function(ot){ot.schema={type:"object",properties:{network:nt.Network.schema,chainId:tt.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:at.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.RentalListingCreation||(_e.RentalListingCreation={}))})(rentalsListings$4);var analyticsDayData$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AnalyticsDayDataSortBy=void 0,function(et){et.DATE="date",et.MOST_SALES="most_sales"}(_e.AnalyticsDayDataSortBy||(_e.AnalyticsDayDataSortBy={}))})(analyticsDayData$4);var store$6={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Store=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Store||(_e.Store={}))})(store$6);var wearableGender$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.GenderFilterOption=_e.WearableGender=void 0;const et=validation$3;(function(tt){tt.MALE="male",tt.FEMALE="female"})(_e.WearableGender||(_e.WearableGender={})),function(tt){tt.MALE="male",tt.FEMALE="female",tt.UNISEX="unisex"}(_e.GenderFilterOption||(_e.GenderFilterOption={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableGender||(_e.WearableGender={}))})(wearableGender$4);var world$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.World=_e.isInsideWorldLimits=_e.getWorld=void 0;const et=validation$3;function tt(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}_e.getWorld=tt;function nt(at,ot){const st=tt().validWorldRanges;for(const ct of st)if(at>=ct.xMin&&at<=ct.xMax&&ot>=ct.yMin&&ot<=ct.yMax)return!0;return!1}_e.isInsideWorldLimits=nt,function(at){at.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.World||(_e.World={}))})(world$4);var preview$4={},previewCamera$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewCamera=void 0;const et=validation$3;(function(tt){tt.STATIC="static",tt.INTERACTIVE="interactive"})(_e.PreviewCamera||(_e.PreviewCamera={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewCamera||(_e.PreviewCamera={}))})(previewCamera$4);var previewConfig$4={};Object.defineProperty(previewConfig$4,"__esModule",{value:!0});var previewController$4={};Object.defineProperty(previewController$4,"__esModule",{value:!0});var previewEmoteEventType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmoteEventType=void 0;const et=validation$3;(function(tt){tt.ANIMATION_PLAY="animation_play",tt.ANIMATION_PAUSE="animation_pause",tt.ANIMATION_LOOP="animation_loop",tt.ANIMATION_END="animation_end",tt.ANIMATION_PLAYING="animation_playing"})(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={}))})(previewEmoteEventType$4);var previewEmote$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmote=void 0;const et=validation$3;(function(tt){tt.IDLE="idle",tt.WALK="walk",tt.RUN="run",tt.JUMP="jump",tt.CLAP="clap",tt.DAB="dab",tt.DANCE="dance",tt.FASHION="fashion",tt.FASHION_2="fashion-2",tt.FASHION_3="fashion-3",tt.FASHION_4="fashion-4",tt.LOVE="love",tt.MONEY="money",tt.FIST_PUMP="fist-pump",tt.HEAD_EXPLODE="head-explode",tt.WAVE="wave"})(_e.PreviewEmote||(_e.PreviewEmote={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmote||(_e.PreviewEmote={}))})(previewEmote$4);var previewMessage$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.sendMessage=_e.PreviewMessageType=void 0;const et=validation$3;(function(nt){nt.READY="ready",nt.LOAD="load",nt.ERROR="error",nt.UPDATE="update",nt.CONTROLLER_REQUEST="controller_request",nt.CONTROLLER_RESPONSE="controller_response",nt.EMOTE_EVENT="emote_event"})(_e.PreviewMessageType||(_e.PreviewMessageType={})),function(nt){nt.schema={type:"string",enum:Object.values(nt)},nt.validate=(0,et.generateLazyValidator)(nt.schema)}(_e.PreviewMessageType||(_e.PreviewMessageType={}));const tt=(nt,at,ot,st="*")=>{const ct={type:at,payload:ot};nt.postMessage(ct,st)};_e.sendMessage=tt})(previewMessage$4);var previewOptions$4={};Object.defineProperty(previewOptions$4,"__esModule",{value:!0});var previewProjection$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewProjection=void 0;const et=validation$3;(function(tt){tt.ORTHOGRAPHIC="orthographic",tt.PERSPECTIVE="perspective"})(_e.PreviewProjection||(_e.PreviewProjection={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewProjection||(_e.PreviewProjection={}))})(previewProjection$4);var previewType$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewType=void 0;const et=validation$3;(function(tt){tt.TEXTURE="texture",tt.WEARABLE="wearable",tt.AVATAR="avatar"})(_e.PreviewType||(_e.PreviewType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewType||(_e.PreviewType={}))})(previewType$4);var wearableRepresentationDefinition$4={};Object.defineProperty(wearableRepresentationDefinition$4,"__esModule",{value:!0});var wearableRepresentationWithBlobs$4={};Object.defineProperty(wearableRepresentationWithBlobs$4,"__esModule",{value:!0});var wearableDefinition$4={};Object.defineProperty(wearableDefinition$4,"__esModule",{value:!0});var wearableWithBlobs$4={};Object.defineProperty(wearableWithBlobs$4,"__esModule",{value:!0});var emoteRepresentationDefinition$4={};Object.defineProperty(emoteRepresentationDefinition$4,"__esModule",{value:!0});var emoteRepresentationWithBlobs$4={};Object.defineProperty(emoteRepresentationWithBlobs$4,"__esModule",{value:!0});var emoteDefinition$4={};Object.defineProperty(emoteDefinition$4,"__esModule",{value:!0});var emoteWithBlobs$4={};Object.defineProperty(emoteWithBlobs$4,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(previewCamera$4,_e),tt(previewConfig$4,_e),tt(previewController$4,_e),tt(previewEmoteEventType$4,_e),tt(previewEmote$4,_e),tt(previewMessage$4,_e),tt(previewOptions$4,_e),tt(previewProjection$4,_e),tt(previewType$4,_e),tt(wearableRepresentationDefinition$4,_e),tt(wearableRepresentationWithBlobs$4,_e),tt(wearableDefinition$4,_e),tt(wearableWithBlobs$4,_e),tt(emoteRepresentationDefinition$4,_e),tt(emoteRepresentationWithBlobs$4,_e),tt(emoteDefinition$4,_e),tt(emoteWithBlobs$4,_e)})(preview$4);var linkerAuthorization$4={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.LinkerAuthorization=void 0;const et=validation$3;(function(tt){tt.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.LinkerAuthorization||(_e.LinkerAuthorization={}))})(linkerAuthorization$4);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Ct,Dt,kt){kt===void 0&&(kt=Dt);var Rt=Object.getOwnPropertyDescriptor(Ct,Dt);(!Rt||("get"in Rt?!Ct.__esModule:Rt.writable||Rt.configurable))&&(Rt={enumerable:!0,get:function(){return Ct[Dt]}}),Object.defineProperty(xt,kt,Rt)}:function(xt,Ct,Dt,kt){kt===void 0&&(kt=Dt),xt[kt]=Ct[Dt]}),tt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(xt,Ct){Object.defineProperty(xt,"default",{enumerable:!0,value:Ct})}:function(xt,Ct){xt.default=Ct}),nt=commonjsGlobal&&commonjsGlobal.__importStar||function(xt){if(xt&&xt.__esModule)return xt;var Ct={};if(xt!=null)for(var Dt in xt)Dt!=="default"&&Object.prototype.hasOwnProperty.call(xt,Dt)&&et(Ct,xt,Dt);return tt(Ct,xt),Ct},at=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Ct){for(var Dt in xt)Dt!=="default"&&!Object.prototype.hasOwnProperty.call(Ct,Dt)&&et(Ct,xt,Dt)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.sdk=_e.isInsideWorldLimits=_e.getWorld=_e.World=_e.GenderFilterOption=_e.WearableGender=_e.Store=_e.AnalyticsDayDataSortBy=_e.PeriodCreation=_e.RentalListingCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=_e.TradeType=_e.TradeAssetType=_e.SaleSortBy=_e.Sale=_e.SaleType=_e.Rarity=_e.ProviderType=_e.OrderSortBy=_e.Order=_e.CatalogSortDirection=_e.CatalogSortBy=_e.NFTSortBy=_e.NFT=_e.NFTCategory=_e.Network=_e.MintSortBy=_e.Mint=_e.MetaTransaction=_e.ListingStatus=_e.ItemSortBy=_e.Item=_e.ContractSortBy=_e.Contract=_e.CollectionSortBy=_e.Collection=_e.getChainId=_e.ChainName=_e.getURNProtocol=_e.getChainName=_e.ChainId=_e.AccountSortBy=_e.Account=_e.BidSortBy=_e.Bid=void 0;const ot=nt(sdk$4);_e.sdk=ot,at(validation$3,_e);var st=bid$5;Object.defineProperty(_e,"Bid",{enumerable:!0,get:function(){return st.Bid}}),Object.defineProperty(_e,"BidSortBy",{enumerable:!0,get:function(){return st.BidSortBy}});var ct=account$4;Object.defineProperty(_e,"Account",{enumerable:!0,get:function(){return ct.Account}}),Object.defineProperty(_e,"AccountSortBy",{enumerable:!0,get:function(){return ct.AccountSortBy}});var dt=requireChainId$4();Object.defineProperty(_e,"ChainId",{enumerable:!0,get:function(){return dt.ChainId}}),Object.defineProperty(_e,"getChainName",{enumerable:!0,get:function(){return dt.getChainName}}),Object.defineProperty(_e,"getURNProtocol",{enumerable:!0,get:function(){return dt.getURNProtocol}});var ht=requireChainName$4();Object.defineProperty(_e,"ChainName",{enumerable:!0,get:function(){return ht.ChainName}}),Object.defineProperty(_e,"getChainId",{enumerable:!0,get:function(){return ht.getChainId}});var pt=collection$4;Object.defineProperty(_e,"Collection",{enumerable:!0,get:function(){return pt.Collection}}),Object.defineProperty(_e,"CollectionSortBy",{enumerable:!0,get:function(){return pt.CollectionSortBy}});var mt=contract$4;Object.defineProperty(_e,"Contract",{enumerable:!0,get:function(){return mt.Contract}}),Object.defineProperty(_e,"ContractSortBy",{enumerable:!0,get:function(){return mt.ContractSortBy}});var yt=item$8;Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return yt.Item}}),Object.defineProperty(_e,"ItemSortBy",{enumerable:!0,get:function(){return yt.ItemSortBy}});var gt=listingStatus$4;Object.defineProperty(_e,"ListingStatus",{enumerable:!0,get:function(){return gt.ListingStatus}});var bt=metaTransactions$4;Object.defineProperty(_e,"MetaTransaction",{enumerable:!0,get:function(){return bt.MetaTransaction}});var $t=mint$4;Object.defineProperty(_e,"Mint",{enumerable:!0,get:function(){return $t.Mint}}),Object.defineProperty(_e,"MintSortBy",{enumerable:!0,get:function(){return $t.MintSortBy}});var wt=network$4;Object.defineProperty(_e,"Network",{enumerable:!0,get:function(){return wt.Network}});var St=nftCategory$4;Object.defineProperty(_e,"NFTCategory",{enumerable:!0,get:function(){return St.NFTCategory}});var Tt=nft$4;Object.defineProperty(_e,"NFT",{enumerable:!0,get:function(){return Tt.NFT}}),Object.defineProperty(_e,"NFTSortBy",{enumerable:!0,get:function(){return Tt.NFTSortBy}});var Pt=catalog$4;Object.defineProperty(_e,"CatalogSortBy",{enumerable:!0,get:function(){return Pt.CatalogSortBy}}),Object.defineProperty(_e,"CatalogSortDirection",{enumerable:!0,get:function(){return Pt.CatalogSortDirection}});var Ot=order$5;Object.defineProperty(_e,"Order",{enumerable:!0,get:function(){return Ot.Order}}),Object.defineProperty(_e,"OrderSortBy",{enumerable:!0,get:function(){return Ot.OrderSortBy}});var Nt=providerType$4;Object.defineProperty(_e,"ProviderType",{enumerable:!0,get:function(){return Nt.ProviderType}});var Lt=rarity$4;Object.defineProperty(_e,"Rarity",{enumerable:!0,get:function(){return Lt.Rarity}});var Bt=saleType$4;Object.defineProperty(_e,"SaleType",{enumerable:!0,get:function(){return Bt.SaleType}});var Ut=sale$4;Object.defineProperty(_e,"Sale",{enumerable:!0,get:function(){return Ut.Sale}}),Object.defineProperty(_e,"SaleSortBy",{enumerable:!0,get:function(){return Ut.SaleSortBy}});var Ft=trade$2;Object.defineProperty(_e,"TradeAssetType",{enumerable:!0,get:function(){return Ft.TradeAssetType}}),Object.defineProperty(_e,"TradeType",{enumerable:!0,get:function(){return Ft.TradeType}});var zt=rentalsListings$4;Object.defineProperty(_e,"RentalStatus",{enumerable:!0,get:function(){return zt.RentalStatus}}),Object.defineProperty(_e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return zt.RentalsListingSortDirection}}),Object.defineProperty(_e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return zt.RentalsListingsFilterByCategory}}),Object.defineProperty(_e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return zt.RentalsListingsSortBy}}),Object.defineProperty(_e,"RentalListingCreation",{enumerable:!0,get:function(){return zt.RentalListingCreation}}),Object.defineProperty(_e,"PeriodCreation",{enumerable:!0,get:function(){return zt.PeriodCreation}});var It=analyticsDayData$4;Object.defineProperty(_e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return It.AnalyticsDayDataSortBy}});var vt=store$6;Object.defineProperty(_e,"Store",{enumerable:!0,get:function(){return vt.Store}});var Et=wearableGender$4;Object.defineProperty(_e,"WearableGender",{enumerable:!0,get:function(){return Et.WearableGender}}),Object.defineProperty(_e,"GenderFilterOption",{enumerable:!0,get:function(){return Et.GenderFilterOption}});var At=world$4;Object.defineProperty(_e,"World",{enumerable:!0,get:function(){return At.World}}),Object.defineProperty(_e,"getWorld",{enumerable:!0,get:function(){return At.getWorld}}),Object.defineProperty(_e,"isInsideWorldLimits",{enumerable:!0,get:function(){return At.isInsideWorldLimits}}),at(preview$4,_e),at(platform$5,_e),at(misc$4,_e),at(linkerAuthorization$4,_e),at(authChain$4,_e),at(contentMapping$4,_e),at(email$2,_e)})(dist$f);const configuration=Object.freeze({storageKey:"decentraland-connect-storage-key",[providerType$4.ProviderType.INJECTED]:{},[providerType$4.ProviderType.FORTMATIC]:{apiKeys:{[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:getRpcUrls(providerType$4.ProviderType.FORTMATIC)},[providerType$4.ProviderType.NETWORK]:{urls:getRpcUrls(providerType$4.ProviderType.NETWORK)},[providerType$4.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:getRpcUrls(providerType$4.ProviderType.WALLET_LINK)},[providerType$4.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:getRpcUrls(providerType$4.ProviderType.WALLET_CONNECT_V2),chains:{[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:{chains:[chainIdExports$1.ChainId.ETHEREUM_MAINNET],optionalChains:[chainIdExports$1.ChainId.MATIC_MAINNET,chainIdExports$1.ChainId.ARBITRUM_MAINNET,chainIdExports$1.ChainId.OPTIMISM_MAINNET,chainIdExports$1.ChainId.AVALANCHE_MAINNET,chainIdExports$1.ChainId.BSC_MAINNET,chainIdExports$1.ChainId.FANTOM_MAINNET]},[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:{chains:[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA],optionalChains:[chainIdExports$1.ChainId.MATIC_AMOY]}}},[providerType$4.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:getRpcUrls(providerType$4.ProviderType.MAGIC),chains:[chainIdExports$1.ChainId.ETHEREUM_MAINNET,chainIdExports$1.ChainId.ETHEREUM_SEPOLIA,chainIdExports$1.ChainId.MATIC_MAINNET,chainIdExports$1.ChainId.MATIC_AMOY,chainIdExports$1.ChainId.OPTIMISM_MAINNET,chainIdExports$1.ChainId.ARBITRUM_MAINNET,chainIdExports$1.ChainId.AVALANCHE_MAINNET,chainIdExports$1.ChainId.BSC_MAINNET,chainIdExports$1.ChainId.FANTOM_MAINNET]}});function getConfiguration(){return configuration}function getRpcUrls(_e){const et={[chainIdExports$1.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[chainIdExports$1.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[chainIdExports$1.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[chainIdExports$1.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[chainIdExports$1.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[chainIdExports$1.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[chainIdExports$1.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[chainIdExports$1.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[chainIdExports$1.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let tt="";switch(_e){case providerType$4.ProviderType.WALLET_LINK:tt="walletlink";break;case providerType$4.ProviderType.FORTMATIC:tt="fortmatic";break;case providerType$4.ProviderType.MAGIC:tt="magic";break;case providerType$4.ProviderType.WALLET_CONNECT_V2:tt="walletconnect-v2";break;case providerType$4.ProviderType.AUTH_SERVER:tt="auth-server";break}if(tt)for(const nt in et)et[nt]+=`?project=${tt}`;return et}class FortmaticConnector extends AbstractConnector{constructor(et){const tt=getConfiguration()[dist$f.ProviderType.FORTMATIC],nt=Object.keys(tt.apiKeys).map(at=>Number(at));if(!nt.includes(et))throw new Error(`Invariant error: Unsupported chainId ${et}`);super({supportedChainIds:nt}),this.apiKey=tt.apiKeys[et],this.chainId=et,this.rpcUrl=tt.urls[et]}async activate(){if(!this.fortmatic){const{default:tt}=await __vitePreload(()=>import("./fortmatic-f24b9a91.js").then(nt=>nt.f),[]);this.fortmatic=new tt(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const et=await this.fortmatic.getProvider().enable().then(tt=>tt[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:et}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(et=>et[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function warning$2(_e,et){}function _extends$L(){return _extends$L=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},_extends$L.apply(this,arguments)}function _inheritsLoose$5(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}function _getPrototypeOf$Y(_e){return _getPrototypeOf$Y=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$Y(_e)}function _setPrototypeOf$_(_e,et){return _setPrototypeOf$_=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$_(_e,et)}function isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _construct$1(_e,et,tt){return isNativeReflectConstruct()?_construct$1=Reflect.construct:_construct$1=function(at,ot,st){var ct=[null];ct.push.apply(ct,ot);var dt=Function.bind.apply(at,ct),ht=new dt;return st&&_setPrototypeOf$_(ht,st.prototype),ht},_construct$1.apply(null,arguments)}function _isNativeFunction$1(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _wrapNativeSuper$1(_e){var et=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper$1=function(nt){if(nt===null||!_isNativeFunction$1(nt))return nt;if(typeof nt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof et<"u"){if(et.has(nt))return et.get(nt);et.set(nt,at)}function at(){return _construct$1(nt,arguments,_getPrototypeOf$Y(this).constructor)}return at.prototype=Object.create(nt.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$_(at,nt)},_wrapNativeSuper$1(_e)}function _assertThisInitialized$Z(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function _catch(_e,et){try{var tt=_e()}catch(nt){return et(nt)}return tt&&tt.then?tt.then(void 0,et):tt}function parseSendReturn(_e){return _e.hasOwnProperty("result")?_e.result:_e}var NoEthereumProviderError=function(_e){_inheritsLoose$5(et,_e);function et(){var tt;return tt=_e.call(this)||this,tt.name=tt.constructor.name,tt.message="No Ethereum provider was found on window.ethereum.",tt}return et}(_wrapNativeSuper$1(Error)),UserRejectedRequestError=function(_e){_inheritsLoose$5(et,_e);function et(){var tt;return tt=_e.call(this)||this,tt.name=tt.constructor.name,tt.message="The user rejected the request.",tt}return et}(_wrapNativeSuper$1(Error)),InjectedConnector$1=function(_e){_inheritsLoose$5(et,_e);function et(nt){var at;return at=_e.call(this,nt)||this,at.handleNetworkChanged=at.handleNetworkChanged.bind(_assertThisInitialized$Z(at)),at.handleChainChanged=at.handleChainChanged.bind(_assertThisInitialized$Z(at)),at.handleAccountsChanged=at.handleAccountsChanged.bind(_assertThisInitialized$Z(at)),at.handleClose=at.handleClose.bind(_assertThisInitialized$Z(at)),at}var tt=et.prototype;return tt.handleChainChanged=function(at){this.emitUpdate({chainId:at,provider:window.ethereum})},tt.handleAccountsChanged=function(at){at.length===0?this.emitDeactivate():this.emitUpdate({account:at[0]})},tt.handleClose=function(at,ot){this.emitDeactivate()},tt.handleNetworkChanged=function(at){this.emitUpdate({chainId:at,provider:window.ethereum})},tt.activate=function(){try{var at=function(pt){if(ot)return pt;function mt(){return _extends$L({provider:window.ethereum},ct?{account:ct}:{})}var yt=function(){if(!ct)return Promise.resolve(window.ethereum.enable().then(function(gt){return gt&&parseSendReturn(gt)[0]})).then(function(gt){ct=gt})}();return yt&&yt.then?yt.then(mt):mt(yt)},ot=!1,st=this;if(!window.ethereum)throw new NoEthereumProviderError;window.ethereum.on&&(window.ethereum.on("chainChanged",st.handleChainChanged),window.ethereum.on("accountsChanged",st.handleAccountsChanged),window.ethereum.on("close",st.handleClose),window.ethereum.on("networkChanged",st.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var ct,dt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(ht){return parseSendReturn(ht)[0]})).then(function(ht){ct=ht})},function(ht){if(ht.code===4001)throw new UserRejectedRequestError});return Promise.resolve(dt&&dt.then?dt.then(at):at(dt))}catch(ht){return Promise.reject(ht)}},tt.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(at){return Promise.reject(at)}},tt.getChainId=function(){try{var at=function(){function dt(){if(!ot)try{ot=parseSendReturn(window.ethereum.send({method:"net_version"}))}catch{}return ot||(window.ethereum.isDapper?ot=parseSendReturn(window.ethereum.cachedResults.net_version):ot=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),ot}var ht=function(){if(!ot){var pt=_catch(function(){return Promise.resolve(window.ethereum.send("net_version").then(parseSendReturn)).then(function(mt){ot=mt})},function(){});if(pt&&pt.then)return pt.then(function(){})}}();return ht&&ht.then?ht.then(dt):dt(ht)};if(!window.ethereum)throw new NoEthereumProviderError;var ot,st=_catch(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(parseSendReturn)).then(function(ct){ot=ct})},function(){});return Promise.resolve(st&&st.then?st.then(at):at(st))}catch(ct){return Promise.reject(ct)}},tt.getAccount=function(){try{var at=function(){function dt(){return ot||(ot=parseSendReturn(window.ethereum.send({method:"eth_accounts"}))[0]),ot}var ht=function(){if(!ot){var pt=_catch(function(){return Promise.resolve(window.ethereum.enable().then(function(mt){return parseSendReturn(mt)[0]})).then(function(mt){ot=mt})},function(){});if(pt&&pt.then)return pt.then(function(){})}}();return ht&&ht.then?ht.then(dt):dt(ht)};if(!window.ethereum)throw new NoEthereumProviderError;var ot,st=_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(ct){return parseSendReturn(ct)[0]})).then(function(ct){ot=ct})},function(){});return Promise.resolve(st&&st.then?st.then(at):at(st))}catch(ct){return Promise.reject(ct)}},tt.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},tt.isAuthorized=function(){try{return window.ethereum?Promise.resolve(_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(at){return parseSendReturn(at).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(at){return Promise.reject(at)}},et}(AbstractConnector);class ErrorUnlockingWallet extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const UNLOCK_WALLET_TIMEOUT=60*1e3;class InjectedConnector extends InjectedConnector$1{constructor(et){super({supportedChainIds:[et]})}async activate(){const et=new Promise((nt,at)=>{setTimeout(()=>{at(new ErrorUnlockingWallet)},UNLOCK_WALLET_TIMEOUT)}),tt=super.activate();return Promise.race([tt,et])}}var prefix="Invariant failed";function invariant(_e,et){if(!_e)throw new Error(prefix)}function _inheritsLoose$4(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_setPrototypeOf$Z(_e,et)}function _getPrototypeOf$X(_e){return _getPrototypeOf$X=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf$X(_e)}function _setPrototypeOf$Z(_e,et){return _setPrototypeOf$Z=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$Z(_e,et)}function _isNativeReflectConstruct$X(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _construct(_e,et,tt){return _isNativeReflectConstruct$X()?_construct=Reflect.construct:_construct=function(at,ot,st){var ct=[null];ct.push.apply(ct,ot);var dt=Function.bind.apply(at,ct),ht=new dt;return st&&_setPrototypeOf$Z(ht,st.prototype),ht},_construct.apply(null,arguments)}function _isNativeFunction(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _wrapNativeSuper(_e){var et=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(nt){if(nt===null||!_isNativeFunction(nt))return nt;if(typeof nt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof et<"u"){if(et.has(nt))return et.get(nt);et.set(nt,at)}function at(){return _construct(nt,arguments,_getPrototypeOf$X(this).constructor)}return at.prototype=Object.create(nt.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$Z(at,nt)},_wrapNativeSuper(_e)}var RequestError=function(_e){_inheritsLoose$4(et,_e);function et(tt,nt,at){var ot;return ot=_e.call(this)||this,ot.code=nt,ot.data=at,ot.name=ot.constructor.name,ot.message=tt,ot}return et}(_wrapNativeSuper(Error)),MiniRpcProvider=function(et,tt){var nt=this,at=this;this.isMetaMask=!1,this.sendAsync=function(st,ct){console.log("sendAsync",st.method,st.params),at.request(st.method,st.params).then(function(dt){return ct(null,{jsonrpc:"2.0",id:st.id,result:dt})}).catch(function(dt){return ct(dt,null)})},this.request=function(st,ct){try{return typeof st!="string"&&(ct=st.params,st=st.method),Promise.resolve(fetch(nt.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:st,params:ct}),headers:{"Content-Type":"application/json"}})).then(function(dt){if(!dt.ok)throw new RequestError(dt.status+": "+dt.statusText,-32e3);return Promise.resolve(dt.json()).then(function(ht){if("error"in ht){var pt,mt,yt;throw new RequestError(ht==null||(pt=ht.error)==null?void 0:pt.message,ht==null||(mt=ht.error)==null?void 0:mt.code,ht==null||(yt=ht.error)==null?void 0:yt.data)}else{if("result"in ht)return ht.result;throw new RequestError("Received unexpected JSON-RPC response to "+st+" request.",-32e3,ht)}})})}catch(dt){return Promise.reject(dt)}},this.chainId=et,this.url=tt;var ot=new URL(tt);this.host=ot.host,this.path=ot.pathname},NetworkConnector$1=function(_e){_inheritsLoose$4(et,_e);function et(nt){var at,ot=nt.urls,st=nt.defaultChainId;return st||Object.keys(ot).length===1||invariant(!1),at=_e.call(this,{supportedChainIds:Object.keys(ot).map(function(ct){return Number(ct)})})||this,at.currentChainId=st||Number(Object.keys(ot)[0]),at.providers=Object.keys(ot).reduce(function(ct,dt){return ct[Number(dt)]=new MiniRpcProvider(Number(dt),ot[Number(dt)]),ct},{}),at}var tt=et.prototype;return tt.activate=function(){try{var at=this;return Promise.resolve({provider:at.providers[at.currentChainId],chainId:at.currentChainId,account:null})}catch(ot){return Promise.reject(ot)}},tt.getProvider=function(){try{var at=this;return Promise.resolve(at.providers[at.currentChainId])}catch(ot){return Promise.reject(ot)}},tt.getChainId=function(){try{var at=this;return Promise.resolve(at.currentChainId)}catch(ot){return Promise.reject(ot)}},tt.getAccount=function(){return Promise.resolve(null)},tt.deactivate=function(){},tt.changeChainId=function(at){Object.keys(this.providers).includes(at.toString())||invariant(!1),this.currentChainId=at,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:at})},et}(AbstractConnector);class NetworkConnector extends NetworkConnector$1{constructor(et){super({urls:getConfiguration()[providerType$4.ProviderType.NETWORK].urls,defaultChainId:et})}}function _extends$K(){return _extends$K=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},_extends$K.apply(this,arguments)}function _inheritsLoose$3(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_setPrototypeOf$Y(_e,et)}function _setPrototypeOf$Y(_e,et){return _setPrototypeOf$Y=Object.setPrototypeOf||function(nt,at){return nt.__proto__=at,nt},_setPrototypeOf$Y(_e,et)}function _assertThisInitialized$Y(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}var CHAIN_ID$2=1,WalletLinkConnector$1=function(_e){_inheritsLoose$3(et,_e);function et(nt){var at,ot=nt.url,st=nt.appName,ct=nt.appLogoUrl,dt=nt.darkMode,ht=nt.supportedChainIds;return at=_e.call(this,{supportedChainIds:ht})||this,at.url=ot,at.appName=st,at.appLogoUrl=ct,at.darkMode=dt||!1,at.handleChainChanged=at.handleChainChanged.bind(_assertThisInitialized$Y(at)),at.handleAccountsChanged=at.handleAccountsChanged.bind(_assertThisInitialized$Y(at)),at}var tt=et.prototype;return tt.activate=function(){try{var at=this,ot=function(){return Promise.resolve(at.provider.request({method:"eth_requestAccounts"})).then(function(dt){var ht=dt[0];return at.provider.on("chainChanged",at.handleChainChanged),at.provider.on("accountsChanged",at.handleAccountsChanged),{provider:at.provider,account:ht}})},st=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)at.provider=window.ethereum;else{var ct=function(){if(!at.walletLink)return Promise.resolve(__vitePreload(()=>import("./index-39d1106e.js").then(dt=>dt.i),[]).then(function(dt){var ht;return(ht=dt==null?void 0:dt.default)!=null?ht:dt})).then(function(dt){at.walletLink=new dt(_extends$K({appName:at.appName,darkMode:at.darkMode},at.appLogoUrl?{appLogoUrl:at.appLogoUrl}:{})),at.provider=at.walletLink.makeWeb3Provider(at.url,CHAIN_ID$2)})}();if(ct&&ct.then)return ct.then(function(){})}}();return Promise.resolve(st&&st.then?st.then(ot):ot(st))}catch(ct){return Promise.reject(ct)}},tt.getProvider=function(){try{var at=this;return Promise.resolve(at.provider)}catch(ot){return Promise.reject(ot)}},tt.getChainId=function(){try{var at=this;return Promise.resolve(at.provider.chainId)}catch(ot){return Promise.reject(ot)}},tt.getAccount=function(){try{var at=this;return Promise.resolve(at.provider.request({method:"eth_requestAccounts"})).then(function(ot){return ot[0]})}catch(ot){return Promise.reject(ot)}},tt.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},tt.close=function(){try{var at=this;return at.provider.close(),at.emitDeactivate(),Promise.resolve()}catch(ot){return Promise.reject(ot)}},tt.handleChainChanged=function(at){this.emitUpdate({chainId:at})},tt.handleAccountsChanged=function(at){this.emitUpdate({account:at[0]})},et}(AbstractConnector);class WalletLinkConnector extends WalletLinkConnector$1{constructor(et){const tt=getConfiguration()[dist$f.ProviderType.WALLET_LINK];super({url:tt.urls[et],appName:tt.appName,supportedChainIds:[et]})}}class WalletConnectV2Connector extends AbstractConnector{constructor(et){super({supportedChainIds:(()=>{const{chains:tt,optionalChains:nt}=WalletConnectV2Connector.configuration.chains[et];return[...tt,...nt]})()}),this.desiredChainId=et,this.activate=async()=>{const tt=await __vitePreload(()=>import("./index.es-fcb5afa7.js"),[]).then(at=>{const{chains:ot,optionalChains:st}=WalletConnectV2Connector.configuration.chains[this.desiredChainId];return at.default.init({projectId:WalletConnectV2Connector.configuration.projectId,rpcMap:WalletConnectV2Connector.configuration.urls,chains:ot,optionalChains:st,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),nt=await tt.enable();return tt.on("accountsChanged",this.handleAccountsChanged),tt.on("chainChanged",this.handleChainChanged),tt.on("disconnect",this.handleDisconnect),this.provider=tt,{chainId:tt.chainId,account:nt[0],provider:tt}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>{var tt,nt;return(nt=(tt=this.provider)==null?void 0:tt.session)==null?void 0:nt.peer.metadata.name},this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=tt=>{this.emitUpdate({account:tt[0]})},this.handleChainChanged=tt=>{this.emitUpdate({chainId:tt})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}WalletConnectV2Connector.configuration=getConfiguration()[dist$f.ProviderType.WALLET_CONNECT_V2];WalletConnectV2Connector.clearStorage=_e=>{_e.removeRegExp(new RegExp("^wc@2:"))};class MagicConnector extends AbstractConnector{constructor(et){super({supportedChainIds:getConfiguration()[dist$f.ProviderType.MAGIC].chains}),this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const nt=await this.getProvider(),at=await nt.request({method:"eth_accounts"});return this.account=at[0]??null,{provider:nt,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const tt=await this.magic.wallet.getProvider();return{...tt,request:new Proxy(tt.request,{apply:async(nt,at,ot)=>{var st,ct,dt;if(((st=ot[0])==null?void 0:st.method)==="wallet_switchEthereumChain")try{const ht=parseInt((dt=(ct=ot[0])==null?void 0:ct.params[0])==null?void 0:dt.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(ht)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(ht),this.emitUpdate({chainId:ht}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return nt.bind(tt)(...ot)}}),sendAsync:new Proxy(tt.send,{apply:async(nt,at,ot)=>nt.bind(tt)(...ot)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async tt=>{const{Magic:nt}=await __vitePreload(()=>import("./index-ea940bda.js"),["assets/index-ea940bda.js","assets/index-5c811d63.js"]),{OAuthExtension:at}=await __vitePreload(()=>import("./index-8c2240ba.js"),["assets/index-8c2240ba.js","assets/index-5c811d63.js"]),ot=getConfiguration()[dist$f.ProviderType.MAGIC];return new nt(ot.apiKey,{extensions:[new at],network:{rpcUrl:ot.urls[tt],chainId:tt}})},this.chainId=et,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}const version$q="6.11.1";function checkType(_e,et,tt){const nt=et.split("|").map(ot=>ot.trim());for(let ot=0;ot<nt.length;ot++)switch(et){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof _e===et)return}const at=new Error(`invalid value for type ${et}`);throw at.code="INVALID_ARGUMENT",at.argument=`value.${tt}`,at.value=_e,at}async function resolveProperties$1(_e){const et=Object.keys(_e);return(await Promise.all(et.map(nt=>Promise.resolve(_e[nt])))).reduce((nt,at,ot)=>(nt[et[ot]]=at,nt),{})}function defineProperties$2(_e,et,tt){for(let nt in et){let at=et[nt];const ot=tt?tt[nt]:null;ot&&checkType(at,ot,nt),Object.defineProperty(_e,nt,{enumerable:!0,value:at,writable:!1})}}function stringify$4(_e){if(_e==null)return"null";if(Array.isArray(_e))return"[ "+_e.map(stringify$4).join(", ")+" ]";if(_e instanceof Uint8Array){const et="0123456789abcdef";let tt="0x";for(let nt=0;nt<_e.length;nt++)tt+=et[_e[nt]>>4],tt+=et[_e[nt]&15];return tt}if(typeof _e=="object"&&typeof _e.toJSON=="function")return stringify$4(_e.toJSON());switch(typeof _e){case"boolean":case"symbol":return _e.toString();case"bigint":return BigInt(_e).toString();case"number":return _e.toString();case"string":return JSON.stringify(_e);case"object":{const et=Object.keys(_e);return et.sort(),"{ "+et.map(tt=>`${stringify$4(tt)}: ${stringify$4(_e[tt])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function isError$3(_e,et){return _e&&_e.code===et}function isCallException(_e){return isError$3(_e,"CALL_EXCEPTION")}function makeError(_e,et,tt){let nt=_e;{const ot=[];if(tt){if("message"in tt||"code"in tt||"name"in tt)throw new Error(`value will overwrite populated values: ${stringify$4(tt)}`);for(const st in tt){if(st==="shortMessage")continue;const ct=tt[st];ot.push(st+"="+stringify$4(ct))}}ot.push(`code=${et}`),ot.push(`version=${version$q}`),ot.length&&(_e+=" ("+ot.join(", ")+")")}let at;switch(et){case"INVALID_ARGUMENT":at=new TypeError(_e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":at=new RangeError(_e);break;default:at=new Error(_e)}return defineProperties$2(at,{code:et}),tt&&Object.assign(at,tt),at.shortMessage==null&&defineProperties$2(at,{shortMessage:nt}),at}function assert$y(_e,et,tt,nt){if(!_e)throw makeError(et,tt,nt)}function assertArgument(_e,et,tt,nt){assert$y(_e,et,"INVALID_ARGUMENT",{argument:tt,value:nt})}function assertArgumentCount(_e,et,tt){tt==null&&(tt=""),tt&&(tt=": "+tt),assert$y(_e>=et,"missing arguemnt"+tt,"MISSING_ARGUMENT",{count:_e,expectedCount:et}),assert$y(_e<=et,"too many arguments"+tt,"UNEXPECTED_ARGUMENT",{count:_e,expectedCount:et})}const _normalizeForms=["NFD","NFC","NFKD","NFKC"].reduce((_e,et)=>{try{if("test".normalize(et)!=="test")throw new Error("bad");if(et==="NFD"){const tt=String.fromCharCode(233).normalize("NFD"),nt=String.fromCharCode(101,769);if(tt!==nt)throw new Error("broken")}_e.push(et)}catch{}return _e},[]);function assertNormalize(_e){assert$y(_normalizeForms.indexOf(_e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:_e}})}function assertPrivate(_e,et,tt){if(tt==null&&(tt=""),_e!==et){let nt=tt,at="new";tt&&(nt+=".",at+=" "+tt),assert$y(!1,`private constructor; use ${nt}from* methods`,"UNSUPPORTED_OPERATION",{operation:at})}}function _getBytes(_e,et,tt){if(_e instanceof Uint8Array)return tt?new Uint8Array(_e):_e;if(typeof _e=="string"&&_e.match(/^0x([0-9a-f][0-9a-f])*$/i)){const nt=new Uint8Array((_e.length-2)/2);let at=2;for(let ot=0;ot<nt.length;ot++)nt[ot]=parseInt(_e.substring(at,at+2),16),at+=2;return nt}assertArgument(!1,"invalid BytesLike value",et||"value",_e)}function getBytes(_e,et){return _getBytes(_e,et,!1)}function getBytesCopy(_e,et){return _getBytes(_e,et,!0)}function isHexString$1(_e,et){return!(typeof _e!="string"||!_e.match(/^0x[0-9A-Fa-f]*$/)||typeof et=="number"&&_e.length!==2+2*et||et===!0&&_e.length%2!==0)}function isBytesLike$1(_e){return isHexString$1(_e,!0)||_e instanceof Uint8Array}const HexCharacters$1="0123456789abcdef";function hexlify$1(_e){const et=getBytes(_e);let tt="0x";for(let nt=0;nt<et.length;nt++){const at=et[nt];tt+=HexCharacters$1[(at&240)>>4]+HexCharacters$1[at&15]}return tt}function concat$2(_e){return"0x"+_e.map(et=>hexlify$1(et).substring(2)).join("")}function dataLength(_e){return isHexString$1(_e,!0)?(_e.length-2)/2:getBytes(_e).length}function dataSlice(_e,et,tt){const nt=getBytes(_e);return tt!=null&&tt>nt.length&&assert$y(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:nt,length:nt.length,offset:tt}),hexlify$1(nt.slice(et??0,tt??nt.length))}function zeroPad$1(_e,et,tt){const nt=getBytes(_e);assert$y(et>=nt.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(nt),length:et,offset:et+1});const at=new Uint8Array(et);return at.fill(0),tt?at.set(nt,et-nt.length):at.set(nt,0),hexlify$1(at)}function zeroPadValue(_e,et){return zeroPad$1(_e,et,!0)}function zeroPadBytes(_e,et){return zeroPad$1(_e,et,!1)}const BN_0$9=BigInt(0),BN_1$3=BigInt(1),maxValue=9007199254740991;function fromTwos(_e,et){const tt=getUint(_e,"value"),nt=BigInt(getNumber(et,"width"));if(assert$y(tt>>nt===BN_0$9,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:_e}),tt>>nt-BN_1$3){const at=(BN_1$3<<nt)-BN_1$3;return-((~tt&at)+BN_1$3)}return tt}function toTwos(_e,et){let tt=getBigInt(_e,"value");const nt=BigInt(getNumber(et,"width")),at=BN_1$3<<nt-BN_1$3;if(tt<BN_0$9){tt=-tt,assert$y(tt<=at,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:_e});const ot=(BN_1$3<<nt)-BN_1$3;return(~tt&ot)+BN_1$3}else assert$y(tt<at,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:_e});return tt}function mask(_e,et){const tt=getUint(_e,"value"),nt=BigInt(getNumber(et,"bits"));return tt&(BN_1$3<<nt)-BN_1$3}function getBigInt(_e,et){switch(typeof _e){case"bigint":return _e;case"number":return assertArgument(Number.isInteger(_e),"underflow",et||"value",_e),assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),BigInt(_e);case"string":try{if(_e==="")throw new Error("empty string");return _e[0]==="-"&&_e[1]!=="-"?-BigInt(_e.substring(1)):BigInt(_e)}catch(tt){assertArgument(!1,`invalid BigNumberish string: ${tt.message}`,et||"value",_e)}}assertArgument(!1,"invalid BigNumberish value",et||"value",_e)}function getUint(_e,et){const tt=getBigInt(_e,et);return assert$y(tt>=BN_0$9,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:_e}),tt}const Nibbles$1="0123456789abcdef";function toBigInt(_e){if(_e instanceof Uint8Array){let et="0x0";for(const tt of _e)et+=Nibbles$1[tt>>4],et+=Nibbles$1[tt&15];return BigInt(et)}return getBigInt(_e)}function getNumber(_e,et){switch(typeof _e){case"bigint":return assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),Number(_e);case"number":return assertArgument(Number.isInteger(_e),"underflow",et||"value",_e),assertArgument(_e>=-maxValue&&_e<=maxValue,"overflow",et||"value",_e),_e;case"string":try{if(_e==="")throw new Error("empty string");return getNumber(BigInt(_e),et)}catch(tt){assertArgument(!1,`invalid numeric string: ${tt.message}`,et||"value",_e)}}assertArgument(!1,"invalid numeric value",et||"value",_e)}function toNumber$2(_e){return getNumber(toBigInt(_e))}function toBeHex(_e,et){let nt=getUint(_e,"value").toString(16);if(et==null)nt.length%2&&(nt="0"+nt);else{const at=getNumber(et,"width");for(assert$y(at*2>=nt.length,`value exceeds width (${at} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:_e});nt.length<at*2;)nt="0"+nt}return"0x"+nt}function toBeArray(_e){const et=getUint(_e,"value");if(et===BN_0$9)return new Uint8Array([]);let tt=et.toString(16);tt.length%2&&(tt="0"+tt);const nt=new Uint8Array(tt.length/2);for(let at=0;at<nt.length;at++){const ot=at*2;nt[at]=parseInt(tt.substring(ot,ot+2),16)}return nt}function toQuantity(_e){let et=hexlify$1(isBytesLike$1(_e)?_e:toBeArray(_e)).substring(2);for(;et.startsWith("0");)et=et.substring(1);return et===""&&(et="0"),"0x"+et}const Alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Lookup=null;function getAlpha(_e){if(Lookup==null){Lookup={};for(let tt=0;tt<Alphabet.length;tt++)Lookup[Alphabet[tt]]=BigInt(tt)}const et=Lookup[_e];return assertArgument(et!=null,"invalid base58 value","letter",_e),et}const BN_0$8=BigInt(0),BN_58=BigInt(58);function encodeBase58(_e){const et=getBytes(_e);let tt=toBigInt(et),nt="";for(;tt;)nt=Alphabet[Number(tt%BN_58)]+nt,tt/=BN_58;for(let at=0;at<et.length&&!et[at];at++)nt=Alphabet[0]+nt;return nt}function decodeBase58(_e){let et=BN_0$8;for(let tt=0;tt<_e.length;tt++)et*=BN_58,et+=getAlpha(_e[tt]);return et}function decodeBase64(_e){_e=atob(_e);const et=new Uint8Array(_e.length);for(let tt=0;tt<_e.length;tt++)et[tt]=_e.charCodeAt(tt);return getBytes(et)}function encodeBase64$1(_e){const et=getBytes(_e);let tt="";for(let nt=0;nt<et.length;nt++)tt+=String.fromCharCode(et[nt]);return btoa(tt)}var Du;class EventPayload{constructor(et,tt,nt){Qr(this,"filter");Qr(this,"emitter");In(this,Du,void 0);Yr(this,Du,tt),defineProperties$2(this,{emitter:et,filter:nt})}async removeListener(){$r(this,Du)!=null&&await this.emitter.off(this.filter,$r(this,Du))}}Du=new WeakMap;function errorFunc$1(_e,et,tt,nt,at){assertArgument(!1,`invalid codepoint at offset ${et}; ${_e}`,"bytes",tt)}function ignoreFunc$1(_e,et,tt,nt,at){if(_e==="BAD_PREFIX"||_e==="UNEXPECTED_CONTINUE"){let ot=0;for(let st=et+1;st<tt.length&&tt[st]>>6===2;st++)ot++;return ot}return _e==="OVERRUN"?tt.length-et-1:0}function replaceFunc$1(_e,et,tt,nt,at){return _e==="OVERLONG"?(assertArgument(typeof at=="number","invalid bad code point for replacement","badCodepoint",at),nt.push(at),0):(nt.push(65533),ignoreFunc$1(_e,et,tt))}const Utf8ErrorFuncs$1=Object.freeze({error:errorFunc$1,ignore:ignoreFunc$1,replace:replaceFunc$1});function getUtf8CodePoints$1(_e,et){et==null&&(et=Utf8ErrorFuncs$1.error);const tt=getBytes(_e,"bytes"),nt=[];let at=0;for(;at<tt.length;){const ot=tt[at++];if(!(ot>>7)){nt.push(ot);continue}let st=null,ct=null;if((ot&224)===192)st=1,ct=127;else if((ot&240)===224)st=2,ct=2047;else if((ot&248)===240)st=3,ct=65535;else{(ot&192)===128?at+=et("UNEXPECTED_CONTINUE",at-1,tt,nt):at+=et("BAD_PREFIX",at-1,tt,nt);continue}if(at-1+st>=tt.length){at+=et("OVERRUN",at-1,tt,nt);continue}let dt=ot&(1<<8-st-1)-1;for(let ht=0;ht<st;ht++){let pt=tt[at];if((pt&192)!=128){at+=et("MISSING_CONTINUE",at,tt,nt),dt=null;break}dt=dt<<6|pt&63,at++}if(dt!==null){if(dt>1114111){at+=et("OUT_OF_RANGE",at-1-st,tt,nt,dt);continue}if(dt>=55296&&dt<=57343){at+=et("UTF16_SURROGATE",at-1-st,tt,nt,dt);continue}if(dt<=ct){at+=et("OVERLONG",at-1-st,tt,nt,dt);continue}nt.push(dt)}}return nt}function toUtf8Bytes$1(_e,et){assertArgument(typeof _e=="string","invalid string value","str",_e),et!=null&&(assertNormalize(et),_e=_e.normalize(et));let tt=[];for(let nt=0;nt<_e.length;nt++){const at=_e.charCodeAt(nt);if(at<128)tt.push(at);else if(at<2048)tt.push(at>>6|192),tt.push(at&63|128);else if((at&64512)==55296){nt++;const ot=_e.charCodeAt(nt);assertArgument(nt<_e.length&&(ot&64512)===56320,"invalid surrogate pair","str",_e);const st=65536+((at&1023)<<10)+(ot&1023);tt.push(st>>18|240),tt.push(st>>12&63|128),tt.push(st>>6&63|128),tt.push(st&63|128)}else tt.push(at>>12|224),tt.push(at>>6&63|128),tt.push(at&63|128)}return new Uint8Array(tt)}function _toUtf8String$1(_e){return _e.map(et=>et<=65535?String.fromCharCode(et):(et-=65536,String.fromCharCode((et>>10&1023)+55296,(et&1023)+56320))).join("")}function toUtf8String$1(_e,et){return _toUtf8String$1(getUtf8CodePoints$1(_e,et))}function createGetUrl(_e){async function et(tt,nt){const at=tt.url.split(":")[0].toLowerCase();assert$y(at==="http"||at==="https",`unsupported protocol ${at}`,"UNSUPPORTED_OPERATION",{info:{protocol:at},operation:"request"}),assert$y(at==="https"||!tt.credentials||tt.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let ot;if(nt){const mt=new AbortController;ot=mt.signal,nt.addListener(()=>{mt.abort()})}const st={method:tt.method,headers:new Headers(Array.from(tt)),body:tt.body||void 0,signal:ot},ct=await fetch(tt.url,st),dt={};ct.headers.forEach((mt,yt)=>{dt[yt.toLowerCase()]=mt});const ht=await ct.arrayBuffer(),pt=ht==null?null:new Uint8Array(ht);return{statusCode:ct.status,statusMessage:ct.statusText,headers:dt,body:pt}}return et}const MAX_ATTEMPTS=12,SLOT_INTERVAL=250;let defaultGetUrlFunc=createGetUrl();const reData=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),reIpfs=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let locked$5=!1;async function dataGatewayFunc(_e,et){try{const tt=_e.match(reData);if(!tt)throw new Error("invalid data");return new FetchResponse(200,"OK",{"content-type":tt[1]||"text/plain"},tt[2]?decodeBase64(tt[3]):unpercent$1(tt[3]))}catch{return new FetchResponse(599,"BAD REQUEST (invalid data: URI)",{},null,new FetchRequest(_e))}}function getIpfsGatewayFunc(_e){async function et(tt,nt){try{const at=tt.match(reIpfs);if(!at)throw new Error("invalid link");return new FetchRequest(`${_e}${at[2]}`)}catch{return new FetchResponse(599,"BAD REQUEST (invalid IPFS URI)",{},null,new FetchRequest(tt))}}return et}const Gateways={data:dataGatewayFunc,ipfs:getIpfsGatewayFunc("https://gateway.ipfs.io/ipfs/")},fetchSignals=new WeakMap;var eu,Pl;class FetchCancelSignal{constructor(et){In(this,eu,void 0);In(this,Pl,void 0);Yr(this,eu,[]),Yr(this,Pl,!1),fetchSignals.set(et,()=>{if(!$r(this,Pl)){Yr(this,Pl,!0);for(const tt of $r(this,eu))setTimeout(()=>{tt()},0);Yr(this,eu,[])}})}addListener(et){assert$y(!$r(this,Pl),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),$r(this,eu).push(et)}get cancelled(){return $r(this,Pl)}checkSignal(){assert$y(!this.cancelled,"cancelled","CANCELLED",{})}}eu=new WeakMap,Pl=new WeakMap;function checkSignal(_e){if(_e==null)throw new Error("missing signal; should not happen");return _e.checkSignal(),_e}var Lu,ku,qs,cl,Bu,ju,ns,Ms,fl,tu,ru,nu,Vs,dl,Ml,au,Ap;const Pm=class Pm{constructor(et){In(this,au);In(this,Lu,void 0);In(this,ku,void 0);In(this,qs,void 0);In(this,cl,void 0);In(this,Bu,void 0);In(this,ju,void 0);In(this,ns,void 0);In(this,Ms,void 0);In(this,fl,void 0);In(this,tu,void 0);In(this,ru,void 0);In(this,nu,void 0);In(this,Vs,void 0);In(this,dl,void 0);In(this,Ml,void 0);Yr(this,ju,String(et)),Yr(this,Lu,!1),Yr(this,ku,!0),Yr(this,qs,{}),Yr(this,cl,""),Yr(this,Bu,3e5),Yr(this,dl,{slotInterval:SLOT_INTERVAL,maxAttempts:MAX_ATTEMPTS}),Yr(this,Ml,null)}get url(){return $r(this,ju)}set url(et){Yr(this,ju,String(et))}get body(){return $r(this,ns)==null?null:new Uint8Array($r(this,ns))}set body(et){if(et==null)Yr(this,ns,void 0),Yr(this,Ms,void 0);else if(typeof et=="string")Yr(this,ns,toUtf8Bytes$1(et)),Yr(this,Ms,"text/plain");else if(et instanceof Uint8Array)Yr(this,ns,et),Yr(this,Ms,"application/octet-stream");else if(typeof et=="object")Yr(this,ns,toUtf8Bytes$1(JSON.stringify(et))),Yr(this,Ms,"application/json");else throw new Error("invalid body")}hasBody(){return $r(this,ns)!=null}get method(){return $r(this,cl)?$r(this,cl):this.hasBody()?"POST":"GET"}set method(et){et==null&&(et=""),Yr(this,cl,String(et).toUpperCase())}get headers(){const et=Object.assign({},$r(this,qs));return $r(this,fl)&&(et.authorization=`Basic ${encodeBase64$1(toUtf8Bytes$1($r(this,fl)))}`),this.allowGzip&&(et["accept-encoding"]="gzip"),et["content-type"]==null&&$r(this,Ms)&&(et["content-type"]=$r(this,Ms)),this.body&&(et["content-length"]=String(this.body.length)),et}getHeader(et){return this.headers[et.toLowerCase()]}setHeader(et,tt){$r(this,qs)[String(et).toLowerCase()]=String(tt)}clearHeaders(){Yr(this,qs,{})}[Symbol.iterator](){const et=this.headers,tt=Object.keys(et);let nt=0;return{next:()=>{if(nt<tt.length){const at=tt[nt++];return{value:[at,et[at]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return $r(this,fl)||null}setCredentials(et,tt){assertArgument(!et.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Yr(this,fl,`${et}:${tt}`)}get allowGzip(){return $r(this,ku)}set allowGzip(et){Yr(this,ku,!!et)}get allowInsecureAuthentication(){return!!$r(this,Lu)}set allowInsecureAuthentication(et){Yr(this,Lu,!!et)}get timeout(){return $r(this,Bu)}set timeout(et){assertArgument(et>=0,"timeout must be non-zero","timeout",et),Yr(this,Bu,et)}get preflightFunc(){return $r(this,tu)||null}set preflightFunc(et){Yr(this,tu,et)}get processFunc(){return $r(this,ru)||null}set processFunc(et){Yr(this,ru,et)}get retryFunc(){return $r(this,nu)||null}set retryFunc(et){Yr(this,nu,et)}get getUrlFunc(){return $r(this,Ml)||defaultGetUrlFunc}set getUrlFunc(et){Yr(this,Ml,et)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${$r(this,ns)?hexlify$1($r(this,ns)):"null"}>`}setThrottleParams(et){et.slotInterval!=null&&($r(this,dl).slotInterval=et.slotInterval),et.maxAttempts!=null&&($r(this,dl).maxAttempts=et.maxAttempts)}send(){return assert$y($r(this,Vs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Yr(this,Vs,new FetchCancelSignal(this)),ga(this,au,Ap).call(this,0,getTime$3()+this.timeout,0,this,new FetchResponse(0,"",{},null,this))}cancel(){assert$y($r(this,Vs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const et=fetchSignals.get(this);if(!et)throw new Error("missing signal; should not happen");et()}redirect(et){const tt=this.url.split(":")[0].toLowerCase(),nt=et.split(":")[0].toLowerCase();assert$y(this.method==="GET"&&(tt!=="https"||nt!=="http")&&et.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(et)})`});const at=new Pm(et);return at.method="GET",at.allowGzip=this.allowGzip,at.timeout=this.timeout,Yr(at,qs,Object.assign({},$r(this,qs))),$r(this,ns)&&Yr(at,ns,new Uint8Array($r(this,ns))),Yr(at,Ms,$r(this,Ms)),at}clone(){const et=new Pm(this.url);return Yr(et,cl,$r(this,cl)),$r(this,ns)&&Yr(et,ns,$r(this,ns)),Yr(et,Ms,$r(this,Ms)),Yr(et,qs,Object.assign({},$r(this,qs))),Yr(et,fl,$r(this,fl)),this.allowGzip&&(et.allowGzip=!0),et.timeout=this.timeout,this.allowInsecureAuthentication&&(et.allowInsecureAuthentication=!0),Yr(et,tu,$r(this,tu)),Yr(et,ru,$r(this,ru)),Yr(et,nu,$r(this,nu)),Yr(et,Ml,$r(this,Ml)),et}static lockConfig(){locked$5=!0}static getGateway(et){return Gateways[et.toLowerCase()]||null}static registerGateway(et,tt){if(et=et.toLowerCase(),et==="http"||et==="https")throw new Error(`cannot intercept ${et}; use registerGetUrl`);if(locked$5)throw new Error("gateways locked");Gateways[et]=tt}static registerGetUrl(et){if(locked$5)throw new Error("gateways locked");defaultGetUrlFunc=et}static createGetUrlFunc(et){return createGetUrl()}static createDataGateway(){return dataGatewayFunc}static createIpfsGatewayFunc(et){return getIpfsGatewayFunc(et)}};Lu=new WeakMap,ku=new WeakMap,qs=new WeakMap,cl=new WeakMap,Bu=new WeakMap,ju=new WeakMap,ns=new WeakMap,Ms=new WeakMap,fl=new WeakMap,tu=new WeakMap,ru=new WeakMap,nu=new WeakMap,Vs=new WeakMap,dl=new WeakMap,Ml=new WeakMap,au=new WeakSet,Ap=async function(et,tt,nt,at,ot){var pt,mt,yt;if(et>=$r(this,dl).maxAttempts)return ot.makeServerError("exceeded maximum retry limit");assert$y(getTime$3()<=tt,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:at}),nt>0&&await wait$1(nt);let st=this.clone();const ct=(st.url.split(":")[0]||"").toLowerCase();if(ct in Gateways){const gt=await Gateways[ct](st.url,checkSignal($r(at,Vs)));if(gt instanceof FetchResponse){let bt=gt;if(this.processFunc){checkSignal($r(at,Vs));try{bt=await this.processFunc(st,bt)}catch($t){($t.throttle==null||typeof $t.stall!="number")&&bt.makeServerError("error in post-processing function",$t).assertOk()}}return bt}st=gt}this.preflightFunc&&(st=await this.preflightFunc(st));const dt=await this.getUrlFunc(st,checkSignal($r(at,Vs)));let ht=new FetchResponse(dt.statusCode,dt.statusMessage,dt.headers,dt.body,at);if(ht.statusCode===301||ht.statusCode===302){try{const gt=ht.headers.location||"";return ga(pt=st.redirect(gt),au,Ap).call(pt,et+1,tt,0,at,ht)}catch{}return ht}else if(ht.statusCode===429&&(this.retryFunc==null||await this.retryFunc(st,ht,et))){const gt=ht.headers["retry-after"];let bt=$r(this,dl).slotInterval*Math.trunc(Math.random()*Math.pow(2,et));return typeof gt=="string"&&gt.match(/^[1-9][0-9]*$/)&&(bt=parseInt(gt)),ga(mt=st.clone(),au,Ap).call(mt,et+1,tt,bt,at,ht)}if(this.processFunc){checkSignal($r(at,Vs));try{ht=await this.processFunc(st,ht)}catch(gt){(gt.throttle==null||typeof gt.stall!="number")&&ht.makeServerError("error in post-processing function",gt).assertOk();let bt=$r(this,dl).slotInterval*Math.trunc(Math.random()*Math.pow(2,et));return gt.stall>=0&&(bt=gt.stall),ga(yt=st.clone(),au,Ap).call(yt,et+1,tt,bt,at,ht)}}return ht};let FetchRequest=Pm;var Rp,Ip,Np,Cs,Fu,iu;const Ym=class Ym{constructor(et,tt,nt,at,ot){In(this,Rp,void 0);In(this,Ip,void 0);In(this,Np,void 0);In(this,Cs,void 0);In(this,Fu,void 0);In(this,iu,void 0);Yr(this,Rp,et),Yr(this,Ip,tt),Yr(this,Np,Object.keys(nt).reduce((st,ct)=>(st[ct.toLowerCase()]=String(nt[ct]),st),{})),Yr(this,Cs,at==null?null:new Uint8Array(at)),Yr(this,Fu,ot||null),Yr(this,iu,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${$r(this,Cs)?hexlify$1($r(this,Cs)):"null"}>`}get statusCode(){return $r(this,Rp)}get statusMessage(){return $r(this,Ip)}get headers(){return Object.assign({},$r(this,Np))}get body(){return $r(this,Cs)==null?null:new Uint8Array($r(this,Cs))}get bodyText(){try{return $r(this,Cs)==null?"":toUtf8String$1($r(this,Cs))}catch{assert$y(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{assert$y(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const et=this.headers,tt=Object.keys(et);let nt=0;return{next:()=>{if(nt<tt.length){const at=tt[nt++];return{value:[at,et[at]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(et,tt){let nt;et?nt=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${et})`:(et=`${this.statusCode} ${this.statusMessage}`,nt=`CLIENT ESCALATED SERVER ERROR (${et})`);const at=new Ym(599,nt,this.headers,this.body,$r(this,Fu)||void 0);return Yr(at,iu,{message:et,error:tt}),at}throwThrottleError(et,tt){tt==null?tt=-1:assertArgument(Number.isInteger(tt)&&tt>=0,"invalid stall timeout","stall",tt);const nt=new Error(et||"throttling requests");throw defineProperties$2(nt,{stall:tt,throttle:!0}),nt}getHeader(et){return this.headers[et.toLowerCase()]}hasBody(){return $r(this,Cs)!=null}get request(){return $r(this,Fu)}ok(){return $r(this,iu).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:et,error:tt}=$r(this,iu);et===""&&(et=`server response ${this.statusCode} ${this.statusMessage}`);let nt=null;this.request&&(nt=this.request.url);let at=null;try{$r(this,Cs)&&(at=toUtf8String$1($r(this,Cs)))}catch{}assert$y(!1,et,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:tt,info:{requestUrl:nt,responseBody:at,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Rp=new WeakMap,Ip=new WeakMap,Np=new WeakMap,Cs=new WeakMap,Fu=new WeakMap,iu=new WeakMap;let FetchResponse=Ym;function getTime$3(){return new Date().getTime()}function unpercent$1(_e){return toUtf8Bytes$1(_e.replace(/%([0-9a-f][0-9a-f])/gi,(et,tt)=>String.fromCharCode(parseInt(tt,16))))}function wait$1(_e){return new Promise(et=>setTimeout(et,_e))}function hexlifyByte(_e){let et=_e.toString(16);for(;et.length<2;)et="0"+et;return"0x"+et}function unarrayifyInteger$1(_e,et,tt){let nt=0;for(let at=0;at<tt;at++)nt=nt*256+_e[et+at];return nt}function _decodeChildren$1(_e,et,tt,nt){const at=[];for(;tt<et+1+nt;){const ot=_decode$1(_e,tt);at.push(ot.result),tt+=ot.consumed,assert$y(tt<=et+1+nt,"child data too short","BUFFER_OVERRUN",{buffer:_e,length:nt,offset:et})}return{consumed:1+nt,result:at}}function _decode$1(_e,et){assert$y(_e.length!==0,"data too short","BUFFER_OVERRUN",{buffer:_e,length:0,offset:1});const tt=nt=>{assert$y(nt<=_e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:_e,length:_e.length,offset:nt})};if(_e[et]>=248){const nt=_e[et]-247;tt(et+1+nt);const at=unarrayifyInteger$1(_e,et+1,nt);return tt(et+1+nt+at),_decodeChildren$1(_e,et,et+1+nt,nt+at)}else if(_e[et]>=192){const nt=_e[et]-192;return tt(et+1+nt),_decodeChildren$1(_e,et,et+1,nt)}else if(_e[et]>=184){const nt=_e[et]-183;tt(et+1+nt);const at=unarrayifyInteger$1(_e,et+1,nt);tt(et+1+nt+at);const ot=hexlify$1(_e.slice(et+1+nt,et+1+nt+at));return{consumed:1+nt+at,result:ot}}else if(_e[et]>=128){const nt=_e[et]-128;tt(et+1+nt);const at=hexlify$1(_e.slice(et+1,et+1+nt));return{consumed:1+nt,result:at}}return{consumed:1,result:hexlifyByte(_e[et])}}function decodeRlp(_e){const et=getBytes(_e,"data"),tt=_decode$1(et,0);return assertArgument(tt.consumed===et.length,"unexpected junk after rlp payload","data",_e),tt.result}function arrayifyInteger$1(_e){const et=[];for(;_e;)et.unshift(_e&255),_e>>=8;return et}function _encode$1(_e){if(Array.isArray(_e)){let nt=[];if(_e.forEach(function(ot){nt=nt.concat(_encode$1(ot))}),nt.length<=55)return nt.unshift(192+nt.length),nt;const at=arrayifyInteger$1(nt.length);return at.unshift(247+at.length),at.concat(nt)}const et=Array.prototype.slice.call(getBytes(_e,"object"));if(et.length===1&&et[0]<=127)return et;if(et.length<=55)return et.unshift(128+et.length),et;const tt=arrayifyInteger$1(et.length);return tt.unshift(183+tt.length),tt.concat(et)}const nibbles="0123456789abcdef";function encodeRlp(_e){let et="0x";for(const tt of _encode$1(_e))et+=nibbles[tt>>4],et+=nibbles[tt&15];return et}function uuidV4(_e){const et=getBytes(_e,"randomBytes");et[6]=et[6]&15|64,et[8]=et[8]&63|128;const tt=hexlify$1(et);return[tt.substring(2,10),tt.substring(10,14),tt.substring(14,18),tt.substring(18,22),tt.substring(22,34)].join("-")}const WordSize=32,Padding=new Uint8Array(WordSize),passProperties$1=["then"],_guard$4={};function throwError$1(_e,et){const tt=new Error(`deferred error during ABI decoding triggered accessing ${_e}`);throw tt.error=et,tt}var Cl;const Op=class Op extends Array{constructor(...tt){const nt=tt[0];let at=tt[1],ot=(tt[2]||[]).slice(),st=!0;nt!==_guard$4&&(at=tt,ot=[],st=!1);super(at.length);In(this,Cl,void 0);at.forEach((dt,ht)=>{this[ht]=dt});const ct=ot.reduce((dt,ht)=>(typeof ht=="string"&&dt.set(ht,(dt.get(ht)||0)+1),dt),new Map);if(Yr(this,Cl,Object.freeze(at.map((dt,ht)=>{const pt=ot[ht];return pt!=null&&ct.get(pt)===1?pt:null}))),!!st)return Object.freeze(this),new Proxy(this,{get:(dt,ht,pt)=>{if(typeof ht=="string"){if(ht.match(/^[0-9]+$/)){const yt=getNumber(ht,"%index");if(yt<0||yt>=this.length)throw new RangeError("out of result range");const gt=dt[yt];return gt instanceof Error&&throwError$1(`index ${yt}`,gt),gt}if(passProperties$1.indexOf(ht)>=0)return Reflect.get(dt,ht,pt);const mt=dt[ht];if(mt instanceof Function)return function(...yt){return mt.apply(this===pt?dt:this,yt)};if(!(ht in dt))return dt.getValue.apply(this===pt?dt:this,[ht])}return Reflect.get(dt,ht,pt)}})}toArray(){const tt=[];return this.forEach((nt,at)=>{nt instanceof Error&&throwError$1(`index ${at}`,nt),tt.push(nt)}),tt}toObject(){return $r(this,Cl).reduce((tt,nt,at)=>(assert$y(nt!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),nt in tt||(tt[nt]=this.getValue(nt)),tt),{})}slice(tt,nt){tt==null&&(tt=0),tt<0&&(tt+=this.length,tt<0&&(tt=0)),nt==null&&(nt=this.length),nt<0&&(nt+=this.length,nt<0&&(nt=0)),nt>this.length&&(nt=this.length);const at=[],ot=[];for(let st=tt;st<nt;st++)at.push(this[st]),ot.push($r(this,Cl)[st]);return new Op(_guard$4,at,ot)}filter(tt,nt){const at=[],ot=[];for(let st=0;st<this.length;st++){const ct=this[st];ct instanceof Error&&throwError$1(`index ${st}`,ct),tt.call(nt,ct,st,this)&&(at.push(ct),ot.push($r(this,Cl)[st]))}return new Op(_guard$4,at,ot)}map(tt,nt){const at=[];for(let ot=0;ot<this.length;ot++){const st=this[ot];st instanceof Error&&throwError$1(`index ${ot}`,st),at.push(tt.call(nt,st,ot,this))}return at}getValue(tt){const nt=$r(this,Cl).indexOf(tt);if(nt===-1)return;const at=this[nt];return at instanceof Error&&throwError$1(`property ${JSON.stringify(tt)}`,at.error),at}static fromItems(tt,nt){return new Op(_guard$4,tt,nt)}};Cl=new WeakMap;let Result=Op;function getValue$7(_e){let et=toBeArray(_e);return assert$y(et.length<=WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:et,length:WordSize,offset:et.length}),et.length!==WordSize&&(et=getBytesCopy(concat$2([Padding.slice(et.length%WordSize),et]))),et}let Coder$1=class{constructor(et,tt,nt,at){Qr(this,"name");Qr(this,"type");Qr(this,"localName");Qr(this,"dynamic");defineProperties$2(this,{name:et,type:tt,localName:nt,dynamic:at},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(et,tt){assertArgument(!1,et,this.localName,tt)}};var pl,ou,Uu,_m,Qm;let Writer$1=(Qm=class{constructor(){In(this,Uu);In(this,pl,void 0);In(this,ou,void 0);Yr(this,pl,[]),Yr(this,ou,0)}get data(){return concat$2($r(this,pl))}get length(){return $r(this,ou)}appendWriter(et){return ga(this,Uu,_m).call(this,getBytesCopy(et.data))}writeBytes(et){let tt=getBytesCopy(et);const nt=tt.length%WordSize;return nt&&(tt=getBytesCopy(concat$2([tt,Padding.slice(nt)]))),ga(this,Uu,_m).call(this,tt)}writeValue(et){return ga(this,Uu,_m).call(this,getValue$7(et))}writeUpdatableValue(){const et=$r(this,pl).length;return $r(this,pl).push(Padding),Yr(this,ou,$r(this,ou)+WordSize),tt=>{$r(this,pl)[et]=getValue$7(tt)}}},pl=new WeakMap,ou=new WeakMap,Uu=new WeakSet,_m=function(et){return $r(this,pl).push(et),Yr(this,ou,$r(this,ou)+et.length),et.length},Qm);var $s,Os,su,lu,Ol,Dp,km,Mm,ey,Lp;let Reader$1=(Lp=class{constructor(et,tt,nt){In(this,Dp);In(this,Mm);Qr(this,"allowLoose");In(this,$s,void 0);In(this,Os,void 0);In(this,su,void 0);In(this,lu,void 0);In(this,Ol,void 0);defineProperties$2(this,{allowLoose:!!tt}),Yr(this,$s,getBytesCopy(et)),Yr(this,su,0),Yr(this,lu,null),Yr(this,Ol,nt??1024),Yr(this,Os,0)}get data(){return hexlify$1($r(this,$s))}get dataLength(){return $r(this,$s).length}get consumed(){return $r(this,Os)}get bytes(){return new Uint8Array($r(this,$s))}subReader(et){const tt=new Lp($r(this,$s).slice($r(this,Os)+et),this.allowLoose,$r(this,Ol));return Yr(tt,lu,this),tt}readBytes(et,tt){let nt=ga(this,Mm,ey).call(this,0,et,!!tt);return ga(this,Dp,km).call(this,et),Yr(this,Os,$r(this,Os)+nt.length),nt.slice(0,et)}readValue(){return toBigInt(this.readBytes(WordSize))}readIndex(){return toNumber$2(this.readBytes(WordSize))}},$s=new WeakMap,Os=new WeakMap,su=new WeakMap,lu=new WeakMap,Ol=new WeakMap,Dp=new WeakSet,km=function(et){var tt;if($r(this,lu))return ga(tt=$r(this,lu),Dp,km).call(tt,et);Yr(this,su,$r(this,su)+et),assert$y($r(this,Ol)<1||$r(this,su)<=$r(this,Ol)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${$r(this,Ol)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:getBytesCopy($r(this,$s)),offset:$r(this,Os),length:et,info:{bytesRead:$r(this,su),dataLength:this.dataLength}})},Mm=new WeakSet,ey=function(et,tt,nt){let at=Math.ceil(tt/WordSize)*WordSize;return $r(this,Os)+at>$r(this,$s).length&&(this.allowLoose&&nt&&$r(this,Os)+tt<=$r(this,$s).length?at=tt:assert$y(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:getBytesCopy($r(this,$s)),length:$r(this,$s).length,offset:$r(this,Os)+at})),$r(this,$s).slice($r(this,Os),$r(this,Os)+at)},Lp);const global$a=globalThis||void 0||self;function number$4(_e){if(!Number.isSafeInteger(_e)||_e<0)throw new Error(`Wrong positive integer: ${_e}`)}function bytes$1(_e,...et){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(et.length>0&&!et.includes(_e.length))throw new Error(`Expected Uint8Array of length ${et}, not of length=${_e.length}`)}function hash$9(_e){if(typeof _e!="function"||typeof _e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$4(_e.outputLen),number$4(_e.blockLen)}function exists$1(_e,et=!0){if(_e.destroyed)throw new Error("Hash instance has been destroyed");if(et&&_e.finished)throw new Error("Hash#digest() has already been called")}function output$2(_e,et){bytes$1(_e);const tt=et.outputLen;if(_e.length<tt)throw new Error(`digestInto() expects output buffer of length at least ${tt}`)}const crypto$5=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u8a$1=_e=>_e instanceof Uint8Array,u32=_e=>new Uint32Array(_e.buffer,_e.byteOffset,Math.floor(_e.byteLength/4)),createView=_e=>new DataView(_e.buffer,_e.byteOffset,_e.byteLength),rotr=(_e,et)=>_e<<32-et|_e>>>et,isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");const nextTick$3=async()=>{};async function asyncLoop(_e,et,tt){let nt=Date.now();for(let at=0;at<_e;at++){tt(at);const ot=Date.now()-nt;ot>=0&&ot<et||(await nextTick$3(),nt+=ot)}}function utf8ToBytes$1(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function toBytes(_e){if(typeof _e=="string"&&(_e=utf8ToBytes$1(_e)),!u8a$1(_e))throw new Error(`expected Uint8Array, got ${typeof _e}`);return _e}function concatBytes$1(..._e){const et=new Uint8Array(_e.reduce((nt,at)=>nt+at.length,0));let tt=0;return _e.forEach(nt=>{if(!u8a$1(nt))throw new Error("Uint8Array expected");et.set(nt,tt),tt+=nt.length}),et}let Hash$c=class{clone(){return this._cloneInto()}};const toStr$b={}.toString;function checkOpts(_e,et){if(et!==void 0&&toStr$b.call(et)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(_e,et)}function wrapConstructor$1(_e){const et=nt=>_e().update(toBytes(nt)).digest(),tt=_e();return et.outputLen=tt.outputLen,et.blockLen=tt.blockLen,et.create=()=>_e(),et}function randomBytes$5(_e=32){if(crypto$5&&typeof crypto$5.getRandomValues=="function")return crypto$5.getRandomValues(new Uint8Array(_e));throw new Error("crypto.getRandomValues must be defined")}class HMAC extends Hash$c{constructor(et,tt){super(),this.finished=!1,this.destroyed=!1,hash$9(et);const nt=toBytes(tt);if(this.iHash=et.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const at=this.blockLen,ot=new Uint8Array(at);ot.set(nt.length>at?et.create().update(nt).digest():nt);for(let st=0;st<ot.length;st++)ot[st]^=54;this.iHash.update(ot),this.oHash=et.create();for(let st=0;st<ot.length;st++)ot[st]^=106;this.oHash.update(ot),ot.fill(0)}update(et){return exists$1(this),this.iHash.update(et),this}digestInto(et){exists$1(this),bytes$1(et,this.outputLen),this.finished=!0,this.iHash.digestInto(et),this.oHash.update(et),this.oHash.digestInto(et),this.destroy()}digest(){const et=new Uint8Array(this.oHash.outputLen);return this.digestInto(et),et}_cloneInto(et){et||(et=Object.create(Object.getPrototypeOf(this),{}));const{oHash:tt,iHash:nt,finished:at,destroyed:ot,blockLen:st,outputLen:ct}=this;return et=et,et.finished=at,et.destroyed=ot,et.blockLen=st,et.outputLen=ct,et.oHash=tt._cloneInto(et.oHash),et.iHash=nt._cloneInto(et.iHash),et}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const hmac$2=(_e,et,tt)=>new HMAC(_e,et).update(tt).digest();hmac$2.create=(_e,et)=>new HMAC(_e,et);function pbkdf2Init(_e,et,tt,nt){hash$9(_e);const at=checkOpts({dkLen:32,asyncTick:10},nt),{c:ot,dkLen:st,asyncTick:ct}=at;if(number$4(ot),number$4(st),number$4(ct),ot<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const dt=toBytes(et),ht=toBytes(tt),pt=new Uint8Array(st),mt=hmac$2.create(_e,dt),yt=mt._cloneInto().update(ht);return{c:ot,dkLen:st,asyncTick:ct,DK:pt,PRF:mt,PRFSalt:yt}}function pbkdf2Output(_e,et,tt,nt,at){return _e.destroy(),et.destroy(),nt&&nt.destroy(),at.fill(0),tt}function pbkdf2$2(_e,et,tt,nt){const{c:at,dkLen:ot,DK:st,PRF:ct,PRFSalt:dt}=pbkdf2Init(_e,et,tt,nt);let ht;const pt=new Uint8Array(4),mt=createView(pt),yt=new Uint8Array(ct.outputLen);for(let gt=1,bt=0;bt<ot;gt++,bt+=ct.outputLen){const $t=st.subarray(bt,bt+ct.outputLen);mt.setInt32(0,gt,!1),(ht=dt._cloneInto(ht)).update(pt).digestInto(yt),$t.set(yt.subarray(0,$t.length));for(let wt=1;wt<at;wt++){ct._cloneInto(ht).update(yt).digestInto(yt);for(let St=0;St<$t.length;St++)$t[St]^=yt[St]}}return pbkdf2Output(ct,dt,st,ht,yt)}function setBigUint64$1(_e,et,tt,nt){if(typeof _e.setBigUint64=="function")return _e.setBigUint64(et,tt,nt);const at=BigInt(32),ot=BigInt(4294967295),st=Number(tt>>at&ot),ct=Number(tt&ot),dt=nt?4:0,ht=nt?0:4;_e.setUint32(et+dt,st,nt),_e.setUint32(et+ht,ct,nt)}let SHA2$1=class extends Hash$c{constructor(et,tt,nt,at){super(),this.blockLen=et,this.outputLen=tt,this.padOffset=nt,this.isLE=at,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(et),this.view=createView(this.buffer)}update(et){exists$1(this);const{view:tt,buffer:nt,blockLen:at}=this;et=toBytes(et);const ot=et.length;for(let st=0;st<ot;){const ct=Math.min(at-this.pos,ot-st);if(ct===at){const dt=createView(et);for(;at<=ot-st;st+=at)this.process(dt,st);continue}nt.set(et.subarray(st,st+ct),this.pos),this.pos+=ct,st+=ct,this.pos===at&&(this.process(tt,0),this.pos=0)}return this.length+=et.length,this.roundClean(),this}digestInto(et){exists$1(this),output$2(et,this),this.finished=!0;const{buffer:tt,view:nt,blockLen:at,isLE:ot}=this;let{pos:st}=this;tt[st++]=128,this.buffer.subarray(st).fill(0),this.padOffset>at-st&&(this.process(nt,0),st=0);for(let mt=st;mt<at;mt++)tt[mt]=0;setBigUint64$1(nt,at-8,BigInt(this.length*8),ot),this.process(nt,0);const ct=createView(et),dt=this.outputLen;if(dt%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const ht=dt/4,pt=this.get();if(ht>pt.length)throw new Error("_sha2: outputLen bigger than state");for(let mt=0;mt<ht;mt++)ct.setUint32(4*mt,pt[mt],ot)}digest(){const{buffer:et,outputLen:tt}=this;this.digestInto(et);const nt=et.slice(0,tt);return this.destroy(),nt}_cloneInto(et){et||(et=new this.constructor),et.set(...this.get());const{blockLen:tt,buffer:nt,length:at,finished:ot,destroyed:st,pos:ct}=this;return et.length=at,et.pos=ct,et.finished=ot,et.destroyed=st,at%tt&&et.buffer.set(nt),et}};const Chi$1=(_e,et,tt)=>_e&et^~_e&tt,Maj$1=(_e,et,tt)=>_e&et^_e&tt^et&tt,SHA256_K$1=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IV$1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SHA256_W$1=new Uint32Array(64);let SHA256$3=class extends SHA2$1{constructor(){super(64,32,8,!1),this.A=IV$1[0]|0,this.B=IV$1[1]|0,this.C=IV$1[2]|0,this.D=IV$1[3]|0,this.E=IV$1[4]|0,this.F=IV$1[5]|0,this.G=IV$1[6]|0,this.H=IV$1[7]|0}get(){const{A:et,B:tt,C:nt,D:at,E:ot,F:st,G:ct,H:dt}=this;return[et,tt,nt,at,ot,st,ct,dt]}set(et,tt,nt,at,ot,st,ct,dt){this.A=et|0,this.B=tt|0,this.C=nt|0,this.D=at|0,this.E=ot|0,this.F=st|0,this.G=ct|0,this.H=dt|0}process(et,tt){for(let mt=0;mt<16;mt++,tt+=4)SHA256_W$1[mt]=et.getUint32(tt,!1);for(let mt=16;mt<64;mt++){const yt=SHA256_W$1[mt-15],gt=SHA256_W$1[mt-2],bt=rotr(yt,7)^rotr(yt,18)^yt>>>3,$t=rotr(gt,17)^rotr(gt,19)^gt>>>10;SHA256_W$1[mt]=$t+SHA256_W$1[mt-7]+bt+SHA256_W$1[mt-16]|0}let{A:nt,B:at,C:ot,D:st,E:ct,F:dt,G:ht,H:pt}=this;for(let mt=0;mt<64;mt++){const yt=rotr(ct,6)^rotr(ct,11)^rotr(ct,25),gt=pt+yt+Chi$1(ct,dt,ht)+SHA256_K$1[mt]+SHA256_W$1[mt]|0,$t=(rotr(nt,2)^rotr(nt,13)^rotr(nt,22))+Maj$1(nt,at,ot)|0;pt=ht,ht=dt,dt=ct,ct=st+gt|0,st=ot,ot=at,at=nt,nt=gt+$t|0}nt=nt+this.A|0,at=at+this.B|0,ot=ot+this.C|0,st=st+this.D|0,ct=ct+this.E|0,dt=dt+this.F|0,ht=ht+this.G|0,pt=pt+this.H|0,this.set(nt,at,ot,st,ct,dt,ht,pt)}roundClean(){SHA256_W$1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const sha256$5=wrapConstructor$1(()=>new SHA256$3),U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(_e,et=!1){return et?{h:Number(_e&U32_MASK64),l:Number(_e>>_32n&U32_MASK64)}:{h:Number(_e>>_32n&U32_MASK64)|0,l:Number(_e&U32_MASK64)|0}}function split$3(_e,et=!1){let tt=new Uint32Array(_e.length),nt=new Uint32Array(_e.length);for(let at=0;at<_e.length;at++){const{h:ot,l:st}=fromBig(_e[at],et);[tt[at],nt[at]]=[ot,st]}return[tt,nt]}const toBig=(_e,et)=>BigInt(_e>>>0)<<_32n|BigInt(et>>>0),shrSH=(_e,et,tt)=>_e>>>tt,shrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrSH=(_e,et,tt)=>_e>>>tt|et<<32-tt,rotrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrBH=(_e,et,tt)=>_e<<64-tt|et>>>tt-32,rotrBL=(_e,et,tt)=>_e>>>tt-32|et<<64-tt,rotr32H=(_e,et)=>et,rotr32L=(_e,et)=>_e,rotlSH=(_e,et,tt)=>_e<<tt|et>>>32-tt,rotlSL=(_e,et,tt)=>et<<tt|_e>>>32-tt,rotlBH=(_e,et,tt)=>et<<tt-32|_e>>>64-tt,rotlBL=(_e,et,tt)=>_e<<tt-32|et>>>64-tt;function add$3(_e,et,tt,nt){const at=(et>>>0)+(nt>>>0);return{h:_e+tt+(at/2**32|0)|0,l:at|0}}const add3L=(_e,et,tt)=>(_e>>>0)+(et>>>0)+(tt>>>0),add3H=(_e,et,tt,nt)=>et+tt+nt+(_e/2**32|0)|0,add4L=(_e,et,tt,nt)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(nt>>>0),add4H=(_e,et,tt,nt,at)=>et+tt+nt+at+(_e/2**32|0)|0,add5L=(_e,et,tt,nt,at)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(nt>>>0)+(at>>>0),add5H=(_e,et,tt,nt,at,ot)=>et+tt+nt+at+ot+(_e/2**32|0)|0,u64={fromBig,split:split$3,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add:add$3,add3L,add3H,add4L,add4H,add5H,add5L},u64$1=u64,[SHA512_Kh,SHA512_Kl]=(()=>u64$1.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(_e=>BigInt(_e))))(),SHA512_W_H=new Uint32Array(80),SHA512_W_L=new Uint32Array(80);let SHA512$3=class extends SHA2$1{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:et,Al:tt,Bh:nt,Bl:at,Ch:ot,Cl:st,Dh:ct,Dl:dt,Eh:ht,El:pt,Fh:mt,Fl:yt,Gh:gt,Gl:bt,Hh:$t,Hl:wt}=this;return[et,tt,nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt]}set(et,tt,nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt){this.Ah=et|0,this.Al=tt|0,this.Bh=nt|0,this.Bl=at|0,this.Ch=ot|0,this.Cl=st|0,this.Dh=ct|0,this.Dl=dt|0,this.Eh=ht|0,this.El=pt|0,this.Fh=mt|0,this.Fl=yt|0,this.Gh=gt|0,this.Gl=bt|0,this.Hh=$t|0,this.Hl=wt|0}process(et,tt){for(let Pt=0;Pt<16;Pt++,tt+=4)SHA512_W_H[Pt]=et.getUint32(tt),SHA512_W_L[Pt]=et.getUint32(tt+=4);for(let Pt=16;Pt<80;Pt++){const Ot=SHA512_W_H[Pt-15]|0,Nt=SHA512_W_L[Pt-15]|0,Lt=u64$1.rotrSH(Ot,Nt,1)^u64$1.rotrSH(Ot,Nt,8)^u64$1.shrSH(Ot,Nt,7),Bt=u64$1.rotrSL(Ot,Nt,1)^u64$1.rotrSL(Ot,Nt,8)^u64$1.shrSL(Ot,Nt,7),Ut=SHA512_W_H[Pt-2]|0,Ft=SHA512_W_L[Pt-2]|0,zt=u64$1.rotrSH(Ut,Ft,19)^u64$1.rotrBH(Ut,Ft,61)^u64$1.shrSH(Ut,Ft,6),It=u64$1.rotrSL(Ut,Ft,19)^u64$1.rotrBL(Ut,Ft,61)^u64$1.shrSL(Ut,Ft,6),vt=u64$1.add4L(Bt,It,SHA512_W_L[Pt-7],SHA512_W_L[Pt-16]),Et=u64$1.add4H(vt,Lt,zt,SHA512_W_H[Pt-7],SHA512_W_H[Pt-16]);SHA512_W_H[Pt]=Et|0,SHA512_W_L[Pt]=vt|0}let{Ah:nt,Al:at,Bh:ot,Bl:st,Ch:ct,Cl:dt,Dh:ht,Dl:pt,Eh:mt,El:yt,Fh:gt,Fl:bt,Gh:$t,Gl:wt,Hh:St,Hl:Tt}=this;for(let Pt=0;Pt<80;Pt++){const Ot=u64$1.rotrSH(mt,yt,14)^u64$1.rotrSH(mt,yt,18)^u64$1.rotrBH(mt,yt,41),Nt=u64$1.rotrSL(mt,yt,14)^u64$1.rotrSL(mt,yt,18)^u64$1.rotrBL(mt,yt,41),Lt=mt&gt^~mt&$t,Bt=yt&bt^~yt&wt,Ut=u64$1.add5L(Tt,Nt,Bt,SHA512_Kl[Pt],SHA512_W_L[Pt]),Ft=u64$1.add5H(Ut,St,Ot,Lt,SHA512_Kh[Pt],SHA512_W_H[Pt]),zt=Ut|0,It=u64$1.rotrSH(nt,at,28)^u64$1.rotrBH(nt,at,34)^u64$1.rotrBH(nt,at,39),vt=u64$1.rotrSL(nt,at,28)^u64$1.rotrBL(nt,at,34)^u64$1.rotrBL(nt,at,39),Et=nt&ot^nt&ct^ot&ct,At=at&st^at&dt^st&dt;St=$t|0,Tt=wt|0,$t=gt|0,wt=bt|0,gt=mt|0,bt=yt|0,{h:mt,l:yt}=u64$1.add(ht|0,pt|0,Ft|0,zt|0),ht=ct|0,pt=dt|0,ct=ot|0,dt=st|0,ot=nt|0,st=at|0;const xt=u64$1.add3L(zt,vt,At);nt=u64$1.add3H(xt,Ft,It,Et),at=xt|0}({h:nt,l:at}=u64$1.add(this.Ah|0,this.Al|0,nt|0,at|0)),{h:ot,l:st}=u64$1.add(this.Bh|0,this.Bl|0,ot|0,st|0),{h:ct,l:dt}=u64$1.add(this.Ch|0,this.Cl|0,ct|0,dt|0),{h:ht,l:pt}=u64$1.add(this.Dh|0,this.Dl|0,ht|0,pt|0),{h:mt,l:yt}=u64$1.add(this.Eh|0,this.El|0,mt|0,yt|0),{h:gt,l:bt}=u64$1.add(this.Fh|0,this.Fl|0,gt|0,bt|0),{h:$t,l:wt}=u64$1.add(this.Gh|0,this.Gl|0,$t|0,wt|0),{h:St,l:Tt}=u64$1.add(this.Hh|0,this.Hl|0,St|0,Tt|0),this.set(nt,at,ot,st,ct,dt,ht,pt,mt,yt,gt,bt,$t,wt,St,Tt)}roundClean(){SHA512_W_H.fill(0),SHA512_W_L.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const sha512$2=wrapConstructor$1(()=>new SHA512$3);function getGlobal(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global$a<"u")return global$a;throw new Error("unable to locate global object")}const anyGlobal=getGlobal(),crypto$4=anyGlobal.crypto||anyGlobal.msCrypto;function createHash$3(_e){switch(_e){case"sha256":return sha256$5.create();case"sha512":return sha512$2.create()}assertArgument(!1,"invalid hashing algorithm name","algorithm",_e)}function createHmac(_e,et){const tt={sha256:sha256$5,sha512:sha512$2}[_e];return assertArgument(tt!=null,"invalid hmac algorithm","algorithm",_e),hmac$2.create(tt,et)}function pbkdf2Sync(_e,et,tt,nt,at){const ot={sha256:sha256$5,sha512:sha512$2}[at];return assertArgument(ot!=null,"invalid pbkdf2 algorithm","algorithm",at),pbkdf2$2(ot,_e,et,{c:tt,dkLen:nt})}function randomBytes$4(_e){assert$y(crypto$4!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),assertArgument(Number.isInteger(_e)&&_e>0&&_e<=1024,"invalid length","length",_e);const et=new Uint8Array(_e);return crypto$4.getRandomValues(et),et}let locked$4=!1;const _computeHmac=function(_e,et,tt){return createHmac(_e,et).update(tt).digest()};let __computeHmac=_computeHmac;function computeHmac(_e,et,tt){const nt=getBytes(et,"key"),at=getBytes(tt,"data");return hexlify$1(__computeHmac(_e,nt,at))}computeHmac._=_computeHmac;computeHmac.lock=function(){locked$4=!0};computeHmac.register=function(_e){if(locked$4)throw new Error("computeHmac is locked");__computeHmac=_e};Object.freeze(computeHmac);const[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]],_0n$4=BigInt(0),_1n$5=BigInt(1),_2n$3=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113);for(let _e=0,et=_1n$5,tt=1,nt=0;_e<24;_e++){[tt,nt]=[nt,(2*tt+3*nt)%5],SHA3_PI.push(2*(5*nt+tt)),SHA3_ROTL.push((_e+1)*(_e+2)/2%64);let at=_0n$4;for(let ot=0;ot<7;ot++)et=(et<<_1n$5^(et>>_7n)*_0x71n)%_256n,et&_2n$3&&(at^=_1n$5<<(_1n$5<<BigInt(ot))-_1n$5);_SHA3_IOTA.push(at)}const[SHA3_IOTA_H,SHA3_IOTA_L]=split$3(_SHA3_IOTA,!0),rotlH=(_e,et,tt)=>tt>32?rotlBH(_e,et,tt):rotlSH(_e,et,tt),rotlL=(_e,et,tt)=>tt>32?rotlBL(_e,et,tt):rotlSL(_e,et,tt);function keccakP(_e,et=24){const tt=new Uint32Array(10);for(let nt=24-et;nt<24;nt++){for(let st=0;st<10;st++)tt[st]=_e[st]^_e[st+10]^_e[st+20]^_e[st+30]^_e[st+40];for(let st=0;st<10;st+=2){const ct=(st+8)%10,dt=(st+2)%10,ht=tt[dt],pt=tt[dt+1],mt=rotlH(ht,pt,1)^tt[ct],yt=rotlL(ht,pt,1)^tt[ct+1];for(let gt=0;gt<50;gt+=10)_e[st+gt]^=mt,_e[st+gt+1]^=yt}let at=_e[2],ot=_e[3];for(let st=0;st<24;st++){const ct=SHA3_ROTL[st],dt=rotlH(at,ot,ct),ht=rotlL(at,ot,ct),pt=SHA3_PI[st];at=_e[pt],ot=_e[pt+1],_e[pt]=dt,_e[pt+1]=ht}for(let st=0;st<50;st+=10){for(let ct=0;ct<10;ct++)tt[ct]=_e[st+ct];for(let ct=0;ct<10;ct++)_e[st+ct]^=~tt[(ct+2)%10]&tt[(ct+4)%10]}_e[0]^=SHA3_IOTA_H[nt],_e[1]^=SHA3_IOTA_L[nt]}tt.fill(0)}class Keccak extends Hash$c{constructor(et,tt,nt,at=!1,ot=24){if(super(),this.blockLen=et,this.suffix=tt,this.outputLen=nt,this.enableXOF=at,this.rounds=ot,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,number$4(nt),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=u32(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(et){exists$1(this);const{blockLen:tt,state:nt}=this;et=toBytes(et);const at=et.length;for(let ot=0;ot<at;){const st=Math.min(tt-this.pos,at-ot);for(let ct=0;ct<st;ct++)nt[this.pos++]^=et[ot++];this.pos===tt&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:et,suffix:tt,pos:nt,blockLen:at}=this;et[nt]^=tt,tt&128&&nt===at-1&&this.keccak(),et[at-1]^=128,this.keccak()}writeInto(et){exists$1(this,!1),bytes$1(et),this.finish();const tt=this.state,{blockLen:nt}=this;for(let at=0,ot=et.length;at<ot;){this.posOut>=nt&&this.keccak();const st=Math.min(nt-this.posOut,ot-at);et.set(tt.subarray(this.posOut,this.posOut+st),at),this.posOut+=st,at+=st}return et}xofInto(et){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(et)}xof(et){return number$4(et),this.xofInto(new Uint8Array(et))}digestInto(et){if(output$2(et,this),this.finished)throw new Error("digest() was already called");return this.writeInto(et),this.destroy(),et}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(et){const{blockLen:tt,suffix:nt,outputLen:at,rounds:ot,enableXOF:st}=this;return et||(et=new Keccak(tt,nt,at,st,ot)),et.state32.set(this.state32),et.pos=this.pos,et.posOut=this.posOut,et.finished=this.finished,et.rounds=ot,et.suffix=nt,et.outputLen=at,et.enableXOF=st,et.destroyed=this.destroyed,et}}const gen=(_e,et,tt)=>wrapConstructor$1(()=>new Keccak(et,_e,tt)),keccak_256=gen(1,136,256/8);let locked$3=!1;const _keccak256=function(_e){return keccak_256(_e)};let __keccak256=_keccak256;function keccak256$1(_e){const et=getBytes(_e,"data");return hexlify$1(__keccak256(et))}keccak256$1._=_keccak256;keccak256$1.lock=function(){locked$3=!0};keccak256$1.register=function(_e){if(locked$3)throw new TypeError("keccak256 is locked");__keccak256=_e};Object.freeze(keccak256$1);const Rho=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Id=Uint8Array.from({length:16},(_e,et)=>et),Pi=Id.map(_e=>(9*_e+5)%16);let idxL=[Id],idxR=[Pi];for(let _e=0;_e<4;_e++)for(let et of[idxL,idxR])et.push(et[_e].map(tt=>Rho[tt]));const shifts=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(_e=>new Uint8Array(_e)),shiftsL=idxL.map((_e,et)=>_e.map(tt=>shifts[et][tt])),shiftsR=idxR.map((_e,et)=>_e.map(tt=>shifts[et][tt])),Kl=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Kr=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),rotl$3=(_e,et)=>_e<<et|_e>>>32-et;function f$4(_e,et,tt,nt){return _e===0?et^tt^nt:_e===1?et&tt|~et&nt:_e===2?(et|~tt)^nt:_e===3?et&nt|tt&~nt:et^(tt|~nt)}const BUF=new Uint32Array(16);let RIPEMD160$5=class extends SHA2$1{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:et,h1:tt,h2:nt,h3:at,h4:ot}=this;return[et,tt,nt,at,ot]}set(et,tt,nt,at,ot){this.h0=et|0,this.h1=tt|0,this.h2=nt|0,this.h3=at|0,this.h4=ot|0}process(et,tt){for(let gt=0;gt<16;gt++,tt+=4)BUF[gt]=et.getUint32(tt,!0);let nt=this.h0|0,at=nt,ot=this.h1|0,st=ot,ct=this.h2|0,dt=ct,ht=this.h3|0,pt=ht,mt=this.h4|0,yt=mt;for(let gt=0;gt<5;gt++){const bt=4-gt,$t=Kl[gt],wt=Kr[gt],St=idxL[gt],Tt=idxR[gt],Pt=shiftsL[gt],Ot=shiftsR[gt];for(let Nt=0;Nt<16;Nt++){const Lt=rotl$3(nt+f$4(gt,ot,ct,ht)+BUF[St[Nt]]+$t,Pt[Nt])+mt|0;nt=mt,mt=ht,ht=rotl$3(ct,10)|0,ct=ot,ot=Lt}for(let Nt=0;Nt<16;Nt++){const Lt=rotl$3(at+f$4(bt,st,dt,pt)+BUF[Tt[Nt]]+wt,Ot[Nt])+yt|0;at=yt,yt=pt,pt=rotl$3(dt,10)|0,dt=st,st=Lt}}this.set(this.h1+ct+pt|0,this.h2+ht+yt|0,this.h3+mt+at|0,this.h4+nt+st|0,this.h0+ot+dt|0)}roundClean(){BUF.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};const ripemd160$2=wrapConstructor$1(()=>new RIPEMD160$5);let locked$2=!1;const _ripemd160=function(_e){return ripemd160$2(_e)};let __ripemd160=_ripemd160;function ripemd160$1(_e){const et=getBytes(_e,"data");return hexlify$1(__ripemd160(et))}ripemd160$1._=_ripemd160;ripemd160$1.lock=function(){locked$2=!0};ripemd160$1.register=function(_e){if(locked$2)throw new TypeError("ripemd160 is locked");__ripemd160=_e};Object.freeze(ripemd160$1);let locked$1=!1;const _pbkdf2=function(_e,et,tt,nt,at){return pbkdf2Sync(_e,et,tt,nt,at)};let __pbkdf2=_pbkdf2;function pbkdf2$1(_e,et,tt,nt,at){const ot=getBytes(_e,"password"),st=getBytes(et,"salt");return hexlify$1(__pbkdf2(ot,st,tt,nt,at))}pbkdf2$1._=_pbkdf2;pbkdf2$1.lock=function(){locked$1=!0};pbkdf2$1.register=function(_e){if(locked$1)throw new Error("pbkdf2 is locked");__pbkdf2=_e};Object.freeze(pbkdf2$1);let locked=!1;const _randomBytes=function(_e){return new Uint8Array(randomBytes$4(_e))};let __randomBytes=_randomBytes;function randomBytes$3(_e){return __randomBytes(_e)}randomBytes$3._=_randomBytes;randomBytes$3.lock=function(){locked=!0};randomBytes$3.register=function(_e){if(locked)throw new Error("randomBytes is locked");__randomBytes=_e};Object.freeze(randomBytes$3);const rotl$2=(_e,et)=>_e<<et|_e>>>32-et;function XorAndSalsa(_e,et,tt,nt,at,ot){let st=_e[et++]^tt[nt++],ct=_e[et++]^tt[nt++],dt=_e[et++]^tt[nt++],ht=_e[et++]^tt[nt++],pt=_e[et++]^tt[nt++],mt=_e[et++]^tt[nt++],yt=_e[et++]^tt[nt++],gt=_e[et++]^tt[nt++],bt=_e[et++]^tt[nt++],$t=_e[et++]^tt[nt++],wt=_e[et++]^tt[nt++],St=_e[et++]^tt[nt++],Tt=_e[et++]^tt[nt++],Pt=_e[et++]^tt[nt++],Ot=_e[et++]^tt[nt++],Nt=_e[et++]^tt[nt++],Lt=st,Bt=ct,Ut=dt,Ft=ht,zt=pt,It=mt,vt=yt,Et=gt,At=bt,xt=$t,Ct=wt,Dt=St,kt=Tt,Rt=Pt,_t=Ot,Mt=Nt;for(let jt=0;jt<8;jt+=2)zt^=rotl$2(Lt+kt|0,7),At^=rotl$2(zt+Lt|0,9),kt^=rotl$2(At+zt|0,13),Lt^=rotl$2(kt+At|0,18),xt^=rotl$2(It+Bt|0,7),Rt^=rotl$2(xt+It|0,9),Bt^=rotl$2(Rt+xt|0,13),It^=rotl$2(Bt+Rt|0,18),_t^=rotl$2(Ct+vt|0,7),Ut^=rotl$2(_t+Ct|0,9),vt^=rotl$2(Ut+_t|0,13),Ct^=rotl$2(vt+Ut|0,18),Ft^=rotl$2(Mt+Dt|0,7),Et^=rotl$2(Ft+Mt|0,9),Dt^=rotl$2(Et+Ft|0,13),Mt^=rotl$2(Dt+Et|0,18),Bt^=rotl$2(Lt+Ft|0,7),Ut^=rotl$2(Bt+Lt|0,9),Ft^=rotl$2(Ut+Bt|0,13),Lt^=rotl$2(Ft+Ut|0,18),vt^=rotl$2(It+zt|0,7),Et^=rotl$2(vt+It|0,9),zt^=rotl$2(Et+vt|0,13),It^=rotl$2(zt+Et|0,18),Dt^=rotl$2(Ct+xt|0,7),At^=rotl$2(Dt+Ct|0,9),xt^=rotl$2(At+Dt|0,13),Ct^=rotl$2(xt+At|0,18),kt^=rotl$2(Mt+_t|0,7),Rt^=rotl$2(kt+Mt|0,9),_t^=rotl$2(Rt+kt|0,13),Mt^=rotl$2(_t+Rt|0,18);at[ot++]=st+Lt|0,at[ot++]=ct+Bt|0,at[ot++]=dt+Ut|0,at[ot++]=ht+Ft|0,at[ot++]=pt+zt|0,at[ot++]=mt+It|0,at[ot++]=yt+vt|0,at[ot++]=gt+Et|0,at[ot++]=bt+At|0,at[ot++]=$t+xt|0,at[ot++]=wt+Ct|0,at[ot++]=St+Dt|0,at[ot++]=Tt+kt|0,at[ot++]=Pt+Rt|0,at[ot++]=Ot+_t|0,at[ot++]=Nt+Mt|0}function BlockMix(_e,et,tt,nt,at){let ot=nt+0,st=nt+16*at;for(let ct=0;ct<16;ct++)tt[st+ct]=_e[et+(2*at-1)*16+ct];for(let ct=0;ct<at;ct++,ot+=16,et+=16)XorAndSalsa(tt,st,_e,et,tt,ot),ct>0&&(st+=16),XorAndSalsa(tt,ot,_e,et+=16,tt,st)}function scryptInit(_e,et,tt){const nt=checkOpts({dkLen:32,asyncTick:10,maxmem:1073742848},tt),{N:at,r:ot,p:st,dkLen:ct,asyncTick:dt,maxmem:ht,onProgress:pt}=nt;if(number$4(at),number$4(ot),number$4(st),number$4(ct),number$4(dt),number$4(ht),pt!==void 0&&typeof pt!="function")throw new Error("progressCb should be function");const mt=128*ot,yt=mt/4;if(at<=1||at&at-1||at>=2**(mt/8)||at>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(st<0||st>(2**32-1)*32/mt)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(ct<0||ct>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const gt=mt*(at+st);if(gt>ht)throw new Error(`Scrypt: parameters too large, ${gt} (128 * r * (N + p)) > ${ht} (maxmem)`);const bt=pbkdf2$2(sha256$5,_e,et,{c:1,dkLen:mt*st}),$t=u32(bt),wt=u32(new Uint8Array(mt*at)),St=u32(new Uint8Array(mt));let Tt=()=>{};if(pt){const Pt=2*at*st,Ot=Math.max(Math.floor(Pt/1e4),1);let Nt=0;Tt=()=>{Nt++,pt&&(!(Nt%Ot)||Nt===Pt)&&pt(Nt/Pt)}}return{N:at,r:ot,p:st,dkLen:ct,blockSize32:yt,V:wt,B32:$t,B:bt,tmp:St,blockMixCb:Tt,asyncTick:dt}}function scryptOutput(_e,et,tt,nt,at){const ot=pbkdf2$2(sha256$5,_e,tt,{c:1,dkLen:et});return tt.fill(0),nt.fill(0),at.fill(0),ot}function scrypt$1(_e,et,tt){const{N:nt,r:at,p:ot,dkLen:st,blockSize32:ct,V:dt,B32:ht,B:pt,tmp:mt,blockMixCb:yt}=scryptInit(_e,et,tt);for(let gt=0;gt<ot;gt++){const bt=ct*gt;for(let $t=0;$t<ct;$t++)dt[$t]=ht[bt+$t];for(let $t=0,wt=0;$t<nt-1;$t++)BlockMix(dt,wt,dt,wt+=ct,at),yt();BlockMix(dt,(nt-1)*ct,ht,bt,at),yt();for(let $t=0;$t<nt;$t++){const wt=ht[bt+ct-16]%nt;for(let St=0;St<ct;St++)mt[St]=ht[bt+St]^dt[wt*ct+St];BlockMix(mt,0,ht,bt,at),yt()}}return scryptOutput(_e,st,pt,dt,mt)}async function scryptAsync(_e,et,tt){const{N:nt,r:at,p:ot,dkLen:st,blockSize32:ct,V:dt,B32:ht,B:pt,tmp:mt,blockMixCb:yt,asyncTick:gt}=scryptInit(_e,et,tt);for(let bt=0;bt<ot;bt++){const $t=ct*bt;for(let St=0;St<ct;St++)dt[St]=ht[$t+St];let wt=0;await asyncLoop(nt-1,gt,()=>{BlockMix(dt,wt,dt,wt+=ct,at),yt()}),BlockMix(dt,(nt-1)*ct,ht,$t,at),yt(),await asyncLoop(nt,gt,()=>{const St=ht[$t+ct-16]%nt;for(let Tt=0;Tt<ct;Tt++)mt[Tt]=ht[$t+Tt]^dt[St*ct+Tt];BlockMix(mt,0,ht,$t,at),yt()})}return scryptOutput(_e,st,pt,dt,mt)}let lockedSync=!1,lockedAsync=!1;const _scryptAsync=async function(_e,et,tt,nt,at,ot,st){return await scryptAsync(_e,et,{N:tt,r:nt,p:at,dkLen:ot,onProgress:st})},_scryptSync=function(_e,et,tt,nt,at,ot){return scrypt$1(_e,et,{N:tt,r:nt,p:at,dkLen:ot})};let __scryptAsync=_scryptAsync,__scryptSync=_scryptSync;async function scrypt(_e,et,tt,nt,at,ot,st){const ct=getBytes(_e,"passwd"),dt=getBytes(et,"salt");return hexlify$1(await __scryptAsync(ct,dt,tt,nt,at,ot,st))}scrypt._=_scryptAsync;scrypt.lock=function(){lockedAsync=!0};scrypt.register=function(_e){if(lockedAsync)throw new Error("scrypt is locked");__scryptAsync=_e};Object.freeze(scrypt);function scryptSync(_e,et,tt,nt,at,ot){const st=getBytes(_e,"passwd"),ct=getBytes(et,"salt");return hexlify$1(__scryptSync(st,ct,tt,nt,at,ot))}scryptSync._=_scryptSync;scryptSync.lock=function(){lockedSync=!0};scryptSync.register=function(_e){if(lockedSync)throw new Error("scryptSync is locked");__scryptSync=_e};Object.freeze(scryptSync);const _sha256=function(_e){return createHash$3("sha256").update(_e).digest()};let __sha256=_sha256,locked256=!1;function sha256$4(_e){const et=getBytes(_e,"data");return hexlify$1(__sha256(et))}sha256$4._=_sha256;sha256$4.lock=function(){locked256=!0};sha256$4.register=function(_e){if(locked256)throw new Error("sha256 is locked");__sha256=_e};Object.freeze(sha256$4);Object.freeze(sha256$4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$3=BigInt(0),_1n$4=BigInt(1),_2n$2=BigInt(2),u8a=_e=>_e instanceof Uint8Array,hexes=Array.from({length:256},(_e,et)=>et.toString(16).padStart(2,"0"));function bytesToHex(_e){if(!u8a(_e))throw new Error("Uint8Array expected");let et="";for(let tt=0;tt<_e.length;tt++)et+=hexes[_e[tt]];return et}function numberToHexUnpadded(_e){const et=_e.toString(16);return et.length&1?`0${et}`:et}function hexToNumber$1(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);return BigInt(_e===""?"0":`0x${_e}`)}function hexToBytes(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);const et=_e.length;if(et%2)throw new Error("padded hex string expected, got unpadded hex of length "+et);const tt=new Uint8Array(et/2);for(let nt=0;nt<tt.length;nt++){const at=nt*2,ot=_e.slice(at,at+2),st=Number.parseInt(ot,16);if(Number.isNaN(st)||st<0)throw new Error("Invalid byte sequence");tt[nt]=st}return tt}function bytesToNumberBE(_e){return hexToNumber$1(bytesToHex(_e))}function bytesToNumberLE(_e){if(!u8a(_e))throw new Error("Uint8Array expected");return hexToNumber$1(bytesToHex(Uint8Array.from(_e).reverse()))}function numberToBytesBE(_e,et){return hexToBytes(_e.toString(16).padStart(et*2,"0"))}function numberToBytesLE(_e,et){return numberToBytesBE(_e,et).reverse()}function numberToVarBytesBE(_e){return hexToBytes(numberToHexUnpadded(_e))}function ensureBytes(_e,et,tt){let nt;if(typeof et=="string")try{nt=hexToBytes(et)}catch(ot){throw new Error(`${_e} must be valid hex string, got "${et}". Cause: ${ot}`)}else if(u8a(et))nt=Uint8Array.from(et);else throw new Error(`${_e} must be hex string or Uint8Array`);const at=nt.length;if(typeof tt=="number"&&at!==tt)throw new Error(`${_e} expected ${tt} bytes, got ${at}`);return nt}function concatBytes(..._e){const et=new Uint8Array(_e.reduce((nt,at)=>nt+at.length,0));let tt=0;return _e.forEach(nt=>{if(!u8a(nt))throw new Error("Uint8Array expected");et.set(nt,tt),tt+=nt.length}),et}function equalBytes(_e,et){if(_e.length!==et.length)return!1;for(let tt=0;tt<_e.length;tt++)if(_e[tt]!==et[tt])return!1;return!0}function utf8ToBytes(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function bitLen(_e){let et;for(et=0;_e>_0n$3;_e>>=_1n$4,et+=1);return et}function bitGet(_e,et){return _e>>BigInt(et)&_1n$4}const bitSet=(_e,et,tt)=>_e|(tt?_1n$4:_0n$3)<<BigInt(et),bitMask=_e=>(_2n$2<<BigInt(_e-1))-_1n$4,u8n=_e=>new Uint8Array(_e),u8fr=_e=>Uint8Array.from(_e);function createHmacDrbg(_e,et,tt){if(typeof _e!="number"||_e<2)throw new Error("hashLen must be a number");if(typeof et!="number"||et<2)throw new Error("qByteLen must be a number");if(typeof tt!="function")throw new Error("hmacFn must be a function");let nt=u8n(_e),at=u8n(_e),ot=0;const st=()=>{nt.fill(1),at.fill(0),ot=0},ct=(...mt)=>tt(at,nt,...mt),dt=(mt=u8n())=>{at=ct(u8fr([0]),mt),nt=ct(),mt.length!==0&&(at=ct(u8fr([1]),mt),nt=ct())},ht=()=>{if(ot++>=1e3)throw new Error("drbg: tried 1000 values");let mt=0;const yt=[];for(;mt<et;){nt=ct();const gt=nt.slice();yt.push(gt),mt+=nt.length}return concatBytes(...yt)};return(mt,yt)=>{st(),dt(mt);let gt;for(;!(gt=yt(ht()));)dt();return st(),gt}}const validatorFns={bigint:_e=>typeof _e=="bigint",function:_e=>typeof _e=="function",boolean:_e=>typeof _e=="boolean",string:_e=>typeof _e=="string",stringOrUint8Array:_e=>typeof _e=="string"||_e instanceof Uint8Array,isSafeInteger:_e=>Number.isSafeInteger(_e),array:_e=>Array.isArray(_e),field:(_e,et)=>et.Fp.isValid(_e),hash:_e=>typeof _e=="function"&&Number.isSafeInteger(_e.outputLen)};function validateObject(_e,et,tt={}){const nt=(at,ot,st)=>{const ct=validatorFns[ot];if(typeof ct!="function")throw new Error(`Invalid validator "${ot}", expected function`);const dt=_e[at];if(!(st&&dt===void 0)&&!ct(dt,_e))throw new Error(`Invalid param ${String(at)}=${dt} (${typeof dt}), expected ${ot}`)};for(const[at,ot]of Object.entries(et))nt(at,ot,!1);for(const[at,ot]of Object.entries(tt))nt(at,ot,!0);return _e}const ut=Object.freeze(Object.defineProperty({__proto__:null,bitGet,bitLen,bitMask,bitSet,bytesToHex,bytesToNumberBE,bytesToNumberLE,concatBytes,createHmacDrbg,ensureBytes,equalBytes,hexToBytes,hexToNumber:hexToNumber$1,numberToBytesBE,numberToBytesLE,numberToHexUnpadded,numberToVarBytesBE,utf8ToBytes,validateObject},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$2=BigInt(0),_1n$3=BigInt(1),_2n$1=BigInt(2),_3n$1=BigInt(3),_4n=BigInt(4),_5n=BigInt(5),_8n=BigInt(8);BigInt(9);BigInt(16);function mod$3(_e,et){const tt=_e%et;return tt>=_0n$2?tt:et+tt}function pow$1(_e,et,tt){if(tt<=_0n$2||et<_0n$2)throw new Error("Expected power/modulo > 0");if(tt===_1n$3)return _0n$2;let nt=_1n$3;for(;et>_0n$2;)et&_1n$3&&(nt=nt*_e%tt),_e=_e*_e%tt,et>>=_1n$3;return nt}function pow2(_e,et,tt){let nt=_e;for(;et-- >_0n$2;)nt*=nt,nt%=tt;return nt}function invert$2(_e,et){if(_e===_0n$2||et<=_0n$2)throw new Error(`invert: expected positive integers, got n=${_e} mod=${et}`);let tt=mod$3(_e,et),nt=et,at=_0n$2,ot=_1n$3;for(;tt!==_0n$2;){const ct=nt/tt,dt=nt%tt,ht=at-ot*ct;nt=tt,tt=dt,at=ot,ot=ht}if(nt!==_1n$3)throw new Error("invert: does not exist");return mod$3(at,et)}function tonelliShanks(_e){const et=(_e-_1n$3)/_2n$1;let tt,nt,at;for(tt=_e-_1n$3,nt=0;tt%_2n$1===_0n$2;tt/=_2n$1,nt++);for(at=_2n$1;at<_e&&pow$1(at,et,_e)!==_e-_1n$3;at++);if(nt===1){const st=(_e+_1n$3)/_4n;return function(dt,ht){const pt=dt.pow(ht,st);if(!dt.eql(dt.sqr(pt),ht))throw new Error("Cannot find square root");return pt}}const ot=(tt+_1n$3)/_2n$1;return function(ct,dt){if(ct.pow(dt,et)===ct.neg(ct.ONE))throw new Error("Cannot find square root");let ht=nt,pt=ct.pow(ct.mul(ct.ONE,at),tt),mt=ct.pow(dt,ot),yt=ct.pow(dt,tt);for(;!ct.eql(yt,ct.ONE);){if(ct.eql(yt,ct.ZERO))return ct.ZERO;let gt=1;for(let $t=ct.sqr(yt);gt<ht&&!ct.eql($t,ct.ONE);gt++)$t=ct.sqr($t);const bt=ct.pow(pt,_1n$3<<BigInt(ht-gt-1));pt=ct.sqr(bt),mt=ct.mul(mt,bt),yt=ct.mul(yt,pt),ht=gt}return mt}}function FpSqrt(_e){if(_e%_4n===_3n$1){const et=(_e+_1n$3)/_4n;return function(nt,at){const ot=nt.pow(at,et);if(!nt.eql(nt.sqr(ot),at))throw new Error("Cannot find square root");return ot}}if(_e%_8n===_5n){const et=(_e-_5n)/_8n;return function(nt,at){const ot=nt.mul(at,_2n$1),st=nt.pow(ot,et),ct=nt.mul(at,st),dt=nt.mul(nt.mul(ct,_2n$1),st),ht=nt.mul(ct,nt.sub(dt,nt.ONE));if(!nt.eql(nt.sqr(ht),at))throw new Error("Cannot find square root");return ht}}return tonelliShanks(_e)}const FIELD_FIELDS=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(_e){const et={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},tt=FIELD_FIELDS.reduce((nt,at)=>(nt[at]="function",nt),et);return validateObject(_e,tt)}function FpPow(_e,et,tt){if(tt<_0n$2)throw new Error("Expected power > 0");if(tt===_0n$2)return _e.ONE;if(tt===_1n$3)return et;let nt=_e.ONE,at=et;for(;tt>_0n$2;)tt&_1n$3&&(nt=_e.mul(nt,at)),at=_e.sqr(at),tt>>=_1n$3;return nt}function FpInvertBatch(_e,et){const tt=new Array(et.length),nt=et.reduce((ot,st,ct)=>_e.is0(st)?ot:(tt[ct]=ot,_e.mul(ot,st)),_e.ONE),at=_e.inv(nt);return et.reduceRight((ot,st,ct)=>_e.is0(st)?ot:(tt[ct]=_e.mul(ot,tt[ct]),_e.mul(ot,st)),at),tt}function nLength(_e,et){const tt=et!==void 0?et:_e.toString(2).length,nt=Math.ceil(tt/8);return{nBitLength:tt,nByteLength:nt}}function Field$3(_e,et,tt=!1,nt={}){if(_e<=_0n$2)throw new Error(`Expected Field ORDER > 0, got ${_e}`);const{nBitLength:at,nByteLength:ot}=nLength(_e,et);if(ot>2048)throw new Error("Field lengths over 2048 bytes are not supported");const st=FpSqrt(_e),ct=Object.freeze({ORDER:_e,BITS:at,BYTES:ot,MASK:bitMask(at),ZERO:_0n$2,ONE:_1n$3,create:dt=>mod$3(dt,_e),isValid:dt=>{if(typeof dt!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof dt}`);return _0n$2<=dt&&dt<_e},is0:dt=>dt===_0n$2,isOdd:dt=>(dt&_1n$3)===_1n$3,neg:dt=>mod$3(-dt,_e),eql:(dt,ht)=>dt===ht,sqr:dt=>mod$3(dt*dt,_e),add:(dt,ht)=>mod$3(dt+ht,_e),sub:(dt,ht)=>mod$3(dt-ht,_e),mul:(dt,ht)=>mod$3(dt*ht,_e),pow:(dt,ht)=>FpPow(ct,dt,ht),div:(dt,ht)=>mod$3(dt*invert$2(ht,_e),_e),sqrN:dt=>dt*dt,addN:(dt,ht)=>dt+ht,subN:(dt,ht)=>dt-ht,mulN:(dt,ht)=>dt*ht,inv:dt=>invert$2(dt,_e),sqrt:nt.sqrt||(dt=>st(ct,dt)),invertBatch:dt=>FpInvertBatch(ct,dt),cmov:(dt,ht,pt)=>pt?ht:dt,toBytes:dt=>tt?numberToBytesLE(dt,ot):numberToBytesBE(dt,ot),fromBytes:dt=>{if(dt.length!==ot)throw new Error(`Fp.fromBytes: expected ${ot}, got ${dt.length}`);return tt?bytesToNumberLE(dt):bytesToNumberBE(dt)}});return Object.freeze(ct)}function getFieldBytesLength(_e){if(typeof _e!="bigint")throw new Error("field order must be bigint");const et=_e.toString(2).length;return Math.ceil(et/8)}function getMinHashLength(_e){const et=getFieldBytesLength(_e);return et+Math.ceil(et/2)}function mapHashToField(_e,et,tt=!1){const nt=_e.length,at=getFieldBytesLength(et),ot=getMinHashLength(et);if(nt<16||nt<ot||nt>1024)throw new Error(`expected ${ot}-1024 bytes of input, got ${nt}`);const st=tt?bytesToNumberBE(_e):bytesToNumberLE(_e),ct=mod$3(st,et-_1n$3)+_1n$3;return tt?numberToBytesLE(ct,at):numberToBytesBE(ct,at)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$1=BigInt(0),_1n$2=BigInt(1);function wNAF(_e,et){const tt=(at,ot)=>{const st=ot.negate();return at?st:ot},nt=at=>{const ot=Math.ceil(et/at)+1,st=2**(at-1);return{windows:ot,windowSize:st}};return{constTimeNegate:tt,unsafeLadder(at,ot){let st=_e.ZERO,ct=at;for(;ot>_0n$1;)ot&_1n$2&&(st=st.add(ct)),ct=ct.double(),ot>>=_1n$2;return st},precomputeWindow(at,ot){const{windows:st,windowSize:ct}=nt(ot),dt=[];let ht=at,pt=ht;for(let mt=0;mt<st;mt++){pt=ht,dt.push(pt);for(let yt=1;yt<ct;yt++)pt=pt.add(ht),dt.push(pt);ht=pt.double()}return dt},wNAF(at,ot,st){const{windows:ct,windowSize:dt}=nt(at);let ht=_e.ZERO,pt=_e.BASE;const mt=BigInt(2**at-1),yt=2**at,gt=BigInt(at);for(let bt=0;bt<ct;bt++){const $t=bt*dt;let wt=Number(st&mt);st>>=gt,wt>dt&&(wt-=yt,st+=_1n$2);const St=$t,Tt=$t+Math.abs(wt)-1,Pt=bt%2!==0,Ot=wt<0;wt===0?pt=pt.add(tt(Pt,ot[St])):ht=ht.add(tt(Ot,ot[Tt]))}return{p:ht,f:pt}},wNAFCached(at,ot,st,ct){const dt=at._WINDOW_SIZE||1;let ht=ot.get(at);return ht||(ht=this.precomputeWindow(at,dt),dt!==1&&ot.set(at,ct(ht))),this.wNAF(dt,ht,st)}}}function validateBasic(_e){return validateField(_e.Fp),validateObject(_e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nLength(_e.n,_e.nBitLength),..._e,p:_e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validatePointOpts(_e){const et=validateBasic(_e);validateObject(et,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:tt,Fp:nt,a:at}=et;if(tt){if(!nt.eql(at,nt.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof tt!="object"||typeof tt.beta!="bigint"||typeof tt.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...et})}const{bytesToNumberBE:b2n,hexToBytes:h2b}=ut,DER={Err:class extends Error{constructor(et=""){super(et)}},_parseInt(_e){const{Err:et}=DER;if(_e.length<2||_e[0]!==2)throw new et("Invalid signature integer tag");const tt=_e[1],nt=_e.subarray(2,tt+2);if(!tt||nt.length!==tt)throw new et("Invalid signature integer: wrong length");if(nt[0]&128)throw new et("Invalid signature integer: negative");if(nt[0]===0&&!(nt[1]&128))throw new et("Invalid signature integer: unnecessary leading zero");return{d:b2n(nt),l:_e.subarray(tt+2)}},toSig(_e){const{Err:et}=DER,tt=typeof _e=="string"?h2b(_e):_e;if(!(tt instanceof Uint8Array))throw new Error("ui8a expected");let nt=tt.length;if(nt<2||tt[0]!=48)throw new et("Invalid signature tag");if(tt[1]!==nt-2)throw new et("Invalid signature: incorrect length");const{d:at,l:ot}=DER._parseInt(tt.subarray(2)),{d:st,l:ct}=DER._parseInt(ot);if(ct.length)throw new et("Invalid signature: left bytes after parsing");return{r:at,s:st}},hexFromSig(_e){const et=ht=>Number.parseInt(ht[0],16)&8?"00"+ht:ht,tt=ht=>{const pt=ht.toString(16);return pt.length&1?`0${pt}`:pt},nt=et(tt(_e.s)),at=et(tt(_e.r)),ot=nt.length/2,st=at.length/2,ct=tt(ot),dt=tt(st);return`30${tt(st+ot+4)}02${dt}${at}02${ct}${nt}`}},_0n=BigInt(0),_1n$1=BigInt(1);BigInt(2);const _3n=BigInt(3);BigInt(4);function weierstrassPoints(_e){const et=validatePointOpts(_e),{Fp:tt}=et,nt=et.toBytes||((bt,$t,wt)=>{const St=$t.toAffine();return concatBytes(Uint8Array.from([4]),tt.toBytes(St.x),tt.toBytes(St.y))}),at=et.fromBytes||(bt=>{const $t=bt.subarray(1),wt=tt.fromBytes($t.subarray(0,tt.BYTES)),St=tt.fromBytes($t.subarray(tt.BYTES,2*tt.BYTES));return{x:wt,y:St}});function ot(bt){const{a:$t,b:wt}=et,St=tt.sqr(bt),Tt=tt.mul(St,bt);return tt.add(tt.add(Tt,tt.mul(bt,$t)),wt)}if(!tt.eql(tt.sqr(et.Gy),ot(et.Gx)))throw new Error("bad generator point: equation left != right");function st(bt){return typeof bt=="bigint"&&_0n<bt&&bt<et.n}function ct(bt){if(!st(bt))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function dt(bt){const{allowedPrivateKeyLengths:$t,nByteLength:wt,wrapPrivateKey:St,n:Tt}=et;if($t&&typeof bt!="bigint"){if(bt instanceof Uint8Array&&(bt=bytesToHex(bt)),typeof bt!="string"||!$t.includes(bt.length))throw new Error("Invalid key");bt=bt.padStart(wt*2,"0")}let Pt;try{Pt=typeof bt=="bigint"?bt:bytesToNumberBE(ensureBytes("private key",bt,wt))}catch{throw new Error(`private key must be ${wt} bytes, hex or bigint, not ${typeof bt}`)}return St&&(Pt=mod$3(Pt,Tt)),ct(Pt),Pt}const ht=new Map;function pt(bt){if(!(bt instanceof mt))throw new Error("ProjectivePoint expected")}class mt{constructor($t,wt,St){if(this.px=$t,this.py=wt,this.pz=St,$t==null||!tt.isValid($t))throw new Error("x required");if(wt==null||!tt.isValid(wt))throw new Error("y required");if(St==null||!tt.isValid(St))throw new Error("z required")}static fromAffine($t){const{x:wt,y:St}=$t||{};if(!$t||!tt.isValid(wt)||!tt.isValid(St))throw new Error("invalid affine point");if($t instanceof mt)throw new Error("projective point not allowed");const Tt=Pt=>tt.eql(Pt,tt.ZERO);return Tt(wt)&&Tt(St)?mt.ZERO:new mt(wt,St,tt.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ($t){const wt=tt.invertBatch($t.map(St=>St.pz));return $t.map((St,Tt)=>St.toAffine(wt[Tt])).map(mt.fromAffine)}static fromHex($t){const wt=mt.fromAffine(at(ensureBytes("pointHex",$t)));return wt.assertValidity(),wt}static fromPrivateKey($t){return mt.BASE.multiply(dt($t))}_setWindowSize($t){this._WINDOW_SIZE=$t,ht.delete(this)}assertValidity(){if(this.is0()){if(et.allowInfinityPoint&&!tt.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:$t,y:wt}=this.toAffine();if(!tt.isValid($t)||!tt.isValid(wt))throw new Error("bad point: x or y not FE");const St=tt.sqr(wt),Tt=ot($t);if(!tt.eql(St,Tt))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:$t}=this.toAffine();if(tt.isOdd)return!tt.isOdd($t);throw new Error("Field doesn't support isOdd")}equals($t){pt($t);const{px:wt,py:St,pz:Tt}=this,{px:Pt,py:Ot,pz:Nt}=$t,Lt=tt.eql(tt.mul(wt,Nt),tt.mul(Pt,Tt)),Bt=tt.eql(tt.mul(St,Nt),tt.mul(Ot,Tt));return Lt&&Bt}negate(){return new mt(this.px,tt.neg(this.py),this.pz)}double(){const{a:$t,b:wt}=et,St=tt.mul(wt,_3n),{px:Tt,py:Pt,pz:Ot}=this;let Nt=tt.ZERO,Lt=tt.ZERO,Bt=tt.ZERO,Ut=tt.mul(Tt,Tt),Ft=tt.mul(Pt,Pt),zt=tt.mul(Ot,Ot),It=tt.mul(Tt,Pt);return It=tt.add(It,It),Bt=tt.mul(Tt,Ot),Bt=tt.add(Bt,Bt),Nt=tt.mul($t,Bt),Lt=tt.mul(St,zt),Lt=tt.add(Nt,Lt),Nt=tt.sub(Ft,Lt),Lt=tt.add(Ft,Lt),Lt=tt.mul(Nt,Lt),Nt=tt.mul(It,Nt),Bt=tt.mul(St,Bt),zt=tt.mul($t,zt),It=tt.sub(Ut,zt),It=tt.mul($t,It),It=tt.add(It,Bt),Bt=tt.add(Ut,Ut),Ut=tt.add(Bt,Ut),Ut=tt.add(Ut,zt),Ut=tt.mul(Ut,It),Lt=tt.add(Lt,Ut),zt=tt.mul(Pt,Ot),zt=tt.add(zt,zt),Ut=tt.mul(zt,It),Nt=tt.sub(Nt,Ut),Bt=tt.mul(zt,Ft),Bt=tt.add(Bt,Bt),Bt=tt.add(Bt,Bt),new mt(Nt,Lt,Bt)}add($t){pt($t);const{px:wt,py:St,pz:Tt}=this,{px:Pt,py:Ot,pz:Nt}=$t;let Lt=tt.ZERO,Bt=tt.ZERO,Ut=tt.ZERO;const Ft=et.a,zt=tt.mul(et.b,_3n);let It=tt.mul(wt,Pt),vt=tt.mul(St,Ot),Et=tt.mul(Tt,Nt),At=tt.add(wt,St),xt=tt.add(Pt,Ot);At=tt.mul(At,xt),xt=tt.add(It,vt),At=tt.sub(At,xt),xt=tt.add(wt,Tt);let Ct=tt.add(Pt,Nt);return xt=tt.mul(xt,Ct),Ct=tt.add(It,Et),xt=tt.sub(xt,Ct),Ct=tt.add(St,Tt),Lt=tt.add(Ot,Nt),Ct=tt.mul(Ct,Lt),Lt=tt.add(vt,Et),Ct=tt.sub(Ct,Lt),Ut=tt.mul(Ft,xt),Lt=tt.mul(zt,Et),Ut=tt.add(Lt,Ut),Lt=tt.sub(vt,Ut),Ut=tt.add(vt,Ut),Bt=tt.mul(Lt,Ut),vt=tt.add(It,It),vt=tt.add(vt,It),Et=tt.mul(Ft,Et),xt=tt.mul(zt,xt),vt=tt.add(vt,Et),Et=tt.sub(It,Et),Et=tt.mul(Ft,Et),xt=tt.add(xt,Et),It=tt.mul(vt,xt),Bt=tt.add(Bt,It),It=tt.mul(Ct,xt),Lt=tt.mul(At,Lt),Lt=tt.sub(Lt,It),It=tt.mul(At,vt),Ut=tt.mul(Ct,Ut),Ut=tt.add(Ut,It),new mt(Lt,Bt,Ut)}subtract($t){return this.add($t.negate())}is0(){return this.equals(mt.ZERO)}wNAF($t){return gt.wNAFCached(this,ht,$t,wt=>{const St=tt.invertBatch(wt.map(Tt=>Tt.pz));return wt.map((Tt,Pt)=>Tt.toAffine(St[Pt])).map(mt.fromAffine)})}multiplyUnsafe($t){const wt=mt.ZERO;if($t===_0n)return wt;if(ct($t),$t===_1n$1)return this;const{endo:St}=et;if(!St)return gt.unsafeLadder(this,$t);let{k1neg:Tt,k1:Pt,k2neg:Ot,k2:Nt}=St.splitScalar($t),Lt=wt,Bt=wt,Ut=this;for(;Pt>_0n||Nt>_0n;)Pt&_1n$1&&(Lt=Lt.add(Ut)),Nt&_1n$1&&(Bt=Bt.add(Ut)),Ut=Ut.double(),Pt>>=_1n$1,Nt>>=_1n$1;return Tt&&(Lt=Lt.negate()),Ot&&(Bt=Bt.negate()),Bt=new mt(tt.mul(Bt.px,St.beta),Bt.py,Bt.pz),Lt.add(Bt)}multiply($t){ct($t);let wt=$t,St,Tt;const{endo:Pt}=et;if(Pt){const{k1neg:Ot,k1:Nt,k2neg:Lt,k2:Bt}=Pt.splitScalar(wt);let{p:Ut,f:Ft}=this.wNAF(Nt),{p:zt,f:It}=this.wNAF(Bt);Ut=gt.constTimeNegate(Ot,Ut),zt=gt.constTimeNegate(Lt,zt),zt=new mt(tt.mul(zt.px,Pt.beta),zt.py,zt.pz),St=Ut.add(zt),Tt=Ft.add(It)}else{const{p:Ot,f:Nt}=this.wNAF(wt);St=Ot,Tt=Nt}return mt.normalizeZ([St,Tt])[0]}multiplyAndAddUnsafe($t,wt,St){const Tt=mt.BASE,Pt=(Nt,Lt)=>Lt===_0n||Lt===_1n$1||!Nt.equals(Tt)?Nt.multiplyUnsafe(Lt):Nt.multiply(Lt),Ot=Pt(this,wt).add(Pt($t,St));return Ot.is0()?void 0:Ot}toAffine($t){const{px:wt,py:St,pz:Tt}=this,Pt=this.is0();$t==null&&($t=Pt?tt.ONE:tt.inv(Tt));const Ot=tt.mul(wt,$t),Nt=tt.mul(St,$t),Lt=tt.mul(Tt,$t);if(Pt)return{x:tt.ZERO,y:tt.ZERO};if(!tt.eql(Lt,tt.ONE))throw new Error("invZ was invalid");return{x:Ot,y:Nt}}isTorsionFree(){const{h:$t,isTorsionFree:wt}=et;if($t===_1n$1)return!0;if(wt)return wt(mt,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:$t,clearCofactor:wt}=et;return $t===_1n$1?this:wt?wt(mt,this):this.multiplyUnsafe(et.h)}toRawBytes($t=!0){return this.assertValidity(),nt(mt,this,$t)}toHex($t=!0){return bytesToHex(this.toRawBytes($t))}}mt.BASE=new mt(et.Gx,et.Gy,tt.ONE),mt.ZERO=new mt(tt.ZERO,tt.ONE,tt.ZERO);const yt=et.nBitLength,gt=wNAF(mt,et.endo?Math.ceil(yt/2):yt);return{CURVE:et,ProjectivePoint:mt,normPrivateKeyToScalar:dt,weierstrassEquation:ot,isWithinCurveOrder:st}}function validateOpts(_e){const et=validateBasic(_e);return validateObject(et,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...et})}function weierstrass(_e){const et=validateOpts(_e),{Fp:tt,n:nt}=et,at=tt.BYTES+1,ot=2*tt.BYTES+1;function st(xt){return _0n<xt&&xt<tt.ORDER}function ct(xt){return mod$3(xt,nt)}function dt(xt){return invert$2(xt,nt)}const{ProjectivePoint:ht,normPrivateKeyToScalar:pt,weierstrassEquation:mt,isWithinCurveOrder:yt}=weierstrassPoints({...et,toBytes(xt,Ct,Dt){const kt=Ct.toAffine(),Rt=tt.toBytes(kt.x),_t=concatBytes;return Dt?_t(Uint8Array.from([Ct.hasEvenY()?2:3]),Rt):_t(Uint8Array.from([4]),Rt,tt.toBytes(kt.y))},fromBytes(xt){const Ct=xt.length,Dt=xt[0],kt=xt.subarray(1);if(Ct===at&&(Dt===2||Dt===3)){const Rt=bytesToNumberBE(kt);if(!st(Rt))throw new Error("Point is not on curve");const _t=mt(Rt);let Mt=tt.sqrt(_t);const jt=(Mt&_1n$1)===_1n$1;return(Dt&1)===1!==jt&&(Mt=tt.neg(Mt)),{x:Rt,y:Mt}}else if(Ct===ot&&Dt===4){const Rt=tt.fromBytes(kt.subarray(0,tt.BYTES)),_t=tt.fromBytes(kt.subarray(tt.BYTES,2*tt.BYTES));return{x:Rt,y:_t}}else throw new Error(`Point of length ${Ct} was invalid. Expected ${at} compressed bytes or ${ot} uncompressed bytes`)}}),gt=xt=>bytesToHex(numberToBytesBE(xt,et.nByteLength));function bt(xt){const Ct=nt>>_1n$1;return xt>Ct}function $t(xt){return bt(xt)?ct(-xt):xt}const wt=(xt,Ct,Dt)=>bytesToNumberBE(xt.slice(Ct,Dt));class St{constructor(Ct,Dt,kt){this.r=Ct,this.s=Dt,this.recovery=kt,this.assertValidity()}static fromCompact(Ct){const Dt=et.nByteLength;return Ct=ensureBytes("compactSignature",Ct,Dt*2),new St(wt(Ct,0,Dt),wt(Ct,Dt,2*Dt))}static fromDER(Ct){const{r:Dt,s:kt}=DER.toSig(ensureBytes("DER",Ct));return new St(Dt,kt)}assertValidity(){if(!yt(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!yt(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(Ct){return new St(this.r,this.s,Ct)}recoverPublicKey(Ct){const{r:Dt,s:kt,recovery:Rt}=this,_t=Bt(ensureBytes("msgHash",Ct));if(Rt==null||![0,1,2,3].includes(Rt))throw new Error("recovery id invalid");const Mt=Rt===2||Rt===3?Dt+et.n:Dt;if(Mt>=tt.ORDER)throw new Error("recovery id 2 or 3 invalid");const jt=Rt&1?"03":"02",qt=ht.fromHex(jt+gt(Mt)),Gt=dt(Mt),Ht=ct(-_t*Gt),Wt=ct(kt*Gt),Vt=ht.BASE.multiplyAndAddUnsafe(qt,Ht,Wt);if(!Vt)throw new Error("point at infinify");return Vt.assertValidity(),Vt}hasHighS(){return bt(this.s)}normalizeS(){return this.hasHighS()?new St(this.r,ct(-this.s),this.recovery):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){return DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return gt(this.r)+gt(this.s)}}const Tt={isValidPrivateKey(xt){try{return pt(xt),!0}catch{return!1}},normPrivateKeyToScalar:pt,randomPrivateKey:()=>{const xt=getMinHashLength(et.n);return mapHashToField(et.randomBytes(xt),et.n)},precompute(xt=8,Ct=ht.BASE){return Ct._setWindowSize(xt),Ct.multiply(BigInt(3)),Ct}};function Pt(xt,Ct=!0){return ht.fromPrivateKey(xt).toRawBytes(Ct)}function Ot(xt){const Ct=xt instanceof Uint8Array,Dt=typeof xt=="string",kt=(Ct||Dt)&&xt.length;return Ct?kt===at||kt===ot:Dt?kt===2*at||kt===2*ot:xt instanceof ht}function Nt(xt,Ct,Dt=!0){if(Ot(xt))throw new Error("first arg must be private key");if(!Ot(Ct))throw new Error("second arg must be public key");return ht.fromHex(Ct).multiply(pt(xt)).toRawBytes(Dt)}const Lt=et.bits2int||function(xt){const Ct=bytesToNumberBE(xt),Dt=xt.length*8-et.nBitLength;return Dt>0?Ct>>BigInt(Dt):Ct},Bt=et.bits2int_modN||function(xt){return ct(Lt(xt))},Ut=bitMask(et.nBitLength);function Ft(xt){if(typeof xt!="bigint")throw new Error("bigint expected");if(!(_0n<=xt&&xt<Ut))throw new Error(`bigint expected < 2^${et.nBitLength}`);return numberToBytesBE(xt,et.nByteLength)}function zt(xt,Ct,Dt=It){if(["recovered","canonical"].some(Zt=>Zt in Dt))throw new Error("sign() legacy options not supported");const{hash:kt,randomBytes:Rt}=et;let{lowS:_t,prehash:Mt,extraEntropy:jt}=Dt;_t==null&&(_t=!0),xt=ensureBytes("msgHash",xt),Mt&&(xt=ensureBytes("prehashed msgHash",kt(xt)));const qt=Bt(xt),Gt=pt(Ct),Ht=[Ft(Gt),Ft(qt)];if(jt!=null){const Zt=jt===!0?Rt(tt.BYTES):jt;Ht.push(ensureBytes("extraEntropy",Zt))}const Wt=concatBytes(...Ht),Vt=qt;function Kt(Zt){const Qt=Lt(Zt);if(!yt(Qt))return;const Jt=dt(Qt),Yt=ht.BASE.multiply(Qt).toAffine(),ir=ct(Yt.x);if(ir===_0n)return;const Sr=ct(Jt*ct(Vt+ir*Gt));if(Sr===_0n)return;let Tr=(Yt.x===ir?0:2)|Number(Yt.y&_1n$1),br=Sr;return _t&&bt(Sr)&&(br=$t(Sr),Tr^=1),new St(ir,br,Tr)}return{seed:Wt,k2sig:Kt}}const It={lowS:et.lowS,prehash:!1},vt={lowS:et.lowS,prehash:!1};function Et(xt,Ct,Dt=It){const{seed:kt,k2sig:Rt}=zt(xt,Ct,Dt),_t=et;return createHmacDrbg(_t.hash.outputLen,_t.nByteLength,_t.hmac)(kt,Rt)}ht.BASE._setWindowSize(8);function At(xt,Ct,Dt,kt=vt){var Yt;const Rt=xt;if(Ct=ensureBytes("msgHash",Ct),Dt=ensureBytes("publicKey",Dt),"strict"in kt)throw new Error("options.strict was renamed to lowS");const{lowS:_t,prehash:Mt}=kt;let jt,qt;try{if(typeof Rt=="string"||Rt instanceof Uint8Array)try{jt=St.fromDER(Rt)}catch(ir){if(!(ir instanceof DER.Err))throw ir;jt=St.fromCompact(Rt)}else if(typeof Rt=="object"&&typeof Rt.r=="bigint"&&typeof Rt.s=="bigint"){const{r:ir,s:Sr}=Rt;jt=new St(ir,Sr)}else throw new Error("PARSE");qt=ht.fromHex(Dt)}catch(ir){if(ir.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(_t&&jt.hasHighS())return!1;Mt&&(Ct=et.hash(Ct));const{r:Gt,s:Ht}=jt,Wt=Bt(Ct),Vt=dt(Ht),Kt=ct(Wt*Vt),Zt=ct(Gt*Vt),Qt=(Yt=ht.BASE.multiplyAndAddUnsafe(qt,Kt,Zt))==null?void 0:Yt.toAffine();return Qt?ct(Qt.x)===Gt:!1}return{CURVE:et,getPublicKey:Pt,getSharedSecret:Nt,sign:Et,verify:At,ProjectivePoint:ht,Signature:St,utils:Tt}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function getHash(_e){return{hash:_e,hmac:(et,...tt)=>hmac$2(_e,et,concatBytes$1(...tt)),randomBytes:randomBytes$5}}function createCurve(_e,et){const tt=nt=>weierstrass({..._e,...getHash(nt)});return Object.freeze({...tt(et),create:tt})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_1n=BigInt(1),_2n=BigInt(2),divNearest=(_e,et)=>(_e+et/_2n)/et;function sqrtMod(_e){const et=secp256k1P,tt=BigInt(3),nt=BigInt(6),at=BigInt(11),ot=BigInt(22),st=BigInt(23),ct=BigInt(44),dt=BigInt(88),ht=_e*_e*_e%et,pt=ht*ht*_e%et,mt=pow2(pt,tt,et)*pt%et,yt=pow2(mt,tt,et)*pt%et,gt=pow2(yt,_2n,et)*ht%et,bt=pow2(gt,at,et)*gt%et,$t=pow2(bt,ot,et)*bt%et,wt=pow2($t,ct,et)*$t%et,St=pow2(wt,dt,et)*wt%et,Tt=pow2(St,ct,et)*$t%et,Pt=pow2(Tt,tt,et)*pt%et,Ot=pow2(Pt,st,et)*bt%et,Nt=pow2(Ot,nt,et)*ht%et,Lt=pow2(Nt,_2n,et);if(!Fp.eql(Fp.sqr(Lt),_e))throw new Error("Cannot find square root");return Lt}const Fp=Field$3(secp256k1P,void 0,void 0,{sqrt:sqrtMod}),secp256k1$3=createCurve({a:BigInt(0),b:BigInt(7),Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:_e=>{const et=secp256k1N,tt=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),nt=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),at=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ot=tt,st=BigInt("0x100000000000000000000000000000000"),ct=divNearest(ot*_e,et),dt=divNearest(-nt*_e,et);let ht=mod$3(_e-ct*tt-dt*at,et),pt=mod$3(-ct*nt-dt*ot,et);const mt=ht>st,yt=pt>st;if(mt&&(ht=et-ht),yt&&(pt=et-pt),ht>st||pt>st)throw new Error("splitScalar: Endomorphism failed, k="+_e);return{k1neg:mt,k1:ht,k2neg:yt,k2:pt}}}},sha256$5);BigInt(0);secp256k1$3.ProjectivePoint;const ZeroAddress="0x0000000000000000000000000000000000000000",ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000",MessagePrefix=`Ethereum Signed Message:
128
128
  `,BN_0$7=BigInt(0),BN_1$2=BigInt(1),BN_2$2=BigInt(2),BN_27$1=BigInt(27),BN_28$1=BigInt(28),BN_35$1=BigInt(35),_guard$3={};function toUint256(_e){return zeroPadValue(toBeArray(_e),32)}var qu,Hu,Gu,uu,Is;let Signature$7=(Is=class{constructor(et,tt,nt,at){In(this,qu,void 0);In(this,Hu,void 0);In(this,Gu,void 0);In(this,uu,void 0);assertPrivate(et,_guard$3,"Signature"),Yr(this,qu,tt),Yr(this,Hu,nt),Yr(this,Gu,at),Yr(this,uu,null)}get r(){return $r(this,qu)}set r(et){assertArgument(dataLength(et)===32,"invalid r","value",et),Yr(this,qu,hexlify$1(et))}get s(){return $r(this,Hu)}set s(et){assertArgument(dataLength(et)===32,"invalid s","value",et);const tt=hexlify$1(et);assertArgument(parseInt(tt.substring(0,3))<8,"non-canonical s","value",tt),Yr(this,Hu,tt)}get v(){return $r(this,Gu)}set v(et){const tt=getNumber(et,"value");assertArgument(tt===27||tt===28,"invalid v","v",et),Yr(this,Gu,tt)}get networkV(){return $r(this,uu)}get legacyChainId(){const et=this.networkV;return et==null?null:Is.getChainId(et)}get yParity(){return this.v===27?0:1}get yParityAndS(){const et=getBytes(this.s);return this.yParity&&(et[0]|=128),hexlify$1(et)}get compactSerialized(){return concat$2([this.r,this.yParityAndS])}get serialized(){return concat$2([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const et=new Is(_guard$3,this.r,this.s,this.v);return this.networkV&&Yr(et,uu,this.networkV),et}toJSON(){const et=this.networkV;return{_type:"signature",networkV:et!=null?et.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(et){const tt=getBigInt(et,"v");return tt==BN_27$1||tt==BN_28$1?BN_0$7:(assertArgument(tt>=BN_35$1,"invalid EIP-155 v","v",et),(tt-BN_35$1)/BN_2$2)}static getChainIdV(et,tt){return getBigInt(et)*BN_2$2+BigInt(35+tt-27)}static getNormalizedV(et){const tt=getBigInt(et);return tt===BN_0$7||tt===BN_27$1?27:tt===BN_1$2||tt===BN_28$1?28:(assertArgument(tt>=BN_35$1,"invalid v","v",et),tt&BN_1$2?27:28)}static from(et){function tt(ht,pt){assertArgument(ht,pt,"signature",et)}if(et==null)return new Is(_guard$3,ZeroHash,ZeroHash,27);if(typeof et=="string"){const ht=getBytes(et,"signature");if(ht.length===64){const pt=hexlify$1(ht.slice(0,32)),mt=ht.slice(32,64),yt=mt[0]&128?28:27;return mt[0]&=127,new Is(_guard$3,pt,hexlify$1(mt),yt)}if(ht.length===65){const pt=hexlify$1(ht.slice(0,32)),mt=ht.slice(32,64);tt((mt[0]&128)===0,"non-canonical s");const yt=Is.getNormalizedV(ht[64]);return new Is(_guard$3,pt,hexlify$1(mt),yt)}tt(!1,"invalid raw signature length")}if(et instanceof Is)return et.clone();const nt=et.r;tt(nt!=null,"missing r");const at=toUint256(nt),ot=function(ht,pt){if(ht!=null)return toUint256(ht);if(pt!=null){tt(isHexString$1(pt,32),"invalid yParityAndS");const mt=getBytes(pt);return mt[0]&=127,hexlify$1(mt)}tt(!1,"missing s")}(et.s,et.yParityAndS);tt((getBytes(ot)[0]&128)==0,"non-canonical s");const{networkV:st,v:ct}=function(ht,pt,mt){if(ht!=null){const yt=getBigInt(ht);return{networkV:yt>=BN_35$1?yt:void 0,v:Is.getNormalizedV(yt)}}if(pt!=null)return tt(isHexString$1(pt,32),"invalid yParityAndS"),{v:getBytes(pt)[0]&128?28:27};if(mt!=null){switch(getNumber(mt,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}tt(!1,"invalid yParity")}tt(!1,"missing v")}(et.v,et.yParityAndS,et.yParity),dt=new Is(_guard$3,at,ot,ct);return st&&Yr(dt,uu,st),tt(et.yParity==null||getNumber(et.yParity,"sig.yParity")===dt.yParity,"yParity mismatch"),tt(et.yParityAndS==null||et.yParityAndS===dt.yParityAndS,"yParityAndS mismatch"),dt}},qu=new WeakMap,Hu=new WeakMap,Gu=new WeakMap,uu=new WeakMap,Is);var ml,wl;let SigningKey$1=(wl=class{constructor(et){In(this,ml,void 0);assertArgument(dataLength(et)===32,"invalid private key","privateKey","[REDACTED]"),Yr(this,ml,hexlify$1(et))}get privateKey(){return $r(this,ml)}get publicKey(){return wl.computePublicKey($r(this,ml))}get compressedPublicKey(){return wl.computePublicKey($r(this,ml),!0)}sign(et){assertArgument(dataLength(et)===32,"invalid digest length","digest",et);const tt=secp256k1$3.sign(getBytesCopy(et),getBytesCopy($r(this,ml)),{lowS:!0});return Signature$7.from({r:toBeHex(tt.r,32),s:toBeHex(tt.s,32),v:tt.recovery?28:27})}computeSharedSecret(et){const tt=wl.computePublicKey(et);return hexlify$1(secp256k1$3.getSharedSecret(getBytesCopy($r(this,ml)),getBytes(tt),!1))}static computePublicKey(et,tt){let nt=getBytes(et,"key");if(nt.length===32){const ot=secp256k1$3.getPublicKey(nt,!!tt);return hexlify$1(ot)}if(nt.length===64){const ot=new Uint8Array(65);ot[0]=4,ot.set(nt,1),nt=ot}const at=secp256k1$3.ProjectivePoint.fromHex(nt);return hexlify$1(at.toRawBytes(tt))}static recoverPublicKey(et,tt){assertArgument(dataLength(et)===32,"invalid digest length","digest",et);const nt=Signature$7.from(tt);let at=secp256k1$3.Signature.fromCompact(getBytesCopy(concat$2([nt.r,nt.s])));at=at.addRecoveryBit(nt.yParity);const ot=at.recoverPublicKey(getBytesCopy(et));return assertArgument(ot!=null,"invalid signautre for digest","signature",tt),"0x"+ot.toHex(!1)}static addPoints(et,tt,nt){const at=secp256k1$3.ProjectivePoint.fromHex(wl.computePublicKey(et).substring(2)),ot=secp256k1$3.ProjectivePoint.fromHex(wl.computePublicKey(tt).substring(2));return"0x"+at.add(ot).toHex(!!nt)}},ml=new WeakMap,wl);const BN_0$6=BigInt(0),BN_36=BigInt(36);function getChecksumAddress$1(_e){_e=_e.toLowerCase();const et=_e.substring(2).split(""),tt=new Uint8Array(40);for(let at=0;at<40;at++)tt[at]=et[at].charCodeAt(0);const nt=getBytes(keccak256$1(tt));for(let at=0;at<40;at+=2)nt[at>>1]>>4>=8&&(et[at]=et[at].toUpperCase()),(nt[at>>1]&15)>=8&&(et[at+1]=et[at+1].toUpperCase());return"0x"+et.join("")}const ibanLookup$1={};for(let _e=0;_e<10;_e++)ibanLookup$1[String(_e)]=String(_e);for(let _e=0;_e<26;_e++)ibanLookup$1[String.fromCharCode(65+_e)]=String(10+_e);const safeDigits$1=15;function ibanChecksum$1(_e){_e=_e.toUpperCase(),_e=_e.substring(4)+_e.substring(0,2)+"00";let et=_e.split("").map(nt=>ibanLookup$1[nt]).join("");for(;et.length>=safeDigits$1;){let nt=et.substring(0,safeDigits$1);et=parseInt(nt,10)%97+et.substring(nt.length)}let tt=String(98-parseInt(et,10)%97);for(;tt.length<2;)tt="0"+tt;return tt}const Base36=function(){const _e={};for(let et=0;et<36;et++){const tt="0123456789abcdefghijklmnopqrstuvwxyz"[et];_e[tt]=BigInt(et)}return _e}();function fromBase36(_e){_e=_e.toLowerCase();let et=BN_0$6;for(let tt=0;tt<_e.length;tt++)et=et*BN_36+Base36[_e[tt]];return et}function getAddress$1(_e){if(assertArgument(typeof _e=="string","invalid address","address",_e),_e.match(/^(0x)?[0-9a-fA-F]{40}$/)){_e.startsWith("0x")||(_e="0x"+_e);const et=getChecksumAddress$1(_e);return assertArgument(!_e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||et===_e,"bad address checksum","address",_e),et}if(_e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){assertArgument(_e.substring(2,4)===ibanChecksum$1(_e),"bad icap checksum","address",_e);let et=fromBase36(_e.substring(4)).toString(16);for(;et.length<40;)et="0"+et;return getChecksumAddress$1("0x"+et)}assertArgument(!1,"invalid address","address",_e)}function getCreateAddress(_e){const et=getAddress$1(_e.from);let nt=getBigInt(_e.nonce,"tx.nonce").toString(16);return nt==="0"?nt="0x":nt.length%2?nt="0x0"+nt:nt="0x"+nt,getAddress$1(dataSlice(keccak256$1(encodeRlp([et,nt])),12))}function isAddressable(_e){return _e&&typeof _e.getAddress=="function"}async function checkAddress(_e,et){const tt=await et;return(tt==null||tt==="0x0000000000000000000000000000000000000000")&&(assert$y(typeof _e!="string","unconfigured name","UNCONFIGURED_NAME",{value:_e}),assertArgument(!1,"invalid AddressLike value; did not resolve to a value address","target",_e)),getAddress$1(tt)}function resolveAddress(_e,et){if(typeof _e=="string")return _e.match(/^0x[0-9a-f]{40}$/i)?getAddress$1(_e):(assert$y(et!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),checkAddress(_e,et.resolveName(_e)));if(isAddressable(_e))return checkAddress(_e,_e.getAddress());if(_e&&typeof _e.then=="function")return checkAddress(_e,_e);assertArgument(!1,"unsupported addressable value","target",_e)}const _gaurd={};function n$4(_e,et){let tt=!1;return et<0&&(tt=!0,et*=-1),new Typed(_gaurd,`${tt?"":"u"}int${et}`,_e,{signed:tt,width:et})}function b$2(_e,et){return new Typed(_gaurd,`bytes${et||""}`,_e,{size:et})}const _typedSymbol=Symbol.for("_ethers_typed");var cu;const ll=class ll{constructor(et,tt,nt,at){Qr(this,"type");Qr(this,"value");In(this,cu,void 0);Qr(this,"_typedSymbol");at==null&&(at=null),assertPrivate(_gaurd,et,"Typed"),defineProperties$2(this,{_typedSymbol,type:tt,value:nt}),Yr(this,cu,at),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(et=>et.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return $r(this,cu)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return $r(this,cu)===!0?-1:$r(this,cu)===!1?this.value.length:null}static from(et,tt){return new ll(_gaurd,et,tt)}static uint8(et){return n$4(et,8)}static uint16(et){return n$4(et,16)}static uint24(et){return n$4(et,24)}static uint32(et){return n$4(et,32)}static uint40(et){return n$4(et,40)}static uint48(et){return n$4(et,48)}static uint56(et){return n$4(et,56)}static uint64(et){return n$4(et,64)}static uint72(et){return n$4(et,72)}static uint80(et){return n$4(et,80)}static uint88(et){return n$4(et,88)}static uint96(et){return n$4(et,96)}static uint104(et){return n$4(et,104)}static uint112(et){return n$4(et,112)}static uint120(et){return n$4(et,120)}static uint128(et){return n$4(et,128)}static uint136(et){return n$4(et,136)}static uint144(et){return n$4(et,144)}static uint152(et){return n$4(et,152)}static uint160(et){return n$4(et,160)}static uint168(et){return n$4(et,168)}static uint176(et){return n$4(et,176)}static uint184(et){return n$4(et,184)}static uint192(et){return n$4(et,192)}static uint200(et){return n$4(et,200)}static uint208(et){return n$4(et,208)}static uint216(et){return n$4(et,216)}static uint224(et){return n$4(et,224)}static uint232(et){return n$4(et,232)}static uint240(et){return n$4(et,240)}static uint248(et){return n$4(et,248)}static uint256(et){return n$4(et,256)}static uint(et){return n$4(et,256)}static int8(et){return n$4(et,-8)}static int16(et){return n$4(et,-16)}static int24(et){return n$4(et,-24)}static int32(et){return n$4(et,-32)}static int40(et){return n$4(et,-40)}static int48(et){return n$4(et,-48)}static int56(et){return n$4(et,-56)}static int64(et){return n$4(et,-64)}static int72(et){return n$4(et,-72)}static int80(et){return n$4(et,-80)}static int88(et){return n$4(et,-88)}static int96(et){return n$4(et,-96)}static int104(et){return n$4(et,-104)}static int112(et){return n$4(et,-112)}static int120(et){return n$4(et,-120)}static int128(et){return n$4(et,-128)}static int136(et){return n$4(et,-136)}static int144(et){return n$4(et,-144)}static int152(et){return n$4(et,-152)}static int160(et){return n$4(et,-160)}static int168(et){return n$4(et,-168)}static int176(et){return n$4(et,-176)}static int184(et){return n$4(et,-184)}static int192(et){return n$4(et,-192)}static int200(et){return n$4(et,-200)}static int208(et){return n$4(et,-208)}static int216(et){return n$4(et,-216)}static int224(et){return n$4(et,-224)}static int232(et){return n$4(et,-232)}static int240(et){return n$4(et,-240)}static int248(et){return n$4(et,-248)}static int256(et){return n$4(et,-256)}static int(et){return n$4(et,-256)}static bytes1(et){return b$2(et,1)}static bytes2(et){return b$2(et,2)}static bytes3(et){return b$2(et,3)}static bytes4(et){return b$2(et,4)}static bytes5(et){return b$2(et,5)}static bytes6(et){return b$2(et,6)}static bytes7(et){return b$2(et,7)}static bytes8(et){return b$2(et,8)}static bytes9(et){return b$2(et,9)}static bytes10(et){return b$2(et,10)}static bytes11(et){return b$2(et,11)}static bytes12(et){return b$2(et,12)}static bytes13(et){return b$2(et,13)}static bytes14(et){return b$2(et,14)}static bytes15(et){return b$2(et,15)}static bytes16(et){return b$2(et,16)}static bytes17(et){return b$2(et,17)}static bytes18(et){return b$2(et,18)}static bytes19(et){return b$2(et,19)}static bytes20(et){return b$2(et,20)}static bytes21(et){return b$2(et,21)}static bytes22(et){return b$2(et,22)}static bytes23(et){return b$2(et,23)}static bytes24(et){return b$2(et,24)}static bytes25(et){return b$2(et,25)}static bytes26(et){return b$2(et,26)}static bytes27(et){return b$2(et,27)}static bytes28(et){return b$2(et,28)}static bytes29(et){return b$2(et,29)}static bytes30(et){return b$2(et,30)}static bytes31(et){return b$2(et,31)}static bytes32(et){return b$2(et,32)}static address(et){return new ll(_gaurd,"address",et)}static bool(et){return new ll(_gaurd,"bool",!!et)}static bytes(et){return new ll(_gaurd,"bytes",et)}static string(et){return new ll(_gaurd,"string",et)}static array(et,tt){throw new Error("not implemented yet")}static tuple(et,tt){throw new Error("not implemented yet")}static overrides(et){return new ll(_gaurd,"overrides",Object.assign({},et))}static isTyped(et){return et&&typeof et=="object"&&"_typedSymbol"in et&&et._typedSymbol===_typedSymbol}static dereference(et,tt){if(ll.isTyped(et)){if(et.type!==tt)throw new Error(`invalid type: expecetd ${tt}, got ${et.type}`);return et.value}return et}};cu=new WeakMap;let Typed=ll,AddressCoder$1=class extends Coder$1{constructor(et){super("address","address",et,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(et,tt){let nt=Typed.dereference(tt,"string");try{nt=getAddress$1(nt)}catch(at){return this._throwError(at.message,tt)}return et.writeValue(nt)}decode(et){return getAddress$1(toBeHex(et.readValue(),20))}},AnonymousCoder$1=class extends Coder$1{constructor(tt){super(tt.name,tt.type,"_",tt.dynamic);Qr(this,"coder");this.coder=tt}defaultValue(){return this.coder.defaultValue()}encode(tt,nt){return this.coder.encode(tt,nt)}decode(tt){return this.coder.decode(tt)}};function pack$1(_e,et,tt){let nt=[];if(Array.isArray(tt))nt=tt;else if(tt&&typeof tt=="object"){let dt={};nt=et.map(ht=>{const pt=ht.localName;return assert$y(pt,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:ht},value:tt}),assert$y(!dt[pt],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:ht},value:tt}),dt[pt]=!0,tt[pt]})}else assertArgument(!1,"invalid tuple value","tuple",tt);assertArgument(et.length===nt.length,"types/value length mismatch","tuple",tt);let at=new Writer$1,ot=new Writer$1,st=[];et.forEach((dt,ht)=>{let pt=nt[ht];if(dt.dynamic){let mt=ot.length;dt.encode(ot,pt);let yt=at.writeUpdatableValue();st.push(gt=>{yt(gt+mt)})}else dt.encode(at,pt)}),st.forEach(dt=>{dt(at.length)});let ct=_e.appendWriter(at);return ct+=_e.appendWriter(ot),ct}function unpack$1(_e,et){let tt=[],nt=[],at=_e.subReader(0);return et.forEach(ot=>{let st=null;if(ot.dynamic){let ct=_e.readIndex(),dt=at.subReader(ct);try{st=ot.decode(dt)}catch(ht){if(isError$3(ht,"BUFFER_OVERRUN"))throw ht;st=ht,st.baseType=ot.name,st.name=ot.localName,st.type=ot.type}}else try{st=ot.decode(_e)}catch(ct){if(isError$3(ct,"BUFFER_OVERRUN"))throw ct;st=ct,st.baseType=ot.name,st.name=ot.localName,st.type=ot.type}if(st==null)throw new Error("investigate");tt.push(st),nt.push(ot.localName||null)}),Result.fromItems(tt,nt)}let ArrayCoder$1=class extends Coder$1{constructor(tt,nt,at){const ot=tt.type+"["+(nt>=0?nt:"")+"]",st=nt===-1||tt.dynamic;super("array",ot,at,st);Qr(this,"coder");Qr(this,"length");defineProperties$2(this,{coder:tt,length:nt})}defaultValue(){const tt=this.coder.defaultValue(),nt=[];for(let at=0;at<this.length;at++)nt.push(tt);return nt}encode(tt,nt){const at=Typed.dereference(nt,"array");Array.isArray(at)||this._throwError("expected array value",at);let ot=this.length;ot===-1&&(ot=at.length,tt.writeValue(at.length)),assertArgumentCount(at.length,ot,"coder array"+(this.localName?" "+this.localName:""));let st=[];for(let ct=0;ct<at.length;ct++)st.push(this.coder);return pack$1(tt,st,at)}decode(tt){let nt=this.length;nt===-1&&(nt=tt.readIndex(),assert$y(nt*WordSize<=tt.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:tt.bytes,offset:nt*WordSize,length:tt.dataLength}));let at=[];for(let ot=0;ot<nt;ot++)at.push(new AnonymousCoder$1(this.coder));return unpack$1(tt,at)}},BooleanCoder$1=class extends Coder$1{constructor(et){super("bool","bool",et,!1)}defaultValue(){return!1}encode(et,tt){const nt=Typed.dereference(tt,"bool");return et.writeValue(nt?1:0)}decode(et){return!!et.readValue()}},DynamicBytesCoder$1=class extends Coder$1{constructor(et,tt){super(et,et,tt,!0)}defaultValue(){return"0x"}encode(et,tt){tt=getBytesCopy(tt);let nt=et.writeValue(tt.length);return nt+=et.writeBytes(tt),nt}decode(et){return et.readBytes(et.readIndex(),!0)}},BytesCoder$1=class extends DynamicBytesCoder$1{constructor(et){super("bytes",et)}decode(et){return hexlify$1(super.decode(et))}},FixedBytesCoder$1=class extends Coder$1{constructor(tt,nt){let at="bytes"+String(tt);super(at,at,nt,!1);Qr(this,"size");defineProperties$2(this,{size:tt},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(tt,nt){let at=getBytesCopy(Typed.dereference(nt,this.type));return at.length!==this.size&&this._throwError("incorrect data length",nt),tt.writeBytes(at)}decode(tt){return hexlify$1(tt.readBytes(this.size))}};const Empty$3=new Uint8Array([]);let NullCoder$1=class extends Coder$1{constructor(et){super("null","",et,!1)}defaultValue(){return null}encode(et,tt){return tt!=null&&this._throwError("not null",tt),et.writeBytes(Empty$3)}decode(et){return et.readBytes(0),null}};const BN_0$5=BigInt(0),BN_1$1=BigInt(1),BN_MAX_UINT256$1=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");let NumberCoder$1=class extends Coder$1{constructor(tt,nt,at){const ot=(nt?"int":"uint")+tt*8;super(ot,ot,at,!1);Qr(this,"size");Qr(this,"signed");defineProperties$2(this,{size:tt,signed:nt},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(tt,nt){let at=getBigInt(Typed.dereference(nt,this.type)),ot=mask(BN_MAX_UINT256$1,WordSize*8);if(this.signed){let st=mask(ot,this.size*8-1);(at>st||at<-(st+BN_1$1))&&this._throwError("value out-of-bounds",nt),at=toTwos(at,8*WordSize)}else(at<BN_0$5||at>mask(ot,this.size*8))&&this._throwError("value out-of-bounds",nt);return tt.writeValue(at)}decode(tt){let nt=mask(tt.readValue(),this.size*8);return this.signed&&(nt=fromTwos(nt,this.size*8)),nt}},StringCoder$1=class extends DynamicBytesCoder$1{constructor(et){super("string",et)}defaultValue(){return""}encode(et,tt){return super.encode(et,toUtf8Bytes$1(Typed.dereference(tt,"string")))}decode(et){return toUtf8String$1(super.decode(et))}},TupleCoder$1=class extends Coder$1{constructor(tt,nt){let at=!1;const ot=[];tt.forEach(ct=>{ct.dynamic&&(at=!0),ot.push(ct.type)});const st="tuple("+ot.join(",")+")";super("tuple",st,nt,at);Qr(this,"coders");defineProperties$2(this,{coders:Object.freeze(tt.slice())})}defaultValue(){const tt=[];this.coders.forEach(at=>{tt.push(at.defaultValue())});const nt=this.coders.reduce((at,ot)=>{const st=ot.localName;return st&&(at[st]||(at[st]=0),at[st]++),at},{});return this.coders.forEach((at,ot)=>{let st=at.localName;!st||nt[st]!==1||(st==="length"&&(st="_length"),tt[st]==null&&(tt[st]=tt[ot]))}),Object.freeze(tt)}encode(tt,nt){const at=Typed.dereference(nt,"tuple");return pack$1(tt,this.coders,at)}decode(tt){return unpack$1(tt,this.coders)}};function id$2(_e){return keccak256$1(toUtf8Bytes$1(_e))}var COMPRESSED$1="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const FENCED=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),NSM_MAX=4;function decode_arithmetic$1(_e){let et=0;function tt(){return _e[et++]<<8|_e[et++]}let nt=tt(),at=1,ot=[0,1];for(let Nt=1;Nt<nt;Nt++)ot.push(at+=tt());let st=tt(),ct=et;et+=st;let dt=0,ht=0;function pt(){return dt==0&&(ht=ht<<8|_e[et++],dt=8),ht>>--dt&1}const mt=31,yt=2**mt,gt=yt>>>1,bt=gt>>1,$t=yt-1;let wt=0;for(let Nt=0;Nt<mt;Nt++)wt=wt<<1|pt();let St=[],Tt=0,Pt=yt;for(;;){let Nt=Math.floor(((wt-Tt+1)*at-1)/Pt),Lt=0,Bt=nt;for(;Bt-Lt>1;){let zt=Lt+Bt>>>1;Nt<ot[zt]?Bt=zt:Lt=zt}if(Lt==0)break;St.push(Lt);let Ut=Tt+Math.floor(Pt*ot[Lt]/at),Ft=Tt+Math.floor(Pt*ot[Lt+1]/at)-1;for(;!((Ut^Ft)&gt);)wt=wt<<1&$t|pt(),Ut=Ut<<1&$t,Ft=Ft<<1&$t|1;for(;Ut&~Ft&bt;)wt=wt&gt|wt<<1&$t>>>1|pt(),Ut=Ut<<1^gt,Ft=(Ft^gt)<<1|gt|1;Tt=Ut,Pt=1+Ft-Ut}let Ot=nt-4;return St.map(Nt=>{switch(Nt-Ot){case 3:return Ot+65792+(_e[ct++]<<16|_e[ct++]<<8|_e[ct++]);case 2:return Ot+256+(_e[ct++]<<8|_e[ct++]);case 1:return Ot+_e[ct++];default:return Nt-1}})}function read_payload$1(_e){let et=0;return()=>_e[et++]}function read_compressed_payload$1(_e){return read_payload$1(decode_arithmetic$1(unsafe_atob(_e)))}function unsafe_atob(_e){let et=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((at,ot)=>et[at.charCodeAt(0)]=ot);let tt=_e.length,nt=new Uint8Array(6*tt>>3);for(let at=0,ot=0,st=0,ct=0;at<tt;at++)ct=ct<<6|et[_e.charCodeAt(at)],st+=6,st>=8&&(nt[ot++]=ct>>(st-=8));return nt}function signed$1(_e){return _e&1?~_e>>1:_e>>1}function read_deltas$1(_e,et){let tt=Array(_e);for(let nt=0,at=0;nt<_e;nt++)tt[nt]=at+=signed$1(et());return tt}function read_sorted(_e,et=0){let tt=[];for(;;){let nt=_e(),at=_e();if(!at)break;et+=nt;for(let ot=0;ot<at;ot++)tt.push(et+ot);et+=at+1}return tt}function read_sorted_arrays(_e){return read_array_while(()=>{let et=read_sorted(_e);if(et.length)return et})}function read_mapped(_e){let et=[];for(;;){let tt=_e();if(tt==0)break;et.push(read_linear_table$1(tt,_e))}for(;;){let tt=_e()-1;if(tt<0)break;et.push(read_replacement_table$1(tt,_e))}return et.flat()}function read_array_while(_e){let et=[];for(;;){let tt=_e(et.length);if(!tt)break;et.push(tt)}return et}function read_transposed$1(_e,et,tt){let nt=Array(_e).fill().map(()=>[]);for(let at=0;at<et;at++)read_deltas$1(_e,tt).forEach((ot,st)=>nt[st].push(ot));return nt}function read_linear_table$1(_e,et){let tt=1+et(),nt=et(),at=read_array_while(et);return read_transposed$1(at.length,1+_e,et).flatMap((st,ct)=>{let[dt,...ht]=st;return Array(at[ct]).fill().map((pt,mt)=>{let yt=mt*nt;return[dt+mt*tt,ht.map(gt=>gt+yt)]})})}function read_replacement_table$1(_e,et){let tt=1+et();return read_transposed$1(tt,1+_e,et).map(at=>[at[0],at.slice(1)])}function read_trie(_e){let et=[],tt=read_sorted(_e);return at(nt([]),[]),et;function nt(ot){let st=_e(),ct=read_array_while(()=>{let dt=read_sorted(_e).map(ht=>tt[ht]);if(dt.length)return nt(dt)});return{S:st,B:ct,Q:ot}}function at({S:ot,B:st},ct,dt){if(!(ot&4&&dt===ct[ct.length-1])){ot&2&&(dt=ct[ct.length-1]),ot&1&&et.push(ct);for(let ht of st)for(let pt of ht.Q)at(ht,[...ct,pt],dt)}}}function hex_cp(_e){return _e.toString(16).toUpperCase().padStart(2,"0")}function quote_cp(_e){return`{${hex_cp(_e)}}`}function explode_cp$1(_e){let et=[];for(let tt=0,nt=_e.length;tt<nt;){let at=_e.codePointAt(tt);tt+=at<65536?1:2,et.push(at)}return et}function str_from_cps(_e){let tt=_e.length;if(tt<4096)return String.fromCodePoint(..._e);let nt=[];for(let at=0;at<tt;)nt.push(String.fromCodePoint(..._e.slice(at,at+=4096)));return nt.join("")}function compare_arrays(_e,et){let tt=_e.length,nt=tt-et.length;for(let at=0;nt==0&&at<tt;at++)nt=_e[at]-et[at];return nt}var COMPRESSED="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const S0=44032,L0=4352,V0=4449,T0=4519,L_COUNT=19,V_COUNT=21,T_COUNT=28,N_COUNT=V_COUNT*T_COUNT,S_COUNT=L_COUNT*N_COUNT,S1=S0+S_COUNT,L1=L0+L_COUNT,V1=V0+V_COUNT,T1$1=T0+T_COUNT;function unpack_cc(_e){return _e>>24&255}function unpack_cp(_e){return _e&16777215}let SHIFTED_RANK,EXCLUSIONS,DECOMP,RECOMP;function init$1$1(){let _e=read_compressed_payload$1(COMPRESSED);SHIFTED_RANK=new Map(read_sorted_arrays(_e).flatMap((et,tt)=>et.map(nt=>[nt,tt+1<<24]))),EXCLUSIONS=new Set(read_sorted(_e)),DECOMP=new Map,RECOMP=new Map;for(let[et,tt]of read_mapped(_e)){if(!EXCLUSIONS.has(et)&&tt.length==2){let[nt,at]=tt,ot=RECOMP.get(nt);ot||(ot=new Map,RECOMP.set(nt,ot)),ot.set(at,et)}DECOMP.set(et,tt.reverse())}}function is_hangul(_e){return _e>=S0&&_e<S1}function compose_pair(_e,et){if(_e>=L0&&_e<L1&&et>=V0&&et<V1)return S0+(_e-L0)*N_COUNT+(et-V0)*T_COUNT;if(is_hangul(_e)&&et>T0&&et<T1$1&&(_e-S0)%T_COUNT==0)return _e+(et-T0);{let tt=RECOMP.get(_e);return tt&&(tt=tt.get(et),tt)?tt:-1}}function decomposed(_e){SHIFTED_RANK||init$1$1();let et=[],tt=[],nt=!1;function at(ot){let st=SHIFTED_RANK.get(ot);st&&(nt=!0,ot|=st),et.push(ot)}for(let ot of _e)for(;;){if(ot<128)et.push(ot);else if(is_hangul(ot)){let st=ot-S0,ct=st/N_COUNT|0,dt=st%N_COUNT/T_COUNT|0,ht=st%T_COUNT;at(L0+ct),at(V0+dt),ht>0&&at(T0+ht)}else{let st=DECOMP.get(ot);st?tt.push(...st):at(ot)}if(!tt.length)break;ot=tt.pop()}if(nt&&et.length>1){let ot=unpack_cc(et[0]);for(let st=1;st<et.length;st++){let ct=unpack_cc(et[st]);if(ct==0||ot<=ct){ot=ct;continue}let dt=st-1;for(;;){let ht=et[dt+1];if(et[dt+1]=et[dt],et[dt]=ht,!dt||(ot=unpack_cc(et[--dt]),ot<=ct))break}ot=unpack_cc(et[st])}}return et}function composed_from_decomposed(_e){let et=[],tt=[],nt=-1,at=0;for(let ot of _e){let st=unpack_cc(ot),ct=unpack_cp(ot);if(nt==-1)st==0?nt=ct:et.push(ct);else if(at>0&&at>=st)st==0?(et.push(nt,...tt),tt.length=0,nt=ct):tt.push(ct),at=st;else{let dt=compose_pair(nt,ct);dt>=0?nt=dt:at==0&&st==0?(et.push(nt),nt=ct):(tt.push(ct),at=st)}}return nt>=0&&et.push(nt,...tt),et}function nfd(_e){return decomposed(_e).map(unpack_cp)}function nfc$1(_e){return composed_from_decomposed(decomposed(_e))}const HYPHEN$1=45,STOP_CH=".",FE0F=65039,UNIQUE_PH=1,Array_from=_e=>Array.from(_e);function group_has_cp(_e,et){return _e.P.has(et)||_e.Q.has(et)}class Emoji extends Array{get is_emoji(){return!0}}let MAPPED$1,IGNORED$1,CM,NSM,ESCAPE,GROUPS,WHOLE_VALID,WHOLE_MAP,VALID$1,EMOJI_LIST,EMOJI_ROOT$1;function init$3(){if(MAPPED$1)return;let _e=read_compressed_payload$1(COMPRESSED$1);const et=()=>read_sorted(_e),tt=()=>new Set(et()),nt=(pt,mt)=>mt.forEach(yt=>pt.add(yt));MAPPED$1=new Map(read_mapped(_e)),IGNORED$1=tt(),CM=et(),NSM=new Set(et().map(pt=>CM[pt])),CM=new Set(CM),ESCAPE=tt(),tt();let at=read_sorted_arrays(_e),ot=_e();const st=()=>{let pt=new Set;return et().forEach(mt=>nt(pt,at[mt])),nt(pt,et()),pt};GROUPS=read_array_while(pt=>{let mt=read_array_while(_e).map(yt=>yt+96);if(mt.length){let yt=pt>=ot;mt[0]-=32,mt=str_from_cps(mt),yt&&(mt=`Restricted[${mt}]`);let gt=st(),bt=st(),$t=!_e();return{N:mt,P:gt,Q:bt,M:$t,R:yt}}}),WHOLE_VALID=tt(),WHOLE_MAP=new Map;let ct=et().concat(Array_from(WHOLE_VALID)).sort((pt,mt)=>pt-mt);ct.forEach((pt,mt)=>{let yt=_e(),gt=ct[mt]=yt?ct[mt-yt]:{V:[],M:new Map};gt.V.push(pt),WHOLE_VALID.has(pt)||WHOLE_MAP.set(pt,gt)});for(let{V:pt,M:mt}of new Set(WHOLE_MAP.values())){let yt=[];for(let bt of pt){let $t=GROUPS.filter(St=>group_has_cp(St,bt)),wt=yt.find(({G:St})=>$t.some(Tt=>St.has(Tt)));wt||(wt={G:new Set,V:[]},yt.push(wt)),wt.V.push(bt),nt(wt.G,$t)}let gt=yt.flatMap(bt=>Array_from(bt.G));for(let{G:bt,V:$t}of yt){let wt=new Set(gt.filter(St=>!bt.has(St)));for(let St of $t)mt.set(St,wt)}}VALID$1=new Set;let dt=new Set;const ht=pt=>VALID$1.has(pt)?dt.add(pt):VALID$1.add(pt);for(let pt of GROUPS){for(let mt of pt.P)ht(mt);for(let mt of pt.Q)ht(mt)}for(let pt of VALID$1)!WHOLE_MAP.has(pt)&&!dt.has(pt)&&WHOLE_MAP.set(pt,UNIQUE_PH);nt(VALID$1,nfd(VALID$1)),EMOJI_LIST=read_trie(_e).map(pt=>Emoji.from(pt)).sort(compare_arrays),EMOJI_ROOT$1=new Map;for(let pt of EMOJI_LIST){let mt=[EMOJI_ROOT$1];for(let yt of pt){let gt=mt.map(bt=>{let $t=bt.get(yt);return $t||($t=new Map,bt.set(yt,$t)),$t});yt===FE0F?mt.push(...gt):mt=gt}for(let yt of mt)yt.V=pt}}function quoted_cp(_e){return(should_escape(_e)?"":`${bidi_qq(safe_str_from_cps([_e]))} `)+quote_cp(_e)}function bidi_qq(_e){return`"${_e}"‎`}function check_label_extension(_e){if(_e.length>=4&&_e[2]==HYPHEN$1&&_e[3]==HYPHEN$1)throw new Error(`invalid label extension: "${str_from_cps(_e.slice(0,4))}"`)}function check_leading_underscore(_e){for(let tt=_e.lastIndexOf(95);tt>0;)if(_e[--tt]!==95)throw new Error("underscore allowed only at start")}function check_fenced(_e){let et=_e[0],tt=FENCED.get(et);if(tt)throw error_placement(`leading ${tt}`);let nt=_e.length,at=-1;for(let ot=1;ot<nt;ot++){et=_e[ot];let st=FENCED.get(et);if(st){if(at==ot)throw error_placement(`${tt} + ${st}`);at=ot+1,tt=st}}if(at==nt)throw error_placement(`trailing ${tt}`)}function safe_str_from_cps(_e,et=1/0,tt=quote_cp){let nt=[];is_combining_mark(_e[0])&&nt.push("◌"),_e.length>et&&(et>>=1,_e=[..._e.slice(0,et),8230,..._e.slice(-et)]);let at=0,ot=_e.length;for(let st=0;st<ot;st++){let ct=_e[st];should_escape(ct)&&(nt.push(str_from_cps(_e.slice(at,st))),nt.push(tt(ct)),at=st+1)}return nt.push(str_from_cps(_e.slice(at,ot))),nt.join("")}function is_combining_mark(_e){return init$3(),CM.has(_e)}function should_escape(_e){return init$3(),ESCAPE.has(_e)}function ens_normalize$1(_e){return flatten$3(split$2(_e,nfc$1,filter_fe0f$1))}function split$2(_e,et,tt){if(!_e)return[];init$3();let nt=0;return _e.split(STOP_CH).map(at=>{let ot=explode_cp$1(at),st={input:ot,offset:nt};nt+=ot.length+1;try{let ct=st.tokens=tokens_from_str(ot,et,tt),dt=ct.length,ht;if(!dt)throw new Error("empty label");let pt=st.output=ct.flat();if(check_leading_underscore(pt),!(st.emoji=dt>1||ct[0].is_emoji)&&pt.every(yt=>yt<128))check_label_extension(pt),ht="ASCII";else{let yt=ct.flatMap(gt=>gt.is_emoji?[]:gt);if(!yt.length)ht="Emoji";else{if(CM.has(pt[0]))throw error_placement("leading combining mark");for(let $t=1;$t<dt;$t++){let wt=ct[$t];if(!wt.is_emoji&&CM.has(wt[0]))throw error_placement(`emoji + combining mark: "${str_from_cps(ct[$t-1])} + ${safe_str_from_cps([wt[0]])}"`)}check_fenced(pt);let gt=Array_from(new Set(yt)),[bt]=determine_group(gt);check_group(bt,yt),check_whole(bt,gt),ht=bt.N}}st.type=ht}catch(ct){st.error=ct}return st})}function check_whole(_e,et){let tt,nt=[];for(let at of et){let ot=WHOLE_MAP.get(at);if(ot===UNIQUE_PH)return;if(ot){let st=ot.M.get(at);if(tt=tt?tt.filter(ct=>st.has(ct)):Array_from(st),!tt.length)return}else nt.push(at)}if(tt){for(let at of tt)if(nt.every(ot=>group_has_cp(at,ot)))throw new Error(`whole-script confusable: ${_e.N}/${at.N}`)}}function determine_group(_e){let et=GROUPS;for(let tt of _e){let nt=et.filter(at=>group_has_cp(at,tt));if(!nt.length)throw GROUPS.some(at=>group_has_cp(at,tt))?error_group_member(et[0],tt):error_disallowed(tt);if(et=nt,nt.length==1)break}return et}function flatten$3(_e){return _e.map(({input:et,error:tt,output:nt})=>{if(tt){let at=tt.message;throw new Error(_e.length==1?at:`Invalid label ${bidi_qq(safe_str_from_cps(et,63))}: ${at}`)}return str_from_cps(nt)}).join(STOP_CH)}function error_disallowed(_e){return new Error(`disallowed character: ${quoted_cp(_e)}`)}function error_group_member(_e,et){let tt=quoted_cp(et),nt=GROUPS.find(at=>at.P.has(et));return nt&&(tt=`${nt.N} ${tt}`),new Error(`illegal mixture: ${_e.N} + ${tt}`)}function error_placement(_e){return new Error(`illegal placement: ${_e}`)}function check_group(_e,et){for(let tt of et)if(!group_has_cp(_e,tt))throw error_group_member(_e,tt);if(_e.M){let tt=nfd(et);for(let nt=1,at=tt.length;nt<at;nt++)if(NSM.has(tt[nt])){let ot=nt+1;for(let st;ot<at&&NSM.has(st=tt[ot]);ot++)for(let ct=nt;ct<ot;ct++)if(tt[ct]==st)throw new Error(`duplicate non-spacing marks: ${quoted_cp(st)}`);if(ot-nt>NSM_MAX)throw new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(tt.slice(nt-1,ot)))} (${ot-nt}/${NSM_MAX})`);nt=ot}}}function tokens_from_str(_e,et,tt){let nt=[],at=[];for(_e=_e.slice().reverse();_e.length;){let ot=consume_emoji_reversed$1(_e);if(ot)at.length&&(nt.push(et(at)),at=[]),nt.push(tt(ot));else{let st=_e.pop();if(VALID$1.has(st))at.push(st);else{let ct=MAPPED$1.get(st);if(ct)at.push(...ct);else if(!IGNORED$1.has(st))throw error_disallowed(st)}}}return at.length&&nt.push(et(at)),nt}function filter_fe0f$1(_e){return _e.filter(et=>et!=FE0F)}function consume_emoji_reversed$1(_e,et){let tt=EMOJI_ROOT$1,nt,at=_e.length;for(;at&&(tt=tt.get(_e[--at]),!!tt);){let{V:ot}=tt;ot&&(nt=ot,et&&et.push(..._e.slice(at).reverse()),_e.length=at)}return nt}const Zeros$1=new Uint8Array(32);Zeros$1.fill(0);function checkComponent$1(_e){return assertArgument(_e.length!==0,"invalid ENS name; empty component","comp",_e),_e}function ensNameSplit$1(_e){const et=toUtf8Bytes$1(ensNormalize(_e)),tt=[];if(_e.length===0)return tt;let nt=0;for(let at=0;at<et.length;at++)et[at]===46&&(tt.push(checkComponent$1(et.slice(nt,at))),nt=at+1);return assertArgument(nt<et.length,"invalid ENS name; empty component","name",_e),tt.push(checkComponent$1(et.slice(nt))),tt}function ensNormalize(_e){try{if(_e.length===0)throw new Error("empty label");return ens_normalize$1(_e)}catch(et){assertArgument(!1,`invalid ENS name (${et.message})`,"name",_e)}}function namehash$1(_e){assertArgument(typeof _e=="string","invalid ENS name; not a string","name",_e),assertArgument(_e.length,"invalid ENS name (empty label)","name",_e);let et=Zeros$1;const tt=ensNameSplit$1(_e);for(;tt.length;)et=keccak256$1(concat$2([et,keccak256$1(tt.pop())]));return hexlify$1(et)}function dnsEncode$1(_e,et){const tt=et??63;return assertArgument(tt<=255,"DNS encoded label cannot exceed 255","length",tt),hexlify$1(concat$2(ensNameSplit$1(_e).map(nt=>{assertArgument(nt.length<=tt,`label ${JSON.stringify(_e)} exceeds ${tt} bytes`,"name",_e);const at=new Uint8Array(nt.length+1);return at.set(nt,1),at[0]=at.length-1,at})))+"00"}function accessSetify$1(_e,et){return{address:getAddress$1(_e),storageKeys:et.map((tt,nt)=>(assertArgument(isHexString$1(tt,32),"invalid slot",`storageKeys[${nt}]`,tt),tt.toLowerCase()))}}function accessListify$1(_e){if(Array.isArray(_e))return _e.map((tt,nt)=>Array.isArray(tt)?(assertArgument(tt.length===2,"invalid slot set",`value[${nt}]`,tt),accessSetify$1(tt[0],tt[1])):(assertArgument(tt!=null&&typeof tt=="object","invalid address-slot set","value",_e),accessSetify$1(tt.address,tt.storageKeys)));assertArgument(_e!=null&&typeof _e=="object","invalid access list","value",_e);const et=Object.keys(_e).map(tt=>{const nt=_e[tt].reduce((at,ot)=>(at[ot]=!0,at),{});return accessSetify$1(tt,Object.keys(nt).sort())});return et.sort((tt,nt)=>tt.address.localeCompare(nt.address)),et}function computeAddress$2(_e){let et;return typeof _e=="string"?et=SigningKey$1.computePublicKey(_e,!1):et=_e.publicKey,getAddress$1(keccak256$1("0x"+et.substring(4)).substring(26))}function recoverAddress$1(_e,et){return computeAddress$2(SigningKey$1.recoverPublicKey(_e,et))}const BN_0$4=BigInt(0),BN_2$1=BigInt(2),BN_27=BigInt(27),BN_28=BigInt(28),BN_35=BigInt(35),BN_MAX_UINT=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function handleAddress$1(_e){return _e==="0x"?null:getAddress$1(_e)}function handleAccessList(_e,et){try{return accessListify$1(_e)}catch(tt){assertArgument(!1,tt.message,et,_e)}}function handleNumber$1(_e,et){return _e==="0x"?0:getNumber(_e,et)}function handleUint(_e,et){if(_e==="0x")return BN_0$4;const tt=getBigInt(_e,et);return assertArgument(tt<=BN_MAX_UINT,"value exceeds uint size",et,tt),tt}function formatNumber$2(_e,et){const tt=getBigInt(_e,"value"),nt=toBeArray(tt);return assertArgument(nt.length<=32,"value too large",`tx.${et}`,tt),nt}function formatAccessList$1(_e){return accessListify$1(_e).map(et=>[et.address,et.storageKeys])}function formatHashes(_e,et){assertArgument(Array.isArray(_e),`invalid ${et}`,"value",_e);for(let tt=0;tt<_e.length;tt++)assertArgument(isHexString$1(_e[tt],32),"invalid ${ param } hash",`value[${tt}]`,_e[tt]);return _e}function _parseLegacy(_e){const et=decodeRlp(_e);assertArgument(Array.isArray(et)&&(et.length===9||et.length===6),"invalid field count for legacy transaction","data",_e);const tt={type:0,nonce:handleNumber$1(et[0],"nonce"),gasPrice:handleUint(et[1],"gasPrice"),gasLimit:handleUint(et[2],"gasLimit"),to:handleAddress$1(et[3]),value:handleUint(et[4],"value"),data:hexlify$1(et[5]),chainId:BN_0$4};if(et.length===6)return tt;const nt=handleUint(et[6],"v"),at=handleUint(et[7],"r"),ot=handleUint(et[8],"s");if(at===BN_0$4&&ot===BN_0$4)tt.chainId=nt;else{let st=(nt-BN_35)/BN_2$1;st<BN_0$4&&(st=BN_0$4),tt.chainId=st,assertArgument(st!==BN_0$4||nt===BN_27||nt===BN_28,"non-canonical legacy v","v",et[6]),tt.signature=Signature$7.from({r:zeroPadValue(et[7],32),s:zeroPadValue(et[8],32),v:nt}),tt.hash=keccak256$1(_e)}return tt}function _serializeLegacy(_e,et){const tt=[formatNumber$2(_e.nonce,"nonce"),formatNumber$2(_e.gasPrice||0,"gasPrice"),formatNumber$2(_e.gasLimit,"gasLimit"),_e.to||"0x",formatNumber$2(_e.value,"value"),_e.data];let nt=BN_0$4;if(_e.chainId!=BN_0$4)nt=getBigInt(_e.chainId,"tx.chainId"),assertArgument(!et||et.networkV==null||et.legacyChainId===nt,"tx.chainId/sig.v mismatch","sig",et);else if(_e.signature){const ot=_e.signature.legacyChainId;ot!=null&&(nt=ot)}if(!et)return nt!==BN_0$4&&(tt.push(toBeArray(nt)),tt.push("0x"),tt.push("0x")),encodeRlp(tt);let at=BigInt(27+et.yParity);return nt!==BN_0$4?at=Signature$7.getChainIdV(nt,et.v):BigInt(et.v)!==at&&assertArgument(!1,"tx.chainId/sig.v mismatch","sig",et),tt.push(toBeArray(at)),tt.push(toBeArray(et.r)),tt.push(toBeArray(et.s)),encodeRlp(tt)}function _parseEipSignature$1(_e,et){let tt;try{if(tt=handleNumber$1(et[0],"yParity"),tt!==0&&tt!==1)throw new Error("bad yParity")}catch{assertArgument(!1,"invalid yParity","yParity",et[0])}const nt=zeroPadValue(et[1],32),at=zeroPadValue(et[2],32),ot=Signature$7.from({r:nt,s:at,yParity:tt});_e.signature=ot}function _parseEip1559$1(_e){const et=decodeRlp(getBytes(_e).slice(1));assertArgument(Array.isArray(et)&&(et.length===9||et.length===12),"invalid field count for transaction type: 2","data",hexlify$1(_e));const tt={type:2,chainId:handleUint(et[0],"chainId"),nonce:handleNumber$1(et[1],"nonce"),maxPriorityFeePerGas:handleUint(et[2],"maxPriorityFeePerGas"),maxFeePerGas:handleUint(et[3],"maxFeePerGas"),gasPrice:null,gasLimit:handleUint(et[4],"gasLimit"),to:handleAddress$1(et[5]),value:handleUint(et[6],"value"),data:hexlify$1(et[7]),accessList:handleAccessList(et[8],"accessList")};return et.length===9||(tt.hash=keccak256$1(_e),_parseEipSignature$1(tt,et.slice(9))),tt}function _serializeEip1559$1(_e,et){const tt=[formatNumber$2(_e.chainId,"chainId"),formatNumber$2(_e.nonce,"nonce"),formatNumber$2(_e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber$2(_e.maxFeePerGas||0,"maxFeePerGas"),formatNumber$2(_e.gasLimit,"gasLimit"),_e.to||"0x",formatNumber$2(_e.value,"value"),_e.data,formatAccessList$1(_e.accessList||[])];return et&&(tt.push(formatNumber$2(et.yParity,"yParity")),tt.push(toBeArray(et.r)),tt.push(toBeArray(et.s))),concat$2(["0x02",encodeRlp(tt)])}function _parseEip2930$1(_e){const et=decodeRlp(getBytes(_e).slice(1));assertArgument(Array.isArray(et)&&(et.length===8||et.length===11),"invalid field count for transaction type: 1","data",hexlify$1(_e));const tt={type:1,chainId:handleUint(et[0],"chainId"),nonce:handleNumber$1(et[1],"nonce"),gasPrice:handleUint(et[2],"gasPrice"),gasLimit:handleUint(et[3],"gasLimit"),to:handleAddress$1(et[4]),value:handleUint(et[5],"value"),data:hexlify$1(et[6]),accessList:handleAccessList(et[7],"accessList")};return et.length===8||(tt.hash=keccak256$1(_e),_parseEipSignature$1(tt,et.slice(8))),tt}function _serializeEip2930$1(_e,et){const tt=[formatNumber$2(_e.chainId,"chainId"),formatNumber$2(_e.nonce,"nonce"),formatNumber$2(_e.gasPrice||0,"gasPrice"),formatNumber$2(_e.gasLimit,"gasLimit"),_e.to||"0x",formatNumber$2(_e.value,"value"),_e.data,formatAccessList$1(_e.accessList||[])];return et&&(tt.push(formatNumber$2(et.yParity,"recoveryParam")),tt.push(toBeArray(et.r)),tt.push(toBeArray(et.s))),concat$2(["0x01",encodeRlp(tt)])}function _parseEip4844(_e){const et=decodeRlp(getBytes(_e).slice(1));assertArgument(Array.isArray(et)&&(et.length===11||et.length===14),"invalid field count for transaction type: 3","data",hexlify$1(_e));const tt={type:3,chainId:handleUint(et[0],"chainId"),nonce:handleNumber$1(et[1],"nonce"),maxPriorityFeePerGas:handleUint(et[2],"maxPriorityFeePerGas"),maxFeePerGas:handleUint(et[3],"maxFeePerGas"),gasPrice:null,gasLimit:handleUint(et[4],"gasLimit"),to:handleAddress$1(et[5]),value:handleUint(et[6],"value"),data:hexlify$1(et[7]),accessList:handleAccessList(et[8],"accessList"),maxFeePerBlobGas:handleUint(et[9],"maxFeePerBlobGas"),blobVersionedHashes:et[10]};assertArgument(tt.to!=null,"invalid address for transaction type: 3","data",_e),assertArgument(Array.isArray(tt.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",_e);for(let nt=0;nt<tt.blobVersionedHashes.length;nt++)assertArgument(isHexString$1(tt.blobVersionedHashes[nt],32),`invalid blobVersionedHash at index ${nt}: must be length 32`,"data",_e);return et.length===11||(tt.hash=keccak256$1(_e),_parseEipSignature$1(tt,et.slice(11))),tt}function _serializeEip4844(_e,et){const tt=[formatNumber$2(_e.chainId,"chainId"),formatNumber$2(_e.nonce,"nonce"),formatNumber$2(_e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber$2(_e.maxFeePerGas||0,"maxFeePerGas"),formatNumber$2(_e.gasLimit,"gasLimit"),_e.to||ZeroAddress,formatNumber$2(_e.value,"value"),_e.data,formatAccessList$1(_e.accessList||[]),formatNumber$2(_e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),formatHashes(_e.blobVersionedHashes||[],"blobVersionedHashes")];return et&&(tt.push(formatNumber$2(et.yParity,"yParity")),tt.push(toBeArray(et.r)),tt.push(toBeArray(et.s))),concat$2(["0x03",encodeRlp(tt)])}var Ws,zu,Vu,Wu,Ku,Yu,Xu,Zu,Qu,Ju,_f,_d,fu,du;const ul=class ul{constructor(){In(this,Ws,void 0);In(this,zu,void 0);In(this,Vu,void 0);In(this,Wu,void 0);In(this,Ku,void 0);In(this,Yu,void 0);In(this,Xu,void 0);In(this,Zu,void 0);In(this,Qu,void 0);In(this,Ju,void 0);In(this,_f,void 0);In(this,_d,void 0);In(this,fu,void 0);In(this,du,void 0);Yr(this,Ws,null),Yr(this,zu,null),Yr(this,Wu,0),Yr(this,Ku,BN_0$4),Yr(this,Yu,null),Yr(this,Xu,null),Yr(this,Zu,null),Yr(this,Vu,"0x"),Yr(this,Qu,BN_0$4),Yr(this,Ju,BN_0$4),Yr(this,_f,null),Yr(this,_d,null),Yr(this,fu,null),Yr(this,du,null)}get type(){return $r(this,Ws)}set type(et){switch(et){case null:Yr(this,Ws,null);break;case 0:case"legacy":Yr(this,Ws,0);break;case 1:case"berlin":case"eip-2930":Yr(this,Ws,1);break;case 2:case"london":case"eip-1559":Yr(this,Ws,2);break;case 3:case"cancun":case"eip-4844":Yr(this,Ws,3);break;default:assertArgument(!1,"unsupported transaction type","type",et)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const et=$r(this,zu);return et==null&&this.type===3?ZeroAddress:et}set to(et){Yr(this,zu,et==null?null:getAddress$1(et))}get nonce(){return $r(this,Wu)}set nonce(et){Yr(this,Wu,getNumber(et,"value"))}get gasLimit(){return $r(this,Ku)}set gasLimit(et){Yr(this,Ku,getBigInt(et))}get gasPrice(){const et=$r(this,Yu);return et==null&&(this.type===0||this.type===1)?BN_0$4:et}set gasPrice(et){Yr(this,Yu,et==null?null:getBigInt(et,"gasPrice"))}get maxPriorityFeePerGas(){const et=$r(this,Xu);return et??(this.type===2||this.type===3?BN_0$4:null)}set maxPriorityFeePerGas(et){Yr(this,Xu,et==null?null:getBigInt(et,"maxPriorityFeePerGas"))}get maxFeePerGas(){const et=$r(this,Zu);return et??(this.type===2||this.type===3?BN_0$4:null)}set maxFeePerGas(et){Yr(this,Zu,et==null?null:getBigInt(et,"maxFeePerGas"))}get data(){return $r(this,Vu)}set data(et){Yr(this,Vu,hexlify$1(et))}get value(){return $r(this,Qu)}set value(et){Yr(this,Qu,getBigInt(et,"value"))}get chainId(){return $r(this,Ju)}set chainId(et){Yr(this,Ju,getBigInt(et))}get signature(){return $r(this,_f)||null}set signature(et){Yr(this,_f,et==null?null:Signature$7.from(et))}get accessList(){const et=$r(this,_d)||null;return et??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(et){Yr(this,_d,et==null?null:accessListify$1(et))}get maxFeePerBlobGas(){const et=$r(this,fu);return et==null&&this.type===3?BN_0$4:et}set maxFeePerBlobGas(et){Yr(this,fu,et==null?null:getBigInt(et,"maxFeePerBlobGas"))}get blobVersionedHashes(){let et=$r(this,du);return et==null&&this.type===3?[]:et}set blobVersionedHashes(et){if(et!=null){assertArgument(Array.isArray(et),"blobVersionedHashes must be an Array","value",et),et=et.slice();for(let tt=0;tt<et.length;tt++)assertArgument(isHexString$1(et[tt],32),"invalid blobVersionedHash",`value[${tt}]`,et[tt])}Yr(this,du,et)}get hash(){return this.signature==null?null:keccak256$1(this.serialized)}get unsignedHash(){return keccak256$1(this.unsignedSerialized)}get from(){return this.signature==null?null:recoverAddress$1(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:SigningKey$1.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(assert$y(this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"}),this.inferType()){case 0:return _serializeLegacy(this,this.signature);case 1:return _serializeEip2930$1(this,this.signature);case 2:return _serializeEip1559$1(this,this.signature);case 3:return _serializeEip4844(this,this.signature)}assert$y(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return _serializeLegacy(this);case 1:return _serializeEip2930$1(this);case 2:return _serializeEip1559$1(this);case 3:return _serializeEip4844(this)}assert$y(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".unsignedSerialized"})}inferType(){const et=this.inferTypes();return et.indexOf(2)>=0?2:et.pop()}inferTypes(){const et=this.gasPrice!=null,tt=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,nt=this.accessList!=null,at=$r(this,fu)!=null||$r(this,du);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&assert$y(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),assert$y(!tt||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),assert$y(this.type!==0||!nt,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const ot=[];return this.type!=null?ot.push(this.type):tt?ot.push(2):et?(ot.push(1),nt||ot.push(0)):nt?(ot.push(1),ot.push(2)):(at&&this.to||(ot.push(0),ot.push(1),ot.push(2)),ot.push(3)),ot.sort(),ot}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return ul.from(this)}toJSON(){const et=tt=>tt==null?null:tt.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:et(this.gasLimit),gasPrice:et(this.gasPrice),maxPriorityFeePerGas:et(this.maxPriorityFeePerGas),maxFeePerGas:et(this.maxFeePerGas),value:et(this.value),chainId:et(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(et){if(et==null)return new ul;if(typeof et=="string"){const nt=getBytes(et);if(nt[0]>=127)return ul.from(_parseLegacy(nt));switch(nt[0]){case 1:return ul.from(_parseEip2930$1(nt));case 2:return ul.from(_parseEip1559$1(nt));case 3:return ul.from(_parseEip4844(nt))}assert$y(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const tt=new ul;return et.type!=null&&(tt.type=et.type),et.to!=null&&(tt.to=et.to),et.nonce!=null&&(tt.nonce=et.nonce),et.gasLimit!=null&&(tt.gasLimit=et.gasLimit),et.gasPrice!=null&&(tt.gasPrice=et.gasPrice),et.maxPriorityFeePerGas!=null&&(tt.maxPriorityFeePerGas=et.maxPriorityFeePerGas),et.maxFeePerGas!=null&&(tt.maxFeePerGas=et.maxFeePerGas),et.maxFeePerBlobGas!=null&&(tt.maxFeePerBlobGas=et.maxFeePerBlobGas),et.data!=null&&(tt.data=et.data),et.value!=null&&(tt.value=et.value),et.chainId!=null&&(tt.chainId=et.chainId),et.signature!=null&&(tt.signature=Signature$7.from(et.signature)),et.accessList!=null&&(tt.accessList=et.accessList),et.blobVersionedHashes!=null&&(tt.blobVersionedHashes=et.blobVersionedHashes),et.hash!=null&&(assertArgument(tt.isSigned(),"unsigned transaction cannot define hash","tx",et),assertArgument(tt.hash===et.hash,"hash mismatch","tx",et)),et.from!=null&&(assertArgument(tt.isSigned(),"unsigned transaction cannot define from","tx",et),assertArgument(tt.from.toLowerCase()===(et.from||"").toLowerCase(),"from mismatch","tx",et)),tt}};Ws=new WeakMap,zu=new WeakMap,Vu=new WeakMap,Wu=new WeakMap,Ku=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,Qu=new WeakMap,Ju=new WeakMap,_f=new WeakMap,_d=new WeakMap,fu=new WeakMap,du=new WeakMap;let Transaction=ul;function hashMessage(_e){return typeof _e=="string"&&(_e=toUtf8Bytes$1(_e)),keccak256$1(concat$2([toUtf8Bytes$1(MessagePrefix),toUtf8Bytes$1(String(_e.length)),_e]))}const padding$1=new Uint8Array(32);padding$1.fill(0);const BN__1=BigInt(-1),BN_0$3=BigInt(0),BN_1=BigInt(1),BN_MAX_UINT256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hexPadRight$1(_e){const et=getBytes(_e),tt=et.length%32;return tt?concat$2([et,padding$1.slice(tt)]):hexlify$1(et)}const hexTrue$1=toBeHex(BN_1,32),hexFalse$1=toBeHex(BN_0$3,32),domainFieldTypes$1={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},domainFieldNames$1=["name","version","chainId","verifyingContract","salt"];function checkString$1(_e){return function(et){return assertArgument(typeof et=="string",`invalid domain value for ${JSON.stringify(_e)}`,`domain.${_e}`,et),et}}const domainChecks$1={name:checkString$1("name"),version:checkString$1("version"),chainId:function(_e){const et=getBigInt(_e,"domain.chainId");return assertArgument(et>=0,"invalid chain ID","domain.chainId",_e),Number.isSafeInteger(et)?Number(et):toQuantity(et)},verifyingContract:function(_e){try{return getAddress$1(_e).toLowerCase()}catch{}assertArgument(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",_e)},salt:function(_e){const et=getBytes(_e,"domain.salt");return assertArgument(et.length===32,'invalid domain value "salt"',"domain.salt",_e),hexlify$1(et)}};function getBaseEncoder$1(_e){{const et=_e.match(/^(u?)int(\d+)$/);if(et){const tt=et[1]==="",nt=parseInt(et[2]);assertArgument(nt%8===0&&nt!==0&&nt<=256&&et[2]===String(nt),"invalid numeric width","type",_e);const at=mask(BN_MAX_UINT256,tt?nt-1:nt),ot=tt?(at+BN_1)*BN__1:BN_0$3;return function(st){const ct=getBigInt(st,"value");return assertArgument(ct>=ot&&ct<=at,`value out-of-bounds for ${_e}`,"value",ct),toBeHex(tt?toTwos(ct,256):ct,32)}}}{const et=_e.match(/^bytes(\d+)$/);if(et){const tt=parseInt(et[1]);return assertArgument(tt!==0&&tt<=32&&et[1]===String(tt),"invalid bytes width","type",_e),function(nt){const at=getBytes(nt);return assertArgument(at.length===tt,`invalid length for ${_e}`,"value",nt),hexPadRight$1(nt)}}}switch(_e){case"address":return function(et){return zeroPadValue(getAddress$1(et),32)};case"bool":return function(et){return et?hexTrue$1:hexFalse$1};case"bytes":return function(et){return keccak256$1(et)};case"string":return function(et){return id$2(et)}}return null}function encodeType$1(_e,et){return`${_e}(${et.map(({name:tt,type:nt})=>nt+" "+tt).join(",")})`}function splitArray(_e){const et=_e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return et?{base:et[1],index:et[2]+et[4],array:{base:et[1],prefix:et[1]+et[2],count:et[5]?parseInt(et[5]):-1}}:{base:_e}}var kp,yl,_h,Cm,ty,As;let TypedDataEncoder$1=(As=class{constructor(et){In(this,Cm);Qr(this,"primaryType");In(this,kp,void 0);In(this,yl,void 0);In(this,_h,void 0);Yr(this,yl,new Map),Yr(this,_h,new Map);const tt=new Map,nt=new Map,at=new Map,ot={};Object.keys(et).forEach(dt=>{ot[dt]=et[dt].map(({name:ht,type:pt})=>{let{base:mt,index:yt}=splitArray(pt);return mt==="int"&&!et.int&&(mt="int256"),mt==="uint"&&!et.uint&&(mt="uint256"),{name:ht,type:mt+(yt||"")}}),tt.set(dt,new Set),nt.set(dt,[]),at.set(dt,new Set)}),Yr(this,kp,JSON.stringify(ot));for(const dt in ot){const ht=new Set;for(const pt of ot[dt]){assertArgument(!ht.has(pt.name),`duplicate variable name ${JSON.stringify(pt.name)} in ${JSON.stringify(dt)}`,"types",et),ht.add(pt.name);const mt=splitArray(pt.type).base;assertArgument(mt!==dt,`circular type reference to ${JSON.stringify(mt)}`,"types",et),!getBaseEncoder$1(mt)&&(assertArgument(nt.has(mt),`unknown type ${JSON.stringify(mt)}`,"types",et),nt.get(mt).push(dt),tt.get(dt).add(mt))}}const st=Array.from(nt.keys()).filter(dt=>nt.get(dt).length===0);assertArgument(st.length!==0,"missing primary type","types",et),assertArgument(st.length===1,`ambiguous primary types or unused types: ${st.map(dt=>JSON.stringify(dt)).join(", ")}`,"types",et),defineProperties$2(this,{primaryType:st[0]});function ct(dt,ht){assertArgument(!ht.has(dt),`circular type reference to ${JSON.stringify(dt)}`,"types",et),ht.add(dt);for(const pt of tt.get(dt))if(nt.has(pt)){ct(pt,ht);for(const mt of ht)at.get(mt).add(pt)}ht.delete(dt)}ct(this.primaryType,new Set);for(const[dt,ht]of at){const pt=Array.from(ht);pt.sort(),$r(this,yl).set(dt,encodeType$1(dt,ot[dt])+pt.map(mt=>encodeType$1(mt,ot[mt])).join(""))}}get types(){return JSON.parse($r(this,kp))}getEncoder(et){let tt=$r(this,_h).get(et);return tt||(tt=ga(this,Cm,ty).call(this,et),$r(this,_h).set(et,tt)),tt}encodeType(et){const tt=$r(this,yl).get(et);return assertArgument(tt,`unknown type: ${JSON.stringify(et)}`,"name",et),tt}encodeData(et,tt){return this.getEncoder(et)(tt)}hashStruct(et,tt){return keccak256$1(this.encodeData(et,tt))}encode(et){return this.encodeData(this.primaryType,et)}hash(et){return this.hashStruct(this.primaryType,et)}_visit(et,tt,nt){if(getBaseEncoder$1(et))return nt(et,tt);const at=splitArray(et).array;if(at)return assertArgument(at.count===-1||at.count===tt.length,`array length mismatch; expected length ${at.count}`,"value",tt),tt.map(st=>this._visit(at.prefix,st,nt));const ot=this.types[et];if(ot)return ot.reduce((st,{name:ct,type:dt})=>(st[ct]=this._visit(dt,tt[ct],nt),st),{});assertArgument(!1,`unknown type: ${et}`,"type",et)}visit(et,tt){return this._visit(this.primaryType,et,tt)}static from(et){return new As(et)}static getPrimaryType(et){return As.from(et).primaryType}static hashStruct(et,tt,nt){return As.from(tt).hashStruct(et,nt)}static hashDomain(et){const tt=[];for(const nt in et){if(et[nt]==null)continue;const at=domainFieldTypes$1[nt];assertArgument(at,`invalid typed-data domain key: ${JSON.stringify(nt)}`,"domain",et),tt.push({name:nt,type:at})}return tt.sort((nt,at)=>domainFieldNames$1.indexOf(nt.name)-domainFieldNames$1.indexOf(at.name)),As.hashStruct("EIP712Domain",{EIP712Domain:tt},et)}static encode(et,tt,nt){return concat$2(["0x1901",As.hashDomain(et),As.from(tt).hash(nt)])}static hash(et,tt,nt){return keccak256$1(As.encode(et,tt,nt))}static async resolveNames(et,tt,nt,at){et=Object.assign({},et);for(const ct in et)et[ct]==null&&delete et[ct];const ot={};et.verifyingContract&&!isHexString$1(et.verifyingContract,20)&&(ot[et.verifyingContract]="0x");const st=As.from(tt);st.visit(nt,(ct,dt)=>(ct==="address"&&!isHexString$1(dt,20)&&(ot[dt]="0x"),dt));for(const ct in ot)ot[ct]=await at(ct);return et.verifyingContract&&ot[et.verifyingContract]&&(et.verifyingContract=ot[et.verifyingContract]),nt=st.visit(nt,(ct,dt)=>ct==="address"&&ot[dt]?ot[dt]:dt),{domain:et,value:nt}}static getPayload(et,tt,nt){As.hashDomain(et);const at={},ot=[];domainFieldNames$1.forEach(dt=>{const ht=et[dt];ht!=null&&(at[dt]=domainChecks$1[dt](ht),ot.push({name:dt,type:domainFieldTypes$1[dt]}))});const st=As.from(tt);tt=st.types;const ct=Object.assign({},tt);return assertArgument(ct.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",tt),ct.EIP712Domain=ot,st.encode(nt),{types:ct,domain:at,primaryType:st.primaryType,message:st.visit(nt,(dt,ht)=>{if(dt.match(/^bytes(\d*)/))return hexlify$1(getBytes(ht));if(dt.match(/^u?int/))return getBigInt(ht).toString();switch(dt){case"address":return ht.toLowerCase();case"bool":return!!ht;case"string":return assertArgument(typeof ht=="string","invalid string","value",ht),ht}assertArgument(!1,"unsupported type","type",dt)})}}},kp=new WeakMap,yl=new WeakMap,_h=new WeakMap,Cm=new WeakSet,ty=function(et){{const at=getBaseEncoder$1(et);if(at)return at}const tt=splitArray(et).array;if(tt){const at=tt.prefix,ot=this.getEncoder(at);return st=>{assertArgument(tt.count===-1||tt.count===st.length,`array length mismatch; expected length ${tt.count}`,"value",st);let ct=st.map(ot);return $r(this,yl).has(at)&&(ct=ct.map(keccak256$1)),keccak256$1(concat$2(ct))}}const nt=this.types[et];if(nt){const at=id$2($r(this,yl).get(et));return ot=>{const st=nt.map(({name:ct,type:dt})=>{const ht=this.getEncoder(dt)(ot[ct]);return $r(this,yl).has(dt)?keccak256$1(ht):ht});return st.unshift(at),concat$2(st)}}assertArgument(!1,`unknown type: ${et}`,"type",et)},As);function setify(_e){const et=new Set;return _e.forEach(tt=>et.add(tt)),Object.freeze(et)}const _kwVisibDeploy="external public payable override",KwVisibDeploy=setify(_kwVisibDeploy.split(" ")),_kwVisib="constant external internal payable private public pure view override",KwVisib=setify(_kwVisib.split(" ")),_kwTypes="constructor error event fallback function receive struct",KwTypes=setify(_kwTypes.split(" ")),_kwModifiers="calldata memory storage payable indexed",KwModifiers=setify(_kwModifiers.split(" ")),_kwOther="tuple returns",_keywords=[_kwTypes,_kwModifiers,_kwOther,_kwVisib].join(" "),Keywords=setify(_keywords.split(" ")),SimpleTokens={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},regexWhitespacePrefix=new RegExp("^(\\s*)"),regexNumberPrefix=new RegExp("^([0-9]+)"),regexIdPrefix=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),regexId=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),regexType=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var ls,Hs,Bp,Bm;const Om=class Om{constructor(et){In(this,Bp);In(this,ls,void 0);In(this,Hs,void 0);Yr(this,ls,0),Yr(this,Hs,et.slice())}get offset(){return $r(this,ls)}get length(){return $r(this,Hs).length-$r(this,ls)}clone(){return new Om($r(this,Hs))}reset(){Yr(this,ls,0)}popKeyword(et){const tt=this.peek();if(tt.type!=="KEYWORD"||!et.has(tt.text))throw new Error(`expected keyword ${tt.text}`);return this.pop().text}popType(et){if(this.peek().type!==et){const tt=this.peek();throw new Error(`expected ${et}; got ${tt.type} ${JSON.stringify(tt.text)}`)}return this.pop().text}popParen(){const et=this.peek();if(et.type!=="OPEN_PAREN")throw new Error("bad start");const tt=ga(this,Bp,Bm).call(this,$r(this,ls)+1,et.match+1);return Yr(this,ls,et.match+1),tt}popParams(){const et=this.peek();if(et.type!=="OPEN_PAREN")throw new Error("bad start");const tt=[];for(;$r(this,ls)<et.match-1;){const nt=this.peek().linkNext;tt.push(ga(this,Bp,Bm).call(this,$r(this,ls)+1,nt)),Yr(this,ls,nt)}return Yr(this,ls,et.match+1),tt}peek(){if($r(this,ls)>=$r(this,Hs).length)throw new Error("out-of-bounds");return $r(this,Hs)[$r(this,ls)]}peekKeyword(et){const tt=this.peekType("KEYWORD");return tt!=null&&et.has(tt)?tt:null}peekType(et){if(this.length===0)return null;const tt=this.peek();return tt.type===et?tt.text:null}pop(){const et=this.peek();return Sp(this,ls)._++,et}toString(){const et=[];for(let tt=$r(this,ls);tt<$r(this,Hs).length;tt++){const nt=$r(this,Hs)[tt];et.push(`${nt.type}:${nt.text}`)}return`<TokenString ${et.join(" ")}>`}};ls=new WeakMap,Hs=new WeakMap,Bp=new WeakSet,Bm=function(et=0,tt=0){return new Om($r(this,Hs).slice(et,tt).map(nt=>Object.freeze(Object.assign({},nt,{match:nt.match-et,linkBack:nt.linkBack-et,linkNext:nt.linkNext-et}))))};let TokenString=Om;function lex(_e){const et=[],tt=st=>{const ct=ot<_e.length?JSON.stringify(_e[ot]):"$EOI";throw new Error(`invalid token ${ct} at ${ot}: ${st}`)};let nt=[],at=[],ot=0;for(;ot<_e.length;){let st=_e.substring(ot),ct=st.match(regexWhitespacePrefix);ct&&(ot+=ct[1].length,st=_e.substring(ot));const dt={depth:nt.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:ot,value:-1};et.push(dt);let ht=SimpleTokens[st[0]]||"";if(ht){if(dt.type=ht,dt.text=st[0],ot++,ht==="OPEN_PAREN")nt.push(et.length-1),at.push(et.length-1);else if(ht=="CLOSE_PAREN")nt.length===0&&tt("no matching open bracket"),dt.match=nt.pop(),et[dt.match].match=et.length-1,dt.depth--,dt.linkBack=at.pop(),et[dt.linkBack].linkNext=et.length-1;else if(ht==="COMMA")dt.linkBack=at.pop(),et[dt.linkBack].linkNext=et.length-1,at.push(et.length-1);else if(ht==="OPEN_BRACKET")dt.type="BRACKET";else if(ht==="CLOSE_BRACKET"){let pt=et.pop().text;if(et.length>0&&et[et.length-1].type==="NUMBER"){const mt=et.pop().text;pt=mt+pt,et[et.length-1].value=getNumber(mt)}if(et.length===0||et[et.length-1].type!=="BRACKET")throw new Error("missing opening bracket");et[et.length-1].text+=pt}continue}if(ct=st.match(regexIdPrefix),ct){if(dt.text=ct[1],ot+=dt.text.length,Keywords.has(dt.text)){dt.type="KEYWORD";continue}if(dt.text.match(regexType)){dt.type="TYPE";continue}dt.type="ID";continue}if(ct=st.match(regexNumberPrefix),ct){dt.text=ct[1],dt.type="NUMBER",ot+=dt.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(st[0])} at position ${ot}`)}return new TokenString(et.map(st=>Object.freeze(st)))}function allowSingle(_e,et){let tt=[];for(const nt in et.keys())_e.has(nt)&&tt.push(nt);if(tt.length>1)throw new Error(`conflicting types: ${tt.join(", ")}`)}function consumeName(_e,et){if(et.peekKeyword(KwTypes)){const tt=et.pop().text;if(tt!==_e)throw new Error(`expected ${_e}, got ${tt}`)}return et.popType("ID")}function consumeKeywords(_e,et){const tt=new Set;for(;;){const nt=_e.peekType("KEYWORD");if(nt==null||et&&!et.has(nt))break;if(_e.pop(),tt.has(nt))throw new Error(`duplicate keywords: ${JSON.stringify(nt)}`);tt.add(nt)}return Object.freeze(tt)}function consumeMutability(_e){let et=consumeKeywords(_e,KwVisib);return allowSingle(et,setify("constant payable nonpayable".split(" "))),allowSingle(et,setify("pure view payable nonpayable".split(" "))),et.has("view")?"view":et.has("pure")?"pure":et.has("payable")?"payable":et.has("nonpayable")?"nonpayable":et.has("constant")?"view":"nonpayable"}function consumeParams(_e,et){return _e.popParams().map(tt=>ParamType$1.from(tt,et))}function consumeGas(_e){if(_e.peekType("AT")){if(_e.pop(),_e.peekType("NUMBER"))return getBigInt(_e.pop().text);throw new Error("invalid gas")}return null}function consumeEoi(_e){if(_e.length)throw new Error(`unexpected tokens at offset ${_e.offset}: ${_e.toString()}`)}const regexArrayType=new RegExp(/^(.*)\[([0-9]*)\]$/);function verifyBasicType(_e){const et=_e.match(regexType);if(assertArgument(et,"invalid type","type",_e),_e==="uint")return"uint256";if(_e==="int")return"int256";if(et[2]){const tt=parseInt(et[2]);assertArgument(tt!==0&&tt<=32,"invalid bytes length","type",_e)}else if(et[3]){const tt=parseInt(et[3]);assertArgument(tt!==0&&tt<=256&&tt%8===0,"invalid numeric width","type",_e)}return _e}const _guard$2={},internal$1=Symbol.for("_ethers_internal"),ParamTypeInternal="_ParamTypeInternal",ErrorFragmentInternal="_ErrorInternal",EventFragmentInternal="_EventInternal",ConstructorFragmentInternal="_ConstructorInternal",FallbackFragmentInternal="_FallbackInternal",FunctionFragmentInternal="_FunctionInternal",StructFragmentInternal="_StructInternal";var ep,$m,Ts;let ParamType$1=(Ts=class{constructor(et,tt,nt,at,ot,st,ct,dt){In(this,ep);Qr(this,"name");Qr(this,"type");Qr(this,"baseType");Qr(this,"indexed");Qr(this,"components");Qr(this,"arrayLength");Qr(this,"arrayChildren");if(assertPrivate(et,_guard$2,"ParamType"),Object.defineProperty(this,internal$1,{value:ParamTypeInternal}),st&&(st=Object.freeze(st.slice())),at==="array"){if(ct==null||dt==null)throw new Error("")}else if(ct!=null||dt!=null)throw new Error("");if(at==="tuple"){if(st==null)throw new Error("")}else if(st!=null)throw new Error("");defineProperties$2(this,{name:tt,type:nt,baseType:at,indexed:ot,components:st,arrayLength:ct,arrayChildren:dt})}format(et){if(et==null&&(et="sighash"),et==="json"){const nt=this.name||"";if(this.isArray()){const ot=JSON.parse(this.arrayChildren.format("json"));return ot.name=nt,ot.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(ot)}const at={type:this.baseType==="tuple"?"tuple":this.type,name:nt};return typeof this.indexed=="boolean"&&(at.indexed=this.indexed),this.isTuple()&&(at.components=this.components.map(ot=>JSON.parse(ot.format(et)))),JSON.stringify(at)}let tt="";return this.isArray()?(tt+=this.arrayChildren.format(et),tt+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?tt+="("+this.components.map(nt=>nt.format(et)).join(et==="full"?", ":",")+")":tt+=this.type,et!=="sighash"&&(this.indexed===!0&&(tt+=" indexed"),et==="full"&&this.name&&(tt+=" "+this.name)),tt}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(et,tt){if(this.isArray()){if(!Array.isArray(et))throw new Error("invalid array value");if(this.arrayLength!==-1&&et.length!==this.arrayLength)throw new Error("array is wrong length");const nt=this;return et.map(at=>nt.arrayChildren.walk(at,tt))}if(this.isTuple()){if(!Array.isArray(et))throw new Error("invalid tuple value");if(et.length!==this.components.length)throw new Error("array is wrong length");const nt=this;return et.map((at,ot)=>nt.components[ot].walk(at,tt))}return tt(this.type,et)}async walkAsync(et,tt){const nt=[],at=[et];return ga(this,ep,$m).call(this,nt,et,tt,ot=>{at[0]=ot}),nt.length&&await Promise.all(nt),at[0]}static from(et,tt){if(Ts.isParamType(et))return et;if(typeof et=="string")try{return Ts.from(lex(et),tt)}catch{assertArgument(!1,"invalid param type","obj",et)}else if(et instanceof TokenString){let ct="",dt="",ht=null;consumeKeywords(et,setify(["tuple"])).has("tuple")||et.peekType("OPEN_PAREN")?(dt="tuple",ht=et.popParams().map($t=>Ts.from($t)),ct=`tuple(${ht.map($t=>$t.format()).join(",")})`):(ct=verifyBasicType(et.popType("TYPE")),dt=ct);let pt=null,mt=null;for(;et.length&&et.peekType("BRACKET");){const $t=et.pop();pt=new Ts(_guard$2,"",ct,dt,null,ht,mt,pt),mt=$t.value,ct+=$t.text,dt="array",ht=null}let yt=null;if(consumeKeywords(et,KwModifiers).has("indexed")){if(!tt)throw new Error("");yt=!0}const bt=et.peekType("ID")?et.pop().text:"";if(et.length)throw new Error("leftover tokens");return new Ts(_guard$2,bt,ct,dt,yt,ht,mt,pt)}const nt=et.name;assertArgument(!nt||typeof nt=="string"&&nt.match(regexId),"invalid name","obj.name",nt);let at=et.indexed;at!=null&&(assertArgument(tt,"parameter cannot be indexed","obj.indexed",et.indexed),at=!!at);let ot=et.type,st=ot.match(regexArrayType);if(st){const ct=parseInt(st[2]||"-1"),dt=Ts.from({type:st[1],components:et.components});return new Ts(_guard$2,nt||"",ot,"array",at,null,ct,dt)}if(ot==="tuple"||ot.startsWith("tuple(")||ot.startsWith("(")){const ct=et.components!=null?et.components.map(ht=>Ts.from(ht)):null;return new Ts(_guard$2,nt||"",ot,"tuple",at,ct,null,null)}return ot=verifyBasicType(et.type),new Ts(_guard$2,nt||"",ot,ot,at,null,null,null)}static isParamType(et){return et&&et[internal$1]===ParamTypeInternal}},ep=new WeakSet,$m=function(et,tt,nt,at){if(this.isArray()){if(!Array.isArray(tt))throw new Error("invalid array value");if(this.arrayLength!==-1&&tt.length!==this.arrayLength)throw new Error("array is wrong length");const st=this.arrayChildren,ct=tt.slice();ct.forEach((dt,ht)=>{var pt;ga(pt=st,ep,$m).call(pt,et,dt,nt,mt=>{ct[ht]=mt})}),at(ct);return}if(this.isTuple()){const st=this.components;let ct;if(Array.isArray(tt))ct=tt.slice();else{if(tt==null||typeof tt!="object")throw new Error("invalid tuple value");ct=st.map(dt=>{if(!dt.name)throw new Error("cannot use object value with unnamed components");if(!(dt.name in tt))throw new Error(`missing value for component ${dt.name}`);return tt[dt.name]})}if(ct.length!==this.components.length)throw new Error("array is wrong length");ct.forEach((dt,ht)=>{var pt;ga(pt=st[ht],ep,$m).call(pt,et,dt,nt,mt=>{ct[ht]=mt})}),at(ct);return}const ot=nt(this.type,tt);ot.then?et.push(async function(){at(await ot)}()):at(ot)},Ts),Fragment$1=class jm{constructor(et,tt,nt){Qr(this,"type");Qr(this,"inputs");assertPrivate(et,_guard$2,"Fragment"),nt=Object.freeze(nt.slice()),defineProperties$2(this,{type:tt,inputs:nt})}static from(et){if(typeof et=="string"){try{jm.from(JSON.parse(et))}catch{}return jm.from(lex(et))}if(et instanceof TokenString)switch(et.peekKeyword(KwTypes)){case"constructor":return ConstructorFragment$1.from(et);case"error":return ErrorFragment$1.from(et);case"event":return EventFragment$1.from(et);case"fallback":case"receive":return FallbackFragment.from(et);case"function":return FunctionFragment$1.from(et);case"struct":return StructFragment.from(et)}else if(typeof et=="object"){switch(et.type){case"constructor":return ConstructorFragment$1.from(et);case"error":return ErrorFragment$1.from(et);case"event":return EventFragment$1.from(et);case"fallback":case"receive":return FallbackFragment.from(et);case"function":return FunctionFragment$1.from(et);case"struct":return StructFragment.from(et)}assert$y(!1,`unsupported type: ${et.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}assertArgument(!1,"unsupported frgament object","obj",et)}static isConstructor(et){return ConstructorFragment$1.isFragment(et)}static isError(et){return ErrorFragment$1.isFragment(et)}static isEvent(et){return EventFragment$1.isFragment(et)}static isFunction(et){return FunctionFragment$1.isFragment(et)}static isStruct(et){return StructFragment.isFragment(et)}};class NamedFragment extends Fragment$1{constructor(tt,nt,at,ot){super(tt,nt,ot);Qr(this,"name");assertArgument(typeof at=="string"&&at.match(regexId),"invalid identifier","name",at),ot=Object.freeze(ot.slice()),defineProperties$2(this,{name:at})}}function joinParams(_e,et){return"("+et.map(tt=>tt.format(_e)).join(_e==="full"?", ":",")+")"}let ErrorFragment$1=class Tp extends NamedFragment{constructor(et,tt,nt){super(et,"error",tt,nt),Object.defineProperty(this,internal$1,{value:ErrorFragmentInternal})}get selector(){return id$2(this.format("sighash")).substring(0,10)}format(et){if(et==null&&(et="sighash"),et==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(nt=>JSON.parse(nt.format(et)))});const tt=[];return et!=="sighash"&&tt.push("error"),tt.push(this.name+joinParams(et,this.inputs)),tt.join(" ")}static from(et){if(Tp.isFragment(et))return et;if(typeof et=="string")return Tp.from(lex(et));if(et instanceof TokenString){const tt=consumeName("error",et),nt=consumeParams(et);return consumeEoi(et),new Tp(_guard$2,tt,nt)}return new Tp(_guard$2,et.name,et.inputs?et.inputs.map(ParamType$1.from):[])}static isFragment(et){return et&&et[internal$1]===ErrorFragmentInternal}},EventFragment$1=class Cu extends NamedFragment{constructor(tt,nt,at,ot){super(tt,"event",nt,at);Qr(this,"anonymous");Object.defineProperty(this,internal$1,{value:EventFragmentInternal}),defineProperties$2(this,{anonymous:ot})}get topicHash(){return id$2(this.format("sighash"))}format(tt){if(tt==null&&(tt="sighash"),tt==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(at=>JSON.parse(at.format(tt)))});const nt=[];return tt!=="sighash"&&nt.push("event"),nt.push(this.name+joinParams(tt,this.inputs)),tt!=="sighash"&&this.anonymous&&nt.push("anonymous"),nt.join(" ")}static getTopicHash(tt,nt){return nt=(nt||[]).map(ot=>ParamType$1.from(ot)),new Cu(_guard$2,tt,nt,!1).topicHash}static from(tt){if(Cu.isFragment(tt))return tt;if(typeof tt=="string")try{return Cu.from(lex(tt))}catch{assertArgument(!1,"invalid event fragment","obj",tt)}else if(tt instanceof TokenString){const nt=consumeName("event",tt),at=consumeParams(tt,!0),ot=!!consumeKeywords(tt,setify(["anonymous"])).has("anonymous");return consumeEoi(tt),new Cu(_guard$2,nt,at,ot)}return new Cu(_guard$2,tt.name,tt.inputs?tt.inputs.map(nt=>ParamType$1.from(nt,!0)):[],!!tt.anonymous)}static isFragment(tt){return tt&&tt[internal$1]===EventFragmentInternal}},ConstructorFragment$1=class xp extends Fragment$1{constructor(tt,nt,at,ot,st){super(tt,nt,at);Qr(this,"payable");Qr(this,"gas");Object.defineProperty(this,internal$1,{value:ConstructorFragmentInternal}),defineProperties$2(this,{payable:ot,gas:st})}format(tt){if(assert$y(tt!=null&&tt!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),tt==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(at=>JSON.parse(at.format(tt)))});const nt=[`constructor${joinParams(tt,this.inputs)}`];return this.payable&&nt.push("payable"),this.gas!=null&&nt.push(`@${this.gas.toString()}`),nt.join(" ")}static from(tt){if(xp.isFragment(tt))return tt;if(typeof tt=="string")try{return xp.from(lex(tt))}catch{assertArgument(!1,"invalid constuctor fragment","obj",tt)}else if(tt instanceof TokenString){consumeKeywords(tt,setify(["constructor"]));const nt=consumeParams(tt),at=!!consumeKeywords(tt,KwVisibDeploy).has("payable"),ot=consumeGas(tt);return consumeEoi(tt),new xp(_guard$2,"constructor",nt,at,ot)}return new xp(_guard$2,"constructor",tt.inputs?tt.inputs.map(ParamType$1.from):[],!!tt.payable,tt.gas!=null?tt.gas:null)}static isFragment(tt){return tt&&tt[internal$1]===ConstructorFragmentInternal}};class FallbackFragment extends Fragment$1{constructor(tt,nt,at){super(tt,"fallback",nt);Qr(this,"payable");Object.defineProperty(this,internal$1,{value:FallbackFragmentInternal}),defineProperties$2(this,{payable:at})}format(tt){const nt=this.inputs.length===0?"receive":"fallback";if(tt==="json"){const at=this.payable?"payable":"nonpayable";return JSON.stringify({type:nt,stateMutability:at})}return`${nt}()${this.payable?" payable":""}`}static from(tt){if(FallbackFragment.isFragment(tt))return tt;if(typeof tt=="string")try{return FallbackFragment.from(lex(tt))}catch{assertArgument(!1,"invalid fallback fragment","obj",tt)}else if(tt instanceof TokenString){const nt=tt.toString(),at=tt.peekKeyword(setify(["fallback","receive"]));if(assertArgument(at,"type must be fallback or receive","obj",nt),tt.popKeyword(setify(["fallback","receive"]))==="receive"){const dt=consumeParams(tt);return assertArgument(dt.length===0,"receive cannot have arguments","obj.inputs",dt),consumeKeywords(tt,setify(["payable"])),consumeEoi(tt),new FallbackFragment(_guard$2,[],!0)}let st=consumeParams(tt);st.length?assertArgument(st.length===1&&st[0].type==="bytes","invalid fallback inputs","obj.inputs",st.map(dt=>dt.format("minimal")).join(", ")):st=[ParamType$1.from("bytes")];const ct=consumeMutability(tt);if(assertArgument(ct==="nonpayable"||ct==="payable","fallback cannot be constants","obj.stateMutability",ct),consumeKeywords(tt,setify(["returns"])).has("returns")){const dt=consumeParams(tt);assertArgument(dt.length===1&&dt[0].type==="bytes","invalid fallback outputs","obj.outputs",dt.map(ht=>ht.format("minimal")).join(", "))}return consumeEoi(tt),new FallbackFragment(_guard$2,st,ct==="payable")}if(tt.type==="receive")return new FallbackFragment(_guard$2,[],!0);if(tt.type==="fallback"){const nt=[ParamType$1.from("bytes")],at=tt.stateMutability==="payable";return new FallbackFragment(_guard$2,nt,at)}assertArgument(!1,"invalid fallback description","obj",tt)}static isFragment(tt){return tt&&tt[internal$1]===FallbackFragmentInternal}}let FunctionFragment$1=class Ou extends NamedFragment{constructor(tt,nt,at,ot,st,ct){super(tt,"function",nt,ot);Qr(this,"constant");Qr(this,"outputs");Qr(this,"stateMutability");Qr(this,"payable");Qr(this,"gas");Object.defineProperty(this,internal$1,{value:FunctionFragmentInternal}),st=Object.freeze(st.slice()),defineProperties$2(this,{constant:at==="view"||at==="pure",gas:ct,outputs:st,payable:at==="payable",stateMutability:at})}get selector(){return id$2(this.format("sighash")).substring(0,10)}format(tt){if(tt==null&&(tt="sighash"),tt==="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!=null?this.gas:void 0,inputs:this.inputs.map(at=>JSON.parse(at.format(tt))),outputs:this.outputs.map(at=>JSON.parse(at.format(tt)))});const nt=[];return tt!=="sighash"&&nt.push("function"),nt.push(this.name+joinParams(tt,this.inputs)),tt!=="sighash"&&(this.stateMutability!=="nonpayable"&&nt.push(this.stateMutability),this.outputs&&this.outputs.length&&(nt.push("returns"),nt.push(joinParams(tt,this.outputs))),this.gas!=null&&nt.push(`@${this.gas.toString()}`)),nt.join(" ")}static getSelector(tt,nt){return nt=(nt||[]).map(ot=>ParamType$1.from(ot)),new Ou(_guard$2,tt,"view",nt,[],null).selector}static from(tt){if(Ou.isFragment(tt))return tt;if(typeof tt=="string")try{return Ou.from(lex(tt))}catch{assertArgument(!1,"invalid function fragment","obj",tt)}else if(tt instanceof TokenString){const at=consumeName("function",tt),ot=consumeParams(tt),st=consumeMutability(tt);let ct=[];consumeKeywords(tt,setify(["returns"])).has("returns")&&(ct=consumeParams(tt));const dt=consumeGas(tt);return consumeEoi(tt),new Ou(_guard$2,at,st,ot,ct,dt)}let nt=tt.stateMutability;return nt==null&&(nt="payable",typeof tt.constant=="boolean"?(nt="view",tt.constant||(nt="payable",typeof tt.payable=="boolean"&&!tt.payable&&(nt="nonpayable"))):typeof tt.payable=="boolean"&&!tt.payable&&(nt="nonpayable")),new Ou(_guard$2,tt.name,nt,tt.inputs?tt.inputs.map(ParamType$1.from):[],tt.outputs?tt.outputs.map(ParamType$1.from):[],tt.gas!=null?tt.gas:null)}static isFragment(tt){return tt&&tt[internal$1]===FunctionFragmentInternal}};class StructFragment extends NamedFragment{constructor(et,tt,nt){super(et,"struct",tt,nt),Object.defineProperty(this,internal$1,{value:StructFragmentInternal})}format(){throw new Error("@TODO")}static from(et){if(typeof et=="string")try{return StructFragment.from(lex(et))}catch{assertArgument(!1,"invalid struct fragment","obj",et)}else if(et instanceof TokenString){const tt=consumeName("struct",et),nt=consumeParams(et);return consumeEoi(et),new StructFragment(_guard$2,tt,nt)}return new StructFragment(_guard$2,et.name,et.inputs?et.inputs.map(ParamType$1.from):[])}static isFragment(et){return et&&et[internal$1]===StructFragmentInternal}}const PanicReasons$1=new Map;PanicReasons$1.set(0,"GENERIC_PANIC");PanicReasons$1.set(1,"ASSERT_FALSE");PanicReasons$1.set(17,"OVERFLOW");PanicReasons$1.set(18,"DIVIDE_BY_ZERO");PanicReasons$1.set(33,"ENUM_RANGE_ERROR");PanicReasons$1.set(34,"BAD_STORAGE_DATA");PanicReasons$1.set(49,"STACK_UNDERFLOW");PanicReasons$1.set(50,"ARRAY_RANGE_ERROR");PanicReasons$1.set(65,"OUT_OF_MEMORY");PanicReasons$1.set(81,"UNINITIALIZED_FUNCTION_CALL");const paramTypeBytes$1=new RegExp(/^bytes([0-9]*)$/),paramTypeNumber$1=new RegExp(/^(u?int)([0-9]*)$/);let defaultCoder=null,defaultMaxInflation=1024;function getBuiltinCallException(_e,et,tt,nt){let at="missing revert data",ot=null;const st=null;let ct=null;if(tt){at="execution reverted";const ht=getBytes(tt);if(tt=hexlify$1(tt),ht.length===0)at+=" (no data present; likely require(false) occurred",ot="require(false)";else if(ht.length%32!==4)at+=" (could not decode reason; invalid data length)";else if(hexlify$1(ht.slice(0,4))==="0x08c379a0")try{ot=nt.decode(["string"],ht.slice(4))[0],ct={signature:"Error(string)",name:"Error",args:[ot]},at+=`: ${JSON.stringify(ot)}`}catch{at+=" (could not decode reason; invalid string data)"}else if(hexlify$1(ht.slice(0,4))==="0x4e487b71")try{const pt=Number(nt.decode(["uint256"],ht.slice(4))[0]);ct={signature:"Panic(uint256)",name:"Panic",args:[pt]},ot=`Panic due to ${PanicReasons$1.get(pt)||"UNKNOWN"}(${pt})`,at+=`: ${ot}`}catch{at+=" (could not decode panic code)"}else at+=" (unknown custom error)"}const dt={to:et.to?getAddress$1(et.to):null,data:et.data||"0x"};return et.from&&(dt.from=getAddress$1(et.from)),makeError(at,"CALL_EXCEPTION",{action:_e,data:tt,reason:ot,transaction:dt,invocation:st,revert:ct})}var Rl,Ru,Ep;let AbiCoder$1=(Ep=class{constructor(){In(this,Rl)}getDefaultValue(et){const tt=et.map(at=>ga(this,Rl,Ru).call(this,ParamType$1.from(at)));return new TupleCoder$1(tt,"_").defaultValue()}encode(et,tt){assertArgumentCount(tt.length,et.length,"types/values length mismatch");const nt=et.map(st=>ga(this,Rl,Ru).call(this,ParamType$1.from(st))),at=new TupleCoder$1(nt,"_"),ot=new Writer$1;return at.encode(ot,tt),ot.data}decode(et,tt,nt){const at=et.map(st=>ga(this,Rl,Ru).call(this,ParamType$1.from(st)));return new TupleCoder$1(at,"_").decode(new Reader$1(tt,nt,defaultMaxInflation))}static _setDefaultMaxInflation(et){assertArgument(typeof et=="number"&&Number.isInteger(et),"invalid defaultMaxInflation factor","value",et),defaultMaxInflation=et}static defaultAbiCoder(){return defaultCoder==null&&(defaultCoder=new Ep),defaultCoder}static getBuiltinCallException(et,tt,nt){return getBuiltinCallException(et,tt,nt,Ep.defaultAbiCoder())}},Rl=new WeakSet,Ru=function(et){if(et.isArray())return new ArrayCoder$1(ga(this,Rl,Ru).call(this,et.arrayChildren),et.arrayLength,et.name);if(et.isTuple())return new TupleCoder$1(et.components.map(nt=>ga(this,Rl,Ru).call(this,nt)),et.name);switch(et.baseType){case"address":return new AddressCoder$1(et.name);case"bool":return new BooleanCoder$1(et.name);case"string":return new StringCoder$1(et.name);case"bytes":return new BytesCoder$1(et.name);case"":return new NullCoder$1(et.name)}let tt=et.type.match(paramTypeNumber$1);if(tt){let nt=parseInt(tt[2]||"256");return assertArgument(nt!==0&&nt<=256&&nt%8===0,"invalid "+tt[1]+" bit length","param",et),new NumberCoder$1(nt/8,tt[1]==="int",et.name)}if(tt=et.type.match(paramTypeBytes$1),tt){let nt=parseInt(tt[1]);return assertArgument(nt!==0&&nt<=32,"invalid bytes length","param",et),new FixedBytesCoder$1(nt,et.name)}assertArgument(!1,"invalid type","type",et.type)},Ep),LogDescription$1=class{constructor(et,tt,nt){Qr(this,"fragment");Qr(this,"name");Qr(this,"signature");Qr(this,"topic");Qr(this,"args");const at=et.name,ot=et.format();defineProperties$2(this,{fragment:et,name:at,signature:ot,topic:tt,args:nt})}},TransactionDescription$1=class{constructor(et,tt,nt,at){Qr(this,"fragment");Qr(this,"name");Qr(this,"args");Qr(this,"signature");Qr(this,"selector");Qr(this,"value");const ot=et.name,st=et.format();defineProperties$2(this,{fragment:et,name:ot,args:nt,signature:st,selector:tt,value:at})}},ErrorDescription$1=class{constructor(et,tt,nt){Qr(this,"fragment");Qr(this,"name");Qr(this,"args");Qr(this,"signature");Qr(this,"selector");const at=et.name,ot=et.format();defineProperties$2(this,{fragment:et,name:at,args:nt,signature:ot,selector:tt})}},Indexed$1=class{constructor(et){Qr(this,"hash");Qr(this,"_isIndexed");defineProperties$2(this,{hash:et,_isIndexed:!0})}static isIndexed(et){return!!(et&&et._isIndexed)}};const PanicReasons={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},BuiltinErrors$1={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:_e=>`reverted with reason string ${JSON.stringify(_e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:_e=>{let et="unknown panic code";return _e>=0&&_e<=255&&PanicReasons[_e.toString()]&&(et=PanicReasons[_e.toString()]),`reverted with panic code 0x${_e.toString(16)} (${et})`}}};var Ks,Ys,Xs,ds,tp,Em,rp,wm,Gl;let Interface$1=(Gl=class{constructor(et){In(this,tp);In(this,rp);Qr(this,"fragments");Qr(this,"deploy");Qr(this,"fallback");Qr(this,"receive");In(this,Ks,void 0);In(this,Ys,void 0);In(this,Xs,void 0);In(this,ds,void 0);let tt=[];typeof et=="string"?tt=JSON.parse(et):tt=et,Yr(this,Xs,new Map),Yr(this,Ks,new Map),Yr(this,Ys,new Map);const nt=[];for(const st of tt)try{nt.push(Fragment$1.from(st))}catch(ct){console.log(`[Warning] Invalid Fragment ${JSON.stringify(st)}:`,ct.message)}defineProperties$2(this,{fragments:Object.freeze(nt)});let at=null,ot=!1;Yr(this,ds,this.getAbiCoder()),this.fragments.forEach((st,ct)=>{let dt;switch(st.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}defineProperties$2(this,{deploy:st});return;case"fallback":st.inputs.length===0?ot=!0:(assertArgument(!at||st.payable!==at.payable,"conflicting fallback fragments",`fragments[${ct}]`,st),at=st,ot=at.payable);return;case"function":dt=$r(this,Xs);break;case"event":dt=$r(this,Ys);break;case"error":dt=$r(this,Ks);break;default:return}const ht=st.format();dt.has(ht)||dt.set(ht,st)}),this.deploy||defineProperties$2(this,{deploy:ConstructorFragment$1.from("constructor()")}),defineProperties$2(this,{fallback:at,receive:ot})}format(et){const tt=et?"minimal":"full";return this.fragments.map(at=>at.format(tt))}formatJson(){const et=this.fragments.map(tt=>tt.format("json"));return JSON.stringify(et.map(tt=>JSON.parse(tt)))}getAbiCoder(){return AbiCoder$1.defaultAbiCoder()}getFunctionName(et){const tt=ga(this,tp,Em).call(this,et,null,!1);return assertArgument(tt,"no matching function","key",et),tt.name}hasFunction(et){return!!ga(this,tp,Em).call(this,et,null,!1)}getFunction(et,tt){return ga(this,tp,Em).call(this,et,tt||null,!0)}forEachFunction(et){const tt=Array.from($r(this,Xs).keys());tt.sort((nt,at)=>nt.localeCompare(at));for(let nt=0;nt<tt.length;nt++){const at=tt[nt];et($r(this,Xs).get(at),nt)}}getEventName(et){const tt=ga(this,rp,wm).call(this,et,null,!1);return assertArgument(tt,"no matching event","key",et),tt.name}hasEvent(et){return!!ga(this,rp,wm).call(this,et,null,!1)}getEvent(et,tt){return ga(this,rp,wm).call(this,et,tt||null,!0)}forEachEvent(et){const tt=Array.from($r(this,Ys).keys());tt.sort((nt,at)=>nt.localeCompare(at));for(let nt=0;nt<tt.length;nt++){const at=tt[nt];et($r(this,Ys).get(at),nt)}}getError(et,tt){if(isHexString$1(et)){const at=et.toLowerCase();if(BuiltinErrors$1[at])return ErrorFragment$1.from(BuiltinErrors$1[at].signature);for(const ot of $r(this,Ks).values())if(at===ot.selector)return ot;return null}if(et.indexOf("(")===-1){const at=[];for(const[ot,st]of $r(this,Ks))ot.split("(")[0]===et&&at.push(st);if(at.length===0)return et==="Error"?ErrorFragment$1.from("error Error(string)"):et==="Panic"?ErrorFragment$1.from("error Panic(uint256)"):null;if(at.length>1){const ot=at.map(st=>JSON.stringify(st.format())).join(", ");assertArgument(!1,`ambiguous error description (i.e. ${ot})`,"name",et)}return at[0]}if(et=ErrorFragment$1.from(et).format(),et==="Error(string)")return ErrorFragment$1.from("error Error(string)");if(et==="Panic(uint256)")return ErrorFragment$1.from("error Panic(uint256)");const nt=$r(this,Ks).get(et);return nt||null}forEachError(et){const tt=Array.from($r(this,Ks).keys());tt.sort((nt,at)=>nt.localeCompare(at));for(let nt=0;nt<tt.length;nt++){const at=tt[nt];et($r(this,Ks).get(at),nt)}}_decodeParams(et,tt){return $r(this,ds).decode(et,tt)}_encodeParams(et,tt){return $r(this,ds).encode(et,tt)}encodeDeploy(et){return this._encodeParams(this.deploy.inputs,et||[])}decodeErrorResult(et,tt){if(typeof et=="string"){const nt=this.getError(et);assertArgument(nt,"unknown error","fragment",et),et=nt}return assertArgument(dataSlice(tt,0,4)===et.selector,`data signature does not match error ${et.name}.`,"data",tt),this._decodeParams(et.inputs,dataSlice(tt,4))}encodeErrorResult(et,tt){if(typeof et=="string"){const nt=this.getError(et);assertArgument(nt,"unknown error","fragment",et),et=nt}return concat$2([et.selector,this._encodeParams(et.inputs,tt||[])])}decodeFunctionData(et,tt){if(typeof et=="string"){const nt=this.getFunction(et);assertArgument(nt,"unknown function","fragment",et),et=nt}return assertArgument(dataSlice(tt,0,4)===et.selector,`data signature does not match function ${et.name}.`,"data",tt),this._decodeParams(et.inputs,dataSlice(tt,4))}encodeFunctionData(et,tt){if(typeof et=="string"){const nt=this.getFunction(et);assertArgument(nt,"unknown function","fragment",et),et=nt}return concat$2([et.selector,this._encodeParams(et.inputs,tt||[])])}decodeFunctionResult(et,tt){if(typeof et=="string"){const ot=this.getFunction(et);assertArgument(ot,"unknown function","fragment",et),et=ot}let nt="invalid length for result data";const at=getBytesCopy(tt);if(at.length%32===0)try{return $r(this,ds).decode(et.outputs,at)}catch{nt="could not decode result data"}assert$y(!1,nt,"BAD_DATA",{value:hexlify$1(at),info:{method:et.name,signature:et.format()}})}makeError(et,tt){const nt=getBytes(et,"data"),at=AbiCoder$1.getBuiltinCallException("call",tt,nt),ot="execution reverted (unknown custom error)";if(at.message.startsWith(ot)){const ct=hexlify$1(nt.slice(0,4)),dt=this.getError(ct);if(dt)try{const ht=$r(this,ds).decode(dt.inputs,nt.slice(4));at.revert={name:dt.name,signature:dt.format(),args:ht},at.reason=at.revert.signature,at.message=`execution reverted: ${at.reason}`}catch{at.message="execution reverted (coult not decode custom error)"}}const st=this.parseTransaction(tt);return st&&(at.invocation={method:st.name,signature:st.signature,args:st.args}),at}encodeFunctionResult(et,tt){if(typeof et=="string"){const nt=this.getFunction(et);assertArgument(nt,"unknown function","fragment",et),et=nt}return hexlify$1($r(this,ds).encode(et.outputs,tt||[]))}encodeFilterTopics(et,tt){if(typeof et=="string"){const ot=this.getEvent(et);assertArgument(ot,"unknown event","eventFragment",et),et=ot}assert$y(tt.length<=et.inputs.length,`too many arguments for ${et.format()}`,"UNEXPECTED_ARGUMENT",{count:tt.length,expectedCount:et.inputs.length});const nt=[];et.anonymous||nt.push(et.topicHash);const at=(ot,st)=>ot.type==="string"?id$2(st):ot.type==="bytes"?keccak256$1(hexlify$1(st)):(ot.type==="bool"&&typeof st=="boolean"?st=st?"0x01":"0x00":ot.type.match(/^u?int/)?st=toBeHex(st):ot.type.match(/^bytes/)?st=zeroPadBytes(st,32):ot.type==="address"&&$r(this,ds).encode(["address"],[st]),zeroPadValue(hexlify$1(st),32));for(tt.forEach((ot,st)=>{const ct=et.inputs[st];if(!ct.indexed){assertArgument(ot==null,"cannot filter non-indexed parameters; must be null","contract."+ct.name,ot);return}ot==null?nt.push(null):ct.baseType==="array"||ct.baseType==="tuple"?assertArgument(!1,"filtering with tuples or arrays not supported","contract."+ct.name,ot):Array.isArray(ot)?nt.push(ot.map(dt=>at(ct,dt))):nt.push(at(ct,ot))});nt.length&&nt[nt.length-1]===null;)nt.pop();return nt}encodeEventLog(et,tt){if(typeof et=="string"){const st=this.getEvent(et);assertArgument(st,"unknown event","eventFragment",et),et=st}const nt=[],at=[],ot=[];return et.anonymous||nt.push(et.topicHash),assertArgument(tt.length===et.inputs.length,"event arguments/values mismatch","values",tt),et.inputs.forEach((st,ct)=>{const dt=tt[ct];if(st.indexed)if(st.type==="string")nt.push(id$2(dt));else if(st.type==="bytes")nt.push(keccak256$1(dt));else{if(st.baseType==="tuple"||st.baseType==="array")throw new Error("not implemented");nt.push($r(this,ds).encode([st.type],[dt]))}else at.push(st),ot.push(dt)}),{data:$r(this,ds).encode(at,ot),topics:nt}}decodeEventLog(et,tt,nt){if(typeof et=="string"){const gt=this.getEvent(et);assertArgument(gt,"unknown event","eventFragment",et),et=gt}if(nt!=null&&!et.anonymous){const gt=et.topicHash;assertArgument(isHexString$1(nt[0],32)&&nt[0].toLowerCase()===gt,"fragment/topic mismatch","topics[0]",nt[0]),nt=nt.slice(1)}const at=[],ot=[],st=[];et.inputs.forEach((gt,bt)=>{gt.indexed?gt.type==="string"||gt.type==="bytes"||gt.baseType==="tuple"||gt.baseType==="array"?(at.push(ParamType$1.from({type:"bytes32",name:gt.name})),st.push(!0)):(at.push(gt),st.push(!1)):(ot.push(gt),st.push(!1))});const ct=nt!=null?$r(this,ds).decode(at,concat$2(nt)):null,dt=$r(this,ds).decode(ot,tt,!0),ht=[],pt=[];let mt=0,yt=0;return et.inputs.forEach((gt,bt)=>{let $t=null;if(gt.indexed)if(ct==null)$t=new Indexed$1(null);else if(st[bt])$t=new Indexed$1(ct[yt++]);else try{$t=ct[yt++]}catch(wt){$t=wt}else try{$t=dt[mt++]}catch(wt){$t=wt}ht.push($t),pt.push(gt.name||null)}),Result.fromItems(ht,pt)}parseTransaction(et){const tt=getBytes(et.data,"tx.data"),nt=getBigInt(et.value!=null?et.value:0,"tx.value"),at=this.getFunction(hexlify$1(tt.slice(0,4)));if(!at)return null;const ot=$r(this,ds).decode(at.inputs,tt.slice(4));return new TransactionDescription$1(at,at.selector,ot,nt)}parseCallResult(et){throw new Error("@TODO")}parseLog(et){const tt=this.getEvent(et.topics[0]);return!tt||tt.anonymous?null:new LogDescription$1(tt,tt.topicHash,this.decodeEventLog(tt,et.data,et.topics))}parseError(et){const tt=hexlify$1(et),nt=this.getError(dataSlice(tt,0,4));if(!nt)return null;const at=$r(this,ds).decode(nt.inputs,dataSlice(tt,4));return new ErrorDescription$1(nt,nt.selector,at)}static from(et){return et instanceof Gl?et:typeof et=="string"?new Gl(JSON.parse(et)):typeof et.format=="function"?new Gl(et.format("json")):new Gl(et)}},Ks=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,ds=new WeakMap,tp=new WeakSet,Em=function(et,tt,nt){if(isHexString$1(et)){const ot=et.toLowerCase();for(const st of $r(this,Xs).values())if(ot===st.selector)return st;return null}if(et.indexOf("(")===-1){const ot=[];for(const[st,ct]of $r(this,Xs))st.split("(")[0]===et&&ot.push(ct);if(tt){const st=tt.length>0?tt[tt.length-1]:null;let ct=tt.length,dt=!0;Typed.isTyped(st)&&st.type==="overrides"&&(dt=!1,ct--);for(let ht=ot.length-1;ht>=0;ht--){const pt=ot[ht].inputs.length;pt!==ct&&(!dt||pt!==ct-1)&&ot.splice(ht,1)}for(let ht=ot.length-1;ht>=0;ht--){const pt=ot[ht].inputs;for(let mt=0;mt<tt.length;mt++)if(Typed.isTyped(tt[mt])){if(mt>=pt.length){if(tt[mt].type==="overrides")continue;ot.splice(ht,1);break}if(tt[mt].type!==pt[mt].baseType){ot.splice(ht,1);break}}}}if(ot.length===1&&tt&&tt.length!==ot[0].inputs.length){const st=tt[tt.length-1];(st==null||Array.isArray(st)||typeof st!="object")&&ot.splice(0,1)}if(ot.length===0)return null;if(ot.length>1&&nt){const st=ot.map(ct=>JSON.stringify(ct.format())).join(", ");assertArgument(!1,`ambiguous function description (i.e. matches ${st})`,"key",et)}return ot[0]}const at=$r(this,Xs).get(FunctionFragment$1.from(et).format());return at||null},rp=new WeakSet,wm=function(et,tt,nt){if(isHexString$1(et)){const ot=et.toLowerCase();for(const st of $r(this,Ys).values())if(ot===st.topicHash)return st;return null}if(et.indexOf("(")===-1){const ot=[];for(const[st,ct]of $r(this,Ys))st.split("(")[0]===et&&ot.push(ct);if(tt){for(let st=ot.length-1;st>=0;st--)ot[st].inputs.length<tt.length&&ot.splice(st,1);for(let st=ot.length-1;st>=0;st--){const ct=ot[st].inputs;for(let dt=0;dt<tt.length;dt++)if(Typed.isTyped(tt[dt])&&tt[dt].type!==ct[dt].baseType){ot.splice(st,1);break}}}if(ot.length===0)return null;if(ot.length>1&&nt){const st=ot.map(ct=>JSON.stringify(ct.format())).join(", ");assertArgument(!1,`ambiguous event description (i.e. matches ${st})`,"key",et)}return ot[0]}const at=$r(this,Ys).get(EventFragment$1.from(et).format());return at||null},Gl);const BN_0$2=BigInt(0);function getValue$6(_e){return _e??null}function toJson(_e){return _e==null?null:_e.toString()}class FeeData{constructor(et,tt,nt){Qr(this,"gasPrice");Qr(this,"maxFeePerGas");Qr(this,"maxPriorityFeePerGas");defineProperties$2(this,{gasPrice:getValue$6(et),maxFeePerGas:getValue$6(tt),maxPriorityFeePerGas:getValue$6(nt)})}toJSON(){const{gasPrice:et,maxFeePerGas:tt,maxPriorityFeePerGas:nt}=this;return{_type:"FeeData",gasPrice:toJson(et),maxFeePerGas:toJson(tt),maxPriorityFeePerGas:toJson(nt)}}}function copyRequest(_e){const et={};_e.to&&(et.to=_e.to),_e.from&&(et.from=_e.from),_e.data&&(et.data=hexlify$1(_e.data));const tt="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const at of tt)!(at in _e)||_e[at]==null||(et[at]=getBigInt(_e[at],`request.${at}`));const nt="type,nonce".split(/,/);for(const at of nt)!(at in _e)||_e[at]==null||(et[at]=getNumber(_e[at],`request.${at}`));return _e.accessList&&(et.accessList=accessListify$1(_e.accessList)),"blockTag"in _e&&(et.blockTag=_e.blockTag),"enableCcipRead"in _e&&(et.enableCcipRead=!!_e.enableCcipRead),"customData"in _e&&(et.customData=_e.customData),et}var vl;class Block{constructor(et,tt){Qr(this,"provider");Qr(this,"number");Qr(this,"hash");Qr(this,"timestamp");Qr(this,"parentHash");Qr(this,"parentBeaconBlockRoot");Qr(this,"nonce");Qr(this,"difficulty");Qr(this,"gasLimit");Qr(this,"gasUsed");Qr(this,"stateRoot");Qr(this,"receiptsRoot");Qr(this,"blobGasUsed");Qr(this,"excessBlobGas");Qr(this,"miner");Qr(this,"extraData");Qr(this,"baseFeePerGas");In(this,vl,void 0);Yr(this,vl,et.transactions.map(nt=>typeof nt!="string"?new TransactionResponse(nt,tt):nt)),defineProperties$2(this,{provider:tt,hash:getValue$6(et.hash),number:et.number,timestamp:et.timestamp,parentHash:et.parentHash,parentBeaconBlockRoot:et.parentBeaconBlockRoot,nonce:et.nonce,difficulty:et.difficulty,gasLimit:et.gasLimit,gasUsed:et.gasUsed,blobGasUsed:et.blobGasUsed,excessBlobGas:et.excessBlobGas,miner:et.miner,extraData:et.extraData,baseFeePerGas:getValue$6(et.baseFeePerGas),stateRoot:et.stateRoot,receiptsRoot:et.receiptsRoot})}get transactions(){return $r(this,vl).map(et=>typeof et=="string"?et:et.hash)}get prefetchedTransactions(){const et=$r(this,vl).slice();return et.length===0?[]:(assert$y(typeof et[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),et)}toJSON(){const{baseFeePerGas:et,difficulty:tt,extraData:nt,gasLimit:at,gasUsed:ot,hash:st,miner:ct,nonce:dt,number:ht,parentHash:pt,parentBeaconBlockRoot:mt,stateRoot:yt,receiptsRoot:gt,timestamp:bt,transactions:$t}=this;return{_type:"Block",baseFeePerGas:toJson(et),difficulty:toJson(tt),extraData:nt,gasLimit:toJson(at),gasUsed:toJson(ot),blobGasUsed:toJson(this.blobGasUsed),excessBlobGas:toJson(this.excessBlobGas),hash:st,miner:ct,nonce:dt,number:ht,parentHash:pt,timestamp:bt,parentBeaconBlockRoot:mt,stateRoot:yt,receiptsRoot:gt,transactions:$t}}[Symbol.iterator](){let et=0;const tt=this.transactions;return{next:()=>et<this.length?{value:tt[et++],done:!1}:{value:void 0,done:!0}}}get length(){return $r(this,vl).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(et){let tt;if(typeof et=="number")tt=$r(this,vl)[et];else{const nt=et.toLowerCase();for(const at of $r(this,vl))if(typeof at=="string"){if(at!==nt)continue;tt=at;break}else{if(at.hash===nt)continue;tt=at;break}}if(tt==null)throw new Error("no such tx");return typeof tt=="string"?await this.provider.getTransaction(tt):tt}getPrefetchedTransaction(et){const tt=this.prefetchedTransactions;if(typeof et=="number")return tt[et];et=et.toLowerCase();for(const nt of tt)if(nt.hash===et)return nt;assertArgument(!1,"no matching transaction","indexOrHash",et)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return createOrphanedBlockFilter(this)}}vl=new WeakMap;class Log{constructor(et,tt){Qr(this,"provider");Qr(this,"transactionHash");Qr(this,"blockHash");Qr(this,"blockNumber");Qr(this,"removed");Qr(this,"address");Qr(this,"data");Qr(this,"topics");Qr(this,"index");Qr(this,"transactionIndex");this.provider=tt;const nt=Object.freeze(et.topics.slice());defineProperties$2(this,{transactionHash:et.transactionHash,blockHash:et.blockHash,blockNumber:et.blockNumber,removed:et.removed,address:et.address,data:et.data,topics:nt,index:et.index,transactionIndex:et.transactionIndex})}toJSON(){const{address:et,blockHash:tt,blockNumber:nt,data:at,index:ot,removed:st,topics:ct,transactionHash:dt,transactionIndex:ht}=this;return{_type:"log",address:et,blockHash:tt,blockNumber:nt,data:at,index:ot,removed:st,topics:ct,transactionHash:dt,transactionIndex:ht}}async getBlock(){const et=await this.provider.getBlock(this.blockHash);return assert$y(!!et,"failed to find transaction","UNKNOWN_ERROR",{}),et}async getTransaction(){const et=await this.provider.getTransaction(this.transactionHash);return assert$y(!!et,"failed to find transaction","UNKNOWN_ERROR",{}),et}async getTransactionReceipt(){const et=await this.provider.getTransactionReceipt(this.transactionHash);return assert$y(!!et,"failed to find transaction receipt","UNKNOWN_ERROR",{}),et}removedEvent(){return createRemovedLogFilter(this)}}var jp;class TransactionReceipt{constructor(et,tt){Qr(this,"provider");Qr(this,"to");Qr(this,"from");Qr(this,"contractAddress");Qr(this,"hash");Qr(this,"index");Qr(this,"blockHash");Qr(this,"blockNumber");Qr(this,"logsBloom");Qr(this,"gasUsed");Qr(this,"blobGasUsed");Qr(this,"cumulativeGasUsed");Qr(this,"gasPrice");Qr(this,"blobGasPrice");Qr(this,"type");Qr(this,"status");Qr(this,"root");In(this,jp,void 0);Yr(this,jp,Object.freeze(et.logs.map(at=>new Log(at,tt))));let nt=BN_0$2;et.effectiveGasPrice!=null?nt=et.effectiveGasPrice:et.gasPrice!=null&&(nt=et.gasPrice),defineProperties$2(this,{provider:tt,to:et.to,from:et.from,contractAddress:et.contractAddress,hash:et.hash,index:et.index,blockHash:et.blockHash,blockNumber:et.blockNumber,logsBloom:et.logsBloom,gasUsed:et.gasUsed,cumulativeGasUsed:et.cumulativeGasUsed,blobGasUsed:et.blobGasUsed,gasPrice:nt,blobGasPrice:et.blobGasPrice,type:et.type,status:et.status,root:et.root})}get logs(){return $r(this,jp)}toJSON(){const{to:et,from:tt,contractAddress:nt,hash:at,index:ot,blockHash:st,blockNumber:ct,logsBloom:dt,logs:ht,status:pt,root:mt}=this;return{_type:"TransactionReceipt",blockHash:st,blockNumber:ct,contractAddress:nt,cumulativeGasUsed:toJson(this.cumulativeGasUsed),from:tt,gasPrice:toJson(this.gasPrice),blobGasUsed:toJson(this.blobGasUsed),blobGasPrice:toJson(this.blobGasPrice),gasUsed:toJson(this.gasUsed),hash:at,index:ot,logs:ht,logsBloom:dt,root:mt,status:pt,to:et}}get length(){return this.logs.length}[Symbol.iterator](){let et=0;return{next:()=>et<this.length?{value:this.logs[et++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const et=await this.provider.getBlock(this.blockHash);if(et==null)throw new Error("TODO");return et}async getTransaction(){const et=await this.provider.getTransaction(this.hash);if(et==null)throw new Error("TODO");return et}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return createRemovedTransactionFilter(this)}reorderedEvent(et){return assert$y(!et||et.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),createReorderedTransactionFilter(this,et)}}jp=new WeakMap;var Il;const Xm=class Xm{constructor(et,tt){Qr(this,"provider");Qr(this,"blockNumber");Qr(this,"blockHash");Qr(this,"index");Qr(this,"hash");Qr(this,"type");Qr(this,"to");Qr(this,"from");Qr(this,"nonce");Qr(this,"gasLimit");Qr(this,"gasPrice");Qr(this,"maxPriorityFeePerGas");Qr(this,"maxFeePerGas");Qr(this,"maxFeePerBlobGas");Qr(this,"data");Qr(this,"value");Qr(this,"chainId");Qr(this,"signature");Qr(this,"accessList");Qr(this,"blobVersionedHashes");In(this,Il,void 0);this.provider=tt,this.blockNumber=et.blockNumber!=null?et.blockNumber:null,this.blockHash=et.blockHash!=null?et.blockHash:null,this.hash=et.hash,this.index=et.index,this.type=et.type,this.from=et.from,this.to=et.to||null,this.gasLimit=et.gasLimit,this.nonce=et.nonce,this.data=et.data,this.value=et.value,this.gasPrice=et.gasPrice,this.maxPriorityFeePerGas=et.maxPriorityFeePerGas!=null?et.maxPriorityFeePerGas:null,this.maxFeePerGas=et.maxFeePerGas!=null?et.maxFeePerGas:null,this.maxFeePerBlobGas=et.maxFeePerBlobGas!=null?et.maxFeePerBlobGas:null,this.chainId=et.chainId,this.signature=et.signature,this.accessList=et.accessList!=null?et.accessList:null,this.blobVersionedHashes=et.blobVersionedHashes!=null?et.blobVersionedHashes:null,Yr(this,Il,-1)}toJSON(){const{blockNumber:et,blockHash:tt,index:nt,hash:at,type:ot,to:st,from:ct,nonce:dt,data:ht,signature:pt,accessList:mt,blobVersionedHashes:yt}=this;return{_type:"TransactionResponse",accessList:mt,blockNumber:et,blockHash:tt,blobVersionedHashes:yt,chainId:toJson(this.chainId),data:ht,from:ct,gasLimit:toJson(this.gasLimit),gasPrice:toJson(this.gasPrice),hash:at,maxFeePerGas:toJson(this.maxFeePerGas),maxPriorityFeePerGas:toJson(this.maxPriorityFeePerGas),maxFeePerBlobGas:toJson(this.maxFeePerBlobGas),nonce:dt,signature:pt,to:st,index:nt,type:ot,value:toJson(this.value)}}async getBlock(){let et=this.blockNumber;if(et==null){const nt=await this.getTransaction();nt&&(et=nt.blockNumber)}if(et==null)return null;const tt=this.provider.getBlock(et);if(tt==null)throw new Error("TODO");return tt}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:tt,blockNumber:nt}=await resolveProperties$1({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return tt==null||tt.blockNumber==null?0:nt-tt.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(et,tt){const nt=et??1,at=tt??0;let ot=$r(this,Il),st=-1,ct=ot===-1;const dt=async()=>{if(ct)return null;const{blockNumber:yt,nonce:gt}=await resolveProperties$1({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(gt<this.nonce){ot=yt;return}if(ct)return null;const bt=await this.getTransaction();if(!(bt&&bt.blockNumber!=null))for(st===-1&&(st=ot-3,st<$r(this,Il)&&(st=$r(this,Il)));st<=yt;){if(ct)return null;const $t=await this.provider.getBlock(st,!0);if($t==null)return;for(const wt of $t)if(wt===this.hash)return;for(let wt=0;wt<$t.length;wt++){const St=await $t.getTransaction(wt);if(St.from===this.from&&St.nonce===this.nonce){if(ct)return null;const Tt=await this.provider.getTransactionReceipt(St.hash);if(Tt==null||yt-Tt.blockNumber+1<nt)return;let Pt="replaced";St.data===this.data&&St.to===this.to&&St.value===this.value?Pt="repriced":St.data==="0x"&&St.from===St.to&&St.value===BN_0$2&&(Pt="cancelled"),assert$y(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:Pt==="replaced"||Pt==="cancelled",reason:Pt,replacement:St.replaceableTransaction(ot),hash:St.hash,receipt:Tt})}}st++}},ht=yt=>{if(yt==null||yt.status!==0)return yt;assert$y(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:yt.to,from:yt.from,data:""},receipt:yt})},pt=await this.provider.getTransactionReceipt(this.hash);if(nt===0)return ht(pt);if(pt){if(await pt.confirmations()>=nt)return ht(pt)}else if(await dt(),nt===0)return null;return await new Promise((yt,gt)=>{const bt=[],$t=()=>{bt.forEach(St=>St())};if(bt.push(()=>{ct=!0}),at>0){const St=setTimeout(()=>{$t(),gt(makeError("wait for transaction timeout","TIMEOUT"))},at);bt.push(()=>{clearTimeout(St)})}const wt=async St=>{if(await St.confirmations()>=nt){$t();try{yt(ht(St))}catch(Tt){gt(Tt)}}};if(bt.push(()=>{this.provider.off(this.hash,wt)}),this.provider.on(this.hash,wt),ot>=0){const St=async()=>{try{await dt()}catch(Tt){if(isError$3(Tt,"TRANSACTION_REPLACED")){$t(),gt(Tt);return}}ct||this.provider.once("block",St)};bt.push(()=>{this.provider.off("block",St)}),this.provider.once("block",St)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return assert$y(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),createRemovedTransactionFilter(this)}reorderedEvent(et){return assert$y(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),assert$y(!et||et.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),createReorderedTransactionFilter(this,et)}replaceableTransaction(et){assertArgument(Number.isInteger(et)&&et>=0,"invalid startBlock","startBlock",et);const tt=new Xm(this,this.provider);return Yr(tt,Il,et),tt}};Il=new WeakMap;let TransactionResponse=Xm;function createOrphanedBlockFilter(_e){return{orphan:"drop-block",hash:_e.hash,number:_e.number}}function createReorderedTransactionFilter(_e,et){return{orphan:"reorder-transaction",tx:_e,other:et}}function createRemovedTransactionFilter(_e){return{orphan:"drop-transaction",tx:_e}}function createRemovedLogFilter(_e){return{orphan:"drop-log",log:{transactionHash:_e.transactionHash,blockHash:_e.blockHash,blockNumber:_e.blockNumber,address:_e.address,data:_e.data,topics:Object.freeze(_e.topics.slice()),index:_e.index}}}class EventLog extends Log{constructor(tt,nt,at){super(tt,tt.provider);Qr(this,"interface");Qr(this,"fragment");Qr(this,"args");const ot=nt.decodeEventLog(at,tt.data,tt.topics);defineProperties$2(this,{args:ot,fragment:at,interface:nt})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class UndecodedEventLog extends Log{constructor(tt,nt){super(tt,tt.provider);Qr(this,"error");defineProperties$2(this,{error:nt})}}var np;class ContractTransactionReceipt extends TransactionReceipt{constructor(tt,nt,at){super(at,nt);In(this,np,void 0);Yr(this,np,tt)}get logs(){return super.logs.map(tt=>{const nt=tt.topics.length?$r(this,np).getEvent(tt.topics[0]):null;if(nt)try{return new EventLog(tt,$r(this,np),nt)}catch(at){return new UndecodedEventLog(tt,at)}return tt})}}np=new WeakMap;var Up;class ContractTransactionResponse extends TransactionResponse{constructor(tt,nt,at){super(at,nt);In(this,Up,void 0);Yr(this,Up,tt)}async wait(tt,nt){const at=await super.wait(tt,nt);return at==null?null:new ContractTransactionReceipt($r(this,Up),this.provider,at)}}Up=new WeakMap;class ContractUnknownEventPayload extends EventPayload{constructor(tt,nt,at,ot){super(tt,nt,at);Qr(this,"log");defineProperties$2(this,{log:ot})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class ContractEventPayload extends ContractUnknownEventPayload{constructor(et,tt,nt,at,ot){super(et,tt,nt,new EventLog(ot,et.interface,at));const st=et.interface.decodeEventLog(at,this.log.data,this.log.topics);defineProperties$2(this,{args:st,fragment:at})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const BN_0$1=BigInt(0);function canCall(_e){return _e&&typeof _e.call=="function"}function canEstimate(_e){return _e&&typeof _e.estimateGas=="function"}function canResolve(_e){return _e&&typeof _e.resolveName=="function"}function canSend(_e){return _e&&typeof _e.sendTransaction=="function"}function getResolver(_e){if(_e!=null){if(canResolve(_e))return _e;if(_e.provider)return _e.provider}}var qp;class PreparedTopicFilter{constructor(et,tt,nt){In(this,qp,void 0);Qr(this,"fragment");if(defineProperties$2(this,{fragment:tt}),tt.inputs.length<nt.length)throw new Error("too many arguments");const at=getRunner(et.runner,"resolveName"),ot=canResolve(at)?at:null;Yr(this,qp,async function(){const st=await Promise.all(tt.inputs.map((ct,dt)=>nt[dt]==null?null:ct.walkAsync(nt[dt],(pt,mt)=>pt==="address"?Array.isArray(mt)?Promise.all(mt.map(yt=>resolveAddress(yt,ot))):resolveAddress(mt,ot):mt)));return et.interface.encodeFilterTopics(tt,st)}())}getTopicFilter(){return $r(this,qp)}}qp=new WeakMap;function getRunner(_e,et){return _e==null?null:typeof _e[et]=="function"?_e:_e.provider&&typeof _e.provider[et]=="function"?_e.provider:null}function getProvider(_e){return _e==null?null:_e.provider||null}async function copyOverrides(_e,et){const tt=Typed.dereference(_e,"overrides");assertArgument(typeof tt=="object","invalid overrides parameter","overrides",_e);const nt=copyRequest(tt);return assertArgument(nt.to==null||(et||[]).indexOf("to")>=0,"cannot override to","overrides.to",nt.to),assertArgument(nt.data==null||(et||[]).indexOf("data")>=0,"cannot override data","overrides.data",nt.data),nt.from&&(nt.from=nt.from),nt}async function resolveArgs(_e,et,tt){const nt=getRunner(_e,"resolveName"),at=canResolve(nt)?nt:null;return await Promise.all(et.map((ot,st)=>ot.walkAsync(tt[st],(ct,dt)=>(dt=Typed.dereference(dt,ct),ct==="address"?resolveAddress(dt,at):dt))))}function buildWrappedFallback(_e){const et=async function(st){const ct=await copyOverrides(st,["data"]);ct.to=await _e.getAddress(),ct.from&&(ct.from=await resolveAddress(ct.from,getResolver(_e.runner)));const dt=_e.interface,ht=getBigInt(ct.value||BN_0$1,"overrides.value")===BN_0$1,pt=(ct.data||"0x")==="0x";dt.fallback&&!dt.fallback.payable&&dt.receive&&!pt&&!ht&&assertArgument(!1,"cannot send data to receive or send value to non-payable fallback","overrides",st),assertArgument(dt.fallback||pt,"cannot send data to receive-only contract","overrides.data",ct.data);const mt=dt.receive||dt.fallback&&dt.fallback.payable;return assertArgument(mt||ht,"cannot send value to non-payable fallback","overrides.value",ct.value),assertArgument(dt.fallback||pt,"cannot send data to receive-only contract","overrides.data",ct.data),ct},tt=async function(st){const ct=getRunner(_e.runner,"call");assert$y(canCall(ct),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const dt=await et(st);try{return await ct.call(dt)}catch(ht){throw isCallException(ht)&&ht.data?_e.interface.makeError(ht.data,dt):ht}},nt=async function(st){const ct=_e.runner;assert$y(canSend(ct),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const dt=await ct.sendTransaction(await et(st)),ht=getProvider(_e.runner);return new ContractTransactionResponse(_e.interface,ht,dt)},at=async function(st){const ct=getRunner(_e.runner,"estimateGas");return assert$y(canEstimate(ct),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await ct.estimateGas(await et(st))},ot=async st=>await nt(st);return defineProperties$2(ot,{_contract:_e,estimateGas:at,populateTransaction:et,send:nt,staticCall:tt}),ot}function buildWrappedMethod(_e,et){const tt=function(...ht){const pt=_e.interface.getFunction(et,ht);return assert$y(pt,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:et,args:ht}}),pt},nt=async function(...ht){const pt=tt(...ht);let mt={};if(pt.inputs.length+1===ht.length&&(mt=await copyOverrides(ht.pop()),mt.from&&(mt.from=await resolveAddress(mt.from,getResolver(_e.runner)))),pt.inputs.length!==ht.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const yt=await resolveArgs(_e.runner,pt.inputs,ht);return Object.assign({},mt,await resolveProperties$1({to:_e.getAddress(),data:_e.interface.encodeFunctionData(pt,yt)}))},at=async function(...ht){const pt=await ct(...ht);return pt.length===1?pt[0]:pt},ot=async function(...ht){const pt=_e.runner;assert$y(canSend(pt),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const mt=await pt.sendTransaction(await nt(...ht)),yt=getProvider(_e.runner);return new ContractTransactionResponse(_e.interface,yt,mt)},st=async function(...ht){const pt=getRunner(_e.runner,"estimateGas");return assert$y(canEstimate(pt),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await pt.estimateGas(await nt(...ht))},ct=async function(...ht){const pt=getRunner(_e.runner,"call");assert$y(canCall(pt),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const mt=await nt(...ht);let yt="0x";try{yt=await pt.call(mt)}catch(bt){throw isCallException(bt)&&bt.data?_e.interface.makeError(bt.data,mt):bt}const gt=tt(...ht);return _e.interface.decodeFunctionResult(gt,yt)},dt=async(...ht)=>tt(...ht).constant?await at(...ht):await ot(...ht);return defineProperties$2(dt,{name:_e.interface.getFunctionName(et),_contract:_e,_key:et,getFragment:tt,estimateGas:st,populateTransaction:nt,send:ot,staticCall:at,staticCallResult:ct}),Object.defineProperty(dt,"fragment",{configurable:!1,enumerable:!0,get:()=>{const ht=_e.interface.getFunction(et);return assert$y(ht,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:et}}),ht}}),dt}function buildWrappedEvent(_e,et){const tt=function(...at){const ot=_e.interface.getEvent(et,at);return assert$y(ot,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:et,args:at}}),ot},nt=function(...at){return new PreparedTopicFilter(_e,tt(...at),at)};return defineProperties$2(nt,{name:_e.interface.getEventName(et),_contract:_e,_key:et,getFragment:tt}),Object.defineProperty(nt,"fragment",{configurable:!1,enumerable:!0,get:()=>{const at=_e.interface.getEvent(et);return assert$y(at,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:et}}),at}}),nt}const internal=Symbol.for("_ethersInternal_contract"),internalValues=new WeakMap;function setInternal(_e,et){internalValues.set(_e[internal],et)}function getInternal(_e){return internalValues.get(_e[internal])}function isDeferred(_e){return _e&&typeof _e=="object"&&"getTopicFilter"in _e&&typeof _e.getTopicFilter=="function"&&_e.fragment}async function getSubInfo(_e,et){let tt,nt=null;if(Array.isArray(et)){const ot=function(st){if(isHexString$1(st,32))return st;const ct=_e.interface.getEvent(st);return assertArgument(ct,"unknown fragment","name",st),ct.topicHash};tt=et.map(st=>st==null?null:Array.isArray(st)?st.map(ot):ot(st))}else et==="*"?tt=[null]:typeof et=="string"?isHexString$1(et,32)?tt=[et]:(nt=_e.interface.getEvent(et),assertArgument(nt,"unknown fragment","event",et),tt=[nt.topicHash]):isDeferred(et)?tt=await et.getTopicFilter():"fragment"in et?(nt=et.fragment,tt=[nt.topicHash]):assertArgument(!1,"unknown event name","event",et);tt=tt.map(ot=>{if(ot==null)return null;if(Array.isArray(ot)){const st=Array.from(new Set(ot.map(ct=>ct.toLowerCase())).values());return st.length===1?st[0]:(st.sort(),st)}return ot.toLowerCase()});const at=tt.map(ot=>ot==null?"null":Array.isArray(ot)?ot.join("|"):ot).join("&");return{fragment:nt,tag:at,topics:tt}}async function hasSub(_e,et){const{subs:tt}=getInternal(_e);return tt.get((await getSubInfo(_e,et)).tag)||null}async function getSub(_e,et,tt){const nt=getProvider(_e.runner);assert$y(nt,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:et});const{fragment:at,tag:ot,topics:st}=await getSubInfo(_e,tt),{addr:ct,subs:dt}=getInternal(_e);let ht=dt.get(ot);if(!ht){const mt={address:ct||_e,topics:st},yt=wt=>{let St=at;if(St==null)try{St=_e.interface.getEvent(wt.topics[0])}catch{}if(St){const Tt=St,Pt=at?_e.interface.decodeEventLog(at,wt.data,wt.topics):[];emit(_e,tt,Pt,Ot=>new ContractEventPayload(_e,Ot,tt,Tt,wt))}else emit(_e,tt,[],Tt=>new ContractUnknownEventPayload(_e,Tt,tt,wt))};let gt=[];ht={tag:ot,listeners:[],start:()=>{gt.length||gt.push(nt.on(mt,yt))},stop:async()=>{if(gt.length==0)return;let wt=gt;gt=[],await Promise.all(wt),nt.off(mt,yt)}},dt.set(ot,ht)}return ht}let lastEmit=Promise.resolve();async function _emit(_e,et,tt,nt){await lastEmit;const at=await hasSub(_e,et);if(!at)return!1;const ot=at.listeners.length;return at.listeners=at.listeners.filter(({listener:st,once:ct})=>{const dt=Array.from(tt);nt&&dt.push(nt(ct?null:st));try{st.call(_e,...dt)}catch{}return!ct}),at.listeners.length===0&&(at.stop(),getInternal(_e).subs.delete(at.tag)),ot>0}async function emit(_e,et,tt,nt){try{await lastEmit}catch{}const at=_emit(_e,et,tt,nt);return lastEmit=at,await at}const passProperties=["then"];var cy,Au;let BaseContract$1=(Au=class{constructor(et,tt,nt,at){Qr(this,"target");Qr(this,"interface");Qr(this,"runner");Qr(this,"filters");Qr(this,cy);Qr(this,"fallback");assertArgument(typeof et=="string"||isAddressable(et),"invalid value for Contract target","target",et),nt==null&&(nt=null);const ot=Interface$1.from(tt);defineProperties$2(this,{target:et,runner:nt,interface:ot}),Object.defineProperty(this,internal,{value:{}});let st,ct=null,dt=null;if(at){const mt=getProvider(nt);dt=new ContractTransactionResponse(this.interface,mt,at)}let ht=new Map;if(typeof et=="string")if(isHexString$1(et))ct=et,st=Promise.resolve(et);else{const mt=getRunner(nt,"resolveName");if(!canResolve(mt))throw makeError("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});st=mt.resolveName(et).then(yt=>{if(yt==null)throw makeError("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:et});return getInternal(this).addr=yt,yt})}else st=et.getAddress().then(mt=>{if(mt==null)throw new Error("TODO");return getInternal(this).addr=mt,mt});setInternal(this,{addrPromise:st,addr:ct,deployTx:dt,subs:ht});const pt=new Proxy({},{get:(mt,yt,gt)=>{if(typeof yt=="symbol"||passProperties.indexOf(yt)>=0)return Reflect.get(mt,yt,gt);try{return this.getEvent(yt)}catch(bt){if(!isError$3(bt,"INVALID_ARGUMENT")||bt.argument!=="key")throw bt}},has:(mt,yt)=>passProperties.indexOf(yt)>=0?Reflect.has(mt,yt):Reflect.has(mt,yt)||this.interface.hasEvent(String(yt))});return defineProperties$2(this,{filters:pt}),defineProperties$2(this,{fallback:ot.receive||ot.fallback?buildWrappedFallback(this):null}),new Proxy(this,{get:(mt,yt,gt)=>{if(typeof yt=="symbol"||yt in mt||passProperties.indexOf(yt)>=0)return Reflect.get(mt,yt,gt);try{return mt.getFunction(yt)}catch(bt){if(!isError$3(bt,"INVALID_ARGUMENT")||bt.argument!=="key")throw bt}},has:(mt,yt)=>typeof yt=="symbol"||yt in mt||passProperties.indexOf(yt)>=0?Reflect.has(mt,yt):mt.interface.hasFunction(yt)})}connect(et){return new Au(this.target,this.interface,et)}attach(et){return new Au(et,this.interface,this.runner)}async getAddress(){return await getInternal(this).addrPromise}async getDeployedCode(){const et=getProvider(this.runner);assert$y(et,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const tt=await et.getCode(await this.getAddress());return tt==="0x"?null:tt}async waitForDeployment(){const et=this.deploymentTransaction();if(et)return await et.wait(),this;if(await this.getDeployedCode()!=null)return this;const nt=getProvider(this.runner);return assert$y(nt!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((at,ot)=>{const st=async()=>{try{if(await this.getDeployedCode()!=null)return at(this);nt.once("block",st)}catch(ct){ot(ct)}};st()})}deploymentTransaction(){return getInternal(this).deployTx}getFunction(et){return typeof et!="string"&&(et=et.format()),buildWrappedMethod(this,et)}getEvent(et){return typeof et!="string"&&(et=et.format()),buildWrappedEvent(this,et)}async queryTransaction(et){throw new Error("@TODO")}async queryFilter(et,tt,nt){tt==null&&(tt=0),nt==null&&(nt="latest");const{addr:at,addrPromise:ot}=getInternal(this),st=at||await ot,{fragment:ct,topics:dt}=await getSubInfo(this,et),ht={address:st,topics:dt,fromBlock:tt,toBlock:nt},pt=getProvider(this.runner);return assert$y(pt,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await pt.getLogs(ht)).map(mt=>{let yt=ct;if(yt==null)try{yt=this.interface.getEvent(mt.topics[0])}catch{}if(yt)try{return new EventLog(mt,this.interface,yt)}catch(gt){return new UndecodedEventLog(mt,gt)}return new Log(mt,pt)})}async on(et,tt){const nt=await getSub(this,"on",et);return nt.listeners.push({listener:tt,once:!1}),nt.start(),this}async once(et,tt){const nt=await getSub(this,"once",et);return nt.listeners.push({listener:tt,once:!0}),nt.start(),this}async emit(et,...tt){return await emit(this,et,tt,null)}async listenerCount(et){if(et){const at=await hasSub(this,et);return at?at.listeners.length:0}const{subs:tt}=getInternal(this);let nt=0;for(const{listeners:at}of tt.values())nt+=at.length;return nt}async listeners(et){if(et){const at=await hasSub(this,et);return at?at.listeners.map(({listener:ot})=>ot):[]}const{subs:tt}=getInternal(this);let nt=[];for(const{listeners:at}of tt.values())nt=nt.concat(at.map(({listener:ot})=>ot));return nt}async off(et,tt){const nt=await hasSub(this,et);if(!nt)return this;if(tt){const at=nt.listeners.map(({listener:ot})=>ot).indexOf(tt);at>=0&&nt.listeners.splice(at,1)}return(tt==null||nt.listeners.length===0)&&(nt.stop(),getInternal(this).subs.delete(nt.tag)),this}async removeAllListeners(et){if(et){const tt=await hasSub(this,et);if(!tt)return this;tt.stop(),getInternal(this).subs.delete(tt.tag)}else{const{subs:tt}=getInternal(this);for(const{tag:nt,stop:at}of tt.values())at(),tt.delete(nt)}return this}async addListener(et,tt){return await this.on(et,tt)}async removeListener(et,tt){return await this.off(et,tt)}static buildClass(et){class tt extends Au{constructor(at,ot=null){super(at,et,ot)}}return tt}static from(et,tt,nt){return nt==null&&(nt=null),new this(et,tt,nt)}},cy=internal,Au);function _ContractBase(){return BaseContract$1}let Contract$1=class extends _ContractBase(){};function getIpfsLink$1(_e){return _e.match(/^ipfs:\/\/ipfs\//i)?_e=_e.substring(12):_e.match(/^ipfs:\/\//i)?_e=_e.substring(7):assertArgument(!1,"unsupported IPFS format","link",_e),`https://gateway.ipfs.io/ipfs/${_e}`}class MulticoinProviderPlugin{constructor(et){Qr(this,"name");defineProperties$2(this,{name:et})}connect(et){return this}supportsCoinType(et){return!1}async encodeAddress(et,tt){throw new Error("unsupported coin")}async decodeAddress(et,tt){throw new Error("unsupported coin")}}const matcherIpfs$1=new RegExp("^(ipfs)://(.*)$","i"),matchers$1=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),matcherIpfs$1,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Nl,hu,Dl,Iu,Rm,ry;const Nu=class Nu{constructor(et,tt,nt){In(this,Dl);Qr(this,"provider");Qr(this,"address");Qr(this,"name");In(this,Nl,void 0);In(this,hu,void 0);defineProperties$2(this,{provider:et,address:tt,name:nt}),Yr(this,Nl,null),Yr(this,hu,new Contract$1(tt,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],et))}async supportsWildcard(){return $r(this,Nl)==null&&Yr(this,Nl,(async()=>{try{return await $r(this,hu).supportsInterface("0x9061b923")}catch(et){if(isError$3(et,"CALL_EXCEPTION"))return!1;throw Yr(this,Nl,null),et}})()),await $r(this,Nl)}async getAddress(et){if(et==null&&(et=60),et===60)try{const ot=await ga(this,Dl,Iu).call(this,"addr(bytes32)");return ot==null||ot===ZeroAddress?null:ot}catch(ot){if(isError$3(ot,"CALL_EXCEPTION"))return null;throw ot}if(et>=0&&et<2147483648){let ot=et+2147483648;const st=await ga(this,Dl,Iu).call(this,"addr(bytes32,uint)",[ot]);if(isHexString$1(st,20))return getAddress$1(st)}let tt=null;for(const ot of this.provider.plugins)if(ot instanceof MulticoinProviderPlugin&&ot.supportsCoinType(et)){tt=ot;break}if(tt==null)return null;const nt=await ga(this,Dl,Iu).call(this,"addr(bytes32,uint)",[et]);if(nt==null||nt==="0x")return null;const at=await tt.decodeAddress(et,nt);if(at!=null)return at;assert$y(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${et})`,info:{coinType:et,data:nt}})}async getText(et){const tt=await ga(this,Dl,Iu).call(this,"text(bytes32,string)",[et]);return tt==null||tt==="0x"?null:tt}async getContentHash(){const et=await ga(this,Dl,Iu).call(this,"contenthash(bytes32)");if(et==null||et==="0x")return null;const tt=et.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(tt){const at=tt[1]==="e3010170"?"ipfs":"ipns",ot=parseInt(tt[4],16);if(tt[5].length===ot*2)return`${at}://${encodeBase58("0x"+tt[2])}`}const nt=et.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(nt&&nt[1].length===64)return`bzz://${nt[1]}`;assert$y(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:et}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const et=[{type:"name",value:this.name}];try{const tt=await this.getText("avatar");if(tt==null)return et.push({type:"!avatar",value:""}),{url:null,linkage:et};et.push({type:"avatar",value:tt});for(let nt=0;nt<matchers$1.length;nt++){const at=tt.match(matchers$1[nt]);if(at==null)continue;const ot=at[1].toLowerCase();switch(ot){case"https":case"data":return et.push({type:"url",value:tt}),{linkage:et,url:tt};case"ipfs":{const st=getIpfsLink$1(tt);return et.push({type:"ipfs",value:tt}),et.push({type:"url",value:st}),{linkage:et,url:st}}case"erc721":case"erc1155":{const st=ot==="erc721"?"tokenURI(uint256)":"uri(uint256)";et.push({type:ot,value:tt});const ct=await this.getAddress();if(ct==null)return et.push({type:"!owner",value:""}),{url:null,linkage:et};const dt=(at[2]||"").split("/");if(dt.length!==2)return et.push({type:`!${ot}caip`,value:at[2]||""}),{url:null,linkage:et};const ht=dt[1],pt=new Contract$1(dt[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(ot==="erc721"){const $t=await pt.ownerOf(ht);if(ct!==$t)return et.push({type:"!owner",value:$t}),{url:null,linkage:et};et.push({type:"owner",value:$t})}else if(ot==="erc1155"){const $t=await pt.balanceOf(ct,ht);if(!$t)return et.push({type:"!balance",value:"0"}),{url:null,linkage:et};et.push({type:"balance",value:$t.toString()})}let mt=await pt[st](ht);if(mt==null||mt==="0x")return et.push({type:"!metadata-url",value:""}),{url:null,linkage:et};et.push({type:"metadata-url-base",value:mt}),ot==="erc1155"&&(mt=mt.replace("{id}",toBeHex(ht,32).substring(2)),et.push({type:"metadata-url-expanded",value:mt})),mt.match(/^ipfs:/i)&&(mt=getIpfsLink$1(mt)),et.push({type:"metadata-url",value:mt});let yt={};const gt=await new FetchRequest(mt).send();gt.assertOk();try{yt=gt.bodyJson}catch{try{et.push({type:"!metadata",value:gt.bodyText})}catch{const St=gt.body;return St&&et.push({type:"!metadata",value:hexlify$1(St)}),{url:null,linkage:et}}return{url:null,linkage:et}}if(!yt)return et.push({type:"!metadata",value:""}),{url:null,linkage:et};et.push({type:"metadata",value:JSON.stringify(yt)});let bt=yt.image;if(typeof bt!="string")return et.push({type:"!imageUrl",value:""}),{url:null,linkage:et};if(!bt.match(/^(https:\/\/|data:)/i)){if(bt.match(matcherIpfs$1)==null)return et.push({type:"!imageUrl-ipfs",value:bt}),{url:null,linkage:et};et.push({type:"imageUrl-ipfs",value:bt}),bt=getIpfsLink$1(bt)}return et.push({type:"url",value:bt}),{linkage:et,url:bt}}}}}catch{}return{linkage:et,url:null}}static async getEnsAddress(et){const tt=await et.getNetwork(),nt=tt.getPlugin("org.ethers.plugins.network.Ens");return assert$y(nt,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:tt}}),nt.address}static async fromName(et,tt){var at;let nt=tt;for(;;){if(nt===""||nt==="."||tt!=="eth"&&nt==="eth")return null;const ot=await ga(at=Nu,Rm,ry).call(at,et,nt);if(ot!=null){const st=new Nu(et,ot,tt);return nt!==tt&&!await st.supportsWildcard()?null:st}nt=nt.split(".").slice(1).join(".")}}};Nl=new WeakMap,hu=new WeakMap,Dl=new WeakSet,Iu=async function(et,tt){tt=(tt||[]).slice();const nt=$r(this,hu).interface;tt.unshift(namehash$1(this.name));let at=null;await this.supportsWildcard()&&(at=nt.getFunction(et),assert$y(at,"missing fragment","UNKNOWN_ERROR",{info:{funcName:et}}),tt=[dnsEncode$1(this.name,255),nt.encodeFunctionData(at,tt)],et="resolve(bytes,bytes)"),tt.push({enableCcipRead:!0});try{const ot=await $r(this,hu)[et](...tt);return at?nt.decodeFunctionResult(at,ot)[0]:ot}catch(ot){if(!isError$3(ot,"CALL_EXCEPTION"))throw ot}return null},Rm=new WeakSet,ry=async function(et,tt){const nt=await Nu.getEnsAddress(et);try{const ot=await new Contract$1(nt,["function resolver(bytes32) view returns (address)"],et).resolver(namehash$1(tt),{enableCcipRead:!0});return ot===ZeroAddress?null:ot}catch(at){throw at}return null},In(Nu,Rm);let EnsResolver=Nu;const BN_0=BigInt(0);function allowNull(_e,et){return function(tt){return tt==null?et:_e(tt)}}function arrayOf(_e,et){return tt=>{if(et&&tt==null)return null;if(!Array.isArray(tt))throw new Error("not an array");return tt.map(nt=>_e(nt))}}function object$1(_e,et){return tt=>{const nt={};for(const at in _e){let ot=at;if(et&&at in et&&!(ot in tt)){for(const st of et[at])if(st in tt){ot=st;break}}try{const st=_e[at](tt[ot]);st!==void 0&&(nt[at]=st)}catch(st){const ct=st instanceof Error?st.message:"not-an-error";assert$y(!1,`invalid value for value.${at} (${ct})`,"BAD_DATA",{value:tt})}}return nt}}function formatBoolean(_e){switch(_e){case!0:case"true":return!0;case!1:case"false":return!1}assertArgument(!1,`invalid boolean; ${JSON.stringify(_e)}`,"value",_e)}function formatData(_e){return assertArgument(isHexString$1(_e,!0),"invalid data","value",_e),_e}function formatHash(_e){return assertArgument(isHexString$1(_e,32),"invalid hash","value",_e),_e}const _formatLog=object$1({address:getAddress$1,blockHash:formatHash,blockNumber:getNumber,data:formatData,index:getNumber,removed:allowNull(formatBoolean,!1),topics:arrayOf(formatHash),transactionHash:formatHash,transactionIndex:getNumber},{index:["logIndex"]});function formatLog(_e){return _formatLog(_e)}const _formatBlock=object$1({hash:allowNull(formatHash),parentHash:formatHash,parentBeaconBlockRoot:allowNull(formatHash,null),number:getNumber,timestamp:getNumber,nonce:allowNull(formatData),difficulty:getBigInt,gasLimit:getBigInt,gasUsed:getBigInt,stateRoot:allowNull(formatHash,null),receiptsRoot:allowNull(formatHash,null),blobGasUsed:allowNull(getBigInt,null),excessBlobGas:allowNull(getBigInt,null),miner:allowNull(getAddress$1),extraData:formatData,baseFeePerGas:allowNull(getBigInt)});function formatBlock(_e){const et=_formatBlock(_e);return et.transactions=_e.transactions.map(tt=>typeof tt=="string"?tt:formatTransactionResponse(tt)),et}const _formatReceiptLog=object$1({transactionIndex:getNumber,blockNumber:getNumber,transactionHash:formatHash,address:getAddress$1,topics:arrayOf(formatHash),data:formatData,index:getNumber,blockHash:formatHash},{index:["logIndex"]});function formatReceiptLog(_e){return _formatReceiptLog(_e)}const _formatTransactionReceipt=object$1({to:allowNull(getAddress$1,null),from:allowNull(getAddress$1,null),contractAddress:allowNull(getAddress$1,null),index:getNumber,root:allowNull(hexlify$1),gasUsed:getBigInt,blobGasUsed:allowNull(getBigInt,null),logsBloom:allowNull(formatData),blockHash:formatHash,hash:formatHash,logs:arrayOf(formatReceiptLog),blockNumber:getNumber,cumulativeGasUsed:getBigInt,effectiveGasPrice:allowNull(getBigInt),blobGasPrice:allowNull(getBigInt,null),status:allowNull(getNumber),type:allowNull(getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function formatTransactionReceipt(_e){return _formatTransactionReceipt(_e)}function formatTransactionResponse(_e){_e.to&&getBigInt(_e.to)===BN_0&&(_e.to="0x0000000000000000000000000000000000000000");const et=object$1({hash:formatHash,index:allowNull(getNumber,void 0),type:tt=>tt==="0x"||tt==null?0:getNumber(tt),accessList:allowNull(accessListify$1,null),blobVersionedHashes:allowNull(arrayOf(formatHash,!0),null),blockHash:allowNull(formatHash,null),blockNumber:allowNull(getNumber,null),transactionIndex:allowNull(getNumber,null),from:getAddress$1,gasPrice:allowNull(getBigInt),maxPriorityFeePerGas:allowNull(getBigInt),maxFeePerGas:allowNull(getBigInt),maxFeePerBlobGas:allowNull(getBigInt,null),gasLimit:getBigInt,to:allowNull(getAddress$1,null),value:getBigInt,nonce:getNumber,data:formatData,creates:allowNull(getAddress$1,null),chainId:allowNull(getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(_e);if(et.to==null&&et.creates==null&&(et.creates=getCreateAddress(et)),(_e.type===1||_e.type===2)&&_e.accessList==null&&(et.accessList=[]),_e.signature?et.signature=Signature$7.from(_e.signature):et.signature=Signature$7.from(_e),et.chainId==null){const tt=et.signature.legacyChainId;tt!=null&&(et.chainId=tt)}return et.blockHash&&getBigInt(et.blockHash)===BN_0&&(et.blockHash=null),et}const EnsAddress="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class NetworkPlugin{constructor(et){Qr(this,"name");defineProperties$2(this,{name:et})}clone(){return new NetworkPlugin(this.name)}}class GasCostPlugin extends NetworkPlugin{constructor(tt,nt){tt==null&&(tt=0);super(`org.ethers.network.plugins.GasCost#${tt||0}`);Qr(this,"effectiveBlock");Qr(this,"txBase");Qr(this,"txCreate");Qr(this,"txDataZero");Qr(this,"txDataNonzero");Qr(this,"txAccessListStorageKey");Qr(this,"txAccessListAddress");const at={effectiveBlock:tt};function ot(st,ct){let dt=(nt||{})[st];dt==null&&(dt=ct),assertArgument(typeof dt=="number",`invalud value for ${st}`,"costs",nt),at[st]=dt}ot("txBase",21e3),ot("txCreate",32e3),ot("txDataZero",4),ot("txDataNonzero",16),ot("txAccessListStorageKey",1900),ot("txAccessListAddress",2400),defineProperties$2(this,at)}clone(){return new GasCostPlugin(this.effectiveBlock,this)}}class EnsPlugin extends NetworkPlugin{constructor(tt,nt){super("org.ethers.plugins.network.Ens");Qr(this,"address");Qr(this,"targetNetwork");defineProperties$2(this,{address:tt||EnsAddress,targetNetwork:nt??1})}clone(){return new EnsPlugin(this.address,this.targetNetwork)}}var Hp,Gp;class FetchUrlFeeDataNetworkPlugin extends NetworkPlugin{constructor(tt,nt){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");In(this,Hp,void 0);In(this,Gp,void 0);Yr(this,Hp,tt),Yr(this,Gp,nt)}get url(){return $r(this,Hp)}get processFunc(){return $r(this,Gp)}clone(){return this}}Hp=new WeakMap,Gp=new WeakMap;const Networks=new Map;var ap,ip,Ll,Vl;let Network$2=(Vl=class{constructor(et,tt){In(this,ap,void 0);In(this,ip,void 0);In(this,Ll,void 0);Yr(this,ap,et),Yr(this,ip,getBigInt(tt)),Yr(this,Ll,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return $r(this,ap)}set name(et){Yr(this,ap,et)}get chainId(){return $r(this,ip)}set chainId(et){Yr(this,ip,getBigInt(et,"chainId"))}matches(et){if(et==null)return!1;if(typeof et=="string"){try{return this.chainId===getBigInt(et)}catch{}return this.name===et}if(typeof et=="number"||typeof et=="bigint"){try{return this.chainId===getBigInt(et)}catch{}return!1}if(typeof et=="object"){if(et.chainId!=null){try{return this.chainId===getBigInt(et.chainId)}catch{}return!1}return et.name!=null?this.name===et.name:!1}return!1}get plugins(){return Array.from($r(this,Ll).values())}attachPlugin(et){if($r(this,Ll).get(et.name))throw new Error(`cannot replace existing plugin: ${et.name} `);return $r(this,Ll).set(et.name,et.clone()),this}getPlugin(et){return $r(this,Ll).get(et)||null}getPlugins(et){return this.plugins.filter(tt=>tt.name.split("#")[0]===et)}clone(){const et=new Vl(this.name,this.chainId);return this.plugins.forEach(tt=>{et.attachPlugin(tt.clone())}),et}computeIntrinsicGas(et){const tt=this.getPlugin("org.ethers.plugins.network.GasCost")||new GasCostPlugin;let nt=tt.txBase;if(et.to==null&&(nt+=tt.txCreate),et.data)for(let at=2;at<et.data.length;at+=2)et.data.substring(at,at+2)==="00"?nt+=tt.txDataZero:nt+=tt.txDataNonzero;if(et.accessList){const at=accessListify$1(et.accessList);for(const ot in at)nt+=tt.txAccessListAddress+tt.txAccessListStorageKey*at[ot].storageKeys.length}return nt}static from(et){if(injectCommonNetworks(),et==null)return Vl.from("mainnet");if(typeof et=="number"&&(et=BigInt(et)),typeof et=="string"||typeof et=="bigint"){const tt=Networks.get(et);if(tt)return tt();if(typeof et=="bigint")return new Vl("unknown",et);assertArgument(!1,"unknown network","network",et)}if(typeof et.clone=="function")return et.clone();if(typeof et=="object"){assertArgument(typeof et.name=="string"&&typeof et.chainId=="number","invalid network object name or chainId","network",et);const tt=new Vl(et.name,et.chainId);return(et.ensAddress||et.ensNetwork!=null)&&tt.attachPlugin(new EnsPlugin(et.ensAddress,et.ensNetwork)),tt}assertArgument(!1,"invalid network","network",et)}static register(et,tt){typeof et=="number"&&(et=BigInt(et));const nt=Networks.get(et);nt&&assertArgument(!1,`conflicting network for ${JSON.stringify(nt.name)}`,"nameOrChainId",et),Networks.set(et,tt)}},ap=new WeakMap,ip=new WeakMap,Ll=new WeakMap,Vl);function parseUnits$1(_e,et){const tt=String(_e);if(!tt.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${_e}`);const nt=tt.split(".");if(nt.length===1&&nt.push(""),nt.length!==2)throw new Error(`invalid gwei value: ${_e}`);for(;nt[1].length<et;)nt[1]+="0";if(nt[1].length>9){let at=BigInt(nt[1].substring(0,9));nt[1].substring(9).match(/^0+$/)||at++,nt[1]=at.toString()}return BigInt(nt[0]+nt[1])}function getGasStationPlugin(_e){return new FetchUrlFeeDataNetworkPlugin(_e,async(et,tt,nt)=>{nt.setHeader("User-Agent","ethers");let at;try{const[ot,st]=await Promise.all([nt.send(),et()]);at=ot;const ct=at.bodyJson.standard;return{gasPrice:st.gasPrice,maxFeePerGas:parseUnits$1(ct.maxFee,9),maxPriorityFeePerGas:parseUnits$1(ct.maxPriorityFee,9)}}catch(ot){assert$y(!1,`error encountered with polygon gas station (${JSON.stringify(nt.url)})`,"SERVER_ERROR",{request:nt,response:at,error:ot})}})}let injected=!1;function injectCommonNetworks(){if(injected)return;injected=!0;function _e(et,tt,nt){const at=function(){const ot=new Network$2(et,tt);return nt.ensNetwork!=null&&ot.attachPlugin(new EnsPlugin(null,nt.ensNetwork)),ot.attachPlugin(new GasCostPlugin),(nt.plugins||[]).forEach(st=>{ot.attachPlugin(st)}),ot};Network$2.register(et,at),Network$2.register(tt,at),nt.altNames&&nt.altNames.forEach(ot=>{Network$2.register(ot,at)})}_e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),_e("ropsten",3,{ensNetwork:3}),_e("rinkeby",4,{ensNetwork:4}),_e("goerli",5,{ensNetwork:5}),_e("kovan",42,{ensNetwork:42}),_e("sepolia",11155111,{ensNetwork:11155111}),_e("holesky",17e3,{ensNetwork:17e3}),_e("classic",61,{}),_e("classicKotti",6,{}),_e("arbitrum",42161,{ensNetwork:1}),_e("arbitrum-goerli",421613,{}),_e("arbitrum-sepolia",421614,{}),_e("base",8453,{ensNetwork:1}),_e("base-goerli",84531,{}),_e("base-sepolia",84532,{}),_e("bnb",56,{ensNetwork:1}),_e("bnbt",97,{}),_e("linea",59144,{ensNetwork:1}),_e("linea-goerli",59140,{}),_e("matic",137,{ensNetwork:1,plugins:[getGasStationPlugin("https://gasstation.polygon.technology/v2")]}),_e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[getGasStationPlugin("https://gasstation-testnet.polygon.technology/v2")]}),_e("optimism",10,{ensNetwork:1,plugins:[]}),_e("optimism-goerli",420,{}),_e("optimism-sepolia",11155420,{}),_e("xdai",100,{ensNetwork:1})}function copy$5(_e){return JSON.parse(JSON.stringify(_e))}var gl,Ls,kl,Zs,op,Sm;class PollingBlockSubscriber{constructor(et){In(this,op);In(this,gl,void 0);In(this,Ls,void 0);In(this,kl,void 0);In(this,Zs,void 0);Yr(this,gl,et),Yr(this,Ls,null),Yr(this,kl,4e3),Yr(this,Zs,-2)}get pollingInterval(){return $r(this,kl)}set pollingInterval(et){Yr(this,kl,et)}start(){$r(this,Ls)||(Yr(this,Ls,$r(this,gl)._setTimeout(ga(this,op,Sm).bind(this),$r(this,kl))),ga(this,op,Sm).call(this))}stop(){$r(this,Ls)&&($r(this,gl)._clearTimeout($r(this,Ls)),Yr(this,Ls,null))}pause(et){this.stop(),et&&Yr(this,Zs,-2)}resume(){this.start()}}gl=new WeakMap,Ls=new WeakMap,kl=new WeakMap,Zs=new WeakMap,op=new WeakSet,Sm=async function(){try{const et=await $r(this,gl).getBlockNumber();if($r(this,Zs)===-2){Yr(this,Zs,et);return}if(et!==$r(this,Zs)){for(let tt=$r(this,Zs)+1;tt<=et;tt++){if($r(this,Ls)==null)return;await $r(this,gl).emit("block",tt)}Yr(this,Zs,et)}}catch{}$r(this,Ls)!=null&&Yr(this,Ls,$r(this,gl)._setTimeout(ga(this,op,Sm).bind(this),$r(this,kl)))};var pu,mu,Bl;class OnBlockSubscriber{constructor(et){In(this,pu,void 0);In(this,mu,void 0);In(this,Bl,void 0);Yr(this,pu,et),Yr(this,Bl,!1),Yr(this,mu,tt=>{this._poll(tt,$r(this,pu))})}async _poll(et,tt){throw new Error("sub-classes must override this")}start(){$r(this,Bl)||(Yr(this,Bl,!0),$r(this,mu).call(this,-2),$r(this,pu).on("block",$r(this,mu)))}stop(){$r(this,Bl)&&(Yr(this,Bl,!1),$r(this,pu).off("block",$r(this,mu)))}pause(et){this.stop()}resume(){this.start()}}pu=new WeakMap,mu=new WeakMap,Bl=new WeakMap;var sp,bl;class PollingBlockTagSubscriber extends OnBlockSubscriber{constructor(tt,nt){super(tt);In(this,sp,void 0);In(this,bl,void 0);Yr(this,sp,nt),Yr(this,bl,-2)}pause(tt){tt&&Yr(this,bl,-2),super.pause(tt)}async _poll(tt,nt){const at=await nt.getBlock($r(this,sp));at!=null&&($r(this,bl)===-2?Yr(this,bl,at.number):at.number>$r(this,bl)&&(nt.emit($r(this,sp),at.number),Yr(this,bl,at.number)))}}sp=new WeakMap,bl=new WeakMap;var Im;class PollingOrphanSubscriber extends OnBlockSubscriber{constructor(tt,nt){super(tt);In(this,Im,void 0);Yr(this,Im,copy$5(nt))}async _poll(tt,nt){throw new Error("@TODO")}}Im=new WeakMap;var lp;class PollingTransactionSubscriber extends OnBlockSubscriber{constructor(tt,nt){super(tt);In(this,lp,void 0);Yr(this,lp,nt)}async _poll(tt,nt){const at=await nt.getTransactionReceipt($r(this,lp));at&&nt.emit($r(this,lp),at)}}lp=new WeakMap;var _l,up,cp,jl,ks,Nm,ny;class PollingEventSubscriber{constructor(et,tt){In(this,Nm);In(this,_l,void 0);In(this,up,void 0);In(this,cp,void 0);In(this,jl,void 0);In(this,ks,void 0);Yr(this,_l,et),Yr(this,up,copy$5(tt)),Yr(this,cp,ga(this,Nm,ny).bind(this)),Yr(this,jl,!1),Yr(this,ks,-2)}start(){$r(this,jl)||(Yr(this,jl,!0),$r(this,ks)===-2&&$r(this,_l).getBlockNumber().then(et=>{Yr(this,ks,et)}),$r(this,_l).on("block",$r(this,cp)))}stop(){$r(this,jl)&&(Yr(this,jl,!1),$r(this,_l).off("block",$r(this,cp)))}pause(et){this.stop(),et&&Yr(this,ks,-2)}resume(){this.start()}}_l=new WeakMap,up=new WeakMap,cp=new WeakMap,jl=new WeakMap,ks=new WeakMap,Nm=new WeakSet,ny=async function(et){if($r(this,ks)===-2)return;const tt=copy$5($r(this,up));tt.fromBlock=$r(this,ks)+1,tt.toBlock=et;const nt=await $r(this,_l).getLogs(tt);if(nt.length===0){$r(this,ks)<et-60&&Yr(this,ks,et-60);return}for(const at of nt)$r(this,_l).emit($r(this,up),at),Yr(this,ks,at.blockNumber)};const BN_2=BigInt(2),MAX_CCIP_REDIRECTS$1=10;function isPromise(_e){return _e&&typeof _e.then=="function"}function getTag$7(_e,et){return _e+":"+JSON.stringify(et,(tt,nt)=>{if(nt==null)return"null";if(typeof nt=="bigint")return`bigint:${nt.toString()}`;if(typeof nt=="string")return nt.toLowerCase();if(typeof nt=="object"&&!Array.isArray(nt)){const at=Object.keys(nt);return at.sort(),at.reduce((ot,st)=>(ot[st]=nt[st],ot),{})}return nt})}class UnmanagedSubscriber{constructor(et){Qr(this,"name");defineProperties$2(this,{name:et})}start(){}stop(){}pause(et){}resume(){}}function copy$4(_e){return JSON.parse(JSON.stringify(_e))}function concisify(_e){return _e=Array.from(new Set(_e).values()),_e.sort(),_e}async function getSubscription(_e,et){if(_e==null)throw new Error("invalid event");if(Array.isArray(_e)&&(_e={topics:_e}),typeof _e=="string")switch(_e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:_e,tag:_e}}if(isHexString$1(_e,32)){const tt=_e.toLowerCase();return{type:"transaction",tag:getTag$7("tx",{hash:tt}),hash:tt}}if(_e.orphan){const tt=_e;return{type:"orphan",tag:getTag$7("orphan",tt),filter:copy$4(tt)}}if(_e.address||_e.topics){const tt=_e,nt={topics:(tt.topics||[]).map(at=>at==null?null:Array.isArray(at)?concisify(at.map(ot=>ot.toLowerCase())):at.toLowerCase())};if(tt.address){const at=[],ot=[],st=ct=>{isHexString$1(ct)?at.push(ct):ot.push((async()=>{at.push(await resolveAddress(ct,et))})())};Array.isArray(tt.address)?tt.address.forEach(st):st(tt.address),ot.length&&await Promise.all(ot),nt.address=concisify(at.map(ct=>ct.toLowerCase()))}return{filter:nt,tag:getTag$7("event",nt),type:"event"}}assertArgument(!1,"unknown ProviderEvent","event",_e)}function getTime$2(){return new Date().getTime()}const defaultOptions$3={cacheTimeout:250,pollingInterval:4e3};var hs,Fl,ps,fp,Rs,yu,Ul,$l,zp,Bs,dp,hp,vs,Ps,Vp,Fm,Wp,Um,vu,Pp,Kp,qm,gu,Mp,pp,Am;class AbstractProvider{constructor(et,tt){In(this,vs);In(this,Vp);In(this,Wp);In(this,vu);In(this,Kp);In(this,gu);In(this,pp);In(this,hs,void 0);In(this,Fl,void 0);In(this,ps,void 0);In(this,fp,void 0);In(this,Rs,void 0);In(this,yu,void 0);In(this,Ul,void 0);In(this,$l,void 0);In(this,zp,void 0);In(this,Bs,void 0);In(this,dp,void 0);In(this,hp,void 0);if(Yr(this,hp,Object.assign({},defaultOptions$3,tt||{})),et==="any")Yr(this,yu,!0),Yr(this,Rs,null);else if(et){const nt=Network$2.from(et);Yr(this,yu,!1),Yr(this,Rs,Promise.resolve(nt)),setTimeout(()=>{this.emit("network",nt,null)},0)}else Yr(this,yu,!1),Yr(this,Rs,null);Yr(this,$l,-1),Yr(this,Ul,new Map),Yr(this,hs,new Map),Yr(this,Fl,new Map),Yr(this,ps,null),Yr(this,fp,!1),Yr(this,zp,1),Yr(this,Bs,new Map),Yr(this,dp,!1)}get pollingInterval(){return $r(this,hp).pollingInterval}get provider(){return this}get plugins(){return Array.from($r(this,Fl).values())}attachPlugin(et){if($r(this,Fl).get(et.name))throw new Error(`cannot replace existing plugin: ${et.name} `);return $r(this,Fl).set(et.name,et.connect(this)),this}getPlugin(et){return $r(this,Fl).get(et)||null}get disableCcipRead(){return $r(this,dp)}set disableCcipRead(et){Yr(this,dp,!!et)}async ccipReadFetch(et,tt,nt){if(this.disableCcipRead||nt.length===0||et.to==null)return null;const at=et.to.toLowerCase(),ot=tt.toLowerCase(),st=[];for(let ct=0;ct<nt.length;ct++){const dt=nt[ct],ht=dt.replace("{sender}",at).replace("{data}",ot),pt=new FetchRequest(ht);dt.indexOf("{data}")===-1&&(pt.body={data:ot,sender:at}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:pt,index:ct,urls:nt});let mt="unknown error";const yt=await pt.send();try{const gt=yt.bodyJson;if(gt.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:pt,result:gt}),gt.data;gt.message&&(mt=gt.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:pt,result:gt})}catch{}assert$y(yt.statusCode<400||yt.statusCode>=500,`response not found during CCIP fetch: ${mt}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:et,info:{url:dt,errorMessage:mt}}),st.push(mt)}assert$y(!1,`error encountered during CCIP fetch: ${st.map(ct=>JSON.stringify(ct)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:et,info:{urls:nt,errorMessages:st}})}_wrapBlock(et,tt){return new Block(formatBlock(et),this)}_wrapLog(et,tt){return new Log(formatLog(et),this)}_wrapTransactionReceipt(et,tt){return new TransactionReceipt(formatTransactionReceipt(et),this)}_wrapTransactionResponse(et,tt){return new TransactionResponse(formatTransactionResponse(et),this)}_detectNetwork(){assert$y(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(et){assert$y(!1,`unsupported method: ${et.method}`,"UNSUPPORTED_OPERATION",{operation:et.method,info:et})}async getBlockNumber(){const et=getNumber(await ga(this,vs,Ps).call(this,{method:"getBlockNumber"}),"%response");return $r(this,$l)>=0&&Yr(this,$l,et),et}_getAddress(et){return resolveAddress(et,this)}_getBlockTag(et){if(et==null)return"latest";switch(et){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return et}if(isHexString$1(et))return isHexString$1(et,32)?et:toQuantity(et);if(typeof et=="bigint"&&(et=getNumber(et,"blockTag")),typeof et=="number")return et>=0?toQuantity(et):$r(this,$l)>=0?toQuantity($r(this,$l)+et):this.getBlockNumber().then(tt=>toQuantity(tt+et));assertArgument(!1,"invalid blockTag","blockTag",et)}_getFilter(et){const tt=(et.topics||[]).map(dt=>dt==null?null:Array.isArray(dt)?concisify(dt.map(ht=>ht.toLowerCase())):dt.toLowerCase()),nt="blockHash"in et?et.blockHash:void 0,at=(dt,ht,pt)=>{let mt;switch(dt.length){case 0:break;case 1:mt=dt[0];break;default:dt.sort(),mt=dt}if(nt&&(ht!=null||pt!=null))throw new Error("invalid filter");const yt={};return mt&&(yt.address=mt),tt.length&&(yt.topics=tt),ht&&(yt.fromBlock=ht),pt&&(yt.toBlock=pt),nt&&(yt.blockHash=nt),yt};let ot=[];if(et.address)if(Array.isArray(et.address))for(const dt of et.address)ot.push(this._getAddress(dt));else ot.push(this._getAddress(et.address));let st;"fromBlock"in et&&(st=this._getBlockTag(et.fromBlock));let ct;return"toBlock"in et&&(ct=this._getBlockTag(et.toBlock)),ot.filter(dt=>typeof dt!="string").length||st!=null&&typeof st!="string"||ct!=null&&typeof ct!="string"?Promise.all([Promise.all(ot),st,ct]).then(dt=>at(dt[0],dt[1],dt[2])):at(ot,st,ct)}_getTransactionRequest(et){const tt=copyRequest(et),nt=[];if(["to","from"].forEach(at=>{if(tt[at]==null)return;const ot=resolveAddress(tt[at],this);isPromise(ot)?nt.push(async function(){tt[at]=await ot}()):tt[at]=ot}),tt.blockTag!=null){const at=this._getBlockTag(tt.blockTag);isPromise(at)?nt.push(async function(){tt.blockTag=await at}()):tt.blockTag=at}return nt.length?async function(){return await Promise.all(nt),tt}():tt}async getNetwork(){if($r(this,Rs)==null){const at=(async()=>{try{const ot=await this._detectNetwork();return this.emit("network",ot,null),ot}catch(ot){throw $r(this,Rs)===at&&Yr(this,Rs,null),ot}})();return Yr(this,Rs,at),(await at).clone()}const et=$r(this,Rs),[tt,nt]=await Promise.all([et,this._detectNetwork()]);return tt.chainId!==nt.chainId&&($r(this,yu)?(this.emit("network",nt,tt),$r(this,Rs)===et&&Yr(this,Rs,Promise.resolve(nt))):assert$y(!1,`network changed: ${tt.chainId} => ${nt.chainId} `,"NETWORK_ERROR",{event:"changed"})),tt.clone()}async getFeeData(){const et=await this.getNetwork(),tt=async()=>{const{_block:at,gasPrice:ot,priorityFee:st}=await resolveProperties$1({_block:ga(this,Kp,qm).call(this,"latest",!1),gasPrice:(async()=>{try{const pt=await ga(this,vs,Ps).call(this,{method:"getGasPrice"});return getBigInt(pt,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const pt=await ga(this,vs,Ps).call(this,{method:"getPriorityFee"});return getBigInt(pt,"%response")}catch{}return null})()});let ct=null,dt=null;const ht=this._wrapBlock(at,et);return ht&&ht.baseFeePerGas&&(dt=st??BigInt("1000000000"),ct=ht.baseFeePerGas*BN_2+dt),new FeeData(ot,ct,dt)},nt=et.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(nt){const at=new FetchRequest(nt.url),ot=await nt.processFunc(tt,this,at);return new FeeData(ot.gasPrice,ot.maxFeePerGas,ot.maxPriorityFeePerGas)}return await tt()}async estimateGas(et){let tt=this._getTransactionRequest(et);return isPromise(tt)&&(tt=await tt),getBigInt(await ga(this,vs,Ps).call(this,{method:"estimateGas",transaction:tt}),"%response")}async call(et){const{tx:tt,blockTag:nt}=await resolveProperties$1({tx:this._getTransactionRequest(et),blockTag:this._getBlockTag(et.blockTag)});return await ga(this,Wp,Um).call(this,ga(this,Vp,Fm).call(this,tt,nt,et.enableCcipRead?0:-1))}async getBalance(et,tt){return getBigInt(await ga(this,vu,Pp).call(this,{method:"getBalance"},et,tt),"%response")}async getTransactionCount(et,tt){return getNumber(await ga(this,vu,Pp).call(this,{method:"getTransactionCount"},et,tt),"%response")}async getCode(et,tt){return hexlify$1(await ga(this,vu,Pp).call(this,{method:"getCode"},et,tt))}async getStorage(et,tt,nt){const at=getBigInt(tt,"position");return hexlify$1(await ga(this,vu,Pp).call(this,{method:"getStorage",position:at},et,nt))}async broadcastTransaction(et){const{blockNumber:tt,hash:nt,network:at}=await resolveProperties$1({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:et}),network:this.getNetwork()}),ot=Transaction.from(et);if(ot.hash!==nt)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(ot,at).replaceableTransaction(tt)}async getBlock(et,tt){const{network:nt,params:at}=await resolveProperties$1({network:this.getNetwork(),params:ga(this,Kp,qm).call(this,et,!!tt)});return at==null?null:this._wrapBlock(at,nt)}async getTransaction(et){const{network:tt,params:nt}=await resolveProperties$1({network:this.getNetwork(),params:ga(this,vs,Ps).call(this,{method:"getTransaction",hash:et})});return nt==null?null:this._wrapTransactionResponse(nt,tt)}async getTransactionReceipt(et){const{network:tt,params:nt}=await resolveProperties$1({network:this.getNetwork(),params:ga(this,vs,Ps).call(this,{method:"getTransactionReceipt",hash:et})});if(nt==null)return null;if(nt.gasPrice==null&&nt.effectiveGasPrice==null){const at=await ga(this,vs,Ps).call(this,{method:"getTransaction",hash:et});if(at==null)throw new Error("report this; could not find tx or effectiveGasPrice");nt.effectiveGasPrice=at.gasPrice}return this._wrapTransactionReceipt(nt,tt)}async getTransactionResult(et){const{result:tt}=await resolveProperties$1({network:this.getNetwork(),result:ga(this,vs,Ps).call(this,{method:"getTransactionResult",hash:et})});return tt==null?null:hexlify$1(tt)}async getLogs(et){let tt=this._getFilter(et);isPromise(tt)&&(tt=await tt);const{network:nt,params:at}=await resolveProperties$1({network:this.getNetwork(),params:ga(this,vs,Ps).call(this,{method:"getLogs",filter:tt})});return at.map(ot=>this._wrapLog(ot,nt))}_getProvider(et){assert$y(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(et){return await EnsResolver.fromName(this,et)}async getAvatar(et){const tt=await this.getResolver(et);return tt?await tt.getAvatar():null}async resolveName(et){const tt=await this.getResolver(et);return tt?await tt.getAddress():null}async lookupAddress(et){et=getAddress$1(et);const tt=namehash$1(et.substring(2).toLowerCase()+".addr.reverse");try{const nt=await EnsResolver.getEnsAddress(this),ot=await new Contract$1(nt,["function resolver(bytes32) view returns (address)"],this).resolver(tt);if(ot==null||ot===ZeroAddress)return null;const ct=await new Contract$1(ot,["function name(bytes32) view returns (string)"],this).name(tt);return await this.resolveName(ct)!==et?null:ct}catch(nt){if(isError$3(nt,"BAD_DATA")&&nt.value==="0x"||isError$3(nt,"CALL_EXCEPTION"))return null;throw nt}return null}async waitForTransaction(et,tt,nt){const at=tt??1;return at===0?this.getTransactionReceipt(et):new Promise(async(ot,st)=>{let ct=null;const dt=async ht=>{try{const pt=await this.getTransactionReceipt(et);if(pt!=null&&ht-pt.blockNumber+1>=at){ot(pt),ct&&(clearTimeout(ct),ct=null);return}}catch(pt){console.log("EEE",pt)}this.once("block",dt)};nt!=null&&(ct=setTimeout(()=>{ct!=null&&(ct=null,this.off("block",dt),st(makeError("timeout","TIMEOUT",{reason:"timeout"})))},nt)),dt(await this.getBlockNumber())})}async waitForBlock(et){assert$y(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(et){const tt=$r(this,Bs).get(et);tt&&(tt.timer&&clearTimeout(tt.timer),$r(this,Bs).delete(et))}_setTimeout(et,tt){tt==null&&(tt=0);const nt=Sp(this,zp)._++,at=()=>{$r(this,Bs).delete(nt),et()};if(this.paused)$r(this,Bs).set(nt,{timer:null,func:at,time:tt});else{const ot=setTimeout(at,tt);$r(this,Bs).set(nt,{timer:ot,func:at,time:getTime$2()})}return nt}_forEachSubscriber(et){for(const tt of $r(this,hs).values())et(tt.subscriber)}_getSubscriber(et){switch(et.type){case"debug":case"error":case"network":return new UnmanagedSubscriber(et.type);case"block":{const tt=new PollingBlockSubscriber(this);return tt.pollingInterval=this.pollingInterval,tt}case"safe":case"finalized":return new PollingBlockTagSubscriber(this,et.type);case"event":return new PollingEventSubscriber(this,et.filter);case"transaction":return new PollingTransactionSubscriber(this,et.hash);case"orphan":return new PollingOrphanSubscriber(this,et.filter)}throw new Error(`unsupported event: ${et.type}`)}_recoverSubscriber(et,tt){for(const nt of $r(this,hs).values())if(nt.subscriber===et){nt.started&&nt.subscriber.stop(),nt.subscriber=tt,nt.started&&tt.start(),$r(this,ps)!=null&&tt.pause($r(this,ps));break}}async on(et,tt){const nt=await ga(this,pp,Am).call(this,et);return nt.listeners.push({listener:tt,once:!1}),nt.started||(nt.subscriber.start(),nt.started=!0,$r(this,ps)!=null&&nt.subscriber.pause($r(this,ps))),this}async once(et,tt){const nt=await ga(this,pp,Am).call(this,et);return nt.listeners.push({listener:tt,once:!0}),nt.started||(nt.subscriber.start(),nt.started=!0,$r(this,ps)!=null&&nt.subscriber.pause($r(this,ps))),this}async emit(et,...tt){const nt=await ga(this,gu,Mp).call(this,et,tt);if(!nt||nt.listeners.length===0)return!1;const at=nt.listeners.length;return nt.listeners=nt.listeners.filter(({listener:ot,once:st})=>{const ct=new EventPayload(this,st?null:ot,et);try{ot.call(this,...tt,ct)}catch{}return!st}),nt.listeners.length===0&&(nt.started&&nt.subscriber.stop(),$r(this,hs).delete(nt.tag)),at>0}async listenerCount(et){if(et){const nt=await ga(this,gu,Mp).call(this,et);return nt?nt.listeners.length:0}let tt=0;for(const{listeners:nt}of $r(this,hs).values())tt+=nt.length;return tt}async listeners(et){if(et){const nt=await ga(this,gu,Mp).call(this,et);return nt?nt.listeners.map(({listener:at})=>at):[]}let tt=[];for(const{listeners:nt}of $r(this,hs).values())tt=tt.concat(nt.map(({listener:at})=>at));return tt}async off(et,tt){const nt=await ga(this,gu,Mp).call(this,et);if(!nt)return this;if(tt){const at=nt.listeners.map(({listener:ot})=>ot).indexOf(tt);at>=0&&nt.listeners.splice(at,1)}return(!tt||nt.listeners.length===0)&&(nt.started&&nt.subscriber.stop(),$r(this,hs).delete(nt.tag)),this}async removeAllListeners(et){if(et){const{tag:tt,started:nt,subscriber:at}=await ga(this,pp,Am).call(this,et);nt&&at.stop(),$r(this,hs).delete(tt)}else for(const[tt,{started:nt,subscriber:at}]of $r(this,hs))nt&&at.stop(),$r(this,hs).delete(tt);return this}async addListener(et,tt){return await this.on(et,tt)}async removeListener(et,tt){return this.off(et,tt)}get destroyed(){return $r(this,fp)}destroy(){this.removeAllListeners();for(const et of $r(this,Bs).keys())this._clearTimeout(et);Yr(this,fp,!0)}get paused(){return $r(this,ps)!=null}set paused(et){!!et!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(et){if(Yr(this,$l,-1),$r(this,ps)!=null){if($r(this,ps)==!!et)return;assert$y(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(tt=>tt.pause(et)),Yr(this,ps,!!et);for(const tt of $r(this,Bs).values())tt.timer&&clearTimeout(tt.timer),tt.time=getTime$2()-tt.time}resume(){if($r(this,ps)!=null){this._forEachSubscriber(et=>et.resume()),Yr(this,ps,null);for(const et of $r(this,Bs).values()){let tt=et.time;tt<0&&(tt=0),et.time=getTime$2(),setTimeout(et.func,tt)}}}}hs=new WeakMap,Fl=new WeakMap,ps=new WeakMap,fp=new WeakMap,Rs=new WeakMap,yu=new WeakMap,Ul=new WeakMap,$l=new WeakMap,zp=new WeakMap,Bs=new WeakMap,dp=new WeakMap,hp=new WeakMap,vs=new WeakSet,Ps=async function(et){const tt=$r(this,hp).cacheTimeout;if(tt<0)return await this._perform(et);const nt=getTag$7(et.method,et);let at=$r(this,Ul).get(nt);return at||(at=this._perform(et),$r(this,Ul).set(nt,at),setTimeout(()=>{$r(this,Ul).get(nt)===at&&$r(this,Ul).delete(nt)},tt)),await at},Vp=new WeakSet,Fm=async function(et,tt,nt){assert$y(nt<MAX_CCIP_REDIRECTS$1,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},et,{blockTag:tt,enableCcipRead:!0})});const at=copyRequest(et);try{return hexlify$1(await this._perform({method:"call",transaction:at,blockTag:tt}))}catch(ot){if(!this.disableCcipRead&&isCallException(ot)&&ot.data&&nt>=0&&tt==="latest"&&at.to!=null&&dataSlice(ot.data,0,4)==="0x556f1830"){const st=ot.data,ct=await resolveAddress(at.to,this);let dt;try{dt=parseOffchainLookup(dataSlice(ot.data,4))}catch(mt){assert$y(!1,mt.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:at,info:{data:st}})}assert$y(dt.sender.toLowerCase()===ct.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:st,reason:"OffchainLookup",transaction:at,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:dt.errorArgs}});const ht=await this.ccipReadFetch(at,dt.calldata,dt.urls);assert$y(ht!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:at,info:{data:ot.data,errorArgs:dt.errorArgs}});const pt={to:ct,data:concat$2([dt.selector,encodeBytes$1([ht,dt.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:pt});try{const mt=await ga(this,Vp,Fm).call(this,pt,tt,nt+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},pt),result:mt}),mt}catch(mt){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},pt),error:mt}),mt}}throw ot}},Wp=new WeakSet,Um=async function(et){const{value:tt}=await resolveProperties$1({network:this.getNetwork(),value:et});return tt},vu=new WeakSet,Pp=async function(et,tt,nt){let at=this._getAddress(tt),ot=this._getBlockTag(nt);return(typeof at!="string"||typeof ot!="string")&&([at,ot]=await Promise.all([at,ot])),await ga(this,Wp,Um).call(this,ga(this,vs,Ps).call(this,Object.assign(et,{address:at,blockTag:ot})))},Kp=new WeakSet,qm=async function(et,tt){if(isHexString$1(et,32))return await ga(this,vs,Ps).call(this,{method:"getBlock",blockHash:et,includeTransactions:tt});let nt=this._getBlockTag(et);return typeof nt!="string"&&(nt=await nt),await ga(this,vs,Ps).call(this,{method:"getBlock",blockTag:nt,includeTransactions:tt})},gu=new WeakSet,Mp=async function(et,tt){let nt=await getSubscription(et,this);return nt.type==="event"&&tt&&tt.length>0&&tt[0].removed===!0&&(nt=await getSubscription({orphan:"drop-log",log:tt[0]},this)),$r(this,hs).get(nt.tag)||null},pp=new WeakSet,Am=async function(et){const tt=await getSubscription(et,this),nt=tt.tag;let at=$r(this,hs).get(nt);return at||(at={subscriber:this._getSubscriber(tt),tag:nt,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},$r(this,hs).set(nt,at)),at};function _parseString$1(_e,et){try{const tt=_parseBytes$1(_e,et);if(tt)return toUtf8String$1(tt)}catch{}return null}function _parseBytes$1(_e,et){if(_e==="0x")return null;try{const tt=getNumber(dataSlice(_e,et,et+32)),nt=getNumber(dataSlice(_e,tt,tt+32));return dataSlice(_e,tt+32,tt+32+nt)}catch{}return null}function numPad$1(_e){const et=toBeArray(_e);if(et.length>32)throw new Error("internal; should not happen");const tt=new Uint8Array(32);return tt.set(et,32-et.length),tt}function bytesPad$1(_e){if(_e.length%32===0)return _e;const et=new Uint8Array(Math.ceil(_e.length/32)*32);return et.set(_e),et}const empty$1=new Uint8Array([]);function encodeBytes$1(_e){const et=[];let tt=0;for(let nt=0;nt<_e.length;nt++)et.push(empty$1),tt+=32;for(let nt=0;nt<_e.length;nt++){const at=getBytes(_e[nt]);et[nt]=numPad$1(tt),et.push(numPad$1(at.length)),et.push(bytesPad$1(at)),tt+=32+Math.ceil(at.length/32)*32}return concat$2(et)}const zeros$1="0x0000000000000000000000000000000000000000000000000000000000000000";function parseOffchainLookup(_e){const et={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};assert$y(dataLength(_e)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const tt=dataSlice(_e,0,32);assert$y(dataSlice(tt,0,12)===dataSlice(zeros$1,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),et.sender=dataSlice(tt,12);try{const nt=[],at=getNumber(dataSlice(_e,32,64)),ot=getNumber(dataSlice(_e,at,at+32)),st=dataSlice(_e,at+32);for(let ct=0;ct<ot;ct++){const dt=_parseString$1(st,ct*32);if(dt==null)throw new Error("abort");nt.push(dt)}et.urls=nt}catch{assert$y(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const nt=_parseBytes$1(_e,64);if(nt==null)throw new Error("abort");et.calldata=nt}catch{assert$y(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}assert$y(dataSlice(_e,100,128)===dataSlice(zeros$1,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),et.selector=dataSlice(_e,96,100);try{const nt=_parseBytes$1(_e,128);if(nt==null)throw new Error("abort");et.extraData=nt}catch{assert$y(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return et.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(nt=>et[nt]),et}function checkProvider(_e,et){if(_e.provider)return _e.provider;assert$y(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:et})}async function populate$1(_e,et){let tt=copyRequest(et);if(tt.to!=null&&(tt.to=resolveAddress(tt.to,_e)),tt.from!=null){const nt=tt.from;tt.from=Promise.all([_e.getAddress(),resolveAddress(nt,_e)]).then(([at,ot])=>(assertArgument(at.toLowerCase()===ot.toLowerCase(),"transaction from mismatch","tx.from",ot),at))}else tt.from=_e.getAddress();return await resolveProperties$1(tt)}class AbstractSigner{constructor(et){Qr(this,"provider");defineProperties$2(this,{provider:et||null})}async getNonce(et){return checkProvider(this,"getTransactionCount").getTransactionCount(await this.getAddress(),et)}async populateCall(et){return await populate$1(this,et)}async populateTransaction(et){const tt=checkProvider(this,"populateTransaction"),nt=await populate$1(this,et);nt.nonce==null&&(nt.nonce=await this.getNonce("pending")),nt.gasLimit==null&&(nt.gasLimit=await this.estimateGas(nt));const at=await this.provider.getNetwork();if(nt.chainId!=null){const st=getBigInt(nt.chainId);assertArgument(st===at.chainId,"transaction chainId mismatch","tx.chainId",et.chainId)}else nt.chainId=at.chainId;const ot=nt.maxFeePerGas!=null||nt.maxPriorityFeePerGas!=null;if(nt.gasPrice!=null&&(nt.type===2||ot)?assertArgument(!1,"eip-1559 transaction do not support gasPrice","tx",et):(nt.type===0||nt.type===1)&&ot&&assertArgument(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",et),(nt.type===2||nt.type==null)&&nt.maxFeePerGas!=null&&nt.maxPriorityFeePerGas!=null)nt.type=2;else if(nt.type===0||nt.type===1){const st=await tt.getFeeData();assert$y(st.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),nt.gasPrice==null&&(nt.gasPrice=st.gasPrice)}else{const st=await tt.getFeeData();if(nt.type==null)if(st.maxFeePerGas!=null&&st.maxPriorityFeePerGas!=null)if(nt.type=2,nt.gasPrice!=null){const ct=nt.gasPrice;delete nt.gasPrice,nt.maxFeePerGas=ct,nt.maxPriorityFeePerGas=ct}else nt.maxFeePerGas==null&&(nt.maxFeePerGas=st.maxFeePerGas),nt.maxPriorityFeePerGas==null&&(nt.maxPriorityFeePerGas=st.maxPriorityFeePerGas);else st.gasPrice!=null?(assert$y(!ot,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),nt.gasPrice==null&&(nt.gasPrice=st.gasPrice),nt.type=0):assert$y(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else nt.type===2&&(nt.maxFeePerGas==null&&(nt.maxFeePerGas=st.maxFeePerGas),nt.maxPriorityFeePerGas==null&&(nt.maxPriorityFeePerGas=st.maxPriorityFeePerGas))}return await resolveProperties$1(nt)}async estimateGas(et){return checkProvider(this,"estimateGas").estimateGas(await this.populateCall(et))}async call(et){return checkProvider(this,"call").call(await this.populateCall(et))}async resolveName(et){return await checkProvider(this,"resolveName").resolveName(et)}async sendTransaction(et){const tt=checkProvider(this,"sendTransaction"),nt=await this.populateTransaction(et);delete nt.from;const at=Transaction.from(nt);return await tt.broadcastTransaction(await this.signTransaction(at))}}var mp,Tm,Yp;let VoidSigner$1=(Yp=class extends AbstractSigner{constructor(tt,nt){super(nt);In(this,mp);Qr(this,"address");defineProperties$2(this,{address:tt})}async getAddress(){return this.address}connect(tt){return new Yp(this.address,tt)}async signTransaction(tt){ga(this,mp,Tm).call(this,"transactions","signTransaction")}async signMessage(tt){ga(this,mp,Tm).call(this,"messages","signMessage")}async signTypedData(tt,nt,at){ga(this,mp,Tm).call(this,"typed-data","signTypedData")}},mp=new WeakSet,Tm=function(tt,nt){assert$y(!1,`VoidSigner cannot sign ${tt}`,"UNSUPPORTED_OPERATION",{operation:nt})},Yp);function copy$3(_e){return JSON.parse(JSON.stringify(_e))}var Es,Qs,bu,ql,_u,yp,Xp,Hm,Zp,Gm;class FilterIdSubscriber{constructor(et){In(this,Xp);In(this,Zp);In(this,Es,void 0);In(this,Qs,void 0);In(this,bu,void 0);In(this,ql,void 0);In(this,_u,void 0);In(this,yp,void 0);Yr(this,Es,et),Yr(this,Qs,null),Yr(this,bu,ga(this,Xp,Hm).bind(this)),Yr(this,ql,!1),Yr(this,_u,null),Yr(this,yp,!1)}_subscribe(et){throw new Error("subclasses must override this")}_emitResults(et,tt){throw new Error("subclasses must override this")}_recover(et){throw new Error("subclasses must override this")}start(){$r(this,ql)||(Yr(this,ql,!0),ga(this,Xp,Hm).call(this,-2))}stop(){$r(this,ql)&&(Yr(this,ql,!1),Yr(this,yp,!0),ga(this,Zp,Gm).call(this),$r(this,Es).off("block",$r(this,bu)))}pause(et){et&&ga(this,Zp,Gm).call(this),$r(this,Es).off("block",$r(this,bu))}resume(){this.start()}}Es=new WeakMap,Qs=new WeakMap,bu=new WeakMap,ql=new WeakMap,_u=new WeakMap,yp=new WeakMap,Xp=new WeakSet,Hm=async function(et){try{$r(this,Qs)==null&&Yr(this,Qs,this._subscribe($r(this,Es)));let tt=null;try{tt=await $r(this,Qs)}catch(ot){if(!isError$3(ot,"UNSUPPORTED_OPERATION")||ot.operation!=="eth_newFilter")throw ot}if(tt==null){Yr(this,Qs,null),$r(this,Es)._recoverSubscriber(this,this._recover($r(this,Es)));return}const nt=await $r(this,Es).getNetwork();if($r(this,_u)||Yr(this,_u,nt),$r(this,_u).chainId!==nt.chainId)throw new Error("chaid changed");if($r(this,yp))return;const at=await $r(this,Es).send("eth_getFilterChanges",[tt]);await this._emitResults($r(this,Es),at)}catch(tt){console.log("@TODO",tt)}$r(this,Es).once("block",$r(this,bu))},Zp=new WeakSet,Gm=function(){const et=$r(this,Qs);et&&(Yr(this,Qs,null),et.then(tt=>{$r(this,Es).send("eth_uninstallFilter",[tt])}))};var $u;class FilterIdEventSubscriber extends FilterIdSubscriber{constructor(tt,nt){super(tt);In(this,$u,void 0);Yr(this,$u,copy$3(nt))}_recover(tt){return new PollingEventSubscriber(tt,$r(this,$u))}async _subscribe(tt){return await tt.send("eth_newFilter",[$r(this,$u)])}async _emitResults(tt,nt){for(const at of nt)tt.emit($r(this,$u),tt._wrapLog(at,tt._network))}}$u=new WeakMap;class FilterIdPendingSubscriber extends FilterIdSubscriber{async _subscribe(et){return await et.send("eth_newPendingTransactionFilter",[])}async _emitResults(et,tt){for(const nt of tt)et.emit("pending",nt)}}const Primitive="bigint,boolean,function,number,string,symbol".split(/,/g);function deepCopy$1(_e){if(_e==null||Primitive.indexOf(typeof _e)>=0||typeof _e.getAddress=="function")return _e;if(Array.isArray(_e))return _e.map(deepCopy$1);if(typeof _e=="object")return Object.keys(_e).reduce((et,tt)=>(et[tt]=_e[tt],et),{});throw new Error(`should not happen: ${_e} (${typeof _e})`)}function stall$3(_e){return new Promise(et=>{setTimeout(et,_e)})}function getLowerCase$1(_e){return _e&&_e.toLowerCase()}function isPollable(_e){return _e&&typeof _e.pollingInterval=="number"}const defaultOptions$2={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};let JsonRpcSigner$1=class extends AbstractSigner{constructor(tt,nt){super(tt);Qr(this,"address");nt=getAddress$1(nt),defineProperties$2(this,{address:nt})}connect(tt){assert$y(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(tt){return await this.populateCall(tt)}async sendUncheckedTransaction(tt){const nt=deepCopy$1(tt),at=[];if(nt.from){const st=nt.from;at.push((async()=>{const ct=await resolveAddress(st,this.provider);assertArgument(ct!=null&&ct.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",tt),nt.from=ct})())}else nt.from=this.address;if(nt.gasLimit==null&&at.push((async()=>{nt.gasLimit=await this.provider.estimateGas({...nt,from:this.address})})()),nt.to!=null){const st=nt.to;at.push((async()=>{nt.to=await resolveAddress(st,this.provider)})())}at.length&&await Promise.all(at);const ot=this.provider.getRpcTransaction(nt);return this.provider.send("eth_sendTransaction",[ot])}async sendTransaction(tt){const nt=await this.provider.getBlockNumber(),at=await this.sendUncheckedTransaction(tt);return await new Promise((ot,st)=>{const ct=[1e3,100];let dt=0;const ht=async()=>{try{const pt=await this.provider.getTransaction(at);if(pt!=null){ot(pt.replaceableTransaction(nt));return}}catch(pt){if(isError$3(pt,"CANCELLED")||isError$3(pt,"BAD_DATA")||isError$3(pt,"NETWORK_ERROR")){pt.info==null&&(pt.info={}),pt.info.sendTransactionHash=at,st(pt);return}if(isError$3(pt,"INVALID_ARGUMENT")&&(dt++,pt.info==null&&(pt.info={}),pt.info.sendTransactionHash=at,dt>10)){st(pt);return}this.provider.emit("error",makeError("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:pt}))}this.provider._setTimeout(()=>{ht()},ct.pop()||4e3)};ht()})}async signTransaction(tt){const nt=deepCopy$1(tt);if(nt.from){const ot=await resolveAddress(nt.from,this.provider);assertArgument(ot!=null&&ot.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",tt),nt.from=ot}else nt.from=this.address;const at=this.provider.getRpcTransaction(nt);return await this.provider.send("eth_signTransaction",[at])}async signMessage(tt){const nt=typeof tt=="string"?toUtf8Bytes$1(tt):tt;return await this.provider.send("personal_sign",[hexlify$1(nt),this.address.toLowerCase()])}async signTypedData(tt,nt,at){const ot=deepCopy$1(at),st=await TypedDataEncoder$1.resolveNames(tt,nt,ot,async ct=>{const dt=await resolveAddress(ct);return assertArgument(dt!=null,"TypedData does not support null address","value",ct),dt});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(TypedDataEncoder$1.getPayload(st.domain,nt,st.value))])}async unlock(tt){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),tt,null])}async _legacySignMessage(tt){const nt=typeof tt=="string"?toUtf8Bytes$1(tt):tt;return await this.provider.send("eth_sign",[this.address.toLowerCase(),hexlify$1(nt)])}};var Eu,vp,El,Js,Gs,js,Ss,Qp,zm;class JsonRpcApiProvider extends AbstractProvider{constructor(tt,nt){super(tt,nt);In(this,Qp);In(this,Eu,void 0);In(this,vp,void 0);In(this,El,void 0);In(this,Js,void 0);In(this,Gs,void 0);In(this,js,void 0);In(this,Ss,void 0);Yr(this,vp,1),Yr(this,Eu,Object.assign({},defaultOptions$2,nt||{})),Yr(this,El,[]),Yr(this,Js,null),Yr(this,js,null),Yr(this,Ss,null);{let ot=null;const st=new Promise(ct=>{ot=ct});Yr(this,Gs,{promise:st,resolve:ot})}const at=this._getOption("staticNetwork");typeof at=="boolean"?(assertArgument(!at||tt!=="any","staticNetwork cannot be used on special network 'any'","options",nt),at&&tt!=null&&Yr(this,js,Network$2.from(tt))):at&&(assertArgument(tt==null||at.matches(tt),"staticNetwork MUST match network object","options",nt),Yr(this,js,at))}_getOption(tt){return $r(this,Eu)[tt]}get _network(){return assert$y($r(this,js),"network is not available yet","NETWORK_ERROR"),$r(this,js)}async _perform(tt){if(tt.method==="call"||tt.method==="estimateGas"){let at=tt.transaction;if(at&&at.type!=null&&getBigInt(at.type)&&at.maxFeePerGas==null&&at.maxPriorityFeePerGas==null){const ot=await this.getFeeData();ot.maxFeePerGas==null&&ot.maxPriorityFeePerGas==null&&(tt=Object.assign({},tt,{transaction:Object.assign({},at,{type:void 0})}))}}const nt=this.getRpcRequest(tt);return nt!=null?await this.send(nt.method,nt.args):super._perform(tt)}async _detectNetwork(){const tt=this._getOption("staticNetwork");if(tt)if(tt===!0){if($r(this,js))return $r(this,js)}else return tt;return $r(this,Ss)?await $r(this,Ss):this.ready?(Yr(this,Ss,(async()=>{try{const nt=Network$2.from(getBigInt(await this.send("eth_chainId",[])));return Yr(this,Ss,null),nt}catch(nt){throw Yr(this,Ss,null),nt}})()),await $r(this,Ss)):(Yr(this,Ss,(async()=>{const nt={id:Sp(this,vp)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:nt});let at;try{at=(await this._send(nt))[0],Yr(this,Ss,null)}catch(ot){throw Yr(this,Ss,null),this.emit("debug",{action:"receiveRpcError",error:ot}),ot}if(this.emit("debug",{action:"receiveRpcResult",result:at}),"result"in at)return Network$2.from(getBigInt(at.result));throw this.getRpcError(nt,at)})()),await $r(this,Ss))}_start(){$r(this,Gs)==null||$r(this,Gs).resolve==null||($r(this,Gs).resolve(),Yr(this,Gs,null),(async()=>{for(;$r(this,js)==null&&!this.destroyed;)try{Yr(this,js,await this._detectNetwork())}catch(tt){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",makeError("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:tt}})),await stall$3(1e3)}ga(this,Qp,zm).call(this)})())}async _waitUntilReady(){if($r(this,Gs)!=null)return await $r(this,Gs).promise}_getSubscriber(tt){return tt.type==="pending"?new FilterIdPendingSubscriber(this):tt.type==="event"?this._getOption("polling")?new PollingEventSubscriber(this,tt.filter):new FilterIdEventSubscriber(this,tt.filter):tt.type==="orphan"&&tt.filter.orphan==="drop-log"?new UnmanagedSubscriber("orphan"):super._getSubscriber(tt)}get ready(){return $r(this,Gs)==null}getRpcTransaction(tt){const nt={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(at=>{if(tt[at]==null)return;let ot=at;at==="gasLimit"&&(ot="gas"),nt[ot]=toQuantity(getBigInt(tt[at],`tx.${at}`))}),["from","to","data"].forEach(at=>{tt[at]!=null&&(nt[at]=hexlify$1(tt[at]))}),tt.accessList&&(nt.accessList=accessListify$1(tt.accessList)),nt}getRpcRequest(tt){switch(tt.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[getLowerCase$1(tt.address),tt.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[getLowerCase$1(tt.address),tt.blockTag]};case"getCode":return{method:"eth_getCode",args:[getLowerCase$1(tt.address),tt.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[getLowerCase$1(tt.address),"0x"+tt.position.toString(16),tt.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[tt.signedTransaction]};case"getBlock":if("blockTag"in tt)return{method:"eth_getBlockByNumber",args:[tt.blockTag,!!tt.includeTransactions]};if("blockHash"in tt)return{method:"eth_getBlockByHash",args:[tt.blockHash,!!tt.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[tt.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[tt.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(tt.transaction),tt.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(tt.transaction)]};case"getLogs":return tt.filter&&tt.filter.address!=null&&(Array.isArray(tt.filter.address)?tt.filter.address=tt.filter.address.map(getLowerCase$1):tt.filter.address=getLowerCase$1(tt.filter.address)),{method:"eth_getLogs",args:[tt.filter]}}return null}getRpcError(tt,nt){const{method:at}=tt,{error:ot}=nt;if(at==="eth_estimateGas"&&ot.message){const dt=ot.message;if(!dt.match(/revert/i)&&dt.match(/insufficient funds/i))return makeError("insufficient funds","INSUFFICIENT_FUNDS",{transaction:tt.params[0],info:{payload:tt,error:ot}})}if(at==="eth_call"||at==="eth_estimateGas"){const dt=spelunkData(ot),ht=AbiCoder$1.getBuiltinCallException(at==="eth_call"?"call":"estimateGas",tt.params[0],dt?dt.data:null);return ht.info={error:ot,payload:tt},ht}const st=JSON.stringify(spelunkMessage(ot));if(typeof ot.message=="string"&&ot.message.match(/user denied|ethers-user-denied/i))return makeError("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[at]||"unknown",reason:"rejected",info:{payload:tt,error:ot}});if(at==="eth_sendRawTransaction"||at==="eth_sendTransaction"){const dt=tt.params[0];if(st.match(/insufficient funds|base fee exceeds gas limit/i))return makeError("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:dt,info:{error:ot}});if(st.match(/nonce/i)&&st.match(/too low/i))return makeError("nonce has already been used","NONCE_EXPIRED",{transaction:dt,info:{error:ot}});if(st.match(/replacement transaction/i)&&st.match(/underpriced/i))return makeError("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:dt,info:{error:ot}});if(st.match(/only replay-protected/i))return makeError("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:at,info:{transaction:dt,info:{error:ot}}})}let ct=!!st.match(/the method .* does not exist/i);return ct||ot&&ot.details&&ot.details.startsWith("Unauthorized method:")&&(ct=!0),ct?makeError("unsupported operation","UNSUPPORTED_OPERATION",{operation:tt.method,info:{error:ot,payload:tt}}):makeError("could not coalesce error","UNKNOWN_ERROR",{error:ot,payload:tt})}send(tt,nt){if(this.destroyed)return Promise.reject(makeError("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:tt}));const at=Sp(this,vp)._++,ot=new Promise((st,ct)=>{$r(this,El).push({resolve:st,reject:ct,payload:{method:tt,params:nt,id:at,jsonrpc:"2.0"}})});return ga(this,Qp,zm).call(this),ot}async getSigner(tt){tt==null&&(tt=0);const nt=this.send("eth_accounts",[]);if(typeof tt=="number"){const ot=await nt;if(tt>=ot.length)throw new Error("no such account");return new JsonRpcSigner$1(this,ot[tt])}const{accounts:at}=await resolveProperties$1({network:this.getNetwork(),accounts:nt});tt=getAddress$1(tt);for(const ot of at)if(getAddress$1(ot)===tt)return new JsonRpcSigner$1(this,tt);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(nt=>new JsonRpcSigner$1(this,nt))}destroy(){$r(this,Js)&&(clearTimeout($r(this,Js)),Yr(this,Js,null));for(const{payload:tt,reject:nt}of $r(this,El))nt(makeError("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:tt.method}));Yr(this,El,[]),super.destroy()}}Eu=new WeakMap,vp=new WeakMap,El=new WeakMap,Js=new WeakMap,Gs=new WeakMap,js=new WeakMap,Ss=new WeakMap,Qp=new WeakSet,zm=function(){if($r(this,Js))return;const tt=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");Yr(this,Js,setTimeout(()=>{Yr(this,Js,null);const nt=$r(this,El);for(Yr(this,El,[]);nt.length;){const at=[nt.shift()];for(;nt.length&&at.length!==$r(this,Eu).batchMaxCount;)if(at.push(nt.shift()),JSON.stringify(at.map(st=>st.payload)).length>$r(this,Eu).batchMaxSize){nt.unshift(at.pop());break}(async()=>{const ot=at.length===1?at[0].payload:at.map(st=>st.payload);this.emit("debug",{action:"sendRpcPayload",payload:ot});try{const st=await this._send(ot);this.emit("debug",{action:"receiveRpcResult",result:st});for(const{resolve:ct,reject:dt,payload:ht}of at){if(this.destroyed){dt(makeError("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:ht.method}));continue}const pt=st.filter(mt=>mt.id===ht.id)[0];if(pt==null){const mt=makeError("missing response for request","BAD_DATA",{value:st,info:{payload:ht}});this.emit("error",mt),dt(mt);continue}if("error"in pt){dt(this.getRpcError(ht,pt));continue}ct(pt.result)}}catch(st){this.emit("debug",{action:"receiveRpcError",error:st});for(const{reject:ct}of at)ct(st)}})()}},tt))};var Hl;class JsonRpcApiPollingProvider extends JsonRpcApiProvider{constructor(tt,nt){super(tt,nt);In(this,Hl,void 0);Yr(this,Hl,4e3)}_getSubscriber(tt){const nt=super._getSubscriber(tt);return isPollable(nt)&&(nt.pollingInterval=$r(this,Hl)),nt}get pollingInterval(){return $r(this,Hl)}set pollingInterval(tt){if(!Number.isInteger(tt)||tt<0)throw new Error("invalid interval");Yr(this,Hl,tt),this._forEachSubscriber(nt=>{isPollable(nt)&&(nt.pollingInterval=$r(this,Hl))})}}Hl=new WeakMap;var gp,Jm;let JsonRpcProvider$1=(Jm=class extends JsonRpcApiPollingProvider{constructor(tt,nt,at){tt==null&&(tt="http://localhost:8545");super(nt,at);In(this,gp,void 0);typeof tt=="string"?Yr(this,gp,new FetchRequest(tt)):Yr(this,gp,tt.clone())}_getConnection(){return $r(this,gp).clone()}async send(tt,nt){return await this._start(),await super.send(tt,nt)}async _send(tt){const nt=this._getConnection();nt.body=JSON.stringify(tt),nt.setHeader("content-type","application/json");const at=await nt.send();at.assertOk();let ot=at.bodyJson;return Array.isArray(ot)||(ot=[ot]),ot}},gp=new WeakMap,Jm);function spelunkData(_e){if(_e==null)return null;if(typeof _e.message=="string"&&_e.message.match(/revert/i)&&isHexString$1(_e.data))return{message:_e.message,data:_e.data};if(typeof _e=="object"){for(const et in _e){const tt=spelunkData(_e[et]);if(tt)return tt}return null}if(typeof _e=="string")try{return spelunkData(JSON.parse(_e))}catch{}return null}function _spelunkMessage(_e,et){if(_e!=null){if(typeof _e.message=="string"&&et.push(_e.message),typeof _e=="object")for(const tt in _e)_spelunkMessage(_e[tt],et);if(typeof _e=="string")try{return _spelunkMessage(JSON.parse(_e),et)}catch{}}}function spelunkMessage(_e){const et=[];return _spelunkMessage(_e,et),et}var bp;class BrowserProvider extends JsonRpcApiPollingProvider{constructor(tt,nt){assertArgument(tt&&tt.request,"invalid EIP-1193 provider","ethereum",tt);super(nt,{batchMaxCount:1});In(this,bp,void 0);Yr(this,bp,async(at,ot)=>{const st={method:at,params:ot};this.emit("debug",{action:"sendEip1193Request",payload:st});try{const ct=await tt.request(st);return this.emit("debug",{action:"receiveEip1193Result",result:ct}),ct}catch(ct){const dt=new Error(ct.message);throw dt.code=ct.code,dt.data=ct.data,dt.payload=st,this.emit("debug",{action:"receiveEip1193Error",error:dt}),dt}})}async send(tt,nt){return await this._start(),await super.send(tt,nt)}async _send(tt){assertArgument(!Array.isArray(tt),"EIP-1193 does not support batch request","payload",tt);try{const nt=await $r(this,bp).call(this,tt.method,tt.params||[]);return[{id:tt.id,result:nt}]}catch(nt){return[{id:tt.id,error:{code:nt.code,data:nt.data,message:nt.message}}]}}getRpcError(tt,nt){switch(nt=JSON.parse(JSON.stringify(nt)),nt.error.code||-1){case 4001:nt.error.message=`ethers-user-denied: ${nt.error.message}`;break;case 4200:nt.error.message=`ethers-unsupported: ${nt.error.message}`;break}return super.getRpcError(tt,nt)}async hasSigner(tt){tt==null&&(tt=0);const nt=await this.send("eth_accounts",[]);return typeof tt=="number"?nt.length>tt:(tt=tt.toLowerCase(),nt.filter(at=>at.toLowerCase()===tt).length!==0)}async getSigner(tt){if(tt==null&&(tt=0),!await this.hasSigner(tt))try{await $r(this,bp).call(this,"eth_requestAccounts",[])}catch(nt){const at=nt.payload;throw this.getRpcError(at,{id:at.id,error:nt})}return await super.getSigner(tt)}}bp=new WeakMap;var _p;const Zm=class Zm extends AbstractSigner{constructor(tt,nt){super(nt);Qr(this,"address");In(this,_p,void 0);assertArgument(tt&&typeof tt.sign=="function","invalid private key","privateKey","[ REDACTED ]"),Yr(this,_p,tt);const at=computeAddress$2(this.signingKey.publicKey);defineProperties$2(this,{address:at})}get signingKey(){return $r(this,_p)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(tt){return new Zm($r(this,_p),tt)}async signTransaction(tt){const{to:nt,from:at}=await resolveProperties$1({to:tt.to?resolveAddress(tt.to,this.provider):void 0,from:tt.from?resolveAddress(tt.from,this.provider):void 0});nt!=null&&(tt.to=nt),at!=null&&(tt.from=at),tt.from!=null&&(assertArgument(getAddress$1(tt.from)===this.address,"transaction from address mismatch","tx.from",tt.from),delete tt.from);const ot=Transaction.from(tt);return ot.signature=this.signingKey.sign(ot.unsignedHash),ot.serialized}async signMessage(tt){return this.signMessageSync(tt)}signMessageSync(tt){return this.signingKey.sign(hashMessage(tt)).serialized}async signTypedData(tt,nt,at){const ot=await TypedDataEncoder$1.resolveNames(tt,nt,at,async st=>{assert$y(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:st}});const ct=await this.provider.resolveName(st);return assert$y(ct!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:st}),ct});return this.signingKey.sign(TypedDataEncoder$1.hash(ot.domain,nt,ot.value)).serialized}};_p=new WeakMap;let BaseWallet=Zm;const subsChrs=" !#$%&'()*+,-./<=>?@[]^_`{|}~",Word=/^[a-z]*$/i;function unfold(_e,et){let tt=97;return _e.reduce((nt,at)=>(at===et?tt++:at.match(Word)?nt.push(String.fromCharCode(tt)+at):(tt=97,nt.push(at)),nt),[])}function decode$6(_e,et){for(let at=subsChrs.length-1;at>=0;at--)_e=_e.split(subsChrs[at]).join(et.substring(2*at,2*at+2));const tt=[],nt=_e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(at,ot,st,ct)=>{if(st)for(let dt=parseInt(st);dt>=0;dt--)tt.push(";");else tt.push(ot.toLowerCase());return""});if(nt)throw new Error(`leftovers: ${JSON.stringify(nt)}`);return unfold(unfold(tt,";"),":")}function decodeOwl(_e){return assertArgument(_e[0]==="0","unsupported auwl data","data",_e),decode$6(_e.substring(1+2*subsChrs.length),_e.substring(1,1+2*subsChrs.length))}class Wordlist{constructor(et){Qr(this,"locale");defineProperties$2(this,{locale:et})}split(et){return et.toLowerCase().split(/\s+/g)}join(et){return et.join(" ")}}var $p,Jp,wu,em,Vm;class WordlistOwl extends Wordlist{constructor(tt,nt,at){super(tt);In(this,em);In(this,$p,void 0);In(this,Jp,void 0);In(this,wu,void 0);Yr(this,$p,nt),Yr(this,Jp,at),Yr(this,wu,null)}get _data(){return $r(this,$p)}_decodeWords(){return decodeOwl($r(this,$p))}getWord(tt){const nt=ga(this,em,Vm).call(this);return assertArgument(tt>=0&&tt<nt.length,`invalid word index: ${tt}`,"index",tt),nt[tt]}getWordIndex(tt){return ga(this,em,Vm).call(this).indexOf(tt)}}$p=new WeakMap,Jp=new WeakMap,wu=new WeakMap,em=new WeakSet,Vm=function(){if($r(this,wu)==null){const tt=this._decodeWords();if(id$2(tt.join(`
129
129
  `)+`
130
130
  `)!==$r(this,Jp))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);Yr(this,wu,tt)}return $r(this,wu)};const words$1="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO",checksum="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let wordlist=null;class LangEn extends WordlistOwl{constructor(){super("en",words$1,checksum)}static wordlist(){return wordlist==null&&(wordlist=new LangEn),wordlist}}function getUpperMask(_e){return(1<<_e)-1<<8-_e&255}function getLowerMask(_e){return(1<<_e)-1&255}function mnemonicToEntropy(_e,et){assertNormalize("NFKD"),et==null&&(et=LangEn.wordlist());const tt=et.split(_e);assertArgument(tt.length%3===0&&tt.length>=12&&tt.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const nt=new Uint8Array(Math.ceil(11*tt.length/8));let at=0;for(let ht=0;ht<tt.length;ht++){let pt=et.getWordIndex(tt[ht].normalize("NFKD"));assertArgument(pt>=0,`invalid mnemonic word at index ${ht}`,"mnemonic","[ REDACTED ]");for(let mt=0;mt<11;mt++)pt&1<<10-mt&&(nt[at>>3]|=1<<7-at%8),at++}const ot=32*tt.length/3,st=tt.length/3,ct=getUpperMask(st),dt=getBytes(sha256$4(nt.slice(0,ot/8)))[0]&ct;return assertArgument(dt===(nt[nt.length-1]&ct),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),hexlify$1(nt.slice(0,ot/8))}function entropyToMnemonic(_e,et){assertArgument(_e.length%4===0&&_e.length>=16&&_e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),et==null&&(et=LangEn.wordlist());const tt=[0];let nt=11;for(let st=0;st<_e.length;st++)nt>8?(tt[tt.length-1]<<=8,tt[tt.length-1]|=_e[st],nt-=8):(tt[tt.length-1]<<=nt,tt[tt.length-1]|=_e[st]>>8-nt,tt.push(_e[st]&getLowerMask(8-nt)),nt+=3);const at=_e.length/4,ot=parseInt(sha256$4(_e).substring(2,4),16)&getUpperMask(at);return tt[tt.length-1]<<=at,tt[tt.length-1]|=ot>>8-at,et.join(tt.map(st=>et.getWord(st)))}const _guard$1={};class Mnemonic{constructor(et,tt,nt,at,ot){Qr(this,"phrase");Qr(this,"password");Qr(this,"wordlist");Qr(this,"entropy");at==null&&(at=""),ot==null&&(ot=LangEn.wordlist()),assertPrivate(et,_guard$1,"Mnemonic"),defineProperties$2(this,{phrase:nt,password:at,wordlist:ot,entropy:tt})}computeSeed(){const et=toUtf8Bytes$1("mnemonic"+this.password,"NFKD");return pbkdf2$1(toUtf8Bytes$1(this.phrase,"NFKD"),et,2048,64,"sha512")}static fromPhrase(et,tt,nt){const at=mnemonicToEntropy(et,nt);return et=entropyToMnemonic(getBytes(at),nt),new Mnemonic(_guard$1,at,et,tt,nt)}static fromEntropy(et,tt,nt){const at=getBytes(et,"entropy"),ot=entropyToMnemonic(at,nt);return new Mnemonic(_guard$1,hexlify$1(at),ot,tt,nt)}static entropyToPhrase(et,tt){const nt=getBytes(et,"entropy");return entropyToMnemonic(nt,tt)}static phraseToEntropy(et,tt){return mnemonicToEntropy(et,tt)}static isValidMnemonic(et,tt){try{return mnemonicToEntropy(et,tt),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */var __classPrivateFieldGet$2=globalThis&&globalThis.__classPrivateFieldGet||function(_e,et,tt,nt){if(tt==="a"&&!nt)throw new TypeError("Private accessor was defined without a getter");if(typeof et=="function"?_e!==et||!nt:!et.has(_e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return tt==="m"?nt:tt==="a"?nt.call(_e):nt?nt.value:et.get(_e)},__classPrivateFieldSet$2=globalThis&&globalThis.__classPrivateFieldSet||function(_e,et,tt,nt,at){if(nt==="m")throw new TypeError("Private method is not writable");if(nt==="a"&&!at)throw new TypeError("Private accessor was defined without a setter");if(typeof et=="function"?_e!==et||!at:!et.has(_e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return nt==="a"?at.call(_e,tt):at?at.value=tt:et.set(_e,tt),tt},_AES_key,_AES_Kd,_AES_Ke;const numberOfRounds={16:10,24:12,32:14},rcon=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],S$1=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Si=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],T1=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],T2=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],T3=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],T4=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T5=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],T6=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],T7=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],T8=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],U1=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],U2=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],U3=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],U4=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function convertToInt32(_e){const et=[];for(let tt=0;tt<_e.length;tt+=4)et.push(_e[tt]<<24|_e[tt+1]<<16|_e[tt+2]<<8|_e[tt+3]);return et}let AES$1=class ay{get key(){return __classPrivateFieldGet$2(this,_AES_key,"f").slice()}constructor(et){if(_AES_key.set(this,void 0),_AES_Kd.set(this,void 0),_AES_Ke.set(this,void 0),!(this instanceof ay))throw Error("AES must be instanitated with `new`");__classPrivateFieldSet$2(this,_AES_key,new Uint8Array(et),"f");const tt=numberOfRounds[this.key.length];if(tt==null)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");__classPrivateFieldSet$2(this,_AES_Ke,[],"f"),__classPrivateFieldSet$2(this,_AES_Kd,[],"f");for(let pt=0;pt<=tt;pt++)__classPrivateFieldGet$2(this,_AES_Ke,"f").push([0,0,0,0]),__classPrivateFieldGet$2(this,_AES_Kd,"f").push([0,0,0,0]);const nt=(tt+1)*4,at=this.key.length/4,ot=convertToInt32(this.key);let st;for(let pt=0;pt<at;pt++)st=pt>>2,__classPrivateFieldGet$2(this,_AES_Ke,"f")[st][pt%4]=ot[pt],__classPrivateFieldGet$2(this,_AES_Kd,"f")[tt-st][pt%4]=ot[pt];let ct=0,dt=at,ht;for(;dt<nt;){if(ht=ot[at-1],ot[0]^=S$1[ht>>16&255]<<24^S$1[ht>>8&255]<<16^S$1[ht&255]<<8^S$1[ht>>24&255]^rcon[ct]<<24,ct+=1,at!=8)for(let gt=1;gt<at;gt++)ot[gt]^=ot[gt-1];else{for(let gt=1;gt<at/2;gt++)ot[gt]^=ot[gt-1];ht=ot[at/2-1],ot[at/2]^=S$1[ht&255]^S$1[ht>>8&255]<<8^S$1[ht>>16&255]<<16^S$1[ht>>24&255]<<24;for(let gt=at/2+1;gt<at;gt++)ot[gt]^=ot[gt-1]}let pt=0,mt,yt;for(;pt<at&&dt<nt;)mt=dt>>2,yt=dt%4,__classPrivateFieldGet$2(this,_AES_Ke,"f")[mt][yt]=ot[pt],__classPrivateFieldGet$2(this,_AES_Kd,"f")[tt-mt][yt]=ot[pt++],dt++}for(let pt=1;pt<tt;pt++)for(let mt=0;mt<4;mt++)ht=__classPrivateFieldGet$2(this,_AES_Kd,"f")[pt][mt],__classPrivateFieldGet$2(this,_AES_Kd,"f")[pt][mt]=U1[ht>>24&255]^U2[ht>>16&255]^U3[ht>>8&255]^U4[ht&255]}encrypt(et){if(et.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const tt=__classPrivateFieldGet$2(this,_AES_Ke,"f").length-1,nt=[0,0,0,0];let at=convertToInt32(et);for(let ct=0;ct<4;ct++)at[ct]^=__classPrivateFieldGet$2(this,_AES_Ke,"f")[0][ct];for(let ct=1;ct<tt;ct++){for(let dt=0;dt<4;dt++)nt[dt]=T1[at[dt]>>24&255]^T2[at[(dt+1)%4]>>16&255]^T3[at[(dt+2)%4]>>8&255]^T4[at[(dt+3)%4]&255]^__classPrivateFieldGet$2(this,_AES_Ke,"f")[ct][dt];at=nt.slice()}const ot=new Uint8Array(16);let st=0;for(let ct=0;ct<4;ct++)st=__classPrivateFieldGet$2(this,_AES_Ke,"f")[tt][ct],ot[4*ct]=(S$1[at[ct]>>24&255]^st>>24)&255,ot[4*ct+1]=(S$1[at[(ct+1)%4]>>16&255]^st>>16)&255,ot[4*ct+2]=(S$1[at[(ct+2)%4]>>8&255]^st>>8)&255,ot[4*ct+3]=(S$1[at[(ct+3)%4]&255]^st)&255;return ot}decrypt(et){if(et.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const tt=__classPrivateFieldGet$2(this,_AES_Kd,"f").length-1,nt=[0,0,0,0];let at=convertToInt32(et);for(let ct=0;ct<4;ct++)at[ct]^=__classPrivateFieldGet$2(this,_AES_Kd,"f")[0][ct];for(let ct=1;ct<tt;ct++){for(let dt=0;dt<4;dt++)nt[dt]=T5[at[dt]>>24&255]^T6[at[(dt+3)%4]>>16&255]^T7[at[(dt+2)%4]>>8&255]^T8[at[(dt+1)%4]&255]^__classPrivateFieldGet$2(this,_AES_Kd,"f")[ct][dt];at=nt.slice()}const ot=new Uint8Array(16);let st=0;for(let ct=0;ct<4;ct++)st=__classPrivateFieldGet$2(this,_AES_Kd,"f")[tt][ct],ot[4*ct]=(Si[at[ct]>>24&255]^st>>24)&255,ot[4*ct+1]=(Si[at[(ct+3)%4]>>16&255]^st>>16)&255,ot[4*ct+2]=(Si[at[(ct+2)%4]>>8&255]^st>>8)&255,ot[4*ct+3]=(Si[at[(ct+1)%4]&255]^st)&255;return ot}};_AES_key=new WeakMap,_AES_Kd=new WeakMap,_AES_Ke=new WeakMap;class ModeOfOperation{constructor(et,tt,nt){if(nt&&!(this instanceof nt))throw new Error(`${et} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new AES$1(tt)},name:{enumerable:!0,value:et}})}}var __classPrivateFieldSet$1=globalThis&&globalThis.__classPrivateFieldSet||function(_e,et,tt,nt,at){if(nt==="m")throw new TypeError("Private method is not writable");if(nt==="a"&&!at)throw new TypeError("Private accessor was defined without a setter");if(typeof et=="function"?_e!==et||!at:!et.has(_e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return nt==="a"?at.call(_e,tt):at?at.value=tt:et.set(_e,tt),tt},__classPrivateFieldGet$1=globalThis&&globalThis.__classPrivateFieldGet||function(_e,et,tt,nt){if(tt==="a"&&!nt)throw new TypeError("Private accessor was defined without a getter");if(typeof et=="function"?_e!==et||!nt:!et.has(_e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return tt==="m"?nt:tt==="a"?nt.call(_e):nt?nt.value:et.get(_e)},_CBC_iv,_CBC_lastBlock;class CBC extends ModeOfOperation{constructor(et,tt){if(super("ECC",et,CBC),_CBC_iv.set(this,void 0),_CBC_lastBlock.set(this,void 0),tt){if(tt.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");__classPrivateFieldSet$1(this,_CBC_iv,new Uint8Array(tt),"f")}else __classPrivateFieldSet$1(this,_CBC_iv,new Uint8Array(16),"f");__classPrivateFieldSet$1(this,_CBC_lastBlock,this.iv,"f")}get iv(){return new Uint8Array(__classPrivateFieldGet$1(this,_CBC_iv,"f"))}encrypt(et){if(et.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const tt=new Uint8Array(et.length);for(let nt=0;nt<et.length;nt+=16){for(let at=0;at<16;at++)__classPrivateFieldGet$1(this,_CBC_lastBlock,"f")[at]^=et[nt+at];__classPrivateFieldSet$1(this,_CBC_lastBlock,this.aes.encrypt(__classPrivateFieldGet$1(this,_CBC_lastBlock,"f")),"f"),tt.set(__classPrivateFieldGet$1(this,_CBC_lastBlock,"f"),nt)}return tt}decrypt(et){if(et.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const tt=new Uint8Array(et.length);for(let nt=0;nt<et.length;nt+=16){const at=this.aes.decrypt(et.subarray(nt,nt+16));for(let ot=0;ot<16;ot++)tt[nt+ot]=at[ot]^__classPrivateFieldGet$1(this,_CBC_lastBlock,"f")[ot],__classPrivateFieldGet$1(this,_CBC_lastBlock,"f")[ot]=et[nt+ot]}return tt}}_CBC_iv=new WeakMap,_CBC_lastBlock=new WeakMap;var __classPrivateFieldSet=globalThis&&globalThis.__classPrivateFieldSet||function(_e,et,tt,nt,at){if(nt==="m")throw new TypeError("Private method is not writable");if(nt==="a"&&!at)throw new TypeError("Private accessor was defined without a setter");if(typeof et=="function"?_e!==et||!at:!et.has(_e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return nt==="a"?at.call(_e,tt):at?at.value=tt:et.set(_e,tt),tt},__classPrivateFieldGet=globalThis&&globalThis.__classPrivateFieldGet||function(_e,et,tt,nt){if(tt==="a"&&!nt)throw new TypeError("Private accessor was defined without a getter");if(typeof et=="function"?_e!==et||!nt:!et.has(_e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return tt==="m"?nt:tt==="a"?nt.call(_e):nt?nt.value:et.get(_e)},_CTR_remaining,_CTR_remainingIndex,_CTR_counter;class CTR extends ModeOfOperation{constructor(et,tt){super("CTR",et,CTR),_CTR_remaining.set(this,void 0),_CTR_remainingIndex.set(this,void 0),_CTR_counter.set(this,void 0),__classPrivateFieldSet(this,_CTR_counter,new Uint8Array(16),"f"),__classPrivateFieldGet(this,_CTR_counter,"f").fill(0),__classPrivateFieldSet(this,_CTR_remaining,__classPrivateFieldGet(this,_CTR_counter,"f"),"f"),__classPrivateFieldSet(this,_CTR_remainingIndex,16,"f"),tt==null&&(tt=1),typeof tt=="number"?this.setCounterValue(tt):this.setCounterBytes(tt)}get counter(){return new Uint8Array(__classPrivateFieldGet(this,_CTR_counter,"f"))}setCounterValue(et){if(!Number.isInteger(et)||et<0||et>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let tt=15;tt>=0;--tt)__classPrivateFieldGet(this,_CTR_counter,"f")[tt]=et%256,et=Math.floor(et/256)}setCounterBytes(et){if(et.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");__classPrivateFieldGet(this,_CTR_counter,"f").set(et)}increment(){for(let et=15;et>=0;et--)if(__classPrivateFieldGet(this,_CTR_counter,"f")[et]===255)__classPrivateFieldGet(this,_CTR_counter,"f")[et]=0;else{__classPrivateFieldGet(this,_CTR_counter,"f")[et]++;break}}encrypt(et){var tt,nt;const at=new Uint8Array(et);for(let ot=0;ot<at.length;ot++)__classPrivateFieldGet(this,_CTR_remainingIndex,"f")===16&&(__classPrivateFieldSet(this,_CTR_remaining,this.aes.encrypt(__classPrivateFieldGet(this,_CTR_counter,"f")),"f"),__classPrivateFieldSet(this,_CTR_remainingIndex,0,"f"),this.increment()),at[ot]^=__classPrivateFieldGet(this,_CTR_remaining,"f")[__classPrivateFieldSet(this,_CTR_remainingIndex,(nt=__classPrivateFieldGet(this,_CTR_remainingIndex,"f"),tt=nt++,nt),"f"),tt];return at}decrypt(et){return this.encrypt(et)}}_CTR_remaining=new WeakMap,_CTR_remainingIndex=new WeakMap,_CTR_counter=new WeakMap;function pkcs7Strip(_e){if(_e.length<16)throw new TypeError("PKCS#7 invalid length");const et=_e[_e.length-1];if(et>16)throw new TypeError("PKCS#7 padding byte out of range");const tt=_e.length-et;for(let nt=0;nt<et;nt++)if(_e[tt+nt]!==et)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(_e.subarray(0,tt))}function looseArrayify(_e){return typeof _e=="string"&&!_e.startsWith("0x")&&(_e="0x"+_e),getBytesCopy(_e)}function zpad$1(_e,et){for(_e=String(_e);_e.length<et;)_e="0"+_e;return _e}function getPassword(_e){return typeof _e=="string"?toUtf8Bytes$1(_e,"NFKC"):getBytesCopy(_e)}function spelunk$1(_e,et){const tt=et.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);assertArgument(tt!=null,"invalid path","path",et);const nt=tt[1],at=tt[3],ot=tt[4]==="!";let st=_e;for(const ct of nt.toLowerCase().split(".")){if(Array.isArray(st)){if(!ct.match(/^[0-9]+$/))break;st=st[parseInt(ct)]}else if(typeof st=="object"){let dt=null;for(const ht in st)if(ht.toLowerCase()===ct){dt=st[ht];break}st=dt}else st=null;if(st==null)break}if(assertArgument(!ot||st!=null,"missing required value","path",nt),at&&st!=null){if(at==="int"){if(typeof st=="string"&&st.match(/^-?[0-9]+$/))return parseInt(st);if(Number.isSafeInteger(st))return st}if(at==="number"&&typeof st=="string"&&st.match(/^-?[0-9.]*$/))return parseFloat(st);if(at==="data"&&typeof st=="string")return looseArrayify(st);if(at==="array"&&Array.isArray(st)||at===typeof st)return st;assertArgument(!1,`wrong type found for ${at} `,"path",nt)}return st}const defaultPath$1="m/44'/60'/0'/0/0";function isKeystoreJson(_e){try{const et=JSON.parse(_e);if((et.version!=null?parseInt(et.version):0)===3)return!0}catch{}return!1}function decrypt$1(_e,et,tt){if(spelunk$1(_e,"crypto.cipher:string")==="aes-128-ctr"){const at=spelunk$1(_e,"crypto.cipherparams.iv:data!"),ot=new CTR(et,at);return hexlify$1(ot.decrypt(tt))}assert$y(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}function getAccount$1(_e,et){const tt=getBytes(et),nt=spelunk$1(_e,"crypto.ciphertext:data!"),at=hexlify$1(keccak256$1(concat$2([tt.slice(16,32),nt]))).substring(2);assertArgument(at===spelunk$1(_e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const ot=decrypt$1(_e,tt.slice(0,16),nt),st=computeAddress$2(ot);if(_e.address){let ht=_e.address.toLowerCase();ht.startsWith("0x")||(ht="0x"+ht),assertArgument(getAddress$1(ht)===st,"keystore address/privateKey mismatch","address",_e.address)}const ct={address:st,privateKey:ot};if(spelunk$1(_e,"x-ethers.version:string")==="0.1"){const ht=tt.slice(32,64),pt=spelunk$1(_e,"x-ethers.mnemonicCiphertext:data!"),mt=spelunk$1(_e,"x-ethers.mnemonicCounter:data!"),yt=new CTR(ht,mt);ct.mnemonic={path:spelunk$1(_e,"x-ethers.path:string")||defaultPath$1,locale:spelunk$1(_e,"x-ethers.locale:string")||"en",entropy:hexlify$1(getBytes(yt.decrypt(pt)))}}return ct}function getDecryptKdfParams(_e){const et=spelunk$1(_e,"crypto.kdf:string");if(et&&typeof et=="string"){if(et.toLowerCase()==="scrypt"){const tt=spelunk$1(_e,"crypto.kdfparams.salt:data!"),nt=spelunk$1(_e,"crypto.kdfparams.n:int!"),at=spelunk$1(_e,"crypto.kdfparams.r:int!"),ot=spelunk$1(_e,"crypto.kdfparams.p:int!");assertArgument(nt>0&&(nt&nt-1)===0,"invalid kdf.N","kdf.N",nt),assertArgument(at>0&&ot>0,"invalid kdf","kdf",et);const st=spelunk$1(_e,"crypto.kdfparams.dklen:int!");return assertArgument(st===32,"invalid kdf.dklen","kdf.dflen",st),{name:"scrypt",salt:tt,N:nt,r:at,p:ot,dkLen:64}}else if(et.toLowerCase()==="pbkdf2"){const tt=spelunk$1(_e,"crypto.kdfparams.salt:data!"),nt=spelunk$1(_e,"crypto.kdfparams.prf:string!"),at=nt.split("-").pop();assertArgument(at==="sha256"||at==="sha512","invalid kdf.pdf","kdf.pdf",nt);const ot=spelunk$1(_e,"crypto.kdfparams.c:int!"),st=spelunk$1(_e,"crypto.kdfparams.dklen:int!");return assertArgument(st===32,"invalid kdf.dklen","kdf.dklen",st),{name:"pbkdf2",salt:tt,count:ot,dkLen:st,algorithm:at}}}assertArgument(!1,"unsupported key-derivation function","kdf",et)}function decryptKeystoreJsonSync(_e,et){const tt=JSON.parse(_e),nt=getPassword(et),at=getDecryptKdfParams(tt);if(at.name==="pbkdf2"){const{salt:mt,count:yt,dkLen:gt,algorithm:bt}=at,$t=pbkdf2$1(nt,mt,yt,gt,bt);return getAccount$1(tt,$t)}assert$y(at.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:at});const{salt:ot,N:st,r:ct,p:dt,dkLen:ht}=at,pt=scryptSync(nt,ot,st,ct,dt,ht);return getAccount$1(tt,pt)}function stall$2(_e){return new Promise(et=>{setTimeout(()=>{et()},_e)})}async function decryptKeystoreJson(_e,et,tt){const nt=JSON.parse(_e),at=getPassword(et),ot=getDecryptKdfParams(nt);if(ot.name==="pbkdf2"){tt&&(tt(0),await stall$2(0));const{salt:yt,count:gt,dkLen:bt,algorithm:$t}=ot,wt=pbkdf2$1(at,yt,gt,bt,$t);return tt&&(tt(1),await stall$2(0)),getAccount$1(nt,wt)}assert$y(ot.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:ot});const{salt:st,N:ct,r:dt,p:ht,dkLen:pt}=ot,mt=await scrypt(at,st,ct,dt,ht,pt,tt);return getAccount$1(nt,mt)}function getEncryptKdfParams(_e){const et=_e.salt!=null?getBytes(_e.salt,"options.salt"):randomBytes$3(32);let tt=1<<17,nt=8,at=1;return _e.scrypt&&(_e.scrypt.N&&(tt=_e.scrypt.N),_e.scrypt.r&&(nt=_e.scrypt.r),_e.scrypt.p&&(at=_e.scrypt.p)),assertArgument(typeof tt=="number"&&tt>0&&Number.isSafeInteger(tt)&&(BigInt(tt)&BigInt(tt-1))===BigInt(0),"invalid scrypt N parameter","options.N",tt),assertArgument(typeof nt=="number"&&nt>0&&Number.isSafeInteger(nt),"invalid scrypt r parameter","options.r",nt),assertArgument(typeof at=="number"&&at>0&&Number.isSafeInteger(at),"invalid scrypt p parameter","options.p",at),{name:"scrypt",dkLen:32,salt:et,N:tt,r:nt,p:at}}function _encryptKeystore(_e,et,tt,nt){const at=getBytes(tt.privateKey,"privateKey"),ot=nt.iv!=null?getBytes(nt.iv,"options.iv"):randomBytes$3(16);assertArgument(ot.length===16,"invalid options.iv length","options.iv",nt.iv);const st=nt.uuid!=null?getBytes(nt.uuid,"options.uuid"):randomBytes$3(16);assertArgument(st.length===16,"invalid options.uuid length","options.uuid",nt.iv);const ct=_e.slice(0,16),dt=_e.slice(16,32),ht=new CTR(ct,ot),pt=getBytes(ht.encrypt(at)),mt=keccak256$1(concat$2([dt,pt])),yt={address:tt.address.substring(2).toLowerCase(),id:uuidV4(st),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:hexlify$1(ot).substring(2)},ciphertext:hexlify$1(pt).substring(2),kdf:"scrypt",kdfparams:{salt:hexlify$1(et.salt).substring(2),n:et.N,dklen:32,p:et.p,r:et.r},mac:mt.substring(2)}};if(tt.mnemonic){const gt=nt.client!=null?nt.client:`ethers/${version$q}`,bt=tt.mnemonic.path||defaultPath$1,$t=tt.mnemonic.locale||"en",wt=_e.slice(32,64),St=getBytes(tt.mnemonic.entropy,"account.mnemonic.entropy"),Tt=randomBytes$3(16),Pt=new CTR(wt,Tt),Ot=getBytes(Pt.encrypt(St)),Nt=new Date,Bt="UTC--"+(Nt.getUTCFullYear()+"-"+zpad$1(Nt.getUTCMonth()+1,2)+"-"+zpad$1(Nt.getUTCDate(),2)+"T"+zpad$1(Nt.getUTCHours(),2)+"-"+zpad$1(Nt.getUTCMinutes(),2)+"-"+zpad$1(Nt.getUTCSeconds(),2)+".0Z")+"--"+yt.address;yt["x-ethers"]={client:gt,gethFilename:Bt,path:bt,locale:$t,mnemonicCounter:hexlify$1(Tt).substring(2),mnemonicCiphertext:hexlify$1(Ot).substring(2),version:"0.1"}}return JSON.stringify(yt)}function encryptKeystoreJsonSync(_e,et,tt){tt==null&&(tt={});const nt=getPassword(et),at=getEncryptKdfParams(tt),ot=scryptSync(nt,at.salt,at.N,at.r,at.p,64);return _encryptKeystore(getBytes(ot),at,_e,tt)}async function encryptKeystoreJson(_e,et,tt){tt==null&&(tt={});const nt=getPassword(et),at=getEncryptKdfParams(tt),ot=await scrypt(nt,at.salt,at.N,at.r,at.p,64,tt.progressCallback);return _encryptKeystore(getBytes(ot),at,_e,tt)}const defaultPath="m/44'/60'/0'/0/0",MasterSecret=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),HardenedBit=2147483648,N$1=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Nibbles="0123456789abcdef";function zpad(_e,et){let tt="";for(;_e;)tt=Nibbles[_e%16]+tt,_e=Math.trunc(_e/16);for(;tt.length<et*2;)tt="0"+tt;return"0x"+tt}function encodeBase58Check(_e){const et=getBytes(_e),tt=dataSlice(sha256$4(sha256$4(et)),0,4),nt=concat$2([et,tt]);return encodeBase58(nt)}const _guard={};function ser_I(_e,et,tt,nt){const at=new Uint8Array(37);_e&HardenedBit?(assert$y(nt!=null,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),at.set(getBytes(nt),1)):at.set(getBytes(tt));for(let st=24;st>=0;st-=8)at[33+(st>>3)]=_e>>24-st&255;const ot=getBytes(computeHmac("sha512",et,at));return{IL:ot.slice(0,32),IR:ot.slice(32)}}function derivePath(_e,et){const tt=et.split("/");assertArgument(tt.length>0,"invalid path","path",et),tt[0]==="m"&&(assertArgument(_e.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${_e.depth}`,"path",et),tt.shift());let nt=_e;for(let at=0;at<tt.length;at++){const ot=tt[at];if(ot.match(/^[0-9]+'$/)){const st=parseInt(ot.substring(0,ot.length-1));assertArgument(st<HardenedBit,"invalid path index",`path[${at}]`,ot),nt=nt.deriveChild(HardenedBit+st)}else if(ot.match(/^[0-9]+$/)){const st=parseInt(ot);assertArgument(st<HardenedBit,"invalid path index",`path[${at}]`,ot),nt=nt.deriveChild(st)}else assertArgument(!1,"invalid path component",`path[${at}]`,ot)}return nt}var tm,Wm,Su,Cp;const Us=class Us extends BaseWallet{constructor(tt,nt,at,ot,st,ct,dt,ht,pt){super(nt,pt);In(this,tm);Qr(this,"publicKey");Qr(this,"fingerprint");Qr(this,"parentFingerprint");Qr(this,"mnemonic");Qr(this,"chainCode");Qr(this,"path");Qr(this,"index");Qr(this,"depth");assertPrivate(tt,_guard,"HDNodeWallet"),defineProperties$2(this,{publicKey:nt.compressedPublicKey});const mt=dataSlice(ripemd160$1(sha256$4(this.publicKey)),0,4);defineProperties$2(this,{parentFingerprint:at,fingerprint:mt,chainCode:ot,path:st,index:ct,depth:dt}),defineProperties$2(this,{mnemonic:ht})}connect(tt){return new Us(_guard,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,tt)}async encrypt(tt,nt){return await encryptKeystoreJson(ga(this,tm,Wm).call(this),tt,{progressCallback:nt})}encryptSync(tt){return encryptKeystoreJsonSync(ga(this,tm,Wm).call(this),tt)}get extendedKey(){return assert$y(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),encodeBase58Check(concat$2(["0x0488ADE4",zpad(this.depth,1),this.parentFingerprint,zpad(this.index,4),this.chainCode,concat$2(["0x00",this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new HDNodeVoidWallet(_guard,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(tt){const nt=getNumber(tt,"index");assertArgument(nt<=4294967295,"invalid index","index",nt);let at=this.path;at&&(at+="/"+(nt&~HardenedBit),nt&HardenedBit&&(at+="'"));const{IR:ot,IL:st}=ser_I(nt,this.chainCode,this.publicKey,this.privateKey),ct=new SigningKey$1(toBeHex((toBigInt(st)+BigInt(this.privateKey))%N$1,32));return new Us(_guard,ct,this.fingerprint,hexlify$1(ot),at,nt,this.depth+1,this.mnemonic,this.provider)}derivePath(tt){return derivePath(this,tt)}static fromExtendedKey(tt){const nt=toBeArray(decodeBase58(tt));assertArgument(nt.length===82||encodeBase58Check(nt.slice(0,78))===tt,"invalid extended key","extendedKey","[ REDACTED ]");const at=nt[4],ot=hexlify$1(nt.slice(5,9)),st=parseInt(hexlify$1(nt.slice(9,13)).substring(2),16),ct=hexlify$1(nt.slice(13,45)),dt=nt.slice(45,78);switch(hexlify$1(nt.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const ht=hexlify$1(dt);return new HDNodeVoidWallet(_guard,computeAddress$2(ht),ht,ot,ct,null,st,at,null)}case"0x0488ade4":case"0x04358394 ":if(dt[0]!==0)break;return new Us(_guard,new SigningKey$1(dt.slice(1)),ot,ct,null,st,at,null,null)}assertArgument(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(tt,nt,at){var st;tt==null&&(tt=""),nt==null&&(nt=defaultPath),at==null&&(at=LangEn.wordlist());const ot=Mnemonic.fromEntropy(randomBytes$3(16),tt,at);return ga(st=Us,Su,Cp).call(st,ot.computeSeed(),ot).derivePath(nt)}static fromMnemonic(tt,nt){var at;return nt||(nt=defaultPath),ga(at=Us,Su,Cp).call(at,tt.computeSeed(),tt).derivePath(nt)}static fromPhrase(tt,nt,at,ot){var ct;nt==null&&(nt=""),at==null&&(at=defaultPath),ot==null&&(ot=LangEn.wordlist());const st=Mnemonic.fromPhrase(tt,nt,ot);return ga(ct=Us,Su,Cp).call(ct,st.computeSeed(),st).derivePath(at)}static fromSeed(tt){var nt;return ga(nt=Us,Su,Cp).call(nt,tt,null)}};tm=new WeakSet,Wm=function(){const tt={address:this.address,privateKey:this.privateKey},nt=this.mnemonic;return this.path&&nt&&nt.wordlist.locale==="en"&&nt.password===""&&(tt.mnemonic={path:this.path,locale:"en",entropy:nt.entropy}),tt},Su=new WeakSet,Cp=function(tt,nt){assertArgument(isBytesLike$1(tt),"invalid seed","seed","[REDACTED]");const at=getBytes(tt,"seed");assertArgument(at.length>=16&&at.length<=64,"invalid seed","seed","[REDACTED]");const ot=getBytes(computeHmac("sha512",MasterSecret,at)),st=new SigningKey$1(hexlify$1(ot.slice(0,32)));return new Us(_guard,st,"0x00000000",hexlify$1(ot.slice(32)),"m",0,0,nt,null)},In(Us,Su);let HDNodeWallet=Us;class HDNodeVoidWallet extends VoidSigner$1{constructor(tt,nt,at,ot,st,ct,dt,ht,pt){super(nt,pt);Qr(this,"publicKey");Qr(this,"fingerprint");Qr(this,"parentFingerprint");Qr(this,"chainCode");Qr(this,"path");Qr(this,"index");Qr(this,"depth");assertPrivate(tt,_guard,"HDNodeVoidWallet"),defineProperties$2(this,{publicKey:at});const mt=dataSlice(ripemd160$1(sha256$4(at)),0,4);defineProperties$2(this,{publicKey:at,fingerprint:mt,parentFingerprint:ot,chainCode:st,path:ct,index:dt,depth:ht})}connect(tt){return new HDNodeVoidWallet(_guard,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,tt)}get extendedKey(){return assert$y(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),encodeBase58Check(concat$2(["0x0488B21E",zpad(this.depth,1),this.parentFingerprint,zpad(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(tt){const nt=getNumber(tt,"index");assertArgument(nt<=4294967295,"invalid index","index",nt);let at=this.path;at&&(at+="/"+(nt&~HardenedBit),nt&HardenedBit&&(at+="'"));const{IR:ot,IL:st}=ser_I(nt,this.chainCode,this.publicKey,null),ct=SigningKey$1.addPoints(st,this.publicKey,!0),dt=computeAddress$2(ct);return new HDNodeVoidWallet(_guard,dt,ct,this.fingerprint,hexlify$1(ot),at,nt,this.depth+1,this.provider)}derivePath(tt){return derivePath(this,tt)}}function isCrowdsaleJson(_e){try{if(JSON.parse(_e).encseed)return!0}catch{}return!1}function decryptCrowdsaleJson(_e,et){const tt=JSON.parse(_e),nt=getPassword(et),at=getAddress$1(spelunk$1(tt,"ethaddr:string!")),ot=looseArrayify(spelunk$1(tt,"encseed:string!"));assertArgument(ot&&ot.length%16===0,"invalid encseed","json",_e);const st=getBytes(pbkdf2$1(nt,nt,2e3,32,"sha256")).slice(0,16),ct=ot.slice(0,16),dt=ot.slice(16),ht=new CBC(st,ct),pt=pkcs7Strip(getBytes(ht.decrypt(dt)));let mt="";for(let yt=0;yt<pt.length;yt++)mt+=String.fromCharCode(pt[yt]);return{address:at,privateKey:id$2(mt)}}function stall$1(_e){return new Promise(et=>{setTimeout(()=>{et()},_e)})}var rm,Km;const Jl=class Jl extends BaseWallet{constructor(et,tt){typeof et=="string"&&!et.startsWith("0x")&&(et="0x"+et);let nt=typeof et=="string"?new SigningKey$1(et):et;super(nt,tt)}connect(et){return new Jl(this.signingKey,et)}async encrypt(et,tt){const nt={address:this.address,privateKey:this.privateKey};return await encryptKeystoreJson(nt,et,{progressCallback:tt})}encryptSync(et){const tt={address:this.address,privateKey:this.privateKey};return encryptKeystoreJsonSync(tt,et)}static async fromEncryptedJson(et,tt,nt){var ot;let at=null;return isKeystoreJson(et)?at=await decryptKeystoreJson(et,tt,nt):isCrowdsaleJson(et)&&(nt&&(nt(0),await stall$1(0)),at=decryptCrowdsaleJson(et,tt),nt&&(nt(1),await stall$1(0))),ga(ot=Jl,rm,Km).call(ot,at)}static fromEncryptedJsonSync(et,tt){var at;let nt=null;return isKeystoreJson(et)?nt=decryptKeystoreJsonSync(et,tt):isCrowdsaleJson(et)?nt=decryptCrowdsaleJson(et,tt):assertArgument(!1,"invalid JSON wallet","json","[ REDACTED ]"),ga(at=Jl,rm,Km).call(at,nt)}static createRandom(et){const tt=HDNodeWallet.createRandom();return et?tt.connect(et):tt}static fromPhrase(et,tt){const nt=HDNodeWallet.fromPhrase(et);return tt?nt.connect(tt):nt}};rm=new WeakSet,Km=function(et){if(assertArgument(et,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in et&&et.mnemonic&&et.mnemonic.locale==="en"){const nt=Mnemonic.fromEntropy(et.mnemonic.entropy),at=HDNodeWallet.fromMnemonic(nt,et.mnemonic.path);if(at.address===et.address&&at.privateKey===et.privateKey)return at;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const tt=new Jl(et.privateKey);return assertArgument(tt.address===et.address,"address/privateKey mismatch","json","[ REDACTED ]"),tt},In(Jl,rm);let Wallet=Jl;const PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(_e=>{PACKET_TYPES_REVERSE[PACKET_TYPES[_e]]=_e});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=_e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(_e):_e&&_e.buffer instanceof ArrayBuffer,encodePacket=({type:_e,data:et},tt,nt)=>withNativeBlob$1&&et instanceof Blob?tt?nt(et):encodeBlobAsBase64(et,nt):withNativeArrayBuffer$2&&(et instanceof ArrayBuffer||isView$1(et))?tt?nt(et):encodeBlobAsBase64(new Blob([et]),nt):nt(PACKET_TYPES[_e]+(et||"")),encodeBlobAsBase64=(_e,et)=>{const tt=new FileReader;return tt.onload=function(){const nt=tt.result.split(",")[1];et("b"+(nt||""))},tt.readAsDataURL(_e)};function toArray$4(_e){return _e instanceof Uint8Array?_e:_e instanceof ArrayBuffer?new Uint8Array(_e):new Uint8Array(_e.buffer,_e.byteOffset,_e.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(_e,et){if(withNativeBlob$1&&_e.data instanceof Blob)return _e.data.arrayBuffer().then(toArray$4).then(et);if(withNativeArrayBuffer$2&&(_e.data instanceof ArrayBuffer||isView$1(_e.data)))return et(toArray$4(_e.data));encodePacket(_e,!1,tt=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),et(TEXT_ENCODER.encode(tt))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let _e=0;_e<chars.length;_e++)lookup$1[chars.charCodeAt(_e)]=_e;const decode$5=_e=>{let et=_e.length*.75,tt=_e.length,nt,at=0,ot,st,ct,dt;_e[_e.length-1]==="="&&(et--,_e[_e.length-2]==="="&&et--);const ht=new ArrayBuffer(et),pt=new Uint8Array(ht);for(nt=0;nt<tt;nt+=4)ot=lookup$1[_e.charCodeAt(nt)],st=lookup$1[_e.charCodeAt(nt+1)],ct=lookup$1[_e.charCodeAt(nt+2)],dt=lookup$1[_e.charCodeAt(nt+3)],pt[at++]=ot<<2|st>>4,pt[at++]=(st&15)<<4|ct>>2,pt[at++]=(ct&3)<<6|dt&63;return ht},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(_e,et)=>{if(typeof _e!="string")return{type:"message",data:mapBinary(_e,et)};const tt=_e.charAt(0);return tt==="b"?{type:"message",data:decodeBase64Packet(_e.substring(1),et)}:PACKET_TYPES_REVERSE[tt]?_e.length>1?{type:PACKET_TYPES_REVERSE[tt],data:_e.substring(1)}:{type:PACKET_TYPES_REVERSE[tt]}:ERROR_PACKET},decodeBase64Packet=(_e,et)=>{if(withNativeArrayBuffer$1){const tt=decode$5(_e);return mapBinary(tt,et)}else return{base64:!0,data:_e}},mapBinary=(_e,et)=>{switch(et){case"blob":return _e instanceof Blob?_e:new Blob([_e]);case"arraybuffer":default:return _e instanceof ArrayBuffer?_e:_e.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(_e,et)=>{const tt=_e.length,nt=new Array(tt);let at=0;_e.forEach((ot,st)=>{encodePacket(ot,!1,ct=>{nt[st]=ct,++at===tt&&et(nt.join(SEPARATOR))})})},decodePayload=(_e,et)=>{const tt=_e.split(SEPARATOR),nt=[];for(let at=0;at<tt.length;at++){const ot=decodePacket(tt[at],et);if(nt.push(ot),ot.type==="error")break}return nt};function createPacketEncoderStream(){return new TransformStream({transform(_e,et){encodePacketToBinary(_e,tt=>{const nt=tt.length;let at;if(nt<126)at=new Uint8Array(1),new DataView(at.buffer).setUint8(0,nt);else if(nt<65536){at=new Uint8Array(3);const ot=new DataView(at.buffer);ot.setUint8(0,126),ot.setUint16(1,nt)}else{at=new Uint8Array(9);const ot=new DataView(at.buffer);ot.setUint8(0,127),ot.setBigUint64(1,BigInt(nt))}_e.data&&typeof _e.data!="string"&&(at[0]|=128),et.enqueue(at),et.enqueue(tt)})}})}let TEXT_DECODER;function totalLength(_e){return _e.reduce((et,tt)=>et+tt.length,0)}function concatChunks(_e,et){if(_e[0].length===et)return _e.shift();const tt=new Uint8Array(et);let nt=0;for(let at=0;at<et;at++)tt[at]=_e[0][nt++],nt===_e[0].length&&(_e.shift(),nt=0);return _e.length&&nt<_e[0].length&&(_e[0]=_e[0].slice(nt)),tt}function createPacketDecoderStream(_e,et){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const tt=[];let nt=0,at=-1,ot=!1;return new TransformStream({transform(st,ct){for(tt.push(st);;){if(nt===0){if(totalLength(tt)<1)break;const dt=concatChunks(tt,1);ot=(dt[0]&128)===128,at=dt[0]&127,at<126?nt=3:at===126?nt=1:nt=2}else if(nt===1){if(totalLength(tt)<2)break;const dt=concatChunks(tt,2);at=new DataView(dt.buffer,dt.byteOffset,dt.length).getUint16(0),nt=3}else if(nt===2){if(totalLength(tt)<8)break;const dt=concatChunks(tt,8),ht=new DataView(dt.buffer,dt.byteOffset,dt.length),pt=ht.getUint32(0);if(pt>Math.pow(2,53-32)-1){ct.enqueue(ERROR_PACKET);break}at=pt*Math.pow(2,32)+ht.getUint32(4),nt=3}else{if(totalLength(tt)<at)break;const dt=concatChunks(tt,at);ct.enqueue(decodePacket(ot?dt:TEXT_DECODER.decode(dt),et)),nt=0}if(at===0||at>_e){ct.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(_e){if(_e)return mixin$1(_e)}function mixin$1(_e){for(var et in Emitter.prototype)_e[et]=Emitter.prototype[et];return _e}Emitter.prototype.on=Emitter.prototype.addEventListener=function(_e,et){return this._callbacks=this._callbacks||{},(this._callbacks["$"+_e]=this._callbacks["$"+_e]||[]).push(et),this};Emitter.prototype.once=function(_e,et){function tt(){this.off(_e,tt),et.apply(this,arguments)}return tt.fn=et,this.on(_e,tt),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(_e,et){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var tt=this._callbacks["$"+_e];if(!tt)return this;if(arguments.length==1)return delete this._callbacks["$"+_e],this;for(var nt,at=0;at<tt.length;at++)if(nt=tt[at],nt===et||nt.fn===et){tt.splice(at,1);break}return tt.length===0&&delete this._callbacks["$"+_e],this};Emitter.prototype.emit=function(_e){this._callbacks=this._callbacks||{};for(var et=new Array(arguments.length-1),tt=this._callbacks["$"+_e],nt=1;nt<arguments.length;nt++)et[nt-1]=arguments[nt];if(tt){tt=tt.slice(0);for(var nt=0,at=tt.length;nt<at;++nt)tt[nt].apply(this,et)}return this};Emitter.prototype.emitReserved=Emitter.prototype.emit;Emitter.prototype.listeners=function(_e){return this._callbacks=this._callbacks||{},this._callbacks["$"+_e]||[]};Emitter.prototype.hasListeners=function(_e){return!!this.listeners(_e).length};const nextTick$2=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?et=>Promise.resolve().then(et):(et,tt)=>tt(et,0))(),globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick$2(_e,...et){return et.reduce((tt,nt)=>(_e.hasOwnProperty(nt)&&(tt[nt]=_e[nt]),tt),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(_e,et){et.useNativeTimers?(_e.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),_e.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(_e.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),_e.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength$1(_e){return typeof _e=="string"?utf8Length(_e):Math.ceil((_e.byteLength||_e.size)*BASE64_OVERHEAD)}function utf8Length(_e){let et=0,tt=0;for(let nt=0,at=_e.length;nt<at;nt++)et=_e.charCodeAt(nt),et<128?tt+=1:et<2048?tt+=2:et<55296||et>=57344?tt+=3:(nt++,tt+=4);return tt}function randomString$1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode$5(_e){let et="";for(let tt in _e)_e.hasOwnProperty(tt)&&(et.length&&(et+="&"),et+=encodeURIComponent(tt)+"="+encodeURIComponent(_e[tt]));return et}function decode$4(_e){let et={},tt=_e.split("&");for(let nt=0,at=tt.length;nt<at;nt++){let ot=tt[nt].split("=");et[decodeURIComponent(ot[0])]=decodeURIComponent(ot[1])}return et}class TransportError extends Error{constructor(et,tt,nt){super(et),this.description=tt,this.context=nt,this.type="TransportError"}}class Transport extends Emitter{constructor(et){super(),this.writable=!1,installTimerFunctions(this,et),this.opts=et,this.query=et.query,this.socket=et.socket,this.supportsBinary=!et.forceBase64}onError(et,tt,nt){return super.emitReserved("error",new TransportError(et,tt,nt)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(et){this.readyState==="open"&&this.write(et)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(et){const tt=decodePacket(et,this.socket.binaryType);this.onPacket(tt)}onPacket(et){super.emitReserved("packet",et)}onClose(et){this.readyState="closed",super.emitReserved("close",et)}pause(et){}createUri(et,tt={}){return et+"://"+this._hostname()+this._port()+this.opts.path+this._query(tt)}_hostname(){const et=this.opts.hostname;return et.indexOf(":")===-1?et:"["+et+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(et){const tt=encode$5(et);return tt.length?"?"+tt:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(et){this.readyState="pausing";const tt=()=>{this.readyState="paused",et()};if(this._polling||!this.writable){let nt=0;this._polling&&(nt++,this.once("pollComplete",function(){--nt||tt()})),this.writable||(nt++,this.once("drain",function(){--nt||tt()}))}else tt()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(et){const tt=nt=>{if(this.readyState==="opening"&&nt.type==="open"&&this.onOpen(),nt.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(nt)};decodePayload(et,this.socket.binaryType).forEach(tt),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const et=()=>{this.write([{type:"close"}])};this.readyState==="open"?et():this.once("open",et)}write(et){this.writable=!1,encodePayload(et,tt=>{this.doWrite(tt,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const et=this.opts.secure?"https":"http",tt=this.query||{};return this.opts.timestampRequests!==!1&&(tt[this.opts.timestampParam]=randomString$1()),!this.supportsBinary&&!tt.sid&&(tt.b64=1),this.createUri(et,tt)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const hasCORS=value;function empty(){}class BaseXHR extends Polling{constructor(et){if(super(et),typeof location<"u"){const tt=location.protocol==="https:";let nt=location.port;nt||(nt=tt?"443":"80"),this.xd=typeof location<"u"&&et.hostname!==location.hostname||nt!==et.port}}doWrite(et,tt){const nt=this.request({method:"POST",data:et});nt.on("success",tt),nt.on("error",(at,ot)=>{this.onError("xhr post error",at,ot)})}doPoll(){const et=this.request();et.on("data",this.onData.bind(this)),et.on("error",(tt,nt)=>{this.onError("xhr poll error",tt,nt)}),this.pollXhr=et}}class Request extends Emitter{constructor(et,tt,nt){super(),this.createRequest=et,installTimerFunctions(this,nt),this._opts=nt,this._method=nt.method||"GET",this._uri=tt,this._data=nt.data!==void 0?nt.data:null,this._create()}_create(){var et;const tt=pick$2(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");tt.xdomain=!!this._opts.xd;const nt=this._xhr=this.createRequest(tt);try{nt.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){nt.setDisableHeaderCheck&&nt.setDisableHeaderCheck(!0);for(let at in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(at)&&nt.setRequestHeader(at,this._opts.extraHeaders[at])}}catch{}if(this._method==="POST")try{nt.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{nt.setRequestHeader("Accept","*/*")}catch{}(et=this._opts.cookieJar)===null||et===void 0||et.addCookies(nt),"withCredentials"in nt&&(nt.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(nt.timeout=this._opts.requestTimeout),nt.onreadystatechange=()=>{var at;nt.readyState===3&&((at=this._opts.cookieJar)===null||at===void 0||at.parseCookies(nt.getResponseHeader("set-cookie"))),nt.readyState===4&&(nt.status===200||nt.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof nt.status=="number"?nt.status:0)},0))},nt.send(this._data)}catch(at){this.setTimeoutFn(()=>{this._onError(at)},0);return}typeof document<"u"&&(this._index=Request.requestsCount++,Request.requests[this._index]=this)}_onError(et){this.emitReserved("error",et,this._xhr),this._cleanup(!0)}_cleanup(et){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty,et)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this._index],this._xhr=null}}_onLoad(){const et=this._xhr.responseText;et!==null&&(this.emitReserved("data",et),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Request.requestsCount=0;Request.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const _e="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(_e,unloadHandler,!1)}}function unloadHandler(){for(let _e in Request.requests)Request.requests.hasOwnProperty(_e)&&Request.requests[_e].abort()}const hasXHR2=function(){const _e=newRequest({xdomain:!1});return _e&&_e.responseType!==null}();class XHR extends BaseXHR{constructor(et){super(et);const tt=et&&et.forceBase64;this.supportsBinary=hasXHR2&&!tt}request(et={}){return Object.assign(et,{xd:this.xd},this.opts),new Request(newRequest,this.uri(),et)}}function newRequest(_e){const et=_e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!et||hasCORS))return new XMLHttpRequest}catch{}if(!et)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const et=this.uri(),tt=this.opts.protocols,nt=isReactNative?{}:pick$2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(nt.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(et,tt,nt)}catch(at){return this.emitReserved("error",at)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=et=>this.onClose({description:"websocket connection closed",context:et}),this.ws.onmessage=et=>this.onData(et.data),this.ws.onerror=et=>this.onError("websocket error",et)}write(et){this.writable=!1;for(let tt=0;tt<et.length;tt++){const nt=et[tt],at=tt===et.length-1;encodePacket(nt,this.supportsBinary,ot=>{try{this.doWrite(nt,ot)}catch{}at&&nextTick$2(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const et=this.opts.secure?"wss":"ws",tt=this.query||{};return this.opts.timestampRequests&&(tt[this.opts.timestampParam]=randomString$1()),this.supportsBinary||(tt.b64=1),this.createUri(et,tt)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;class WS extends BaseWS{createSocket(et,tt,nt){return isReactNative?new WebSocketCtor(et,tt,nt):tt?new WebSocketCtor(et,tt):new WebSocketCtor(et)}doWrite(et,tt){this.ws.send(tt)}}class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(et){return this.emitReserved("error",et)}this._transport.closed.then(()=>{this.onClose()}).catch(et=>{this.onError("webtransport error",et)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(et=>{const tt=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),nt=et.readable.pipeThrough(tt).getReader(),at=createPacketEncoderStream();at.readable.pipeTo(et.writable),this._writer=at.writable.getWriter();const ot=()=>{nt.read().then(({done:ct,value:dt})=>{ct||(this.onPacket(dt),ot())}).catch(ct=>{})};ot();const st={type:"open"};this.query.sid&&(st.data=`{"sid":"${this.query.sid}"}`),this._writer.write(st).then(()=>this.onOpen())})})}write(et){this.writable=!1;for(let tt=0;tt<et.length;tt++){const nt=et[tt],at=tt===et.length-1;this._writer.write(nt).then(()=>{at&&nextTick$2(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var et;(et=this._transport)===null||et===void 0||et.close()}}const transports={websocket:WS,webtransport:WT,polling:XHR},re$1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$e(_e){if(_e.length>8e3)throw"URI too long";const et=_e,tt=_e.indexOf("["),nt=_e.indexOf("]");tt!=-1&&nt!=-1&&(_e=_e.substring(0,tt)+_e.substring(tt,nt).replace(/:/g,";")+_e.substring(nt,_e.length));let at=re$1.exec(_e||""),ot={},st=14;for(;st--;)ot[parts[st]]=at[st]||"";return tt!=-1&&nt!=-1&&(ot.source=et,ot.host=ot.host.substring(1,ot.host.length-1).replace(/;/g,":"),ot.authority=ot.authority.replace("[","").replace("]","").replace(/;/g,":"),ot.ipv6uri=!0),ot.pathNames=pathNames(ot,ot.path),ot.queryKey=queryKey(ot,ot.query),ot}function pathNames(_e,et){const tt=/\/{2,9}/g,nt=et.replace(tt,"/").split("/");return(et.slice(0,1)=="/"||et.length===0)&&nt.splice(0,1),et.slice(-1)=="/"&&nt.splice(nt.length-1,1),nt}function queryKey(_e,et){const tt={};return et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(nt,at,ot){at&&(tt[at]=ot)}),tt}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(_e=>_e())},!1);class SocketWithoutUpgrade extends Emitter{constructor(et,tt){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,et&&typeof et=="object"&&(tt=et,et=null),et){const nt=parse$e(et);tt.hostname=nt.host,tt.secure=nt.protocol==="https"||nt.protocol==="wss",tt.port=nt.port,nt.query&&(tt.query=nt.query)}else tt.host&&(tt.hostname=parse$e(tt.host).host);installTimerFunctions(this,tt),this.secure=tt.secure!=null?tt.secure:typeof location<"u"&&location.protocol==="https:",tt.hostname&&!tt.port&&(tt.port=this.secure?"443":"80"),this.hostname=tt.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=tt.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},tt.transports.forEach(nt=>{const at=nt.prototype.name;this.transports.push(at),this._transportsByName[at]=nt}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},tt),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode$4(this.opts.query)),withEventListeners&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(et){const tt=Object.assign({},this.opts.query);tt.EIO=protocol$1,tt.transport=et,this.id&&(tt.sid=this.id);const nt=Object.assign({},this.opts,{query:tt,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[et]);return new this._transportsByName[et](nt)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const et=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const tt=this.createTransport(et);tt.open(),this.setTransport(tt)}setTransport(et){this.transport&&this.transport.removeAllListeners(),this.transport=et,et.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",tt=>this._onClose("transport close",tt))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(et){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",et),this.emitReserved("heartbeat"),et.type){case"open":this.onHandshake(JSON.parse(et.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const tt=new Error("server error");tt.code=et.data,this._onError(tt);break;case"message":this.emitReserved("data",et.data),this.emitReserved("message",et.data);break}}onHandshake(et){this.emitReserved("handshake",et),this.id=et.sid,this.transport.query.sid=et.sid,this._pingInterval=et.pingInterval,this._pingTimeout=et.pingTimeout,this._maxPayload=et.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const et=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+et,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},et),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const et=this._getWritablePackets();this.transport.send(et),this._prevBufferLen=et.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let tt=1;for(let nt=0;nt<this.writeBuffer.length;nt++){const at=this.writeBuffer[nt].data;if(at&&(tt+=byteLength$1(at)),nt>0&&tt>this._maxPayload)return this.writeBuffer.slice(0,nt);tt+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const et=Date.now()>this._pingTimeoutTime;return et&&(this._pingTimeoutTime=0,nextTick$2(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),et}write(et,tt,nt){return this._sendPacket("message",et,tt,nt),this}send(et,tt,nt){return this._sendPacket("message",et,tt,nt),this}_sendPacket(et,tt,nt,at){if(typeof tt=="function"&&(at=tt,tt=void 0),typeof nt=="function"&&(at=nt,nt=null),this.readyState==="closing"||this.readyState==="closed")return;nt=nt||{},nt.compress=nt.compress!==!1;const ot={type:et,data:tt,options:nt};this.emitReserved("packetCreate",ot),this.writeBuffer.push(ot),at&&this.once("flush",at),this.flush()}close(){const et=()=>{this._onClose("forced close"),this.transport.close()},tt=()=>{this.off("upgrade",tt),this.off("upgradeError",tt),et()},nt=()=>{this.once("upgrade",tt),this.once("upgradeError",tt)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?nt():et()}):this.upgrading?nt():et()),this}_onError(et){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",et),this._onClose("transport error",et)}_onClose(et,tt){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const nt=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);nt!==-1&&OFFLINE_EVENT_LISTENERS.splice(nt,1)}this.readyState="closed",this.id=null,this.emitReserved("close",et,tt),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol$1;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let et=0;et<this._upgrades.length;et++)this._probe(this._upgrades[et])}_probe(et){let tt=this.createTransport(et),nt=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const at=()=>{nt||(tt.send([{type:"ping",data:"probe"}]),tt.once("packet",mt=>{if(!nt)if(mt.type==="pong"&&mt.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",tt),!tt)return;SocketWithoutUpgrade.priorWebsocketSuccess=tt.name==="websocket",this.transport.pause(()=>{nt||this.readyState!=="closed"&&(pt(),this.setTransport(tt),tt.send([{type:"upgrade"}]),this.emitReserved("upgrade",tt),tt=null,this.upgrading=!1,this.flush())})}else{const yt=new Error("probe error");yt.transport=tt.name,this.emitReserved("upgradeError",yt)}}))};function ot(){nt||(nt=!0,pt(),tt.close(),tt=null)}const st=mt=>{const yt=new Error("probe error: "+mt);yt.transport=tt.name,ot(),this.emitReserved("upgradeError",yt)};function ct(){st("transport closed")}function dt(){st("socket closed")}function ht(mt){tt&&mt.name!==tt.name&&ot()}const pt=()=>{tt.removeListener("open",at),tt.removeListener("error",st),tt.removeListener("close",ct),this.off("close",dt),this.off("upgrading",ht)};tt.once("open",at),tt.once("error",st),tt.once("close",ct),this.once("close",dt),this.once("upgrading",ht),this._upgrades.indexOf("webtransport")!==-1&&et!=="webtransport"?this.setTimeoutFn(()=>{nt||tt.open()},200):tt.open()}onHandshake(et){this._upgrades=this._filterUpgrades(et.upgrades),super.onHandshake(et)}_filterUpgrades(et){const tt=[];for(let nt=0;nt<et.length;nt++)~this.transports.indexOf(et[nt])&&tt.push(et[nt]);return tt}}let Socket$1=class extends SocketWithUpgrade{constructor(et,tt={}){const nt=typeof et=="object"?et:tt;(!nt.transports||nt.transports&&typeof nt.transports[0]=="string")&&(nt.transports=(nt.transports||["polling","websocket","webtransport"]).map(at=>transports[at]).filter(at=>!!at)),super(et,nt)}};function url$1(_e,et="",tt){let nt=_e;tt=tt||typeof location<"u"&&location,_e==null&&(_e=tt.protocol+"//"+tt.host),typeof _e=="string"&&(_e.charAt(0)==="/"&&(_e.charAt(1)==="/"?_e=tt.protocol+_e:_e=tt.host+_e),/^(https?|wss?):\/\//.test(_e)||(typeof tt<"u"?_e=tt.protocol+"//"+_e:_e="https://"+_e),nt=parse$e(_e)),nt.port||(/^(http|ws)$/.test(nt.protocol)?nt.port="80":/^(http|ws)s$/.test(nt.protocol)&&(nt.port="443")),nt.path=nt.path||"/";const ot=nt.host.indexOf(":")!==-1?"["+nt.host+"]":nt.host;return nt.id=nt.protocol+"://"+ot+":"+nt.port+et,nt.href=nt.protocol+"://"+ot+(tt&&tt.port===nt.port?"":":"+nt.port),nt}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=_e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(_e):_e.buffer instanceof ArrayBuffer,toString$f=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$f.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$f.call(File)==="[object FileConstructor]";function isBinary(_e){return withNativeArrayBuffer&&(_e instanceof ArrayBuffer||isView(_e))||withNativeBlob&&_e instanceof Blob||withNativeFile&&_e instanceof File}function hasBinary(_e,et){if(!_e||typeof _e!="object")return!1;if(Array.isArray(_e)){for(let tt=0,nt=_e.length;tt<nt;tt++)if(hasBinary(_e[tt]))return!0;return!1}if(isBinary(_e))return!0;if(_e.toJSON&&typeof _e.toJSON=="function"&&arguments.length===1)return hasBinary(_e.toJSON(),!0);for(const tt in _e)if(Object.prototype.hasOwnProperty.call(_e,tt)&&hasBinary(_e[tt]))return!0;return!1}function deconstructPacket(_e){const et=[],tt=_e.data,nt=_e;return nt.data=_deconstructPacket(tt,et),nt.attachments=et.length,{packet:nt,buffers:et}}function _deconstructPacket(_e,et){if(!_e)return _e;if(isBinary(_e)){const tt={_placeholder:!0,num:et.length};return et.push(_e),tt}else if(Array.isArray(_e)){const tt=new Array(_e.length);for(let nt=0;nt<_e.length;nt++)tt[nt]=_deconstructPacket(_e[nt],et);return tt}else if(typeof _e=="object"&&!(_e instanceof Date)){const tt={};for(const nt in _e)Object.prototype.hasOwnProperty.call(_e,nt)&&(tt[nt]=_deconstructPacket(_e[nt],et));return tt}return _e}function reconstructPacket(_e,et){return _e.data=_reconstructPacket(_e.data,et),delete _e.attachments,_e}function _reconstructPacket(_e,et){if(!_e)return _e;if(_e&&_e._placeholder===!0){if(typeof _e.num=="number"&&_e.num>=0&&_e.num<et.length)return et[_e.num];throw new Error("illegal attachments")}else if(Array.isArray(_e))for(let tt=0;tt<_e.length;tt++)_e[tt]=_reconstructPacket(_e[tt],et);else if(typeof _e=="object")for(const tt in _e)Object.prototype.hasOwnProperty.call(_e,tt)&&(_e[tt]=_reconstructPacket(_e[tt],et));return _e}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],protocol=5;var PacketType;(function(_e){_e[_e.CONNECT=0]="CONNECT",_e[_e.DISCONNECT=1]="DISCONNECT",_e[_e.EVENT=2]="EVENT",_e[_e.ACK=3]="ACK",_e[_e.CONNECT_ERROR=4]="CONNECT_ERROR",_e[_e.BINARY_EVENT=5]="BINARY_EVENT",_e[_e.BINARY_ACK=6]="BINARY_ACK"})(PacketType||(PacketType={}));class Encoder{constructor(et){this.replacer=et}encode(et){return(et.type===PacketType.EVENT||et.type===PacketType.ACK)&&hasBinary(et)?this.encodeAsBinary({type:et.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:et.nsp,data:et.data,id:et.id}):[this.encodeAsString(et)]}encodeAsString(et){let tt=""+et.type;return(et.type===PacketType.BINARY_EVENT||et.type===PacketType.BINARY_ACK)&&(tt+=et.attachments+"-"),et.nsp&&et.nsp!=="/"&&(tt+=et.nsp+","),et.id!=null&&(tt+=et.id),et.data!=null&&(tt+=JSON.stringify(et.data,this.replacer)),tt}encodeAsBinary(et){const tt=deconstructPacket(et),nt=this.encodeAsString(tt.packet),at=tt.buffers;return at.unshift(nt),at}}function isObject$q(_e){return Object.prototype.toString.call(_e)==="[object Object]"}class Decoder extends Emitter{constructor(et){super(),this.reviver=et}add(et){let tt;if(typeof et=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");tt=this.decodeString(et);const nt=tt.type===PacketType.BINARY_EVENT;nt||tt.type===PacketType.BINARY_ACK?(tt.type=nt?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(tt),tt.attachments===0&&super.emitReserved("decoded",tt)):super.emitReserved("decoded",tt)}else if(isBinary(et)||et.base64)if(this.reconstructor)tt=this.reconstructor.takeBinaryData(et),tt&&(this.reconstructor=null,super.emitReserved("decoded",tt));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+et)}decodeString(et){let tt=0;const nt={type:Number(et.charAt(0))};if(PacketType[nt.type]===void 0)throw new Error("unknown packet type "+nt.type);if(nt.type===PacketType.BINARY_EVENT||nt.type===PacketType.BINARY_ACK){const ot=tt+1;for(;et.charAt(++tt)!=="-"&&tt!=et.length;);const st=et.substring(ot,tt);if(st!=Number(st)||et.charAt(tt)!=="-")throw new Error("Illegal attachments");nt.attachments=Number(st)}if(et.charAt(tt+1)==="/"){const ot=tt+1;for(;++tt&&!(et.charAt(tt)===","||tt===et.length););nt.nsp=et.substring(ot,tt)}else nt.nsp="/";const at=et.charAt(tt+1);if(at!==""&&Number(at)==at){const ot=tt+1;for(;++tt;){const st=et.charAt(tt);if(st==null||Number(st)!=st){--tt;break}if(tt===et.length)break}nt.id=Number(et.substring(ot,tt+1))}if(et.charAt(++tt)){const ot=this.tryParse(et.substr(tt));if(Decoder.isPayloadValid(nt.type,ot))nt.data=ot;else throw new Error("invalid payload")}return nt}tryParse(et){try{return JSON.parse(et,this.reviver)}catch{return!1}}static isPayloadValid(et,tt){switch(et){case PacketType.CONNECT:return isObject$q(tt);case PacketType.DISCONNECT:return tt===void 0;case PacketType.CONNECT_ERROR:return typeof tt=="string"||isObject$q(tt);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(tt)&&(typeof tt[0]=="number"||typeof tt[0]=="string"&&RESERVED_EVENTS$1.indexOf(tt[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(tt)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(et){this.packet=et,this.buffers=[],this.reconPack=et}takeBinaryData(et){if(this.buffers.push(et),this.buffers.length===this.reconPack.attachments){const tt=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),tt}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const parser=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType},protocol},Symbol.toStringTag,{value:"Module"}));function on$1(_e,et,tt){return _e.on(et,tt),function(){_e.off(et,tt)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter{constructor(et,tt,nt){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=et,this.nsp=tt,nt&&nt.auth&&(this.auth=nt.auth),this._opts=Object.assign({},nt),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const et=this.io;this.subs=[on$1(et,"open",this.onopen.bind(this)),on$1(et,"packet",this.onpacket.bind(this)),on$1(et,"error",this.onerror.bind(this)),on$1(et,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...et){return et.unshift("message"),this.emit.apply(this,et),this}emit(et,...tt){var nt,at,ot;if(RESERVED_EVENTS.hasOwnProperty(et))throw new Error('"'+et.toString()+'" is a reserved event name');if(tt.unshift(et),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(tt),this;const st={type:PacketType.EVENT,data:tt};if(st.options={},st.options.compress=this.flags.compress!==!1,typeof tt[tt.length-1]=="function"){const pt=this.ids++,mt=tt.pop();this._registerAckCallback(pt,mt),st.id=pt}const ct=(at=(nt=this.io.engine)===null||nt===void 0?void 0:nt.transport)===null||at===void 0?void 0:at.writable,dt=this.connected&&!(!((ot=this.io.engine)===null||ot===void 0)&&ot._hasPingExpired());return this.flags.volatile&&!ct||(dt?(this.notifyOutgoingListeners(st),this.packet(st)):this.sendBuffer.push(st)),this.flags={},this}_registerAckCallback(et,tt){var nt;const at=(nt=this.flags.timeout)!==null&&nt!==void 0?nt:this._opts.ackTimeout;if(at===void 0){this.acks[et]=tt;return}const ot=this.io.setTimeoutFn(()=>{delete this.acks[et];for(let ct=0;ct<this.sendBuffer.length;ct++)this.sendBuffer[ct].id===et&&this.sendBuffer.splice(ct,1);tt.call(this,new Error("operation has timed out"))},at),st=(...ct)=>{this.io.clearTimeoutFn(ot),tt.apply(this,ct)};st.withError=!0,this.acks[et]=st}emitWithAck(et,...tt){return new Promise((nt,at)=>{const ot=(st,ct)=>st?at(st):nt(ct);ot.withError=!0,tt.push(ot),this.emit(et,...tt)})}_addToQueue(et){let tt;typeof et[et.length-1]=="function"&&(tt=et.pop());const nt={id:this._queueSeq++,tryCount:0,pending:!1,args:et,flags:Object.assign({fromQueue:!0},this.flags)};et.push((at,...ot)=>nt!==this._queue[0]?void 0:(at!==null?nt.tryCount>this._opts.retries&&(this._queue.shift(),tt&&tt(at)):(this._queue.shift(),tt&&tt(null,...ot)),nt.pending=!1,this._drainQueue())),this._queue.push(nt),this._drainQueue()}_drainQueue(et=!1){if(!this.connected||this._queue.length===0)return;const tt=this._queue[0];tt.pending&&!et||(tt.pending=!0,tt.tryCount++,this.flags=tt.flags,this.emit.apply(this,tt.args))}packet(et){et.nsp=this.nsp,this.io._packet(et)}onopen(){typeof this.auth=="function"?this.auth(et=>{this._sendConnectPacket(et)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(et){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},et):et})}onerror(et){this.connected||this.emitReserved("connect_error",et)}onclose(et,tt){this.connected=!1,delete this.id,this.emitReserved("disconnect",et,tt),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(et=>{if(!this.sendBuffer.some(nt=>String(nt.id)===et)){const nt=this.acks[et];delete this.acks[et],nt.withError&&nt.call(this,new Error("socket has been disconnected"))}})}onpacket(et){if(et.nsp===this.nsp)switch(et.type){case PacketType.CONNECT:et.data&&et.data.sid?this.onconnect(et.data.sid,et.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(et);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(et);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const nt=new Error(et.data.message);nt.data=et.data.data,this.emitReserved("connect_error",nt);break}}onevent(et){const tt=et.data||[];et.id!=null&&tt.push(this.ack(et.id)),this.connected?this.emitEvent(tt):this.receiveBuffer.push(Object.freeze(tt))}emitEvent(et){if(this._anyListeners&&this._anyListeners.length){const tt=this._anyListeners.slice();for(const nt of tt)nt.apply(this,et)}super.emit.apply(this,et),this._pid&&et.length&&typeof et[et.length-1]=="string"&&(this._lastOffset=et[et.length-1])}ack(et){const tt=this;let nt=!1;return function(...at){nt||(nt=!0,tt.packet({type:PacketType.ACK,id:et,data:at}))}}onack(et){const tt=this.acks[et.id];typeof tt=="function"&&(delete this.acks[et.id],tt.withError&&et.data.unshift(null),tt.apply(this,et.data))}onconnect(et,tt){this.id=et,this.recovered=tt&&this._pid===tt,this._pid=tt,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(et=>this.emitEvent(et)),this.receiveBuffer=[],this.sendBuffer.forEach(et=>{this.notifyOutgoingListeners(et),this.packet(et)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(et=>et()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(et){return this.flags.compress=et,this}get volatile(){return this.flags.volatile=!0,this}timeout(et){return this.flags.timeout=et,this}onAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(et),this}prependAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(et),this}offAny(et){if(!this._anyListeners)return this;if(et){const tt=this._anyListeners;for(let nt=0;nt<tt.length;nt++)if(et===tt[nt])return tt.splice(nt,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(et){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(et),this}prependAnyOutgoing(et){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(et),this}offAnyOutgoing(et){if(!this._anyOutgoingListeners)return this;if(et){const tt=this._anyOutgoingListeners;for(let nt=0;nt<tt.length;nt++)if(et===tt[nt])return tt.splice(nt,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(et){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const tt=this._anyOutgoingListeners.slice();for(const nt of tt)nt.apply(this,et.data)}}}function Backoff(_e){_e=_e||{},this.ms=_e.min||100,this.max=_e.max||1e4,this.factor=_e.factor||2,this.jitter=_e.jitter>0&&_e.jitter<=1?_e.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var _e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var et=Math.random(),tt=Math.floor(et*this.jitter*_e);_e=Math.floor(et*10)&1?_e+tt:_e-tt}return Math.min(_e,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(_e){this.ms=_e};Backoff.prototype.setMax=function(_e){this.max=_e};Backoff.prototype.setJitter=function(_e){this.jitter=_e};let Manager$1=class extends Emitter{constructor(et,tt){var nt;super(),this.nsps={},this.subs=[],et&&typeof et=="object"&&(tt=et,et=void 0),tt=tt||{},tt.path=tt.path||"/socket.io",this.opts=tt,installTimerFunctions(this,tt),this.reconnection(tt.reconnection!==!1),this.reconnectionAttempts(tt.reconnectionAttempts||1/0),this.reconnectionDelay(tt.reconnectionDelay||1e3),this.reconnectionDelayMax(tt.reconnectionDelayMax||5e3),this.randomizationFactor((nt=tt.randomizationFactor)!==null&&nt!==void 0?nt:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(tt.timeout==null?2e4:tt.timeout),this._readyState="closed",this.uri=et;const at=tt.parser||parser;this.encoder=new at.Encoder,this.decoder=new at.Decoder,this._autoConnect=tt.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(et){return arguments.length?(this._reconnection=!!et,et||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(et){return et===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=et,this)}reconnectionDelay(et){var tt;return et===void 0?this._reconnectionDelay:(this._reconnectionDelay=et,(tt=this.backoff)===null||tt===void 0||tt.setMin(et),this)}randomizationFactor(et){var tt;return et===void 0?this._randomizationFactor:(this._randomizationFactor=et,(tt=this.backoff)===null||tt===void 0||tt.setJitter(et),this)}reconnectionDelayMax(et){var tt;return et===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=et,(tt=this.backoff)===null||tt===void 0||tt.setMax(et),this)}timeout(et){return arguments.length?(this._timeout=et,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(et){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const tt=this.engine,nt=this;this._readyState="opening",this.skipReconnect=!1;const at=on$1(tt,"open",function(){nt.onopen(),et&&et()}),ot=ct=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",ct),et?et(ct):this.maybeReconnectOnOpen()},st=on$1(tt,"error",ot);if(this._timeout!==!1){const ct=this._timeout,dt=this.setTimeoutFn(()=>{at(),ot(new Error("timeout")),tt.close()},ct);this.opts.autoUnref&&dt.unref(),this.subs.push(()=>{this.clearTimeoutFn(dt)})}return this.subs.push(at),this.subs.push(st),this}connect(et){return this.open(et)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const et=this.engine;this.subs.push(on$1(et,"ping",this.onping.bind(this)),on$1(et,"data",this.ondata.bind(this)),on$1(et,"error",this.onerror.bind(this)),on$1(et,"close",this.onclose.bind(this)),on$1(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(et){try{this.decoder.add(et)}catch(tt){this.onclose("parse error",tt)}}ondecoded(et){nextTick$2(()=>{this.emitReserved("packet",et)},this.setTimeoutFn)}onerror(et){this.emitReserved("error",et)}socket(et,tt){let nt=this.nsps[et];return nt?this._autoConnect&&!nt.active&&nt.connect():(nt=new Socket(this,et,tt),this.nsps[et]=nt),nt}_destroy(et){const tt=Object.keys(this.nsps);for(const nt of tt)if(this.nsps[nt].active)return;this._close()}_packet(et){const tt=this.encoder.encode(et);for(let nt=0;nt<tt.length;nt++)this.engine.write(tt[nt],et.options)}cleanup(){this.subs.forEach(et=>et()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(et,tt){var nt;this.cleanup(),(nt=this.engine)===null||nt===void 0||nt.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",et,tt),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const et=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const tt=this.backoff.duration();this._reconnecting=!0;const nt=this.setTimeoutFn(()=>{et.skipReconnect||(this.emitReserved("reconnect_attempt",et.backoff.attempts),!et.skipReconnect&&et.open(at=>{at?(et._reconnecting=!1,et.reconnect(),this.emitReserved("reconnect_error",at)):et.onreconnect()}))},tt);this.opts.autoUnref&&nt.unref(),this.subs.push(()=>{this.clearTimeoutFn(nt)})}}onreconnect(){const et=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",et)}};const cache$1={};function lookup(_e,et){typeof _e=="object"&&(et=_e,_e=void 0),et=et||{};const tt=url$1(_e,et.path||"/socket.io"),nt=tt.source,at=tt.id,ot=tt.path,st=cache$1[at]&&ot in cache$1[at].nsps,ct=et.forceNew||et["force new connection"]||et.multiplex===!1||st;let dt;return ct?dt=new Manager$1(nt,et):(cache$1[at]||(cache$1[at]=new Manager$1(nt,et)),dt=cache$1[at]),tt.query&&!et.query&&(et.query=tt.queryKey),dt.socket(tt.path,et)}Object.assign(lookup,{Manager:Manager$1,Socket,io:lookup,connect:lookup});var dist$e={},Authenticator={},ethConnect={exports:{}};/*! eth-connect {
@@ -324,7 +324,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
324
324
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
325
325
  */})(dist$4);var distExports=dist$4.exports,browser=typeof self=="object"?self.FormData:window.FormData,Helper={},dist$3={},fetcher$1={},browserPonyfill={exports:{}};(function(_e,et){var tt=typeof self<"u"?self:commonjsGlobal,nt=function(){function ot(){this.fetch=!1,this.DOMException=tt.DOMException}return ot.prototype=tt,new ot}();(function(ot){(function(st){var ct={searchParams:"URLSearchParams"in ot,iterable:"Symbol"in ot&&"iterator"in Symbol,blob:"FileReader"in ot&&"Blob"in ot&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in ot,arrayBuffer:"ArrayBuffer"in ot};function dt(At){return At&&DataView.prototype.isPrototypeOf(At)}if(ct.arrayBuffer)var ht=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],pt=ArrayBuffer.isView||function(At){return At&&ht.indexOf(Object.prototype.toString.call(At))>-1};function mt(At){if(typeof At!="string"&&(At=String(At)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(At))throw new TypeError("Invalid character in header field name");return At.toLowerCase()}function yt(At){return typeof At!="string"&&(At=String(At)),At}function gt(At){var xt={next:function(){var Ct=At.shift();return{done:Ct===void 0,value:Ct}}};return ct.iterable&&(xt[Symbol.iterator]=function(){return xt}),xt}function bt(At){this.map={},At instanceof bt?At.forEach(function(xt,Ct){this.append(Ct,xt)},this):Array.isArray(At)?At.forEach(function(xt){this.append(xt[0],xt[1])},this):At&&Object.getOwnPropertyNames(At).forEach(function(xt){this.append(xt,At[xt])},this)}bt.prototype.append=function(At,xt){At=mt(At),xt=yt(xt);var Ct=this.map[At];this.map[At]=Ct?Ct+", "+xt:xt},bt.prototype.delete=function(At){delete this.map[mt(At)]},bt.prototype.get=function(At){return At=mt(At),this.has(At)?this.map[At]:null},bt.prototype.has=function(At){return this.map.hasOwnProperty(mt(At))},bt.prototype.set=function(At,xt){this.map[mt(At)]=yt(xt)},bt.prototype.forEach=function(At,xt){for(var Ct in this.map)this.map.hasOwnProperty(Ct)&&At.call(xt,this.map[Ct],Ct,this)},bt.prototype.keys=function(){var At=[];return this.forEach(function(xt,Ct){At.push(Ct)}),gt(At)},bt.prototype.values=function(){var At=[];return this.forEach(function(xt){At.push(xt)}),gt(At)},bt.prototype.entries=function(){var At=[];return this.forEach(function(xt,Ct){At.push([Ct,xt])}),gt(At)},ct.iterable&&(bt.prototype[Symbol.iterator]=bt.prototype.entries);function $t(At){if(At.bodyUsed)return Promise.reject(new TypeError("Already read"));At.bodyUsed=!0}function wt(At){return new Promise(function(xt,Ct){At.onload=function(){xt(At.result)},At.onerror=function(){Ct(At.error)}})}function St(At){var xt=new FileReader,Ct=wt(xt);return xt.readAsArrayBuffer(At),Ct}function Tt(At){var xt=new FileReader,Ct=wt(xt);return xt.readAsText(At),Ct}function Pt(At){for(var xt=new Uint8Array(At),Ct=new Array(xt.length),Dt=0;Dt<xt.length;Dt++)Ct[Dt]=String.fromCharCode(xt[Dt]);return Ct.join("")}function Ot(At){if(At.slice)return At.slice(0);var xt=new Uint8Array(At.byteLength);return xt.set(new Uint8Array(At)),xt.buffer}function Nt(){return this.bodyUsed=!1,this._initBody=function(At){this._bodyInit=At,At?typeof At=="string"?this._bodyText=At:ct.blob&&Blob.prototype.isPrototypeOf(At)?this._bodyBlob=At:ct.formData&&FormData.prototype.isPrototypeOf(At)?this._bodyFormData=At:ct.searchParams&&URLSearchParams.prototype.isPrototypeOf(At)?this._bodyText=At.toString():ct.arrayBuffer&&ct.blob&&dt(At)?(this._bodyArrayBuffer=Ot(At.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):ct.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(At)||pt(At))?this._bodyArrayBuffer=Ot(At):this._bodyText=At=Object.prototype.toString.call(At):this._bodyText="",this.headers.get("content-type")||(typeof At=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):ct.searchParams&&URLSearchParams.prototype.isPrototypeOf(At)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},ct.blob&&(this.blob=function(){var At=$t(this);if(At)return At;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$t(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(St)}),this.text=function(){var At=$t(this);if(At)return At;if(this._bodyBlob)return Tt(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Pt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},ct.formData&&(this.formData=function(){return this.text().then(Ft)}),this.json=function(){return this.text().then(JSON.parse)},this}var Lt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Bt(At){var xt=At.toUpperCase();return Lt.indexOf(xt)>-1?xt:At}function Ut(At,xt){xt=xt||{};var Ct=xt.body;if(At instanceof Ut){if(At.bodyUsed)throw new TypeError("Already read");this.url=At.url,this.credentials=At.credentials,xt.headers||(this.headers=new bt(At.headers)),this.method=At.method,this.mode=At.mode,this.signal=At.signal,!Ct&&At._bodyInit!=null&&(Ct=At._bodyInit,At.bodyUsed=!0)}else this.url=String(At);if(this.credentials=xt.credentials||this.credentials||"same-origin",(xt.headers||!this.headers)&&(this.headers=new bt(xt.headers)),this.method=Bt(xt.method||this.method||"GET"),this.mode=xt.mode||this.mode||null,this.signal=xt.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Ct)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Ct)}Ut.prototype.clone=function(){return new Ut(this,{body:this._bodyInit})};function Ft(At){var xt=new FormData;return At.trim().split("&").forEach(function(Ct){if(Ct){var Dt=Ct.split("="),kt=Dt.shift().replace(/\+/g," "),Rt=Dt.join("=").replace(/\+/g," ");xt.append(decodeURIComponent(kt),decodeURIComponent(Rt))}}),xt}function zt(At){var xt=new bt,Ct=At.replace(/\r?\n[\t ]+/g," ");return Ct.split(/\r?\n/).forEach(function(Dt){var kt=Dt.split(":"),Rt=kt.shift().trim();if(Rt){var _t=kt.join(":").trim();xt.append(Rt,_t)}}),xt}Nt.call(Ut.prototype);function It(At,xt){xt||(xt={}),this.type="default",this.status=xt.status===void 0?200:xt.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in xt?xt.statusText:"OK",this.headers=new bt(xt.headers),this.url=xt.url||"",this._initBody(At)}Nt.call(It.prototype),It.prototype.clone=function(){return new It(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new bt(this.headers),url:this.url})},It.error=function(){var At=new It(null,{status:0,statusText:""});return At.type="error",At};var vt=[301,302,303,307,308];It.redirect=function(At,xt){if(vt.indexOf(xt)===-1)throw new RangeError("Invalid status code");return new It(null,{status:xt,headers:{location:At}})},st.DOMException=ot.DOMException;try{new st.DOMException}catch{st.DOMException=function(xt,Ct){this.message=xt,this.name=Ct;var Dt=Error(xt);this.stack=Dt.stack},st.DOMException.prototype=Object.create(Error.prototype),st.DOMException.prototype.constructor=st.DOMException}function Et(At,xt){return new Promise(function(Ct,Dt){var kt=new Ut(At,xt);if(kt.signal&&kt.signal.aborted)return Dt(new st.DOMException("Aborted","AbortError"));var Rt=new XMLHttpRequest;function _t(){Rt.abort()}Rt.onload=function(){var Mt={status:Rt.status,statusText:Rt.statusText,headers:zt(Rt.getAllResponseHeaders()||"")};Mt.url="responseURL"in Rt?Rt.responseURL:Mt.headers.get("X-Request-URL");var jt="response"in Rt?Rt.response:Rt.responseText;Ct(new It(jt,Mt))},Rt.onerror=function(){Dt(new TypeError("Network request failed"))},Rt.ontimeout=function(){Dt(new TypeError("Network request failed"))},Rt.onabort=function(){Dt(new st.DOMException("Aborted","AbortError"))},Rt.open(kt.method,kt.url,!0),kt.credentials==="include"?Rt.withCredentials=!0:kt.credentials==="omit"&&(Rt.withCredentials=!1),"responseType"in Rt&&ct.blob&&(Rt.responseType="blob"),kt.headers.forEach(function(Mt,jt){Rt.setRequestHeader(jt,Mt)}),kt.signal&&(kt.signal.addEventListener("abort",_t),Rt.onreadystatechange=function(){Rt.readyState===4&&kt.signal.removeEventListener("abort",_t)}),Rt.send(typeof kt._bodyInit>"u"?null:kt._bodyInit)})}return Et.polyfill=!0,ot.fetch||(ot.fetch=Et,ot.Headers=bt,ot.Request=Ut,ot.Response=It),st.Headers=bt,st.Request=Ut,st.Response=It,st.fetch=Et,Object.defineProperty(st,"__esModule",{value:!0}),st})({})})(nt),nt.fetch.ponyfill=!0,delete nt.fetch.polyfill;var at=nt;et=at.fetch,et.default=at.fetch,et.fetch=at.fetch,et.Headers=at.Headers,et.Request=at.Request,et.Response=at.Response,_e.exports=et})(browserPonyfill,browserPonyfill.exports);var browserPonyfillExports=browserPonyfill.exports;const o=getDefaultExportFromCjs$1(browserPonyfillExports);var environment={};Object.defineProperty(environment,"__esModule",{value:!0});environment.isUsingNode=void 0;function isUsingNode(){return typeof process$1$1<"u"&&process$1$1.release&&process$1$1.release.name==="node"}environment.isUsingNode=isUsingNode;var __createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(_e,et,tt,nt){nt===void 0&&(nt=tt);var at=Object.getOwnPropertyDescriptor(et,tt);(!at||("get"in at?!et.__esModule:at.writable||at.configurable))&&(at={enumerable:!0,get:function(){return et[tt]}}),Object.defineProperty(_e,nt,at)}:function(_e,et,tt,nt){nt===void 0&&(nt=tt),_e[nt]=et[tt]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(_e,et){Object.defineProperty(_e,"default",{enumerable:!0,value:et})}:function(_e,et){_e.default=et}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var et={};if(_e!=null)for(var tt in _e)tt!=="default"&&Object.prototype.hasOwnProperty.call(_e,tt)&&__createBinding$2(et,_e,tt);return __setModuleDefault$2(et,_e),et},__rest=commonjsGlobal&&commonjsGlobal.__rest||function(_e,et){var tt={};for(var nt in _e)Object.prototype.hasOwnProperty.call(_e,nt)&&et.indexOf(nt)<0&&(tt[nt]=_e[nt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,nt=Object.getOwnPropertySymbols(_e);at<nt.length;at++)et.indexOf(nt[at])<0&&Object.prototype.propertyIsEnumerable.call(_e,nt[at])&&(tt[nt[at]]=_e[nt[at]]);return tt};Object.defineProperty(fetcher$1,"__esModule",{value:!0});fetcher$1.createFetchComponent=void 0;const crossFetch=__importStar$2(browserPonyfillExports),environment_1=environment,NON_RETRYABLE_STATUS_CODES=[400,401,403,404],IDEMPOTENT_HTTP_METHODS=["GET","HEAD","OPTIONS","PUT","DELETE"];async function fetchWithRetriesAndTimeout(_e,et){const{timeout:tt,abortController:nt,signal:at,retryDelay:ot}=et;let st=et.attempts,ct=null,dt;do try{tt&&(ct=setTimeout(()=>{nt.abort()},tt));const ht=crossFetch.default(_e.toString(),Object.assign(Object.assign({},et),{signal:at})),pt=Promise.race([ht,new Promise((mt,yt)=>{at.addEventListener("abort",()=>{mt(new crossFetch.Response("timeout",{status:408,statusText:"Request Timeout"}))})})]);--st,dt=await pt,ct&&clearTimeout(ct)}finally{if(dt&&(dt.ok||NON_RETRYABLE_STATUS_CODES.includes(dt.status)||st===0))break;await new Promise(ht=>setTimeout(ht,ot))}while((!dt||!dt.ok)&&st>0);return dt}function createFetchComponent(_e){async function et(tt,nt){const ot=Object.assign(Object.assign({},_e==null?void 0:_e.defaultFetcherOptions),nt)||{},{timeout:st,method:ct="GET",retryDelay:dt=0,abortController:ht}=ot,pt=__rest(ot,["timeout","method","retryDelay","abortController"]);let mt=pt.attempts||1;const yt=ht||new AbortController,{signal:gt}=yt;_e!=null&&_e.defaultHeaders&&(pt.headers=Object.assign(Object.assign({},_e==null?void 0:_e.defaultHeaders),pt.headers||{})),IDEMPOTENT_HTTP_METHODS.includes(ct.toUpperCase())||(mt=1);const bt=await fetchWithRetriesAndTimeout(tt,Object.assign(Object.assign({},pt),{attempts:mt,method:ct,timeout:st,retryDelay:dt,signal:gt,abortController:yt}));if(!(bt!=null&&bt.ok)){const $t=await(bt==null?void 0:bt.text());throw new Error(`Failed to fetch ${tt}. Got status ${bt==null?void 0:bt.status}. Response was '${$t}'`)}return!(0,environment_1.isUsingNode)()&&bt&&Object.defineProperty(bt,"buffer",{value:async function(){return Buffer$C.from(await bt.arrayBuffer())},configurable:!0}),gt.aborted?void 0:bt}return{fetch:et}}fetcher$1.createFetchComponent=createFetchComponent;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.createFetchComponent=void 0;var et=fetcher$1;Object.defineProperty(_e,"createFetchComponent",{enumerable:!0,get:function(){return et.createFetchComponent}})})(dist$3);const name="dcl-catalyst-client",version="0.0.0-development",commit="Unknown",description="A client to query and perform changes on Decentraland's catalyst servers",main="dist/index.js",typings="dist/index.d.ts",scripts={prebuild:"rm -rf dist && yarn generate:snapshots","generate:snapshots":"ts-node -T scripts/generate-snapshots.ts",build:"cp package.json ./src/package.json && orval && rm src/client/specs/catalyst.ts && tsc --project tsconfig.json",prewatch:"rm -rf dist",watch:"tsc --watch --project tsconfig-build.json",test:"jest --forceExit --detectOpenHandles --coverage --verbose","lint:fix":"eslint '**/*.{js,ts,tsx}' --quiet --fix","lint:check":"eslint '**/*.{js,ts,tsx}' --quiet"},repository={type:"git",url:"git+https://github.com/decentraland/catalyst-client.git"},keywords=["decentraland"],author="Decentraland",license="Apache-2.0",bugs={url:"https://github.com/decentraland/catalyst-client/issues"},homepage="https://github.com/decentraland/catalyst-client#readme",dependencies={"@dcl/catalyst-contracts":"^4.0.2","@dcl/crypto":"^3.4.0","@dcl/hashing":"^3.0.0","@dcl/schemas":"^9.0.0","@well-known-components/fetch-component":"^2.0.0",cookie:"^0.5.0","cross-fetch":"^3.1.5","form-data":"^4.0.0"},devDependencies={"@dcl/catalyst-api-specs":"^3.2.0","@dcl/eslint-config":"^1.1.9","@types/form-data":"^2.5.0","@well-known-components/env-config-provider":"^1.1.1","@well-known-components/http-server":"^2.0.0","@well-known-components/interfaces":"^1.4.0","@well-known-components/logger":"^3.0.0","@well-known-components/test-helpers":"^1.5.3",busboy:"^1.6.0","eth-connect":"^6.1.0",orval:"^6.17.0","ts-node":"^10.4.0",typescript:"^4.4.4"},prettier={printWidth:120,semi:!1,singleQuote:!0,trailingComma:"none",tabWidth:2},optionalDependencies={},files=["package.json","dist"],require$$1={name,version,commit,description,main,typings,scripts,repository,keywords,author,license,bugs,homepage,dependencies,devDependencies,prettier,optionalDependencies,files};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.QueryBuilder=_e.sanitizeUrl=_e.mergeRequestOptions=_e.isNode=_e.convertFiltersToQueryParams=_e.splitValuesIntoManyQueries=_e.splitValuesIntoManyQueryBuilders=_e.splitAndFetchPaginated=_e.splitAndFetch=_e.MAX_URL_LENGTH=_e.addModelToFormData=_e.getCurrentVersion=void 0;const et=dist$3,tt=require$$1;function nt(){return tt.version}_e.getCurrentVersion=nt;function at(St,Tt,Pt=""){for(const Ot in St){if(!St.hasOwnProperty(Ot)||St[Ot]===null||St[Ot]===void 0)continue;const Nt=Pt?`${Pt}[${Ot}]`:Ot;St[Ot]instanceof Date?Tt.append(Nt,St[Ot].toISOString()):St[Ot]instanceof Array?St[Ot].forEach((Lt,Bt)=>{const Ut=`${Nt}[${Bt}]`;at(Lt,Tt,Ut)}):typeof St[Ot]=="object"?at(St[Ot],Tt,Nt):Tt.append(Nt,St[Ot].toString())}return Tt}_e.addModelToFormData=at;function ot(St){return Array.from(new Set(St))}_e.MAX_URL_LENGTH=2048;async function st({baseUrl:St,path:Tt,queryParams:Pt,fetcher:Ot,uniqueBy:Nt,options:Lt}){Ot=Ot||(0,et.createFetchComponent)();const Bt=pt({baseUrl:St,path:Tt,queryParams:Pt}),Ut=new Map;for(const Ft of Bt)(await(await Ot.fetch(Ft,{...Lt,headers:{"Content-Type":"application/json"}})).json()).forEach(It=>Ut.set(Nt?It[Nt]:Ut.size,It));return Array.from(Ut.values())}_e.splitAndFetch=st;const ct=7;async function dt({baseUrl:St,path:Tt,queryParams:Pt,elementsProperty:Ot,uniqueBy:Nt,options:Lt,fetcher:Bt}){Bt=Bt||(0,et.createFetchComponent)();const Ft=pt({baseUrl:St,path:Tt,queryParams:Pt,reservedParams:new Map([["offset",ct]])}),zt=new Map;let It=!1;for(let vt=0;vt<Ft.length&&!It;vt++){let Et=Ft[vt];for(;Et&&!It;)try{const At=(await Bt.fetch(Et,Lt)).json();At[Ot].forEach(Dt=>zt.set(Dt[Nt],Dt));const Ct=At.pagination.next;Et=Ct?new URL(Ct,Et).toString():void 0}catch{It=!0}}return Array.from(zt.values())}_e.splitAndFetchPaginated=dt;function ht({queryParams:St,baseUrl:Tt,path:Pt,reservedParams:Ot}){const Nt="name"in St?new Map([[St.name,St.values]]):St;if(Nt.size===0)return[new wt(Tt+Pt,Nt,Ot)];const Bt=Array.from(Nt.entries()).map(([Et,At])=>[Et,ot(At)]).sort(([Et,At],[xt,Ct])=>At.length-Ct.length),Ut=new wt(Tt+Pt,new Map,Ot);for(let Et=0;Et<Bt.length-1;Et++){const[At,xt]=Bt[Et];if(!Ut.canSetParams(At,xt))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");Ut.setParams(At,xt)}let Ft=wt.clone(Ut);const[zt,It]=Bt[Bt.length-1],vt=[];for(const Et of It)Ft.canAddParam(zt,Et)||(vt.push(Ft),Ft=wt.clone(Ut)),Ft.addParam(zt,Et);return vt.push(Ft),vt}_e.splitValuesIntoManyQueryBuilders=ht;function pt(St){return ht(St).map(Pt=>Pt.toString())}_e.splitValuesIntoManyQueries=pt;function mt(St){if(!St)return new Map;const Tt=Object.entries(St).filter(([Pt,Ot])=>!!Ot).map(([Pt,Ot])=>{const Nt=Pt.endsWith("s")?Pt.slice(0,-1):Pt;let Lt;if(Array.isArray(Ot))Lt=[...Ot].filter(bt).map(Bt=>`${Bt}`);else if(bt(Ot))Lt=[`${Ot}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[Nt,Lt]}).filter(([Pt,Ot])=>Ot.length>0);return new Map(Tt)}_e.convertFiltersToQueryParams=mt;function yt(){return Object.prototype.toString.call(typeof process$1$1<"u"?process$1$1:0)==="[object process]"}_e.isNode=yt;function gt(St,Tt){const Pt={...St==null?void 0:St.headers,...Tt==null?void 0:Tt.headers};return{...St,...Tt,headers:Pt}}_e.mergeRequestOptions=gt;function bt(St){return typeof St=="string"||typeof St=="number"||typeof St=="boolean"}function $t(St){return St=St.trim(),!St.startsWith("https://")&&!St.startsWith("http://")&&(St="https://"+St),St.endsWith("/")&&(St=St.slice(0,-1)),St}_e.sanitizeUrl=$t;class wt{constructor(Tt,Pt=new Map,Ot=new Map){this.baseUrl=Tt,this.queryParams=Pt,this.reservedParams=Ot,this.length=this.calculateUrlLength(Pt,Ot)}canAddParam(Tt,Pt){return this.length+Tt.length+Pt.length+2<_e.MAX_URL_LENGTH}addParam(Tt,Pt){if(!this.canAddParam(Tt,Pt))throw new Error(`You can't add this parameter '${Tt}', since it would exceed the max url length`);const Ot=this.queryParams.get(Tt),Nt=Ot||[];return Nt.push(Pt),this.queryParams.set(Tt,Nt),this.length+=this.calculateAddedLength(Tt,[Pt]),this}canSetParams(Tt,Pt){const Ot=new Map([...this.queryParams,[Tt,Pt]]);return this.calculateUrlLength(Ot,this.reservedParams)<_e.MAX_URL_LENGTH}setParams(Tt,Pt){if(!this.canSetParams(Tt,Pt))throw new Error(`You can't add this parameter '${Tt}', since it would exceed the max url length`);return this.queryParams.set(Tt,Pt.map(Ot=>`${Ot}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(Tt,Pt){return this.setParams(Tt,[Pt]),this}toString(){let Tt=this.baseUrl,Pt=!1;for(const[Ot,Nt]of this.queryParams)for(const Lt of Nt)Pt?Tt+=`&${Ot}=${Lt}`:(Tt+=`?${Ot}=${Lt}`,Pt=!0);return Tt}calculateUrlLength(Tt,Pt){let Ot=this.baseUrl.length;for(const[Nt,Lt]of Pt)this.queryParams.has(Nt)||(Ot+=Nt.length+2+Lt);for(const[Nt,Lt]of Tt)Ot+=this.calculateAddedLength(Nt,Lt);return Ot}static clone(Tt){return new wt(Tt.baseUrl,new Map(Tt.queryParams),Tt.reservedParams)}calculateAddedLength(Tt,Pt){return this.calculateArrayLength(Pt)+(Tt.length+2)*Pt.length}calculateArrayLength(Tt){return Tt.map(Pt=>`${Pt}`).reduce((Pt,Ot)=>Pt+Ot.length,0)}}_e.QueryBuilder=wt})(Helper);var retry$1={};Object.defineProperty(retry$1,"__esModule",{value:!0});retry$1.retry=void 0;async function retry(_e,et,tt,nt){for(;tt>0;)try{return await et()}catch(at){if(tt--,tt>0)console.info(`Failed to ${_e}. Still have ${tt} attempt/s left. Will try again in ${nt}`),await new Promise(ot=>setTimeout(ot,nt));else throw at}throw new Error("Please specify more than one attempt for the retry function")}retry$1.retry=retry;var __importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(ContentClient,"__esModule",{value:!0});var createContentClient_1=ContentClient.createContentClient=ContentClient.downloadContent=void 0;const hashing_1$1=distExports,form_data_1=__importDefault$4(browser),Helper_1$1=Helper,retry_1=retry$1;function arrayBufferFrom(_e){return _e.buffer?_e.buffer:_e}async function downloadContent(_e,et,tt,nt){const{attempts:at=3,retryDelay:ot=500}=nt||{},st=nt!=null&&nt.timeout?{timeout:nt.timeout}:{};return(0,retry_1.retry)(`fetch file with hash ${tt} from ${et}`,async()=>{const ct=await(await _e.fetch(`${et}/${tt}`,st)).buffer();if(!(nt!=null&&nt.avoidChecks)&&(tt.startsWith("Qm")?await(0,hashing_1$1.hashV0)(ct):await(0,hashing_1$1.hashV1)(ct))!==tt)throw new Error(`Failed to fetch file with hash ${tt} from ${et}`);return ct},at,ot)}ContentClient.downloadContent=downloadContent;function createContentClient(_e){const{fetcher:et}=_e,tt=(0,Helper_1$1.sanitizeUrl)(_e.url);async function nt(pt,mt){const yt=(0,Helper_1$1.isNode)(),gt=new form_data_1.default;gt.append("entityId",pt.entityId),(0,Helper_1$1.addModelToFormData)(pt.authChain,gt,"authChain");const bt=await ht(Array.from(pt.files.keys()),mt);for(const[$t,wt]of pt.files)(!bt.has($t)||$t===pt.entityId)&&(yt?gt.append($t,Buffer$C.isBuffer(wt)?wt:Buffer$C.from(arrayBufferFrom(wt)),$t):gt.append($t,new Blob([arrayBufferFrom(wt)]),$t));return gt}async function at(pt,mt){const yt=await nt(pt,mt),gt=(0,Helper_1$1.mergeRequestOptions)(mt||{},{body:yt,method:"POST"});return await et.fetch(`${tt}/entities`,gt)}async function ot(pt,mt){if(pt.length===0)return Promise.reject("You must set at least one pointer.");const yt=(0,Helper_1$1.mergeRequestOptions)(mt||{},{body:JSON.stringify({pointers:pt}),method:"POST",headers:{"Content-Type":"application/json"}});return(await et.fetch(`${tt}/entities/active`,yt)).json()}async function st(pt,mt){if(pt.length===0)return Promise.reject("You must set at least one id.");const yt=(0,Helper_1$1.mergeRequestOptions)(mt||{},{body:JSON.stringify({ids:pt}),method:"POST",headers:{"Content-Type":"application/json"}});return(await et.fetch(`${tt}/entities/active`,yt)).json()}async function ct(pt,mt){const yt=await st([pt],mt);return yt.length===0?Promise.reject(`Failed to find an entity with id '${pt}'.`):yt[0]}function dt(pt,mt){return pt.length===0?Promise.reject("You must set at least one cid."):(0,Helper_1$1.splitAndFetch)({fetcher:et,options:mt,baseUrl:tt,path:"/available-content",queryParams:{name:"cid",values:pt},uniqueBy:"cid"})}async function ht(pt,mt){const gt=(await dt(pt,mt)).filter(bt=>bt.available).map(({cid:bt})=>bt);return new Set(gt)}return{buildEntityFormDataForDeployment:nt,fetchEntitiesByPointers:ot,fetchEntitiesByIds:st,fetchEntityById:ct,downloadContent:(pt,mt)=>downloadContent(et,tt+"/contents",pt,mt),deploy:at,isContentAvailable:dt}}createContentClient_1=ContentClient.createContentClient=createContentClient;var DeploymentBuilder={},dist$2={},sdk={},ws={},sceneUpdate={},validation={},__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(validation,"__esModule",{value:!0});validation.validateType=validation.generateLazyValidator=validation.Ajv=void 0;const ajv_1=__importDefault$3(ajvExports);validation.Ajv=ajv_1.default;const ajv_keywords_1=__importDefault$3(distExports$4),ajv_errors_1=__importDefault$3(distExports$3);function generateLazyValidator(_e,et){let tt=null;const nt=(at,ot)=>{if(!tt){const st=new ajv_1.default({$data:!0,allErrors:!0});(0,ajv_keywords_1.default)(st),(0,ajv_errors_1.default)(st,{singleError:!0}),et==null||et.forEach(ct=>st.addKeyword(ct)),tt=st.compile(_e),Object.defineProperty(nt,"errors",{get(){return tt==null?void 0:tt.errors}})}return tt(at,ot)};return nt}validation.generateLazyValidator=generateLazyValidator;function validateType(_e,et){return _e.validate(et)}validation.validateType=validateType;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneUpdate=_e.SCENE_UPDATE=void 0;const et=validation;_e.SCENE_UPDATE="SCENE_UPDATE",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SceneUpdate||(_e.SceneUpdate={}))})(sceneUpdate);var update={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Update=_e.UPDATE=void 0;const et=validation;_e.UPDATE="update",function(tt){tt.schema={type:"object",properties:{type:{type:"string",enum:[_e.UPDATE]}},required:["type"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Update||(_e.Update={}))})(update);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(sceneUpdate,_e),tt(update,_e)})(ws);var project={},type={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProjectType=void 0;const et=validation;(function(tt){tt.SCENE="scene",tt.SMART_ITEM="smart-item",tt.PORTABLE_EXPERIENCE="portable-experience",tt.LIBRARY="library"})(_e.ProjectType||(_e.ProjectType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProjectType||(_e.ProjectType={}))})(type);var wearableJson={},rarity={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Rarity=void 0;const et=validation;(function(tt){tt.UNIQUE="unique",tt.MYTHIC="mythic",tt.LEGENDARY="legendary",tt.EPIC="epic",tt.RARE="rare",tt.UNCOMMON="uncommon",tt.COMMON="common"})(_e.Rarity||(_e.Rarity={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema);const nt={[tt.UNIQUE]:1,[tt.MYTHIC]:10,[tt.LEGENDARY]:100,[tt.EPIC]:1e3,[tt.RARE]:5e3,[tt.UNCOMMON]:1e4,[tt.COMMON]:1e5},at={[tt.UNIQUE]:"#FFE617",[tt.MYTHIC]:"#FB7DE3",[tt.LEGENDARY]:"#A657ED",[tt.EPIC]:"#6397F2",[tt.RARE]:"#3AD682",[tt.UNCOMMON]:"#FF8563",[tt.COMMON]:"#D4E0E0"},ot={[tt.UNIQUE]:"#FFB626",[tt.MYTHIC]:"#FF63E1",[tt.LEGENDARY]:"#842DDA",[tt.EPIC]:"#3D85E6",[tt.RARE]:"#36CF75",[tt.UNCOMMON]:"#ED6D4F",[tt.COMMON]:"#ABC1C1"};function st(ht){return nt[ht]}tt.getMaxSupply=st;function ct(ht){return ot[ht]}tt.getColor=ct;function dt(ht){return[at[ht],ot[ht]]}tt.getGradient=dt}(_e.Rarity||(_e.Rarity={}))})(rarity);var wearableCategory={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableCategory=void 0;const et=validation;(function(tt){tt.EYEBROWS="eyebrows",tt.EYES="eyes",tt.FACIAL_HAIR="facial_hair",tt.HAIR="hair",tt.BODY_SHAPE="body_shape",tt.MOUTH="mouth",tt.UPPER_BODY="upper_body",tt.LOWER_BODY="lower_body",tt.FEET="feet",tt.EARRING="earring",tt.EYEWEAR="eyewear",tt.HAT="hat",tt.HELMET="helmet",tt.MASK="mask",tt.TIARA="tiara",tt.TOP_HEAD="top_head",tt.SKIN="skin",tt.HANDS_WEAR="hands_wear"})(_e.WearableCategory||(_e.WearableCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableCategory||(_e.WearableCategory={}))})(wearableCategory);var representation={},bodyShape={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyShape=void 0;const et=validation;(function(tt){tt.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",tt.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(_e.BodyShape||(_e.BodyShape={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyShape||(_e.BodyShape={}))})(bodyShape);var hideableCategory={},bodyPartCategory={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.BodyPartCategory=void 0;const et=validation;(function(tt){tt.HEAD="head",tt.HANDS="hands"})(_e.BodyPartCategory||(_e.BodyPartCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.BodyPartCategory||(_e.BodyPartCategory={}))})(bodyPartCategory);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=void 0;const et=wearableCategory,tt=validation,nt=bodyPartCategory;(function(at){at.schema={oneOf:[Object.assign({},et.WearableCategory.schema),Object.assign({},nt.BodyPartCategory.schema)]},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.HideableWearableCategory||(_e.HideableWearableCategory={}))})(hideableCategory);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableRepresentation=void 0;const et=validation,tt=bodyShape,nt=hideableCategory;(function(at){at.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:nt.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:nt.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},at.validate=(0,et.generateLazyValidator)(at.schema)})(_e.WearableRepresentation||(_e.WearableRepresentation={}))})(representation);var platform$1={},profile$1={},avatar={},misc={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.IPFSv1=_e.IPFSv2=_e.EthAddress=_e.Color3=void 0;const et=validation;(function(tt){tt.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const nt=(0,et.generateLazyValidator)(tt.schema);tt.validate=at=>nt(at)})(_e.Color3||(_e.Color3={})),function(tt){tt.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.EthAddress||(_e.EthAddress={})),function(tt){tt.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv2||(_e.IPFSv2={})),function(tt){tt.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const nt=new RegExp(tt.schema.pattern);tt.validate=at=>nt.test(at)}(_e.IPFSv1||(_e.IPFSv1={}))})(misc);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Avatar=_e.Link=_e.LinkUrl=_e.AvatarInfo=_e.Snapshots=void 0;const et=wearableCategory,tt=misc,nt=validation;var at;(function(dt){dt.schema={type:"object",required:["face256","body"],properties:{face256:tt.IPFSv2.schema,body:tt.IPFSv2.schema}},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(at=_e.Snapshots||(_e.Snapshots={}));var ot;(function(dt){dt.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:at.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)})(ot=_e.AvatarInfo||(_e.AvatarInfo={}));var st;(function(dt){dt.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const ht=new RegExp(dt.schema.pattern,"i");dt.validate=pt=>ht.test(pt)})(st=_e.LinkUrl||(_e.LinkUrl={}));var ct;(function(dt){dt.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:st.schema}}})(ct=_e.Link||(_e.Link={})),function(dt){dt.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:ct.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:tt.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:ot.schema},additionalProperties:!0},dt.validate=(0,nt.generateLazyValidator)(dt.schema)}(_e.Avatar||(_e.Avatar={}))})(avatar);var profile={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Profile=void 0;const et=validation,tt=avatar;(function(nt){nt.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:tt.Avatar.schema}},additionalProperties:!0},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.Profile||(_e.Profile={}))})(profile);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(avatar,_e),tt(profile,_e)})(profile$1);var scene$1={},featureToggles={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.FeatureToggles=_e.portableExperiencesToggles=_e.toggles=void 0;const et=validation;_e.toggles=["enabled","disabled"],_e.portableExperiencesToggles=[..._e.toggles,"hideUi"],function(tt){tt.schema={type:"object",properties:{voiceChat:{type:"string",enum:_e.toggles,nullable:!0},portableExperiences:{type:"string",enum:_e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${_e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${_e.toggles.join(", ")}`,required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.FeatureToggles||(_e.FeatureToggles={}))})(featureToggles);var worldConfiguration={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WorldConfiguration=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.WorldConfiguration||(_e.WorldConfiguration={}))})(worldConfiguration);var sceneParcels={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SceneParcels=void 0;const et=validation;(function(tt){tt.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},tt.schemaValidator=(0,et.generateLazyValidator)(tt.schema),tt.validate=nt=>tt.schemaValidator(nt)&&nt.parcels.includes(nt.base)})(_e.SceneParcels||(_e.SceneParcels={}))})(sceneParcels);var scene={},displayable={};Object.defineProperty(displayable,"__esModule",{value:!0});displayable.displayableProperties=void 0;displayable.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var source={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Source=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Source||(_e.Source={}))})(source);var spawnPoint={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.SpawnPoint||(_e.SpawnPoint={}))})(spawnPoint);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Scene=_e.RequiredPermission=void 0;const et=validation,tt=displayable,nt=featureToggles,at=sceneParcels,ot=source,st=spawnPoint,ct=worldConfiguration;var dt;(function(ht){ht.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",ht.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",ht.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",ht.USE_WEB3_API="USE_WEB3_API",ht.USE_FETCH="USE_FETCH",ht.USE_WEBSOCKET="USE_WEBSOCKET",ht.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(dt=_e.RequiredPermission||(_e.RequiredPermission={})),function(ht){ht.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:at.SceneParcels.schema},tt.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},ot.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:st.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(dt)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},nt.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},ct.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:dt.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(_e.Scene||(_e.Scene={}))})(scene);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SpawnPoint=_e.Source=_e.RequiredPermission=_e.Scene=_e.SceneParcels=_e.WorldConfiguration=_e.FeatureToggles=void 0;var et=featureToggles;Object.defineProperty(_e,"FeatureToggles",{enumerable:!0,get:function(){return et.FeatureToggles}});var tt=worldConfiguration;Object.defineProperty(_e,"WorldConfiguration",{enumerable:!0,get:function(){return tt.WorldConfiguration}});var nt=sceneParcels;Object.defineProperty(_e,"SceneParcels",{enumerable:!0,get:function(){return nt.SceneParcels}});var at=scene;Object.defineProperty(_e,"Scene",{enumerable:!0,get:function(){return at.Scene}}),Object.defineProperty(_e,"RequiredPermission",{enumerable:!0,get:function(){return at.RequiredPermission}});var ot=source;Object.defineProperty(_e,"Source",{enumerable:!0,get:function(){return ot.Source}});var st=spawnPoint;Object.defineProperty(_e,"SpawnPoint",{enumerable:!0,get:function(){return st.SpawnPoint}})})(scene$1);var item$1={},i18n={},locale$1={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Locale=void 0;const et=validation;(function(tt){tt.EN="en",tt.ES="es"})(_e.Locale||(_e.Locale={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Locale||(_e.Locale={}))})(locale$1);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.I18N=void 0;const et=validation,tt=locale$1;(function(nt){nt.schema={type:"object",properties:{code:tt.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.I18N||(_e.I18N={}))})(i18n);var metrics={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Metrics=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Metrics||(_e.Metrics={}))})(metrics);var standardProps={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isStandard=_e.standardProperties=void 0;const et=rarity,tt=validation;_e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:et.Rarity.schema};const nt={type:"object",properties:Object.assign({},_e.standardProperties),required:["collectionAddress","rarity"]},at=(0,tt.generateLazyValidator)(nt);function ot(st){return at(st)}_e.isStandard=ot})(standardProps);var thirdPartyProps={},merkleProof={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MerkleProof=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MerkleProof||(_e.MerkleProof={}))})(merkleProof);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.thirdPartyProps=void 0;const et=validation,tt=merkleProof;_e.thirdPartyProps={merkleProof:tt.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const nt={type:"object",properties:Object.assign({},_e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},at={keyword:"_containsHashingKeys",validate:(ct,dt)=>{var ht;const pt=dt;return!((ht=pt==null?void 0:pt.merkleProof)===null||ht===void 0)&&ht.hashingKeys?pt.merkleProof.hashingKeys.every(mt=>pt.hasOwnProperty(mt)):!1},errors:!1},ot=(0,et.generateLazyValidator)(nt,[at]);function st(ct){return ot(ct)}_e.isThirdParty=st})(thirdPartyProps);var wearable$1={},wearable={},baseItem={};Object.defineProperty(baseItem,"__esModule",{value:!0});baseItem.isBaseAvatar=baseItem.requiredBaseItemProps=baseItem.baseItemProperties=void 0;const i18n_1=i18n,metrics_1=metrics,displayable_1=displayable;baseItem.baseItemProperties=Object.assign(Object.assign({},displayable_1.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:i18n_1.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},metrics_1.Metrics.schema),{nullable:!0})});baseItem.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function isBaseAvatar(_e){if(!_e||!_e.id)return!1;const et=_e.id.split(":"),tt=et[1]==="decentraland",nt=et[3]==="base-avatars";return et.length===5&&tt&&nt}baseItem.isBaseAvatar=isBaseAvatar;(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Wearable=void 0;const et=validation,tt=wearableCategory,nt=representation,at=baseItem,ot=standardProps,st=thirdPartyProps,ct=hideableCategory;(function(dt){dt.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},at.baseItemProperties),ot.standardProperties),st.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:ct.HideableWearableCategory.schema},hides:{type:"array",items:ct.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ct.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...at.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...at.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const ht={keyword:"_isThirdParty",validate:(mt,yt)=>!mt||(0,st.isThirdParty)(yt),errors:!1},pt={keyword:"_isBaseAvatar",validate:(mt,yt)=>!mt||(0,at.isBaseAvatar)(yt),errors:!1};dt.validate=(0,et.generateLazyValidator)(dt.schema,[ht,pt])})(_e.Wearable||(_e.Wearable={}))})(wearable);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.HideableWearableCategory=_e.BodyPartCategory=_e.WearableCategory=_e.Wearable=_e.WearableRepresentation=void 0;var et=representation;Object.defineProperty(_e,"WearableRepresentation",{enumerable:!0,get:function(){return et.WearableRepresentation}});var tt=wearable;Object.defineProperty(_e,"Wearable",{enumerable:!0,get:function(){return tt.Wearable}});var nt=wearableCategory;Object.defineProperty(_e,"WearableCategory",{enumerable:!0,get:function(){return nt.WearableCategory}});var at=bodyPartCategory;Object.defineProperty(_e,"BodyPartCategory",{enumerable:!0,get:function(){return at.BodyPartCategory}});var ot=hideableCategory;Object.defineProperty(_e,"HideableWearableCategory",{enumerable:!0,get:function(){return ot.HideableWearableCategory}})})(wearable$1);var emote$1={},emote={},emoteDataAdr74={},emoteCategory={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteCategory=void 0;const et=validation;(function(tt){tt.DANCE="dance",tt.STUNT="stunt",tt.GREETINGS="greetings",tt.FUN="fun",tt.POSES="poses",tt.REACTIONS="reactions",tt.HORROR="horror",tt.MISCELLANEOUS="miscellaneous"})(_e.EmoteCategory||(_e.EmoteCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmoteCategory||(_e.EmoteCategory={}))})(emoteCategory);var representationAdr74={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteRepresentationADR74=void 0;const et=validation,tt=bodyShape;(function(nt){nt.schema={type:"object",properties:{bodyShapes:{type:"array",items:tt.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},nt.validate=(0,et.generateLazyValidator)(nt.schema)})(_e.EmoteRepresentationADR74||(_e.EmoteRepresentationADR74={}))})(representationAdr74);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmoteDataADR74=void 0;const et=emoteCategory,tt=validation,nt=representationAdr74;(function(at){at.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.EmoteRepresentationADR74.schema,minItems:1},category:et.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},at.validate=(0,tt.generateLazyValidator)(at.schema)})(_e.EmoteDataADR74||(_e.EmoteDataADR74={}))})(emoteDataAdr74);var hasRequiredEmote$1;function requireEmote$1(){return hasRequiredEmote$1||(hasRequiredEmote$1=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Emote=void 0;const et=requireItem(),tt=validation,nt=baseItem,at=standardProps,ot=thirdPartyProps,st=emoteDataAdr74;(function(ct){ct.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},nt.baseItemProperties),at.standardProperties),ot.thirdPartyProps),{emoteDataADR74:st.EmoteDataADR74.schema}),additionalProperties:!0,required:[...nt.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const dt={keyword:"_isThirdParty",validate:(ht,pt)=>!ht||(0,et.isThirdParty)(pt),errors:!1};ct.validate=(0,tt.generateLazyValidator)(ct.schema,[dt])})(_e.Emote||(_e.Emote={}))}(emote)),emote}var emotePlayMode={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=void 0;const et=validation;(function(tt){tt.SIMPLE="simple",tt.LOOP="loop"})(_e.EmotePlayMode||(_e.EmotePlayMode={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.EmotePlayMode||(_e.EmotePlayMode={}))})(emotePlayMode);var hasRequiredEmote;function requireEmote(){return hasRequiredEmote||(hasRequiredEmote=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.EmotePlayMode=_e.EmoteCategory=_e.EmoteDataADR74=_e.EmoteRepresentationADR74=_e.Emote=void 0;var et=requireEmote$1();Object.defineProperty(_e,"Emote",{enumerable:!0,get:function(){return et.Emote}});var tt=representationAdr74;Object.defineProperty(_e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return tt.EmoteRepresentationADR74}});var nt=emoteDataAdr74;Object.defineProperty(_e,"EmoteDataADR74",{enumerable:!0,get:function(){return nt.EmoteDataADR74}});var at=emoteCategory;Object.defineProperty(_e,"EmoteCategory",{enumerable:!0,get:function(){return at.EmoteCategory}});var ot=emotePlayMode;Object.defineProperty(_e,"EmotePlayMode",{enumerable:!0,get:function(){return ot.EmotePlayMode}})}(emote$1)),emote$1}var hasRequiredItem;function requireItem(){return hasRequiredItem||(hasRequiredItem=1,function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,pt,mt,yt){yt===void 0&&(yt=mt);var gt=Object.getOwnPropertyDescriptor(pt,mt);(!gt||("get"in gt?!pt.__esModule:gt.writable||gt.configurable))&&(gt={enumerable:!0,get:function(){return pt[mt]}}),Object.defineProperty(ht,yt,gt)}:function(ht,pt,mt,yt){yt===void 0&&(yt=mt),ht[yt]=pt[mt]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,pt){for(var mt in ht)mt!=="default"&&!Object.prototype.hasOwnProperty.call(pt,mt)&&et(pt,ht,mt)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.isThirdParty=_e.isStandard=_e.BodyShape=_e.Metrics=_e.Locale=_e.I18N=void 0;var nt=i18n;Object.defineProperty(_e,"I18N",{enumerable:!0,get:function(){return nt.I18N}});var at=locale$1;Object.defineProperty(_e,"Locale",{enumerable:!0,get:function(){return at.Locale}});var ot=metrics;Object.defineProperty(_e,"Metrics",{enumerable:!0,get:function(){return ot.Metrics}});var st=bodyShape;Object.defineProperty(_e,"BodyShape",{enumerable:!0,get:function(){return st.BodyShape}});var ct=standardProps;Object.defineProperty(_e,"isStandard",{enumerable:!0,get:function(){return ct.isStandard}});var dt=thirdPartyProps;Object.defineProperty(_e,"isThirdParty",{enumerable:!0,get:function(){return dt.isThirdParty}}),tt(wearable$1,_e),tt(requireEmote(),_e)}(item$1)),item$1}var merkleTree={};(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(merkleProof,_e)})(merkleTree);var syncDeployments={},authChain={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AuthChain=_e.AuthLink=_e.AuthLinkType=void 0;const et=validation;var tt;(function(at){at.SIGNER="SIGNER",at.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",at.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",at.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",at.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(tt=_e.AuthLinkType||(_e.AuthLinkType={}));var nt;(function(at){at.schema={type:"object",properties:{type:{type:"string",enum:Object.values(tt)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:tt.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},at.validate=(0,et.generateLazyValidator)(at.schema)})(nt=_e.AuthLink||(_e.AuthLink={})),function(at){at.schema={type:"array",items:nt.schema,minItems:1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.AuthChain||(_e.AuthChain={}))})(authChain);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PointerChangesSyncDeployment=_e.SnapshotSyncDeployment=void 0;const et=misc,tt=authChain,nt=validation;(function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)})(_e.SnapshotSyncDeployment||(_e.SnapshotSyncDeployment={})),function(at){at.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:tt.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:et.IPFSv1.schema}},{properties:{entityId:et.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.PointerChangesSyncDeployment||(_e.PointerChangesSyncDeployment={}))})(syncDeployments);var entity={},contentMapping={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ContentMapping=void 0;const et=misc,tt=validation;(function(nt){nt.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]}},required:["file","hash"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.ContentMapping||(_e.ContentMapping={}))})(contentMapping);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Entity=_e.EntityType=void 0;const et=misc,tt=contentMapping,nt=validation;(function(at){at.SCENE="scene",at.PROFILE="profile",at.WEARABLE="wearable",at.STORE="store",at.EMOTE="emote",at.OUTFITS="outfits"})(_e.EntityType||(_e.EntityType={})),function(at){at.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[et.IPFSv1.schema,et.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:tt.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},at.validate=(0,nt.generateLazyValidator)(at.schema)}(_e.Entity||(_e.Entity={}))})(entity);var deploymentWithAuthChain={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.DeploymentWithAuthChain=void 0;const et=authChain,tt=validation;(function(nt){nt.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:et.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},nt.validate=(0,tt.generateLazyValidator)(nt.schema)})(_e.DeploymentWithAuthChain||(_e.DeploymentWithAuthChain={}))})(deploymentWithAuthChain);var outfits$1={},outfits={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Outfits=_e.Outfit=void 0;const et=wearableCategory,tt=misc,nt=validation;var at;(function(ot){ot.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:tt.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:et.WearableCategory.schema}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)})(at=_e.Outfit||(_e.Outfit={})),function(ot){ot.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:at.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},ot.validate=(0,nt.generateLazyValidator)(ot.schema)}(_e.Outfits||(_e.Outfits={}))})(outfits);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(outfits,_e)})(outfits$1);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(profile$1,_e),tt(scene$1,_e),tt(requireItem(),_e),tt(displayable,_e),tt(merkleTree,_e),tt(syncDeployments,_e),tt(entity,_e),tt(deploymentWithAuthChain,_e),tt(outfits$1,_e)})(platform$1);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.WearableJson=void 0;const et=rarity,tt=wearableCategory,nt=representation,at=validation,ot=platform$1;(function(st){st.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},et.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:tt.WearableCategory.schema},hides:{type:"array",items:tt.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:nt.WearableRepresentation.schema,minItems:1},category:tt.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:ot.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},st.validate=(0,at.generateLazyValidator)(st.schema)})(_e.WearableJson||(_e.WearableJson={}))})(wearableJson);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(type,_e),tt(wearableJson,_e)})(project);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(ws,_e),tt(project,_e)})(sdk);var bid={},chainId={},chainName={},hasRequiredChainName;function requireChainName(){return hasRequiredChainName||(hasRequiredChainName=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getChainId=_e.ChainName=void 0;const et=validation,tt=requireChainId();var nt;(function(ot){ot.ETHEREUM_MAINNET="Ethereum Mainnet",ot.ETHEREUM_ROPSTEN="Ropsten",ot.ETHEREUM_RINKEBY="Rinkeby",ot.ETHEREUM_GOERLI="Goerli",ot.ETHEREUM_KOVAN="Kovan",ot.ETHEREUM_SEPOLIA="Sepolia",ot.MATIC_MAINNET="Polygon",ot.MATIC_MUMBAI="Mumbai",ot.AVALANCHE_MAINNET="Avalanche Mainnet",ot.BINANCE_MAINNET="Binance Smart Chain Mainnet",ot.ARBITRUM_MAINNET="Arbitrum One",ot.OPTIMISM_MAINNET="Optimism Mainnet",ot.FANTOM_MAINNET="Fantom Mainnet"})(nt=_e.ChainName||(_e.ChainName={}));function at(ot){switch(ot){case nt.ETHEREUM_MAINNET:return tt.ChainId.ETHEREUM_MAINNET;case nt.ETHEREUM_ROPSTEN:return tt.ChainId.ETHEREUM_ROPSTEN;case nt.ETHEREUM_RINKEBY:return tt.ChainId.ETHEREUM_RINKEBY;case nt.ETHEREUM_GOERLI:return tt.ChainId.ETHEREUM_GOERLI;case nt.ETHEREUM_KOVAN:return tt.ChainId.ETHEREUM_KOVAN;case nt.ETHEREUM_SEPOLIA:return tt.ChainId.ETHEREUM_SEPOLIA;case nt.MATIC_MAINNET:return tt.ChainId.MATIC_MAINNET;case nt.MATIC_MUMBAI:return tt.ChainId.MATIC_MUMBAI;default:return null}}_e.getChainId=at,function(ot){ot.schema={type:"string",enum:Object.values(ot)},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(nt=_e.ChainName||(_e.ChainName={}))}(chainName)),chainName}var network={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Network=void 0;const et=validation;(function(tt){tt.ETHEREUM="ETHEREUM",tt.MATIC="MATIC"})(_e.Network||(_e.Network={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Network||(_e.Network={}))})(network);var hasRequiredChainId;function requireChainId(){return hasRequiredChainId||(hasRequiredChainId=1,function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.getNetwork=_e.getNetworkMapping=_e.getURNProtocol=_e.getChainName=_e.ChainId=void 0;const et=validation,tt=requireChainName(),nt=network;var at;(function(ht){ht[ht.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",ht[ht.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",ht[ht.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",ht[ht.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",ht[ht.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",ht[ht.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",ht[ht.MATIC_MAINNET=137]="MATIC_MAINNET",ht[ht.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(at=_e.ChainId||(_e.ChainId={}));function ot(ht){switch(ht){case at.ETHEREUM_MAINNET:return tt.ChainName.ETHEREUM_MAINNET;case at.ETHEREUM_ROPSTEN:return tt.ChainName.ETHEREUM_ROPSTEN;case at.ETHEREUM_RINKEBY:return tt.ChainName.ETHEREUM_RINKEBY;case at.ETHEREUM_GOERLI:return tt.ChainName.ETHEREUM_GOERLI;case at.ETHEREUM_KOVAN:return tt.ChainName.ETHEREUM_KOVAN;case at.ETHEREUM_SEPOLIA:return tt.ChainName.ETHEREUM_SEPOLIA;case at.MATIC_MAINNET:return tt.ChainName.MATIC_MAINNET;case at.MATIC_MUMBAI:return tt.ChainName.MATIC_MUMBAI;default:return null}}_e.getChainName=ot;function st(ht){switch(ht){case at.ETHEREUM_MAINNET:return"ethereum";case at.ETHEREUM_ROPSTEN:return"ropsten";case at.ETHEREUM_RINKEBY:return"rinkeby";case at.ETHEREUM_GOERLI:return"goerli";case at.ETHEREUM_KOVAN:return"kovan";case at.ETHEREUM_SEPOLIA:return"sepolia";case at.MATIC_MAINNET:return"matic";case at.MATIC_MUMBAI:return"mumbai";default:return""}}_e.getURNProtocol=st;function ct(ht){switch(ht){case at.ETHEREUM_MAINNET:return{[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET};case at.ETHEREUM_ROPSTEN:return{[nt.Network.ETHEREUM]:at.ETHEREUM_ROPSTEN,[nt.Network.MATIC]:at.MATIC_MUMBAI};case at.ETHEREUM_RINKEBY:return{[nt.Network.ETHEREUM]:at.ETHEREUM_RINKEBY,[nt.Network.MATIC]:at.MATIC_MUMBAI};case at.ETHEREUM_GOERLI:return{[nt.Network.ETHEREUM]:at.ETHEREUM_GOERLI,[nt.Network.MATIC]:at.MATIC_MUMBAI};case at.ETHEREUM_KOVAN:return{[nt.Network.ETHEREUM]:at.ETHEREUM_KOVAN,[nt.Network.MATIC]:at.MATIC_MUMBAI};case at.ETHEREUM_SEPOLIA:return{[nt.Network.ETHEREUM]:at.ETHEREUM_SEPOLIA,[nt.Network.MATIC]:at.MATIC_MUMBAI};case at.MATIC_MAINNET:return{[nt.Network.ETHEREUM]:at.MATIC_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET};case at.MATIC_MUMBAI:return{[nt.Network.ETHEREUM]:at.MATIC_MUMBAI,[nt.Network.MATIC]:at.MATIC_MUMBAI};default:return{[nt.Network.ETHEREUM]:at.ETHEREUM_MAINNET,[nt.Network.MATIC]:at.MATIC_MAINNET}}}_e.getNetworkMapping=ct;function dt(ht){switch(ht){case at.ETHEREUM_MAINNET:case at.ETHEREUM_ROPSTEN:case at.ETHEREUM_GOERLI:case at.ETHEREUM_KOVAN:case at.ETHEREUM_RINKEBY:case at.ETHEREUM_SEPOLIA:return nt.Network.ETHEREUM;case at.MATIC_MAINNET:case at.MATIC_MUMBAI:return nt.Network.MATIC}}_e.getNetwork=dt,function(ht){ht.schema={type:"number",enum:Object.values(ht)},ht.validate=(0,et.generateLazyValidator)(ht.schema)}(at=_e.ChainId||(_e.ChainId={}))}(chainId)),chainId}var listingStatus={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ListingStatus=void 0;const et=validation;(function(tt){tt.OPEN="open",tt.SOLD="sold",tt.CANCELLED="cancelled"})(_e.ListingStatus||(_e.ListingStatus={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ListingStatus||(_e.ListingStatus={}))})(listingStatus);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Bid=_e.BidSortBy=void 0;const et=validation,tt=requireChainId(),nt=listingStatus,at=network;(function(ot){ot.RECENTLY_OFFERED="recently_offered",ot.RECENTLY_UPDATED="recently_updated",ot.MOST_EXPENSIVE="most_expensive"})(_e.BidSortBy||(_e.BidSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:nt.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Bid||(_e.Bid={}))})(bid);var account={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Account=_e.AccountSortBy=void 0;const et=validation;(function(tt){tt.MOST_SALES="most_sales",tt.MOST_PURCHASES="most_purchases",tt.MOST_SPENT="most_spent",tt.MOST_EARNED="most_earned",tt.MOST_ROYALTIES="most_royalties",tt.MOST_COLLECTIONS="most_collections"})(_e.AccountSortBy||(_e.AccountSortBy={})),function(tt){tt.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.Account||(_e.Account={}))})(account);var collection={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Collection=_e.CollectionSortBy=void 0;const et=validation,tt=requireChainId(),nt=network;(function(at){at.NEWEST="newest",at.NAME="name",at.RECENTLY_REVIEWED="recently_reviewed",at.RECENTLY_LISTED="recently_listed",at.SIZE="size"})(_e.CollectionSortBy||(_e.CollectionSortBy={})),function(at){at.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Collection||(_e.Collection={}))})(collection);var contract={},nftCategory={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFTCategory=void 0;const et=validation;(function(tt){tt.PARCEL="parcel",tt.ESTATE="estate",tt.WEARABLE="wearable",tt.ENS="ens",tt.EMOTE="emote"})(_e.NFTCategory||(_e.NFTCategory={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.NFTCategory||(_e.NFTCategory={}))})(nftCategory);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Contract=_e.ContractSortBy=void 0;const et=validation,tt=requireChainId(),nt=network,at=nftCategory;(function(ot){ot.NAME="name"})(_e.ContractSortBy||(_e.ContractSortBy={})),function(ot){ot.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:at.NFTCategory.schema,network:nt.Network.schema,chainId:tt.ChainId.schema},required:["name","address","category","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Contract||(_e.Contract={}))})(contract);var item={},nft={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFT=_e.NFTSortBy=void 0;const et=validation,tt=requireChainId(),nt=platform$1,at=network,ot=nftCategory,st=rarity,ct=wearableCategory;(function(dt){dt.NAME="name",dt.NEWEST="newest",dt.RECENTLY_LISTED="recently_listed",dt.RECENTLY_SOLD="recently_sold",dt.CHEAPEST="cheapest",dt.RENTAL_LISTING_DATE="rental_listing_date",dt.RENTAL_DATE="rented_date",dt.MAX_RENTAL_PRICE="max_rental_price",dt.MIN_RENTAL_PRICE="min_rental_price"})(_e.NFTSortBy||(_e.NFTSortBy={})),function(dt){dt.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:ct.WearableCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:nt.BodyShape.schema},category:nt.EmoteCategory.schema,description:{type:"string"},rarity:st.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:ot.NFTCategory.schema,network:at.Network.schema,chainId:tt.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},dt.validate=(0,et.generateLazyValidator)(dt.schema)}(_e.NFT||(_e.NFT={}))})(nft);(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Item=_e.ItemSortBy=void 0;const et=validation,tt=requireChainId(),nt=network,at=nft,ot=nftCategory;(function(st){st.NAME="name",st.NEWEST="newest",st.RECENTLY_REVIEWED="recently_reviewed",st.RECENTLY_SOLD="recently_sold",st.RECENTLY_LISTED="recently_listed",st.CHEAPEST="cheapest"})(_e.ItemSortBy||(_e.ItemSortBy={})),function(st){st.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:ot.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:at.NFT.schema.properties.data,network:nt.Network.schema,chainId:tt.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},st.validate=(0,et.generateLazyValidator)(st.schema)}(_e.Item||(_e.Item={}))})(item);var metaTransactions={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.MetaTransaction=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.MetaTransaction||(_e.MetaTransaction={}))})(metaTransactions);var mint={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Mint=_e.MintSortBy=void 0;const et=validation,tt=requireChainId(),nt=network;(function(at){at.RECENTLY_MINTED="recently_minted",at.MOST_EXPENSIVE="most_expensive"})(_e.MintSortBy||(_e.MintSortBy={})),function(at){at.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:nt.Network.schema,chainId:tt.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.Mint||(_e.Mint={}))})(mint);var catalog={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.CatalogSortDirection=_e.CatalogSortBy=void 0,function(et){et.NEWEST="newest",et.RECENTLY_SOLD="recently_sold",et.CHEAPEST="cheapest",et.MOST_EXPENSIVE="most_expensive",et.RECENTLY_LISTED="recently_listed"}(_e.CatalogSortBy||(_e.CatalogSortBy={})),function(et){et.ASC="asc",et.DESC="desc"}(_e.CatalogSortDirection||(_e.CatalogSortDirection={}))})(catalog);var order={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Order=_e.OrderSortBy=void 0;const et=validation,tt=requireChainId(),nt=listingStatus,at=network;(function(ot){ot.RECENTLY_LISTED="recently_listed",ot.RECENTLY_UPDATED="recently_updated",ot.CHEAPEST="cheapest",ot.ISSUED_ID_ASC="issued_id_asc",ot.ISSUED_ID_DESC="issued_id_desc",ot.OLDEST="oldest"})(_e.OrderSortBy||(_e.OrderSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:nt.ListingStatus.schema,network:at.Network.schema,chainId:tt.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Order||(_e.Order={}))})(order);var providerType={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.ProviderType=void 0;const et=validation;(function(tt){tt.INJECTED="injected",tt.MAGIC="magic",tt.FORTMATIC="formatic",tt.NETWORK="network",tt.WALLET_CONNECT="wallet_connect",tt.WALLET_CONNECT_V2="wallet_connect_v2",tt.WALLET_LINK="wallet_link",tt.METAMASK_MOBILE="metamask_mobile",tt.AUTH_SERVER="auth_server"})(_e.ProviderType||(_e.ProviderType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.ProviderType||(_e.ProviderType={}))})(providerType);var saleType={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.SaleType=void 0;const et=validation;(function(tt){tt.ORDER="order",tt.BID="bid",tt.MINT="mint"})(_e.SaleType||(_e.SaleType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.SaleType||(_e.SaleType={}))})(saleType);var sale={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Sale=_e.SaleSortBy=void 0;const et=validation,tt=requireChainId(),nt=saleType,at=network;(function(ot){ot.RECENTLY_SOLD="recently_sold",ot.MOST_EXPENSIVE="most_expensive"})(_e.SaleSortBy||(_e.SaleSortBy={})),function(ot){ot.schema={type:"object",properties:{id:{type:"string"},type:nt.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:at.Network.schema,chainId:tt.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.Sale||(_e.Sale={}))})(sale);var rentalsListings={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.RentalListingCreation=_e.PeriodCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=void 0;const et=validation,tt=requireChainId(),nt=network;(function(ot){ot.OPEN="open",ot.CANCELLED="cancelled",ot.EXECUTED="executed",ot.CLAIMED="claimed"})(_e.RentalStatus||(_e.RentalStatus={})),function(ot){ot.ASC="asc",ot.DESC="desc"}(_e.RentalsListingSortDirection||(_e.RentalsListingSortDirection={})),function(ot){ot.PARCEL="parcel",ot.ESTATE="estate"}(_e.RentalsListingsFilterByCategory||(_e.RentalsListingsFilterByCategory={})),function(ot){ot.LAND_CREATION_DATE="land_creation_date",ot.RENTAL_LISTING_DATE="rental_listing_date",ot.RENTAL_DATE="rented_date",ot.NAME="name",ot.MAX_RENTAL_PRICE="max_rental_price",ot.MIN_RENTAL_PRICE="min_rental_price"}(_e.RentalsListingsSortBy||(_e.RentalsListingsSortBy={}));var at;(function(ot){ot.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)})(at=_e.PeriodCreation||(_e.PeriodCreation={})),function(ot){ot.schema={type:"object",properties:{network:nt.Network.schema,chainId:tt.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:at.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},ot.validate=(0,et.generateLazyValidator)(ot.schema)}(_e.RentalListingCreation||(_e.RentalListingCreation={}))})(rentalsListings);var analyticsDayData={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.AnalyticsDayDataSortBy=void 0,function(et){et.DATE="date",et.MOST_SALES="most_sales"}(_e.AnalyticsDayDataSortBy||(_e.AnalyticsDayDataSortBy={}))})(analyticsDayData);var store={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Store=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.Store||(_e.Store={}))})(store);var wearableGender={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.GenderFilterOption=_e.WearableGender=void 0;const et=validation;(function(tt){tt.MALE="male",tt.FEMALE="female"})(_e.WearableGender||(_e.WearableGender={})),function(tt){tt.MALE="male",tt.FEMALE="female",tt.UNISEX="unisex"}(_e.GenderFilterOption||(_e.GenderFilterOption={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.WearableGender||(_e.WearableGender={}))})(wearableGender);var world={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.World=_e.isInsideWorldLimits=_e.getWorld=void 0;const et=validation;function tt(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}_e.getWorld=tt;function nt(at,ot){const st=tt().validWorldRanges;for(const ct of st)if(at>=ct.xMin&&at<=ct.xMax&&ot>=ct.yMin&&ot<=ct.yMax)return!0;return!1}_e.isInsideWorldLimits=nt,function(at){at.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},at.validate=(0,et.generateLazyValidator)(at.schema)}(_e.World||(_e.World={}))})(world);var preview={},previewCamera={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewCamera=void 0;const et=validation;(function(tt){tt.STATIC="static",tt.INTERACTIVE="interactive"})(_e.PreviewCamera||(_e.PreviewCamera={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewCamera||(_e.PreviewCamera={}))})(previewCamera);var previewConfig={};Object.defineProperty(previewConfig,"__esModule",{value:!0});var previewController={};Object.defineProperty(previewController,"__esModule",{value:!0});var previewEmoteEventType={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmoteEventType=void 0;const et=validation;(function(tt){tt.ANIMATION_PLAY="animation_play",tt.ANIMATION_PAUSE="animation_pause",tt.ANIMATION_LOOP="animation_loop",tt.ANIMATION_END="animation_end",tt.ANIMATION_PLAYING="animation_playing"})(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmoteEventType||(_e.PreviewEmoteEventType={}))})(previewEmoteEventType);var previewEmote={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewEmote=void 0;const et=validation;(function(tt){tt.IDLE="idle",tt.WALK="walk",tt.RUN="run",tt.JUMP="jump",tt.CLAP="clap",tt.DAB="dab",tt.DANCE="dance",tt.FASHION="fashion",tt.FASHION_2="fashion-2",tt.FASHION_3="fashion-3",tt.FASHION_4="fashion-4",tt.LOVE="love",tt.MONEY="money",tt.FIST_PUMP="fist-pump",tt.HEAD_EXPLODE="head-explode",tt.WAVE="wave"})(_e.PreviewEmote||(_e.PreviewEmote={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewEmote||(_e.PreviewEmote={}))})(previewEmote);var previewMessage={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.sendMessage=_e.PreviewMessageType=void 0;const et=validation;(function(nt){nt.READY="ready",nt.LOAD="load",nt.ERROR="error",nt.UPDATE="update",nt.CONTROLLER_REQUEST="controller_request",nt.CONTROLLER_RESPONSE="controller_response",nt.EMOTE_EVENT="emote_event"})(_e.PreviewMessageType||(_e.PreviewMessageType={})),function(nt){nt.schema={type:"string",enum:Object.values(nt)},nt.validate=(0,et.generateLazyValidator)(nt.schema)}(_e.PreviewMessageType||(_e.PreviewMessageType={}));const tt=(nt,at,ot,st="*")=>{const ct={type:at,payload:ot};nt.postMessage(ct,st)};_e.sendMessage=tt})(previewMessage);var previewOptions={};Object.defineProperty(previewOptions,"__esModule",{value:!0});var previewProjection={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewProjection=void 0;const et=validation;(function(tt){tt.ORTHOGRAPHIC="orthographic",tt.PERSPECTIVE="perspective"})(_e.PreviewProjection||(_e.PreviewProjection={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewProjection||(_e.PreviewProjection={}))})(previewProjection);var previewType={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.PreviewType=void 0;const et=validation;(function(tt){tt.TEXTURE="texture",tt.WEARABLE="wearable",tt.AVATAR="avatar"})(_e.PreviewType||(_e.PreviewType={})),function(tt){tt.schema={type:"string",enum:Object.values(tt)},tt.validate=(0,et.generateLazyValidator)(tt.schema)}(_e.PreviewType||(_e.PreviewType={}))})(previewType);var wearableRepresentationDefinition={};Object.defineProperty(wearableRepresentationDefinition,"__esModule",{value:!0});var wearableRepresentationWithBlobs={};Object.defineProperty(wearableRepresentationWithBlobs,"__esModule",{value:!0});var wearableDefinition={};Object.defineProperty(wearableDefinition,"__esModule",{value:!0});var wearableWithBlobs={};Object.defineProperty(wearableWithBlobs,"__esModule",{value:!0});var emoteRepresentationDefinition={};Object.defineProperty(emoteRepresentationDefinition,"__esModule",{value:!0});var emoteRepresentationWithBlobs={};Object.defineProperty(emoteRepresentationWithBlobs,"__esModule",{value:!0});var emoteDefinition={};Object.defineProperty(emoteDefinition,"__esModule",{value:!0});var emoteWithBlobs={};Object.defineProperty(emoteWithBlobs,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,at,ot,st){st===void 0&&(st=ot);var ct=Object.getOwnPropertyDescriptor(at,ot);(!ct||("get"in ct?!at.__esModule:ct.writable||ct.configurable))&&(ct={enumerable:!0,get:function(){return at[ot]}}),Object.defineProperty(nt,st,ct)}:function(nt,at,ot,st){st===void 0&&(st=ot),nt[st]=at[ot]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,at){for(var ot in nt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(at,ot)&&et(at,nt,ot)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(previewCamera,_e),tt(previewConfig,_e),tt(previewController,_e),tt(previewEmoteEventType,_e),tt(previewEmote,_e),tt(previewMessage,_e),tt(previewOptions,_e),tt(previewProjection,_e),tt(previewType,_e),tt(wearableRepresentationDefinition,_e),tt(wearableRepresentationWithBlobs,_e),tt(wearableDefinition,_e),tt(wearableWithBlobs,_e),tt(emoteRepresentationDefinition,_e),tt(emoteRepresentationWithBlobs,_e),tt(emoteDefinition,_e),tt(emoteWithBlobs,_e)})(preview);var linkerAuthorization={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.LinkerAuthorization=void 0;const et=validation;(function(tt){tt.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},tt.validate=(0,et.generateLazyValidator)(tt.schema)})(_e.LinkerAuthorization||(_e.LinkerAuthorization={}))})(linkerAuthorization);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(At,xt,Ct,Dt){Dt===void 0&&(Dt=Ct);var kt=Object.getOwnPropertyDescriptor(xt,Ct);(!kt||("get"in kt?!xt.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return xt[Ct]}}),Object.defineProperty(At,Dt,kt)}:function(At,xt,Ct,Dt){Dt===void 0&&(Dt=Ct),At[Dt]=xt[Ct]}),tt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(At,xt){Object.defineProperty(At,"default",{enumerable:!0,value:xt})}:function(At,xt){At.default=xt}),nt=commonjsGlobal&&commonjsGlobal.__importStar||function(At){if(At&&At.__esModule)return At;var xt={};if(At!=null)for(var Ct in At)Ct!=="default"&&Object.prototype.hasOwnProperty.call(At,Ct)&&et(xt,At,Ct);return tt(xt,At),xt},at=commonjsGlobal&&commonjsGlobal.__exportStar||function(At,xt){for(var Ct in At)Ct!=="default"&&!Object.prototype.hasOwnProperty.call(xt,Ct)&&et(xt,At,Ct)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.sdk=_e.isInsideWorldLimits=_e.getWorld=_e.World=_e.GenderFilterOption=_e.WearableGender=_e.Store=_e.AnalyticsDayDataSortBy=_e.PeriodCreation=_e.RentalListingCreation=_e.RentalsListingsSortBy=_e.RentalsListingsFilterByCategory=_e.RentalsListingSortDirection=_e.RentalStatus=_e.SaleSortBy=_e.Sale=_e.SaleType=_e.Rarity=_e.ProviderType=_e.OrderSortBy=_e.Order=_e.CatalogSortDirection=_e.CatalogSortBy=_e.NFTSortBy=_e.NFT=_e.NFTCategory=_e.Network=_e.MintSortBy=_e.Mint=_e.MetaTransaction=_e.ListingStatus=_e.ItemSortBy=_e.Item=_e.ContractSortBy=_e.Contract=_e.CollectionSortBy=_e.Collection=_e.getChainId=_e.ChainName=_e.getURNProtocol=_e.getChainName=_e.ChainId=_e.AccountSortBy=_e.Account=_e.BidSortBy=_e.Bid=void 0;const ot=nt(sdk);_e.sdk=ot,at(validation,_e);var st=bid;Object.defineProperty(_e,"Bid",{enumerable:!0,get:function(){return st.Bid}}),Object.defineProperty(_e,"BidSortBy",{enumerable:!0,get:function(){return st.BidSortBy}});var ct=account;Object.defineProperty(_e,"Account",{enumerable:!0,get:function(){return ct.Account}}),Object.defineProperty(_e,"AccountSortBy",{enumerable:!0,get:function(){return ct.AccountSortBy}});var dt=requireChainId();Object.defineProperty(_e,"ChainId",{enumerable:!0,get:function(){return dt.ChainId}}),Object.defineProperty(_e,"getChainName",{enumerable:!0,get:function(){return dt.getChainName}}),Object.defineProperty(_e,"getURNProtocol",{enumerable:!0,get:function(){return dt.getURNProtocol}});var ht=requireChainName();Object.defineProperty(_e,"ChainName",{enumerable:!0,get:function(){return ht.ChainName}}),Object.defineProperty(_e,"getChainId",{enumerable:!0,get:function(){return ht.getChainId}});var pt=collection;Object.defineProperty(_e,"Collection",{enumerable:!0,get:function(){return pt.Collection}}),Object.defineProperty(_e,"CollectionSortBy",{enumerable:!0,get:function(){return pt.CollectionSortBy}});var mt=contract;Object.defineProperty(_e,"Contract",{enumerable:!0,get:function(){return mt.Contract}}),Object.defineProperty(_e,"ContractSortBy",{enumerable:!0,get:function(){return mt.ContractSortBy}});var yt=item;Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return yt.Item}}),Object.defineProperty(_e,"ItemSortBy",{enumerable:!0,get:function(){return yt.ItemSortBy}});var gt=listingStatus;Object.defineProperty(_e,"ListingStatus",{enumerable:!0,get:function(){return gt.ListingStatus}});var bt=metaTransactions;Object.defineProperty(_e,"MetaTransaction",{enumerable:!0,get:function(){return bt.MetaTransaction}});var $t=mint;Object.defineProperty(_e,"Mint",{enumerable:!0,get:function(){return $t.Mint}}),Object.defineProperty(_e,"MintSortBy",{enumerable:!0,get:function(){return $t.MintSortBy}});var wt=network;Object.defineProperty(_e,"Network",{enumerable:!0,get:function(){return wt.Network}});var St=nftCategory;Object.defineProperty(_e,"NFTCategory",{enumerable:!0,get:function(){return St.NFTCategory}});var Tt=nft;Object.defineProperty(_e,"NFT",{enumerable:!0,get:function(){return Tt.NFT}}),Object.defineProperty(_e,"NFTSortBy",{enumerable:!0,get:function(){return Tt.NFTSortBy}});var Pt=catalog;Object.defineProperty(_e,"CatalogSortBy",{enumerable:!0,get:function(){return Pt.CatalogSortBy}}),Object.defineProperty(_e,"CatalogSortDirection",{enumerable:!0,get:function(){return Pt.CatalogSortDirection}});var Ot=order;Object.defineProperty(_e,"Order",{enumerable:!0,get:function(){return Ot.Order}}),Object.defineProperty(_e,"OrderSortBy",{enumerable:!0,get:function(){return Ot.OrderSortBy}});var Nt=providerType;Object.defineProperty(_e,"ProviderType",{enumerable:!0,get:function(){return Nt.ProviderType}});var Lt=rarity;Object.defineProperty(_e,"Rarity",{enumerable:!0,get:function(){return Lt.Rarity}});var Bt=saleType;Object.defineProperty(_e,"SaleType",{enumerable:!0,get:function(){return Bt.SaleType}});var Ut=sale;Object.defineProperty(_e,"Sale",{enumerable:!0,get:function(){return Ut.Sale}}),Object.defineProperty(_e,"SaleSortBy",{enumerable:!0,get:function(){return Ut.SaleSortBy}});var Ft=rentalsListings;Object.defineProperty(_e,"RentalStatus",{enumerable:!0,get:function(){return Ft.RentalStatus}}),Object.defineProperty(_e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return Ft.RentalsListingSortDirection}}),Object.defineProperty(_e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return Ft.RentalsListingsFilterByCategory}}),Object.defineProperty(_e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return Ft.RentalsListingsSortBy}}),Object.defineProperty(_e,"RentalListingCreation",{enumerable:!0,get:function(){return Ft.RentalListingCreation}}),Object.defineProperty(_e,"PeriodCreation",{enumerable:!0,get:function(){return Ft.PeriodCreation}});var zt=analyticsDayData;Object.defineProperty(_e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return zt.AnalyticsDayDataSortBy}});var It=store;Object.defineProperty(_e,"Store",{enumerable:!0,get:function(){return It.Store}});var vt=wearableGender;Object.defineProperty(_e,"WearableGender",{enumerable:!0,get:function(){return vt.WearableGender}}),Object.defineProperty(_e,"GenderFilterOption",{enumerable:!0,get:function(){return vt.GenderFilterOption}});var Et=world;Object.defineProperty(_e,"World",{enumerable:!0,get:function(){return Et.World}}),Object.defineProperty(_e,"getWorld",{enumerable:!0,get:function(){return Et.getWorld}}),Object.defineProperty(_e,"isInsideWorldLimits",{enumerable:!0,get:function(){return Et.isInsideWorldLimits}}),at(preview,_e),at(platform$1,_e),at(misc,_e),at(linkerAuthorization,_e),at(authChain,_e),at(contentMapping,_e)})(dist$2);Object.defineProperty(DeploymentBuilder,"__esModule",{value:!0});var buildEntityWithoutNewFiles_1=DeploymentBuilder.buildEntityWithoutNewFiles=DeploymentBuilder.buildEntity=DeploymentBuilder.buildEntityAndFile=void 0;const hashing_1=distExports,schemas_1$2=dist$2;async function buildEntityAndFile({type:_e,pointers:et,timestamp:tt,content:nt,metadata:at}){var ot;if(et.length===0)throw new Error("All entities must have at least one pointer.");const st={version:"v3",type:_e,pointers:et,timestamp:tt,content:nt,metadata:at};if(nt){const pt=new Set;for(const mt of nt){const yt=mt.file.toLowerCase();if(pt.has(yt))throw new Error(`Error creating the deployable entity: Decentraland's file system is case insensitive, the file ${JSON.stringify(mt.file)} is repeated`);pt.add(yt)}}const ct=new TextEncoder().encode(JSON.stringify(st)),ht={id:await(0,hashing_1.hashV1)(ct),...st};if(!schemas_1$2.Entity.validate(ht))throw new Error(`Generated entity is not valid:
326
326
  `+((ot=schemas_1$2.Entity.validate.errors)===null||ot===void 0?void 0:ot.map(pt=>pt.message).join(`
327
- `)));return{entity:ht,entityFile:ct}}DeploymentBuilder.buildEntityAndFile=buildEntityAndFile;async function buildEntity({type:_e,pointers:et,files:tt,metadata:nt,timestamp:at}){const ot=Array.from(tt||[]).map(([ht,pt])=>({key:ht,content:pt})),st=await Promise.all(ot.map(async({key:ht,content:pt})=>({key:ht,content:pt,hash:await(0,hashing_1.hashV1)(pt)}))),ct=new Map(st.map(({hash:ht,key:pt})=>[pt,ht])),dt=new Map(st.map(({hash:ht,content:pt})=>[ht,pt]));return buildEntityInternal(_e,et,{hashesByKey:ct,filesByHash:dt,metadata:nt,timestamp:at})}DeploymentBuilder.buildEntity=buildEntity;async function buildEntityWithoutNewFiles(_e,{contentUrl:et,type:tt,pointers:nt,hashesByKey:at,metadata:ot,timestamp:st}){const ct=at??ot?getHashesByKey(ot):void 0;if(ct&&isObsoleteProfile(tt,ct)){const dt=await downloadAllFiles(_e,et,ct),ht=await updateMetadata(dt,ot);return buildEntity({type:tt,pointers:nt,files:dt,metadata:ht,timestamp:st})}return buildEntityInternal(tt,nt,{hashesByKey:at,metadata:ot,timestamp:st})}buildEntityWithoutNewFiles_1=DeploymentBuilder.buildEntityWithoutNewFiles=buildEntityWithoutNewFiles;async function buildEntityInternal(_e,et,tt){if(et.length===0)throw new Error("All entities must have at least one pointer.");const nt=tt!=null&&tt.hashesByKey?tt==null?void 0:tt.hashesByKey:new Map,at=Array.from(nt.entries()).map(([ht,pt])=>({file:ht,hash:pt})),ot=tt!=null&&tt.timestamp?tt==null?void 0:tt.timestamp:Date.now(),{entity:st,entityFile:ct}=await buildEntityAndFile({type:_e,pointers:et,timestamp:ot,content:at,metadata:tt==null?void 0:tt.metadata}),dt=tt!=null&&tt.filesByHash?tt.filesByHash:new Map;return dt.set(st.id,ct),{files:dt,entityId:st.id}}function isObsoleteProfile(_e,et){return _e===schemas_1$2.EntityType.PROFILE&&Array.from(et).some(([,tt])=>tt.toLowerCase().startsWith("qm"))}async function fetchArrayBuffer(_e,et){const nt=await(await _e.fetch(et)).arrayBuffer();return new Uint8Array(nt)}async function downloadAllFiles(_e,et,tt){const nt=tt.get("body.png"),at=tt.get("face256.png"),ot=new URL(`${et}/contents/${nt}`).toString(),st=new URL(`${et}/contents/${at}`).toString(),[ct,dt]=await Promise.all([fetchArrayBuffer(_e,ot),fetchArrayBuffer(_e,st)]);return new Map([["body.png",ct],["face256.png",dt]])}async function updateMetadata(_e,et){return et&&(et.avatars=await Promise.all(et.avatars.map(async tt=>{const nt={face256:"",body:""},at=_e.get("face256.png");at&&(nt.face256=await(0,hashing_1.hashV1)(at));const ot=_e.get("body.png");return ot&&(nt.body=await(0,hashing_1.hashV1)(ot)),tt.avatar.snapshots=nt,tt})),et)}function getHashesByKey(_e){const et=_e.avatars[0];return new Map([["body.png",et.avatar.snapshots.body],["face256.png",et.avatar.snapshots.face256]])}var LambdasClient={},lambdasClient={},fetcher={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.useCustomClient=void 0;const et=({url:tt,method:nt,params:at,data:ot,headers:st})=>{const ct=tt.substring(9);return async function(dt,ht){return(await ht.fetch(`${dt}/${ct}`+new URLSearchParams(at),{method:nt,headers:st,...ot?{body:JSON.stringify(ot)}:{}})).json()}};_e.useCustomClient=et,_e.default=_e.useCustomClient})(fetcher);Object.defineProperty(lambdasClient,"__esModule",{value:!0});lambdasClient.getThirdPartyIntegrations=lambdasClient.getOutfits=lambdasClient.getAvatarDetails=lambdasClient.getAvatarsDetailsByPost=lambdasClient.getRealms=lambdasClient.getHotScenes=lambdasClient.validateSignature=lambdasClient.getDenylistedUserNames=lambdasClient.getPois=lambdasClient.getCatalystServers=lambdasClient.searchWearables=lambdasClient.getThirdPartyCollection=lambdasClient.getThirdPartyWearables=lambdasClient.getLands=lambdasClient.getNames=lambdasClient.getEmotes=lambdasClient.getWearables=lambdasClient.getStandardErc721=lambdasClient.getImage=lambdasClient.getThumbnail=lambdasClient.getCollections=lambdasClient.getLambdaStatus=void 0;const fetcher_1=fetcher,getLambdaStatus=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/status",method:"get"});lambdasClient.getLambdaStatus=getLambdaStatus;const getCollections=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/collections",method:"get"});lambdasClient.getCollections=getCollections;const getThumbnail=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/contents/${_e}/thumbnail`,method:"get",responseType:"blob"});lambdasClient.getThumbnail=getThumbnail;const getImage=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/contents/${_e}/image`,method:"get",responseType:"blob"});lambdasClient.getImage=getImage;const getStandardErc721=(_e,et,tt,nt)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/standard/erc721/${_e}/${et}/${tt}/${nt}`,method:"get"});lambdasClient.getStandardErc721=getStandardErc721;const getWearables=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/wearables`,method:"get",params:et});lambdasClient.getWearables=getWearables;const getEmotes=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/emotes`,method:"get",params:et});lambdasClient.getEmotes=getEmotes;const getNames=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/names`,method:"get",params:et});lambdasClient.getNames=getNames;const getLands=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/lands`,method:"get",params:et});lambdasClient.getLands=getLands;const getThirdPartyWearables=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/third-party-wearables`,method:"get",params:et});lambdasClient.getThirdPartyWearables=getThirdPartyWearables;const getThirdPartyCollection=(_e,et,tt)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/third-party-wearables/${et}`,method:"get",params:tt});lambdasClient.getThirdPartyCollection=getThirdPartyCollection;const searchWearables=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/collections/wearables",method:"get",params:_e});lambdasClient.searchWearables=searchWearables;const getCatalystServers=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/servers",method:"get"});lambdasClient.getCatalystServers=getCatalystServers;const getPois=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/pois",method:"get"});lambdasClient.getPois=getPois;const getDenylistedUserNames=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/denylisted-names",method:"get"});lambdasClient.getDenylistedUserNames=getDenylistedUserNames;const validateSignature=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/crypto/validate-signature",method:"post",headers:{"Content-Type":"application/json; charset=utf-8"},data:_e});lambdasClient.validateSignature=validateSignature;const getHotScenes=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/explore/hot-scenes",method:"get"});lambdasClient.getHotScenes=getHotScenes;const getRealms=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/explore/realms",method:"get"});lambdasClient.getRealms=getRealms;const getAvatarsDetailsByPost=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/profiles",method:"post",headers:{"Content-Type":"application/json; charset=utf-8"},data:_e});lambdasClient.getAvatarsDetailsByPost=getAvatarsDetailsByPost;const getAvatarDetails=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/profiles/${_e}`,method:"get"});lambdasClient.getAvatarDetails=getAvatarDetails;const getOutfits=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/outfits/${_e}`,method:"get"});lambdasClient.getOutfits=getOutfits;const getThirdPartyIntegrations=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/third-party-integrations",method:"get"});lambdasClient.getThirdPartyIntegrations=getThirdPartyIntegrations;var __createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(_e,et,tt,nt){nt===void 0&&(nt=tt);var at=Object.getOwnPropertyDescriptor(et,tt);(!at||("get"in at?!et.__esModule:at.writable||at.configurable))&&(at={enumerable:!0,get:function(){return et[tt]}}),Object.defineProperty(_e,nt,at)}:function(_e,et,tt,nt){nt===void 0&&(nt=tt),_e[nt]=et[tt]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(_e,et){Object.defineProperty(_e,"default",{enumerable:!0,value:et})}:function(_e,et){_e.default=et}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var et={};if(_e!=null)for(var tt in _e)tt!=="default"&&Object.prototype.hasOwnProperty.call(_e,tt)&&__createBinding$1(et,_e,tt);return __setModuleDefault$1(et,_e),et};Object.defineProperty(LambdasClient,"__esModule",{value:!0});var createLambdasClient_1=LambdasClient.createLambdasClient=void 0;const Helper_1=Helper,client=__importStar$1(lambdasClient);function createLambdasClient(_e){const et=(0,Helper_1.sanitizeUrl)(_e.url);function tt(nt){return(...at)=>nt(...at)(et,_e.fetcher)}return{getLambdaStatus:tt(client.getLambdaStatus),getCollections:tt(client.getCollections),getThumbnail:tt(client.getThumbnail),getImage:tt(client.getImage),getStandardErc721:tt(client.getStandardErc721),getWearables:tt(client.getWearables),getEmotes:tt(client.getEmotes),getNames:tt(client.getNames),getLands:tt(client.getLands),getThirdPartyWearables:tt(client.getThirdPartyWearables),getThirdPartyCollection:tt(client.getThirdPartyCollection),getHotScenes:tt(client.getHotScenes),getRealms:tt(client.getRealms),getAvatarsDetailsByPost:tt(client.getAvatarsDetailsByPost),getAvatarDetails:tt(client.getAvatarDetails),getThirdPartyIntegrations:tt(client.getThirdPartyIntegrations)}}createLambdasClient_1=LambdasClient.createLambdasClient=createLambdasClient;class PeerAPI extends BaseAPI{constructor(tt){super(tt);Qr(this,"cache",{});Qr(this,"lambdasClient");this.lambdasClient=createLambdasClient_1({url:`${tt}/lambdas`,fetcher:dist$3.createFetchComponent()})}async fetchProfile(tt,nt={useCache:!0}){return nt.useCache&&tt in this.cache?this.cache[tt]:(this.cache[tt]=this.lambdasClient.getAvatarsDetailsByPost({ids:[tt.toLowerCase()]}).then(at=>at[0]),this.cache[tt])}async fetchProfiles(tt){return tt.length===0?[]:this.lambdasClient.getAvatarsDetailsByPost({ids:tt.map(nt=>nt.toLowerCase())})}async getDefaultProfileEntity(){return(await this.request("GET","/content/entities/profile?pointer=default"+Math.floor(Math.random()*128+1)))[0]}}class EntitiesOperator{constructor(et,tt){Qr(this,"peerUrl");Qr(this,"peerWithNoGbCollectorUrl");Qr(this,"catalystContentClient");Qr(this,"catalystContentClientWithoutGbCollector");Qr(this,"peerAPI");this.peerUrl=et,this.peerWithNoGbCollectorUrl=tt,this.catalystContentClient=createContentClient_1({url:`${et}/content`,fetcher:dist$3.createFetchComponent()}),this.catalystContentClientWithoutGbCollector=tt?createContentClient_1({url:`${et}/content`,fetcher:dist$3.createFetchComponent()}):null,this.peerAPI=new PeerAPI(et)}async getProfileEntity(et){const tt=await this.catalystContentClient.fetchEntitiesByPointers([et.toLowerCase()]);return tt.length>0?tt[0]:this.peerAPI.getDefaultProfileEntity()}async deployEntityWithoutNewFiles(et,tt,nt,at,ot){const st={type:nt,pointers:[at],metadata:et,hashesByKey:tt,timestamp:Date.now()},ct=this.catalystContentClientWithoutGbCollector??this.catalystContentClient,dt=this.peerWithNoGbCollectorUrl??this.peerUrl,ht=await buildEntityWithoutNewFiles_1(dist$3.createFetchComponent(),{contentUrl:`${dt}/content`,...st}),pt=dist$e.Authenticator.signPayload(ot,ht.entityId);return ct.deploy({...ht,authChain:pt})}}function isErrorWithMessage(_e){return _e!=null&&typeof _e=="object"&&"message"in _e}const provider=window.ethereum,SWITCH_NETWORK_TIMEOUT=1e4;let cucumberProviderSend;if(isCucumberProvider()){const _e=provider.send;cucumberProviderSend=(...et)=>{try{return Promise.resolve(_e.apply(provider,et)).then(tt=>(tt==null?void 0:tt.result)||[])}catch(tt){return Promise.reject(tt)}}}async function getAccount(_e){isCucumberProvider()&&await cucumberProviderSend("eth_requestAccounts");const{account:et}=await connection.connect(_e===providerType$2.ProviderType.WALLET_CONNECT?providerType$2.ProviderType.WALLET_CONNECT_V2:_e,_getAppChainId());return et}let POLL_INTERVAL=5*60*1e3,polling=!1;function*walletSaga(){yield fork(initializeAppChainId),yield all([takeEvery$1(CONNECT_WALLET_REQUEST,handleConnectWalletRequest),takeEvery$1(ENABLE_WALLET_REQUEST,handleEnableWalletRequest),takeEvery$1(ENABLE_WALLET_SUCCESS,handleEnableWalletSuccess),takeEvery$1(FETCH_WALLET_REQUEST,handleFetchWalletRequest),takeEvery$1(DISCONNECT_WALLET_REQUEST,handleDisconnectWalletRequest),takeEvery$1(CONNECT_WALLET_SUCCESS,handleConnectWalletSuccess$1),takeEvery$1(SWITCH_NETWORK_REQUEST,handleSwitchNetworkRequest),takeEvery$1(SWITCH_NETWORK_SUCCESS,handleSwitchNetworkSuccess)])}function*initializeAppChainId(){yield put(setAppChainId(_getAppChainId()))}function*handleConnectWalletRequest(){try{yield put(fetchWalletRequest());const{success:_e,failure:et}=yield race({success:take(FETCH_WALLET_SUCCESS),failure:take(FETCH_WALLET_FAILURE)});if(_e)yield put(connectWalletSuccess(_e.payload.wallet));else throw new Error(et.payload.error)}catch(_e){yield put(connectWalletFailure(_e.message))}}function*handleEnableWalletRequest(_e){const{providerType:et}=_e.payload;try{if(!(yield call$6(getAccount,et)))throw new Error("Enable did not return any accounts");yield put(enableWalletSuccess(et))}catch(tt){yield put(enableWalletFailure(tt.message))}}function*handleEnableWalletSuccess(_e){yield put(connectWalletRequest())}function*handleDisconnectWalletRequest(_e){try{yield call$6([connection,"disconnect"]),yield put(disconnectWalletSuccess())}catch(et){yield put(disconnectWalletFailure(isErrorWithMessage(et)?et.message:"Error disconnecting wallet"))}polling=!1}function*handleFetchWalletRequest(_e){try{const et=yield select(getAppChainId),tt=yield call$6(buildWallet,et);yield put(fetchWalletSuccess(tt))}catch(et){yield put(fetchWalletFailure(et.message))}}function*handleConnectWalletSuccess$1(){if(!polling&&POLL_INTERVAL>0)for(polling=!0;polling;)yield delay(POLL_INTERVAL),(yield select(isConnected))&&(yield put(fetchWalletRequest()))}function*handleSwitchNetworkRequest(_e){const{chainId:et}=_e.payload,tt=yield call$6(getConnectedProvider);if(!tt)yield put(switchNetworkFailure(et,"Error switching network: Could not get provider"));else try{const{timeout:nt}=yield race({switched:call$6(switchProviderChainId,tt,et),timeout:delay(SWITCH_NETWORK_TIMEOUT)});if(nt)throw yield put(showToast(getSwitchChainErrorToast(et))),new Error("Error switching network: Operation timed out");yield put(switchNetworkSuccess(et))}catch(nt){yield put(switchNetworkFailure(et,nt.message))}}function*handleSwitchNetworkSuccess(_e){yield put(fetchWalletRequest())}function createWalletSaga(_e){if(isValidChainId(_e.CHAIN_ID))_setAppChainId(Number(_e.CHAIN_ID));else throw new Error(`Invalid Chain id ${_e.CHAIN_ID}. Valid options are ${Object.values(chainIdExports.ChainId)}`);return _e.MANA_ADDRESS&&console.warn("Deprecated notice: the MANA_ADDRESS option on `createWalletSaga` has been deprecated and will be removed in future version."),_e.POLL_INTERVAL&&(POLL_INTERVAL=_e.POLL_INTERVAL),_e.TRANSACTIONS_API_URL?setTransactionsApiUrl(_e.TRANSACTIONS_API_URL):console.warn(`"TRANSACTIONS_API_URL" not provided on createWalletSaga, using default value "${getTransactionsApiUrl()}".`),walletSaga}const en={"global.title":"Decentraland's {token} Vesting Contract","global.copied":"Copied!","global.amount.months":"{amount} {amount, plural, one {month} other {months}}","global.amount.days":"{amount} {amount, plural, one {day} other {days}}","global.yes":"Yes","global.no":"No","error.dao_proposal_url":"DAO Proposal URL not found","helper.total_vesting":"Total amount of the project nominated in the currency/token the project was issued. This is the total budget the projects beneficiaries will have to execute their project.","helper.vesting_so_far":"The amount of money that is available to be used by the project beneficiaries. Since the total amount of the project will be.","helper.releasable":"The amount of funds that can be transferred from the project's smart contract to the beneficiary address but have not yet been transferred.","helper.released":"The amount of funds that have been transferred from the project's smart contract to the beneficiary address.","helper.beneficiary":"The authorized address to which the project's smart contract will transfer the funds.","helper.cliff_period":"The period between the start of the project and when the first funds become vested. This is a secure period where project owners will start making progress without receiving funds immediately. It also provides the DAO and the Revocations Committee with an opportunity to revoke a project without jeopardizing DAO funds.","helper.smart_contract_address":"The address where the project's funding strategy is stored and from which funds will be transferred from the DAO treasury to the beneficiary address.","helper.vesting_schedule":"The period during which funds are vested and become available for release. This schedule outlines the time frame in which beneficiaries are expected to make progress on the project while it is active.","helper.landing_page.continue":"Press enter to continue","helper.landing_page.provide_contract":"Please provide a vesting contract address","helper.landing_page.address_not_valid":"That's not a valid Ethereum address","helper.landing_page.no_contract":"There's no vesting contract on that address...","helper.landing_page.network":"Maybe it's because you are on {network}?","helper.error_page":"So this happened: {error}","helper.error_page.no_internet":"Make sure you are connected to the internet.","helper.error_page.message":"Uh-oh... something went wrong.","landing_page.title":"Contract Address","overview.title":"{token} Vesting Contract","overview.details":"This is a contract for {amount} {token} to be vested in {months}{days, plural, =0 {} other { and {days}}}, {showCliff, plural, =0 {no cliff} other {after a {cliff}}}.","overview.details.cliff":"{months, plural, =0 {} other {{months} {months, plural, one {month} other {months}}}}{days, plural, =0 {} other {{days} {days, plural, one {day} other {days}}}} cliff","beneficiary.title":"Project beneficiary","beneficiary.subtitle":"Enabled by the community participating in the Decentraland DAO","beneficiary.button":"View dao proposal","beneficiary.button.mobile":"Dao initiative","revoked_banner.title":"Contract revoked","revoked_banner.subtitle":"The Decentraland DAO Revocations Committee has ceased funding for this initiative","paused_banner.title":"Contract paused","paused_banner.subtitle":"The Decentraland DAO Revocations Committee has paused funding for this initiative","progress.total":"Total vesting","progress.vested":"Vested so far","progress.released":"<b>{amount} {token}</b> released","chart.title":"FUNDS OVER TIME","chart.vested":"Vested","chart.released":"Released","chart.to_be_vested":"To be vested","chart.revoked":"REVOKED","chart.paused":"PAUSED","chart.today":"TODAY","cliff.duration":"{months}-{months, plural, one {month} other {months}} {days, plural, =0 {} other { and {days} {days, plural, one {day} other {days}}}} cliff","schedule.title":"Schedule","schedule.contract_started":"Contract in place","schedule.cliff_started":"{cliff} started","schedule.cliff_ended":"Cliff ended","schedule.vesting_begins":"Vesting begins","schedule.show_more":"Show more","schedule.released":"{amount} {token} released","schedule.fulfilled":"Contract fulfilled","schedule.revoked":"Revoked","schedule.paused":"Paused","schedule.unpaused":"Unpaused","summary.text":"<b>Because of the {cliff}, no funds were vested before {cliffEnd}.</b>{br}{br}{version_description} The beneficiary has <b>released</b> from said funds{nearly}{percentage}% of what is currently vested.{br}{br}By the end of this contract, the beneficiary will have banked, at the current rate, aprox. <b>${amount} USD</b>{br}{br}","summary.linear_version_description":"Vesting is <b>real-time</b> and the beneficiary is able to release funds as they are vested.","summary.periodic_version_description":"Vesting is <b>periodic</b> every 30 days and the beneficiary is able to release funds as they are vested.","summary.nearly":"nearly","summary.review_contract":"Review smart contract","details.beneficiary":"Beneficiary","details.change_beneficiary":"Change","details.start":"Start","details.end":"End","details.cliff_period":"Cliff period","details.total_vesting":"Total vesting","details.released":"Released","details.releasable":"Releasable","details.release_funds":"Release funds","details.revocable":"Revocable","details.pausable":"Pausable","modal.title":"Change Beneficiary","modal.label":"Beneficiary address","modal.warning":"This is an irreversible operation. Please check the address carefully.","modal.button":"Transfer","modal.error":"This is not a valid Ethereum address","modal.success":"{address} {br} is the new beneficiary. Reload the page to see the reflected changes.","pending_funds.requires_more_funding":"The contract requires {pending} more {token} to cover the total vesting. Please contact the issuer to have it funded accordingly.","pending_funds.over_funded":"The contract has {pending} more {token} than the amount required to fund the total vesting."},translations=Object.freeze(Object.defineProperty({__proto__:null,en},Symbol.toStringTag,{value:"Module"})),NETWORK$1="mainnet",CHAIN_ID$1="1",PEER_URL$1="https://peer.decentraland.zone",ENVIRONMENT$1="development",AUTH_URL$3="/auth",VESTINGS_API_URL$1="https://data.decentraland.vote/vestings.json",PROPOSALS_URL$1="https://decentraland.org/governance/proposal/",REVIEW_CONTRACT_URL$1="https://etherscan.io/address/",dev={NETWORK:NETWORK$1,CHAIN_ID:CHAIN_ID$1,PEER_URL:PEER_URL$1,ENVIRONMENT:ENVIRONMENT$1,AUTH_URL:AUTH_URL$3,VESTINGS_API_URL:VESTINGS_API_URL$1,PROPOSALS_URL:PROPOSALS_URL$1,REVIEW_CONTRACT_URL:REVIEW_CONTRACT_URL$1},NETWORK="mainnet",CHAIN_ID="1",PEER_URL="https://peer.decentraland.org",ENVIRONMENT="production",AUTH_URL$2="/auth",VESTINGS_API_URL="https://data.decentraland.vote/vestings.json",PROPOSALS_URL="https://decentraland.org/governance/proposal/",REVIEW_CONTRACT_URL="https://etherscan.io/address/",prod={NETWORK,CHAIN_ID,PEER_URL,ENVIRONMENT,AUTH_URL:AUTH_URL$2,VESTINGS_API_URL,PROPOSALS_URL,REVIEW_CONTRACT_URL},config=dist$b.createConfig({[dist$b.Env.DEVELOPMENT]:dev,[dist$b.Env.PRODUCTION]:prod},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),AUTH_URL$1=config.get("AUTH_URL");function*identitySaga(){yield takeEvery$1(loginRequest.type,_e),yield takeEvery$1(CHANGE_ACCOUNT,nt),yield takeEvery$1(CONNECT_WALLET_SUCCESS,at),yield takeEvery$1(DISCONNECT_WALLET_SUCCESS,tt);function*_e(ot){const st=ot.payload;try{if(yield select(dt=>!isConnected(dt))){if(!st)throw new Error("Undefined provider type");yield put(enableWalletRequest(st));const dt=yield race({success:take(ENABLE_WALLET_SUCCESS),failure:take(ENABLE_WALLET_FAILURE)});if(!dt.success){yield put(loginFailure(dt.failure.payload.error));return}const ht=yield race({success:take(CONNECT_WALLET_SUCCESS),failure:take(CONNECT_WALLET_FAILURE)});if(!ht.success){yield put(loginFailure(ht.failure.payload.error));return}}}catch(ct){yield put(loginFailure(isErrorWithMessage(ct)?ct.message:"Unknown error"))}}let et="";function*tt(){et&&(yield put(logout(et)),yield call$6(dist$c.localStorageClearIdentity,et))}function*nt(){yield location.reload()}function*at(ot){const{wallet:st}=ot.payload,{address:ct}=st,dt=ct.toLowerCase();et=dt;const ht=dist$c.localStorageGetIdentity(dt);if(!ht){window.location.replace(`${AUTH_URL$1}/login?redirectTo=${window.location.href}`);return}yield put(loginSuccess({address:dt,identity:ht}))}}function getAnalytics(){return window.analytics}function trackConnectWallet(_e){const et=getAnalytics();et&&et.track("Connect Wallet",_e)}(function(){var _e=window.analytics=window.analytics||[];if(!_e.initialize){if(_e.invoked){window.console&&console.error&&console.error("Segment snippet included twice.");return}_e.invoked=!0,_e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","user","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],_e.factory=function(nt){return function(){var at=Array.prototype.slice.call(arguments);return at.unshift(nt),_e.push(at),_e}};for(var et=0;et<_e.methods.length;et++){var tt=_e.methods[et];_e[tt]=_e.factory(tt)}_e.load=function(nt,at){var ot=document.createElement("script");ot.type="text/javascript",ot.async=!0,ot.src="https://cdn.segment.com/analytics.js/v1/"+nt+"/analytics.min.js";var st=document.getElementsByTagName("script")[0];st.parentNode.insertBefore(ot,st),_e._loadOptions=at},_e.SNIPPET_VERSION="4.15.2"}})();function createAnalyticsSaga(){return function*(){yield takeLatest$1(CONNECT_WALLET_SUCCESS,handleConnectWalletSuccess)}}function handleConnectWalletSuccess(_e){const{wallet:et}=_e.payload,tt=getAnalytics();tt&&(tt.identify({ethAddress:et.address,chainId:et.chainId}),trackConnectWallet({address:et.address,chainId:et.chainId,providerType:et.providerType,walletName:connection.getWalletName()}))}const lambdaProfileToContentProfile=_e=>({..._e,avatars:_e.avatars.map(et=>({...et,avatar:{...et.avatar,snapshots:Object.entries(et.avatar.snapshots).map(([tt,nt])=>({[tt]:nt.replace(/.*\//,"")})).reduce((tt,nt)=>({...tt,...nt}),{})}}))}),getHashesByKeyMap=_e=>{const et=new Map;return Object.entries(_e.avatar.snapshots).forEach(([tt,nt])=>{et.set(`${tt}.png`,nt)}),et},NO_IDENTITY_FOUND_ERROR_MESSAGE="No identity found";function createProfileSaga({getIdentity:_e,peerUrl:et,peerWithNoGbCollectorUrl:tt}){const nt=new PeerAPI(et),at=new EntitiesOperator(et,tt);function*ot(){yield takeEvery$1(LOAD_PROFILE_REQUEST,st),yield takeEvery$1(LOAD_PROFILES_REQUEST,ct),yield takeEvery$1(SET_PROFILE_AVATAR_DESCRIPTION_REQUEST,pt),yield takeEvery$1(SET_PROFILE_AVATAR_ALIAS_REQUEST,ht),yield takeLatest$1(CONNECT_WALLET_SUCCESS,dt),yield takeLatest$1(CHANGE_ACCOUNT,dt)}function*st(yt){const{address:gt}=yt.payload;try{const bt=yield call$6([nt,"fetchProfile"],gt);yield put(loadProfileSuccess(gt,bt))}catch(bt){yield put(loadProfileFailure(gt,bt.message))}}function*ct(yt){const{addresses:gt}=yt.payload;try{const bt=yield call$6([nt,"fetchProfiles"],gt);yield put(loadProfilesSuccess(bt))}catch(bt){yield put(loadProfilesFailure(bt.message))}}function*dt(yt){yield put(loadProfileRequest(yt.payload.wallet.address))}function*ht(yt){const{address:gt,alias:bt}=yt.payload;try{const $t=yield mt(gt,{hasClaimedName:!0,name:bt});yield put(setProfileAvatarAliasSuccess(gt,bt,$t.version))}catch($t){yield put(setProfileAvatarAliasFailure(gt,$t.message))}}function*pt(yt){try{const{address:gt,description:bt}=yt.payload,$t=yield mt(gt,{description:bt});yield put(setProfileAvatarDescriptionSuccess(yt.payload.address,$t.description,$t.version))}catch(gt){yield put(setProfileAvatarDescriptionFailure(yt.payload.address,gt.message))}}function*mt(yt,gt){const bt=yield call$6([nt,"fetchProfile"],yt,{useCache:!1}),$t=lambdaProfileToContentProfile(bt),wt={...$t.avatars[0],...gt,version:$t.avatars[0].version+1},St={avatars:[wt,...$t.avatars.slice(1)]},Tt=_e();if(Tt)yield call$6([at,"deployEntityWithoutNewFiles"],St,getHashesByKeyMap(wt),entity$1.EntityType.PROFILE,yt,Tt);else throw new Error(NO_IDENTITY_FOUND_ERROR_MESSAGE);return wt}return ot}const analyticsSaga=createAnalyticsSaga(),translationSaga=createTranslationSaga({translations}),profileSaga=()=>createProfileSaga({getIdentity:()=>{},peerUrl:config.get("PEER_URL")});function*rootSaga(){yield all([analyticsSaga(),createWalletSaga({CHAIN_ID:Number(config.get("CHAIN_ID")),POLL_INTERVAL:0,TRANSACTIONS_API_URL:"https://transactions-api.decentraland.org/v1"})(),identitySaga(),profileSaga(),translationSaga(),transactionSaga()])}function initStore(){const _e=sagaMiddlewareFactory(),et=config.is(dist$b.Env.DEVELOPMENT),tt=reduxLoggerExports.createLogger({collapsed:()=>!0,predicate:(st,ct)=>et||ct.type.includes("Failure")}),{storageMiddleware:nt,loadStorageMiddleware:at}=createStorageMiddleware({storageKey:"dcl-vesting-dashboard",paths:[],actions:[],migrations:{}}),ot=createRootReducer([_e,tt,nt]);if(et){const st=window;st.getState=ot.getState}return _e.run(rootSaga),at(ot),ot}let ChainProvider$1=class extends React$L.PureComponent{render(){const{children:et,...tt}=this.props;return et(tt)}};const mapState$a=_e=>{const et=getChainId(_e)||null,tt=et?chainIdExports.getChainName(et):null,nt=et&&getChainConfiguration(et).network,at=getAppChainId(_e),ot=getChainConfiguration(at),st=chainIdExports.getChainName(at),ct=ot.network,dt=!!et&&!!ot,ht=dt&&Object.values(ot.networkMapping).includes(et);return{chainId:et,chainName:tt,network:nt,appChainId:at,appChainName:st,appNetwork:ct,isConnected:dt,isSupported:ht,isUnsupported:dt&&!ht}},mapDispatch$7=_e=>({}),ChainProvider=connect(mapState$a,mapDispatch$7)(ChainProvider$1);class ChainCheck extends React$L.PureComponent{render(){const{chainId:et,children:tt}=this.props;return React$L.createElement(ChainProvider,null,nt=>{const at=nt.isSupported||nt.chainId===et;return React$L.createElement(Popup$4.Popup,{disabled:at,position:"top center",content:React$L.createElement(T,{id:"@dapps.button.network_not_supported",values:{expectedChainName:React$L.createElement("b",null,nt.appChainName)}}),trigger:tt(at)})})}}const disabledStyle$1={opacity:.5,cursor:"not-allowed",transform:"none"};class ChainButton extends React$L.PureComponent{render(){const{chainId:et,onClick:tt,...nt}=this.props;return React$L.createElement(ChainCheck,{chainId:et},at=>{const ot=at?{onClick:tt}:{style:disabledStyle$1};return React$L.createElement(Button$2.Button,{...nt,...ot})})}}let Footer$2=class extends reactExports.PureComponent{constructor(){super(...arguments);Qr(this,"getTranslations",()=>{if(this.props.hasTranslations)return{dropdown:{en:reactExports.createElement(T,{id:"@dapps.footer.dropdown.en"}),es:reactExports.createElement(T,{id:"@dapps.footer.dropdown.es"}),fr:reactExports.createElement(T,{id:"@dapps.footer.dropdown.fr"}),ja:reactExports.createElement(T,{id:"@dapps.footer.dropdown.ja"}),zh:reactExports.createElement(T,{id:"@dapps.footer.dropdown.zh"}),ko:reactExports.createElement(T,{id:"@dapps.footer.dropdown.ko"})},links:{home:reactExports.createElement(T,{id:"@dapps.footer.links.home"}),privacy:reactExports.createElement(T,{id:"@dapps.footer.links.privacy"}),terms:reactExports.createElement(T,{id:"@dapps.footer.links.terms"}),content:reactExports.createElement(T,{id:"@dapps.footer.links.content"}),ethics:reactExports.createElement(T,{id:"@dapps.footer.links.ethics"}),feature:reactExports.createElement(T,{id:"@dapps.footer.links.feature"})}}});Qr(this,"handleChange",(tt,{value:nt})=>{const{locale:at,onChange:ot}=this.props;nt&&nt!==at&&ot&&ot(tt,{value:nt})})}render(){return reactExports.createElement(Footer_2,{...this.props,onChange:this.handleChange,i18n:this.getTranslations()})}};const mapState$9=_e=>({locale:getLocale$1(_e),hasTranslations:isEnabled(_e)}),mapDispatch$6=_e=>({onChange:(et,{value:tt})=>_e(changeLocale(tt))}),mergeProps$4=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$9,mapDispatch$6,mergeProps$4)(Footer$2);const{METAMASK,DAPPER,SAMSUNG,FORTMATIC,COINBASE,WALLET_CONNECT,WALLET_LINK,METAMASK_MOBILE}=LoginModal$2.LoginModalOptionType;function toModalOptionType(_e){switch(_e){case providerType$2.ProviderType.METAMASK_MOBILE:return METAMASK_MOBILE;case providerType$2.ProviderType.INJECTED:return isCucumberProvider()?SAMSUNG:isCoinbaseProvider()?COINBASE:isDapperProvider()?DAPPER:METAMASK;case providerType$2.ProviderType.FORTMATIC:return FORTMATIC;case providerType$2.ProviderType.WALLET_CONNECT:return WALLET_CONNECT;case providerType$2.ProviderType.WALLET_LINK:return WALLET_LINK;default:console.warn(`Invalid provider type ${_e}`);return}}function toProviderType(_e){switch(_e){case METAMASK_MOBILE:return providerType$2.ProviderType.WALLET_CONNECT;case METAMASK:case COINBASE:case DAPPER:case SAMSUNG:return providerType$2.ProviderType.INJECTED;case FORTMATIC:return providerType$2.ProviderType.FORTMATIC;case WALLET_CONNECT:return providerType$2.ProviderType.WALLET_CONNECT;case WALLET_LINK:return providerType$2.ProviderType.WALLET_LINK;default:throw new Error(`Invalid login type ${_e}`)}}class LoginModal extends reactExports.PureComponent{constructor(tt){super(tt);Qr(this,"handleOnConnect",tt=>{var ot;const nt=((ot=this.props.metadata)==null?void 0:ot.onConnect)??this.props.onConnect,at=toProviderType(tt);nt(at)});Qr(this,"getModalTranslations",()=>{if(this.props.hasTranslations)return{title:reactExports.createElement(T,{id:"@dapps.login.modal.title"}),subtitle:reactExports.createElement(T,{id:"@dapps.login.modal.subtitle"}),error:reactExports.createElement(T,{id:"@dapps.login.modal.error"})}});Qr(this,"getOptionTranslations",()=>{if(this.props.hasTranslations)return{browser_extension:reactExports.createElement(T,{id:"@dapps.login.option.browser_extension"}),email:reactExports.createElement(T,{id:"@dapps.login.option.email"}),mobile:reactExports.createElement(T,{id:"@dapps.login.option.mobile"}),mobile_and_browser:reactExports.createElement(T,{id:"@dapps.login.option.mobile_and_browser"}),metamask_mobile:reactExports.createElement(T,{id:"@dapps.login.option.metamask_mobile"})}});Qr(this,"renderLoginModalOption",tt=>{const nt=toModalOptionType(tt);return nt?reactExports.createElement(LoginModal$2.LoginModal.Option,{key:nt,type:nt,i18n:this.getOptionTranslations(),onClick:()=>this.handleOnConnect(nt)}):null});this.state={hasError:!1}}componentDidUpdate(tt){!tt.hasError&&this.props.hasError?this.setState({hasError:!0}):tt.hasError&&!this.props.hasError&&this.setState({hasError:!1})}render(){const{className:tt,isLoading:nt,onClose:at}=this.props,{hasError:ot}=this.state;return reactExports.createElement(LoginModal$2.LoginModal,{open:!0,className:tt,i18n:this.getModalTranslations(),message:reactExports.createElement(T,{id:"@dapps.login.modal.supported_wallets",values:{br:reactExports.createElement("br",null),trezor_link:reactExports.createElement("a",{href:"https://github.com/trezor/trezor-firmware/pull/1568",target:"_blank",rel:"noopener noreferrer"},t$3("@dapps.login.modal.trezor_link"))}}),loading:nt,hasError:ot,onClose:at},connection.getAvailableProviders().map(this.renderLoginModalOption))}}Qr(LoginModal,"defaultProps",{isLoading:!1});const mapState$8=_e=>({hasError:!!getError$1(_e),isLoading:isEnabling(_e)||isConnecting(_e),hasTranslations:isEnabled(_e)}),mapDispatch$5=_e=>({onConnect:et=>_e(enableWalletRequest(et))}),mergeProps$3=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$8,mapDispatch$5,mergeProps$3)(LoginModal);let Modal$1=class extends reactExports.PureComponent{constructor(){super(...arguments);Qr(this,"handleClose",()=>{const{name:tt,onCloseModal:nt}=this.props;nt(tt)})}render(){const{name:tt,onCloseModal:nt,...at}=this.props;return reactExports.createElement(Modal$6.Modal,{open:!0,className:tt,size:"small",onClose:this.handleClose,...at})}};const getModalActions=()=>({openModal:function(_e,et=null){return action(OPEN_MODAL,{name:_e,metadata:et})},closeModal:function(_e){return action(CLOSE_MODAL,{name:_e})},toggleModal:function(_e){return action(TOGGLE_MODAL,{name:_e})}}),{openModal,closeModal,toggleModal}=getModalActions(),OPEN_MODAL="Open modal",CLOSE_MODAL="Close modal",TOGGLE_MODAL="Toggle modal",mapState$7=_e=>({}),mapDispatch$4=_e=>({onCloseModal:et=>_e(closeModal(et))}),mergeProps$2=(_e,et,tt)=>({..._e,...et,...tt}),BaseModal=connect(mapState$7,mapDispatch$4,mergeProps$2)(Modal$1),Modal=BaseModal;Modal.Actions=Modal$6.Modal.Actions;Modal.Content=Modal$6.Modal.Content;Modal.Description=Modal$6.Modal.Description;Modal.Header=Modal$6.Modal.Header;const getState$2=_e=>_e.profile,getData$2=_e=>getState$2(_e).data,UnsupportedNetworkModal=({chainName:_e,expectedChainName:et,isSwitchingNetwork:tt,onSwitchNetwork:nt})=>React$L.createElement(Modal,{open:!0,size:"tiny"},React$L.createElement(ModalNavigation_2,{title:React$L.createElement(T,{id:"@dapps.navbar.wrong_network.header"})}),React$L.createElement(Modal.Content,null,_e?React$L.createElement(T,{id:"@dapps.navbar.wrong_network.message",values:{currentChainName:React$L.createElement("b",null,_e),expectedChainName:React$L.createElement("b",null,et)}}):React$L.createElement(T,{id:"@dapps.navbar.wrong_network.message_unknown_network",values:{expectedChainName:React$L.createElement("b",null,et)}})),React$L.createElement(Modal.Actions,null,React$L.createElement(Button$2.Button,{primary:!0,disabled:tt,loading:tt,onClick:nt},React$L.createElement(T,{id:"@dapps.navbar.wrong_network.switch_button",values:{chainName:React$L.createElement("b",null,et)}})))),NAVBAR_CLICK_EVENT="Click on Navbar",NOTIFICATIONS_QUERY_INTERVAL=6e4,DROPDOWN_MENU_ITEM_CLICK_EVENT="Unified Dropdown Menu Item Click",DROPDOWN_MENU_DISPLAY_EVENT="Unified Dropdown Menu Display",DROPDOWN_MENU_BALANCE_CLICK_EVENT="Unified Dropdown Menu Balance Click",DROPDOWN_MENU_SIGN_OUT_EVENT="Unified Dropdown Menu Sign Out",CHANGE_NETWORK="Change Network",NOTIFICATIONS_LIMIT=50;class NotificationsAPI extends BaseClient{constructor(et){const tt=dist$b.getEnv()===dist$b.Env.DEVELOPMENT?"https://notifications.decentraland.zone":"https://notifications.decentraland.org";super(tt,et)}async getNotifications(et=NOTIFICATIONS_LIMIT,tt){const nt=new URLSearchParams;et&&nt.append("limit",`${et}`),tt&&nt.append("from",`${tt}`);const{notifications:at}=await this.fetch(`/notifications${nt.toString().length?`?${nt.toString()}`:""}`,{metadata:{signer:"dcl:navbar",intent:"dcl:navbar:see-notifications"}});return at.map(parseNotification)}async markNotificationsAsRead(et){await this.fetch("/notifications/read",{method:"PUT",body:JSON.stringify({notificationIds:et}),metadata:{notificationIds:et,signer:"dcl:navbar",intent:"dcl:navbar:read-notifications"},headers:{"Content-Type":"application/json"}})}async getSubscription(){return this.fetch("/subscription",{metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async putSubscription(et){return this.fetch("/subscription",{method:"PUT",body:JSON.stringify(et),headers:{"Content-Type":"application/json"},metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async putEmail(et){return this.fetch("/set-email",{method:"PUT",body:JSON.stringify({email:et}),headers:{"Content-Type":"application/json"},metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async postEmailConfirmationCode(et){return this.fetch("/confirm-email",{method:"PUT",body:JSON.stringify(et),headers:{"Content-Type":"application/json"}})}}const ONBOARDING_KEY="dcl_notifications_onboarding",checkIsOnboarding=()=>{if(typeof window<"u"){const _e=localStorage.getItem(ONBOARDING_KEY);return _e?JSON.parse(_e):(localStorage.setItem(ONBOARDING_KEY,"true"),!0)}},setOnboardingDone=()=>{typeof window<"u"&&localStorage.setItem(ONBOARDING_KEY,"false")},parseNotification=_e=>({..._e,timestamp:Number(_e.timestamp)});var utilsExports=requireUtils();const Profile=function(_e){const{address:et,debounce:tt,inline:nt=!0}=_e,at=useSelector(getData$2),ot=useDispatch(),st=reactExports.useRef(),ct=reactExports.useMemo(()=>{const ht=at[et];return ht?ht.avatars[0]:null},[et,at]),dt=reactExports.useCallback(ht=>ot(loadProfileRequest(ht)),[et]);return reactExports.useEffect(()=>(ct||(tt?(st.current&&clearTimeout(st.current),st.current=window.setTimeout(()=>dt(et),tt)):dt(et)),()=>{st.current&&window.clearTimeout(st.current)}),[et]),React$L.createElement(Profile_2,{..._e,avatar:ct,inline:nt})},useNotifications=(_e,et)=>{const[{isLoading:tt,notifications:nt},at]=reactExports.useState({isLoading:!1,notifications:[]}),[{activeTab:ot,isOnboarding:st,isOpen:ct},dt]=reactExports.useState({activeTab:types$1.NotificationActiveTab.NEWEST,isOnboarding:checkIsOnboarding(),isOpen:!1}),ht=reactExports.useMemo(()=>_e?new NotificationsAPI({identity:_e}):null,[_e]),pt=()=>{setOnboardingDone(),dt($t=>({...$t,isOnboarding:!1}))},mt=async()=>{const $t=ct;if(dt(wt=>({...wt,isOpen:!wt.isOpen})),$t){const wt=nt.map(St=>St.read?St:{...St,read:!0});at({isLoading:tt,notifications:wt})}else{const wt=nt.filter(St=>!St.read).map(({id:St})=>St);wt.length&&await(ht==null?void 0:ht.markNotificationsAsRead(wt))}},yt=$t=>dt(wt=>({...wt,activeTab:$t})),gt=()=>{at({notifications:[],isLoading:!0}),ht==null||ht.getNotifications().then($t=>{at({isLoading:!1,notifications:$t.filter(wt=>utilsExports.CURRENT_AVAILABLE_NOTIFICATIONS.includes(wt.type))})})},bt=reactExports.useCallback($t=>React$L.createElement(Profile,{address:$t,as:"a",href:`${getBaseUrl()}/profile/accounts/${$t}`,style:{fontWeight:500,color:"white",textDecoration:"none"},target:"_blank"}),[]);return reactExports.useEffect(()=>{if(_e&&et){gt();const $t=setInterval(()=>{gt()},NOTIFICATIONS_QUERY_INTERVAL);return()=>{clearInterval($t)}}return()=>{}},[_e]),{notificationsClient:ht,notifications:nt,isLoading:tt,isModalOpen:ct,modalActiveTab:ot,isNotificationsOnboarding:st,handleOnBegin:pt,handleNotificationsOpen:mt,handleOnChangeModalTab:yt,handleRenderProfile:bt}},BASE_URL=getBaseUrl(),Navbar$3=({appChainId:_e,isSwitchingNetwork:et,withNotifications:tt,withChainSelector:nt,identity:at,docsUrl:ot="https://docs.decentraland.org",enablePartialSupportAlert:st=!0,walletError:ct,...dt})=>{const ht=chainIdExports.getChainName(_e),pt=getAnalytics(),{isModalOpen:mt,isNotificationsOnboarding:yt,modalActiveTab:gt,isLoading:bt,notifications:$t,handleNotificationsOpen:wt,handleOnBegin:St,handleOnChangeModalTab:Tt,handleRenderProfile:Pt}=useNotifications(at,tt||!1),Ot=reactExports.useCallback(()=>{dt.onSwitchNetwork(_e)},[]),[Nt,Lt]=reactExports.useState(void 0);reactExports.useEffect(()=>{ct&&Nt&&nt&&Lt(void 0)},[ct,Nt,nt]);const Bt=reactExports.useCallback(At=>{Lt(At),dt.onSwitchNetwork(At,dt.chainId),pt.track(CHANGE_NETWORK,{from_chain_id:dt.chainId,to_chain_id:At})},[pt]),Ut=reactExports.useCallback((At,xt)=>{At.preventDefault(),pt.track(DROPDOWN_MENU_BALANCE_CLICK_EVENT,{network:xt}),setTimeout(()=>{window.open(`${BASE_URL}/account`,"_blank","noopener")},300)},[pt]),Ft=reactExports.useCallback((At,xt)=>{pt.track(NAVBAR_CLICK_EVENT,xt)},[pt]),zt=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_ITEM_CLICK_EVENT,xt)},[pt]),It=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_DISPLAY_EVENT,{track_uuid:xt})},[pt]),vt=reactExports.useCallback(At=>{dt.onSignIn()},[pt]),Et=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_SIGN_OUT_EVENT,{track_uuid:xt}),setTimeout(()=>{dt.onSignOut()},300)},[pt]);return React$L.createElement(React$L.Fragment,null,React$L.createElement(ChainProvider,null,({chainId:At,isUnsupported:xt})=>React$L.createElement(React$L.Fragment,null,React$L.createElement(Navbar_1,{...dt,notifications:tt?{locale:dt.locale,isLoading:bt,isOnboarding:yt,isOpen:mt,items:$t,activeTab:gt,onClick:wt,onClose:wt,onBegin:St,onChangeTab:(Ct,Dt)=>Tt(Dt),renderProfile:Pt}:void 0,onClickBalance:Ut,onClickNavbarItem:Ft,onClickUserMenuItem:zt,onClickOpen:It,onClickSignIn:vt,onClickSignOut:Et,...nt&&{chains:getAvailableChains(),selectedChain:At??void 0,chainBeingConfirmed:Nt!==At?Nt:void 0,onSelectChain:Bt,i18nChainSelector:{title:t$3("@dapps.chain_selector.title"),connected:t$3("@dapps.chain_selector.connected"),confirmInWallet:getConnectedProviderType()===dist$5.ProviderType.INJECTED?t$3("@dapps.chain_selector.confirm_in_wallet"):t$3("@dapps.chain_selector.switching")}}}),xt?React$L.createElement(UnsupportedNetworkModal,{chainName:chainIdExports.getChainName(At),expectedChainName:ht,isSwitchingNetwork:et,onSwitchNetwork:Ot}):null)))},Navbar$4=React$L.memo(Navbar$3),mapState$6=_e=>{const et=getAddress$2(_e),tt=et?getData$2(_e)[et]:void 0;return{avatar:tt?tt.avatars[0]:void 0,chainId:getChainId(_e),manaBalances:getManaBalances(_e),address:getAddress$2(_e),locale:getLocale$1(_e),isSignedIn:isConnected(_e),isDisconnecting:isDisconnecting(_e),isSigningIn:isConnecting(_e),appChainId:getAppChainId(_e),isSwitchingNetwork:isSwitchingNetwork(_e),walletError:getError$1(_e)}},mapDispatch$3=_e=>({onSwitchNetwork:(et,tt)=>_e(switchNetworkRequest(et,tt)),onSignOut:()=>_e(disconnectWalletRequest())}),mergeProps$1=(_e,et,tt)=>({..._e,...et,...tt}),Navbar$2=connect(mapState$6,mapDispatch$3,mergeProps$1)(Navbar$4);class NetworkCheck extends React$L.PureComponent{constructor(){super(...arguments);Qr(this,"getChainId",()=>{const{network:tt}=this.props;try{return getChainIdByNetwork(tt)}catch{return null}})}render(){const{children:tt}=this.props;return React$L.createElement(ChainProvider,null,nt=>{const at=nt.isSupported||nt.chainId===this.getChainId();return React$L.createElement(Popup$4.Popup,{disabled:at,position:"top center",content:React$L.createElement(T,{id:"@dapps.button.network_not_supported",values:{expectedChainName:React$L.createElement("b",null,nt.appChainName)}}),trigger:tt(at)})})}}const disabledStyle={opacity:.5,cursor:"not-allowed",transform:"none"};class NetworkButton extends React$L.PureComponent{render(){const{network:et,onClick:tt,...nt}=this.props;return React$L.createElement(NetworkCheck,{network:et},at=>{const ot=at?{onClick:tt}:{style:disabledStyle};return React$L.createElement(Button$2.Button,{...nt,...ot})})}}class SignInPage extends reactExports.PureComponent{constructor(tt){super(tt);Qr(this,"getTranslations",()=>{const{hasTranslations:tt,isConnected:nt}=this.props;if(tt)return{header:reactExports.createElement(T,{id:"@dapps.sign_in.get_started"}),error:reactExports.createElement(T,{id:"@dapps.sign_in.error"}),connect:reactExports.createElement(T,{id:"@dapps.sign_in.connect"}),connecting:reactExports.createElement(T,{id:"@dapps.sign_in.connecting"}),connected:reactExports.createElement(T,{id:"@dapps.sign_in.connected"}),message:nt?reactExports.createElement(T,{id:"@dapps.sign_in.options.connected"}):isCucumberProvider()?reactExports.createElement(T,{id:"@dapps.sign_in.options.samsung",values:{samsung_link:reactExports.createElement("a",{href:"https://www.samsung.com/global/galaxy/apps/samsung-blockchain/",target:"_blank",rel:"noopener noreferrer"},"Samsung Blockchain Wallet")}}):isMobile()?reactExports.createElement(T,{id:"@dapps.sign_in.options.mobile",values:{metamask_link:reactExports.createElement("a",{href:"https://metamask.io",target:"_blank",rel:"noopener noreferrer"},"MetaMask"),coinbase_link:reactExports.createElement("a",{href:"https://wallet.coinbase.com",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet"),imtoken_link:reactExports.createElement("a",{href:"https://token.im",target:"_blank",rel:"noopener noreferrer"},"imToken")}}):reactExports.createElement(T,{id:"@dapps.sign_in.options.desktop",values:{metamask_link:reactExports.createElement("a",{href:"https://metamask.io",target:"_blank",rel:"noopener noreferrer"},"MetaMask"),ledger_nano_link:reactExports.createElement("a",{href:"https://www.ledger.com/",target:"_blank",rel:"noopener noreferrer"},"Ledger Nano S")}})}})}render(){const{center:tt,isConnected:nt,isConnecting:at,hasError:ot,onConnect:st}=this.props;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(SignIn_2,{center:tt,isConnected:nt,isConnecting:at,hasError:ot,onConnect:st,i18n:this.getTranslations()}))}}const mapState$5=_e=>{const et=getData$a(_e),tt=et?dist$c.localStorageGetIdentity(et==null?void 0:et.address):null;return{isConnecting:isConnecting(_e),isConnected:isConnected(_e)&&!!tt,hasError:!!getError$1(_e),hasTranslations:isEnabled(_e)}},mapDispatch$2=(_e,et)=>({onConnect:et.onConnect?et.onConnect:()=>_e(openModal("LoginModal",{onConnect:et.handleLoginConnect}))}),mergeProps=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$5,mapDispatch$2,mergeProps)(SignInPage);var Lm;let TransactionLink$1=(Lm=class extends reactExports.PureComponent{render(){const{address:et,txHash:tt}=this.props;if(!et&&!tt)return console.warn("Tried to render an TransactionLink without either an address or tx hash. Please supply one of those"),null;const{chainId:nt,className:at,target:ot,text:st,children:ct}=this.props,dt=getTransactionHref({address:et,txHash:tt},nt);return reactExports.createElement("a",{className:at,href:dt,target:ot},ct||st||dt)}},Qr(Lm,"defaultProps",{className:"etherscan-link",target:"_blank",text:""}),Lm);const mapState$4=(_e,et)=>({chainId:et.chainId||getChainId(_e)}),mapDispatch$1=_e=>({}),TransactionLink=connect(mapState$4,mapDispatch$1)(TransactionLink$1);var AuthorizationType;(function(_e){_e.ALLOWANCE="allowance",_e.APPROVAL="approval",_e.MINT="mint"})(AuthorizationType||(AuthorizationType={}));var AuthorizationAction;(function(_e){_e.GRANT="grant",_e.REVOKE="revoke"})(AuthorizationAction||(AuthorizationAction={}));var AuthorizationError;(function(_e){_e.REVOKE_FAILED="revoke-failed-error",_e.GRANT_FAILED="grant-failed-error",_e.INSUFFICIENT_ALLOWANCE="insufficient-allowance",_e.FETCH_AUTHORIZATIONS_FAILURE="fetch-authorizations-failure"})(AuthorizationError||(AuthorizationError={}));function hasAuthorization(_e,et){return _e.some(tt=>areEqual(tt,et))}function hasAuthorizationAndEnoughAllowance(_e,et,tt){const nt=_e.find(ct=>areEqual(ct,et));if(!nt)return!1;if(et.type!==AuthorizationType.ALLOWANCE)return!0;const{allowance:at}=nt;if(!at)return!1;const ot=parseEther(tt),st=parseEther(at);return ot.lte(st)}function areEqual(_e,et){return _e.type===et.type&&_e.authorizedAddress.toLowerCase()===et.authorizedAddress.toLowerCase()&&_e.contractAddress.toLowerCase()===et.contractAddress.toLowerCase()&&_e.chainId===et.chainId&&_e.address.toLowerCase()===et.address.toLowerCase()}const FETCH_AUTHORIZATIONS_REQUEST="[Request] Fetch Authorizations",fetchAuthorizationsRequest=_e=>action(FETCH_AUTHORIZATIONS_REQUEST,{authorizations:_e}),GRANT_TOKEN_REQUEST="[Request] Grant Token",REVOKE_TOKEN_REQUEST="[Request] Revoke Token",AUTHORIZATION_FLOW_REQUEST="[Request] Authorization Flow",authorizationFlowRequest=(_e,et,tt,nt)=>action(AUTHORIZATION_FLOW_REQUEST,{authorization:_e,authorizationAction:et,allowance:tt,traceId:nt}),getState$1=_e=>_e.authorization,getData$1=_e=>getState$1(_e).data,getLoading$1=_e=>getState$1(_e).loading,getError=_e=>getState$1(_e).error,getAuthorizationFlowError=_e=>getState$1(_e).authorizationFlowError;let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let _e=0;_e<256;++_e)byteToHex.push((_e+256).toString(16).slice(1));function unsafeStringify(_e,et=0){return byteToHex[_e[et+0]]+byteToHex[_e[et+1]]+byteToHex[_e[et+2]]+byteToHex[_e[et+3]]+"-"+byteToHex[_e[et+4]]+byteToHex[_e[et+5]]+"-"+byteToHex[_e[et+6]]+byteToHex[_e[et+7]]+"-"+byteToHex[_e[et+8]]+byteToHex[_e[et+9]]+"-"+byteToHex[_e[et+10]]+byteToHex[_e[et+11]]+byteToHex[_e[et+12]]+byteToHex[_e[et+13]]+byteToHex[_e[et+14]]+byteToHex[_e[et+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(_e,et,tt){if(native.randomUUID&&!et&&!_e)return native.randomUUID();_e=_e||{};const nt=_e.random||(_e.rng||rng)();if(nt[6]=nt[6]&15|64,nt[8]=nt[8]&63|128,et){tt=tt||0;for(let at=0;at<16;++at)et[tt+at]=nt[at];return et}return unsafeStringify(nt)}var AuthorizedAction;(function(_e){_e.BID="bid",_e.BUY="buy",_e.MINT="mint",_e.RENT="rent",_e.CLAIM_NAME="claim_name",_e.SWAP_MANA="swap_mana",_e.SELL="sell",_e.PUBLISH_COLLECTION="publish_collection"})(AuthorizedAction||(AuthorizedAction={}));var AuthorizationStepStatus;(function(_e){_e.LOADING_INFO="loading_info",_e.PENDING="pending",_e.WAITING="waiting",_e.PROCESSING="processing",_e.ALLOWANCE_AMOUNT_ERROR="allowance_amount_error",_e.ERROR="error",_e.DONE="done"})(AuthorizationStepStatus||(AuthorizationStepStatus={}));var AuthorizationStepAction;(function(_e){_e.REVOKE="revoke",_e.GRANT="grant",_e.CONFIRM="confirm"})(AuthorizationStepAction||(AuthorizationStepAction={}));const MAX_ERROR_LENGTH=150;function safeGet(_e,et){const nt=et.split(".").reduce((at,ot)=>{if(at!==void 0)return at[ot]},_e);return typeof nt!="string"?void 0:nt}function getTranslation(_e,et,tt){return t_cond(safeGet(_e,et),`@dapps.authorization_modal.${et}`,tt)}function getStepStatus(_e,et,tt,nt){const at=et===AuthorizationAction.REVOKE?REVOKE_TOKEN_REQUEST:GRANT_TOKEN_REQUEST;if(isLoadingType(getLoading$1(_e),at))return AuthorizationStepStatus.WAITING;if(getTransactions(_e,tt.address).filter(ht=>isPending(ht.status)&&getType({type:at})===getType({type:ht.actionType})&&areEqual(ht.payload.authorization,tt)).length)return AuthorizationStepStatus.PROCESSING;const st=getAuthorizationFlowError(_e);if(st===AuthorizationError.INSUFFICIENT_ALLOWANCE)return AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR;if(st||getError(_e))return AuthorizationStepStatus.ERROR;let ct=!1;const dt=getData$1(_e);return tt.type===AuthorizationType.ALLOWANCE?nt?ct=hasAuthorizationAndEnoughAllowance(dt,tt,nt.toString()):ct=!hasAuthorization(dt,tt):ct=hasAuthorization(dt,tt),ct?AuthorizationStepStatus.DONE:isLoadingType(getLoading$1(_e),AUTHORIZATION_FLOW_REQUEST)&&getLoading$1(_e).find(ht=>{var pt;return((pt=ht.payload)==null?void 0:pt.authorizationAction)===et})?AuthorizationStepStatus.LOADING_INFO:AuthorizationStepStatus.PENDING}function getStepError(_e,et,tt){if(_e)return et===AuthorizationStepAction.REVOKE?getTranslation(tt,"revoke_cap_error"):_e.length>MAX_ERROR_LENGTH?getTranslation(tt,"generic_error"):_e}function getStepMessage(_e,et,tt,nt,at,ot,st){if(_e>nt)return"";if(_e<nt)return getTranslation(st,"done");switch(et){case AuthorizationStepStatus.WAITING:return getTranslation(st,"waiting_wallet");case AuthorizationStepStatus.PROCESSING:return getTranslation(st,"waiting_confirmation");case AuthorizationStepStatus.ERROR:return React$L.createElement("div",{className:"authorization-error"},getStepError(tt,ot,st));case AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR:return React$L.createElement("div",{className:"authorization-error"},getTranslation(st,"spending_cap_error",{price:at}));case AuthorizationStepStatus.DONE:return getTranslation(st,"done");default:return}}function getPriceInMana(_e){if(!_e)return"";const et=Number.parseFloat(formatEther(_e));return(Math.ceil(et*100)/100).toString().replace(/\.0+$/,"")}function getSteps({authorization:_e,authorizationType:et,network:tt,requiredAllowance:nt,authorizedContractLabel:at,targetContractLabel:ot,currentAllowance:st,translationKeys:ct}){const dt=getPriceInMana(nt);if((!st||!st.isZero())&&et===AuthorizationType.ALLOWANCE&&tt===dist$5.Network.ETHEREUM)return[{title:getTranslation(ct,"revoke_cap.title"),description:getTranslation(ct,"revoke_cap.description",{price:dt}),actionType:AuthorizationStepAction.REVOKE},{title:getTranslation(ct,"set_cap.title"),description:getTranslation(ct,"set_cap.description",{price:dt}),actionType:AuthorizationStepAction.GRANT}];if(et===AuthorizationType.ALLOWANCE)return[{title:getTranslation(ct,"authorize_mana.title",{contract:()=>React$L.createElement(TransactionLink,{address:_e.authorizedAddress||"",chainId:_e.chainId,txHash:""},at||_e.authorizedAddress)}),description:getTranslation(ct,"authorize_mana.description",{price:dt}),actionType:AuthorizationStepAction.GRANT}];const ht=et===AuthorizationType.APPROVAL?"authorize_nft.title":"authorize_item.title";return[{title:getTranslation(ct,ht,{contract:()=>React$L.createElement(TransactionLink,{address:_e.authorizedAddress||"",chainId:_e.chainId,txHash:""},at||_e.authorizedAddress),targetContract:()=>React$L.createElement(TransactionLink,{address:_e.contractAddress||"",chainId:_e.chainId,txHash:""},ot||_e.contractAddress)}),actionType:AuthorizationStepAction.GRANT}]}const LOADING_STATUS=[AuthorizationStepStatus.LOADING_INFO,AuthorizationStepStatus.PROCESSING,AuthorizationStepStatus.WAITING];function AuthorizationModal({authorization:_e,requiredAllowance:et,currentAllowance:tt,action:nt,authorizationType:at,revokeStatus:ot,grantStatus:st,confirmationStatus:ct,error:dt,confirmationError:ht,network:pt,authorizedContractLabel:mt,targetContractLabel:yt,translationKeys:gt,onClose:bt,onRevoke:$t,onGrant:wt,onAuthorized:St,onFetchAuthorizations:Tt}){const Pt=getAnalytics(),[Ot]=reactExports.useState(v4()),[Nt,Lt]=reactExports.useState(0),[Bt,Ut]=reactExports.useState(),[Ft,zt]=reactExports.useState(!1),It=getPriceInMana(et);reactExports.useEffect(()=>{Pt.track("[Authorization Flow] Modal Opened",{action:nt,requiredAllowance:et,traceId:Ot})},[]),reactExports.useEffect(()=>{Tt()},[Tt]);const vt=reactExports.useCallback(()=>{$t(Ot),Pt.track("[Authorization Flow] Authorize Revoke Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.REVOKE)},[$t]),Et=reactExports.useCallback(()=>{wt(Ot),Pt.track("[Authorization Flow] Authorize Grant Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.GRANT)},[wt]),At=reactExports.useCallback(()=>{St(),Pt.track("[Authorization Flow] Confirm Transaction Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.CONFIRM)},[St]),xt=reactExports.useMemo(()=>[...getSteps({authorizationType:at,network:pt,requiredAllowance:et,currentAllowance:tt,authorization:_e,authorizedContractLabel:mt,translationKeys:gt,targetContractLabel:yt}),{title:getTranslation(gt,"confirm_transaction.title",{action:getTranslation(gt,"action")}),action:getTranslation(gt,"confirm_transaction.action"),status:ct,actionType:AuthorizationStepAction.CONFIRM,error:ht,onActionClick:At}].map(Dt=>Dt.actionType===AuthorizationStepAction.GRANT?Ft||st===AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR&&pt===dist$5.Network.ETHEREUM?{...Dt,error:getTranslation(gt,"insufficient_amount_error.message",{price:It}),action:"Revoke",status:ot,message:LOADING_STATUS.includes(ot)?void 0:React$L.createElement("div",{className:"authorization-error"},getTranslation(gt,"insufficient_amount_error.message",{price:It})),actionType:AuthorizationStepAction.REVOKE,testId:"reauthorize-step",onActionClick:vt}:{...Dt,action:st===AuthorizationStepStatus.DONE?void 0:getTranslation(gt,"set_cap.action"),error:dt,status:st,onActionClick:Et}:Dt.actionType===AuthorizationStepAction.REVOKE?{...Dt,action:ot===AuthorizationStepStatus.DONE?void 0:getTranslation(gt,"revoke_cap.action"),error:dt,status:ot,onActionClick:vt}:Dt).map((Dt,kt)=>({...Dt,isLoading:kt===Nt&&LOADING_STATUS.includes(Dt.status),message:"message"in Dt&&Dt.message?Dt.message:getStepMessage(kt,Dt.status,Dt.error,Nt,It,Dt.actionType,gt),testId:"testId"in Dt?Dt.testId:`${Dt.actionType}-step`})),[st,ot,at,et,tt,pt,nt,ct,ht,mt,yt,Ft,Nt,dt,Et,vt,At]);return reactExports.useEffect(()=>{const Ct=xt[Nt];Ct.status===AuthorizationStepStatus.DONE&&Ct.actionType===Bt&&(Ft?zt(!1):(Lt(Nt+1),Ut(void 0)))},[xt[Nt].status]),reactExports.useEffect(()=>{st===AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR&&pt===dist$5.Network.ETHEREUM&&zt(!0)},[st,pt,zt]),React$L.createElement(distExports$1.AuthorizationModal,{onClose:bt,currentStep:Nt,steps:xt,header:getTranslation(gt,"title",{action:getTranslation(gt,"title_action")})})}const mapState$3=(_e,et)=>{const{authorization:tt,requiredAllowance:nt,getConfirmationStatus:at,getConfirmationError:ot}=et;return{revokeStatus:getStepStatus(_e,AuthorizationAction.REVOKE,tt,void 0),grantStatus:getStepStatus(_e,AuthorizationAction.GRANT,tt,nt),confirmationStatus:at?at(_e):AuthorizationStepStatus.PENDING,confirmationError:ot?ot(_e):null,error:getAuthorizationFlowError(_e)||getError(_e)||""}},mapDispatch=(_e,et)=>({onRevoke:tt=>_e(authorizationFlowRequest(et.authorization,AuthorizationAction.REVOKE,"",tt)),onGrant:tt=>{var nt;return _e(authorizationFlowRequest(et.authorization,AuthorizationAction.GRANT,((nt=et.requiredAllowance)==null?void 0:nt.toString())||"",tt))},onFetchAuthorizations:()=>_e(fetchAuthorizationsRequest([et.authorization]))});connect(mapState$3,mapDispatch)(AuthorizationModal);var NFTCard$1={},NFTImage$3={},NFTImage$2={};const NFTImage$1="";var utils$1={};Object.defineProperty(utils$1,"__esModule",{value:!0});utils$1.getEstateCenter=void 0;var getEstateCenter=function(_e){var et=Array.from(new Set(_e.map(function(ot){return ot.x}).sort())),tt=Array.from(new Set(_e.map(function(ot){return ot.y}).sort())),nt=et[et.length/2|0],at=tt[tt.length/2|0];return[nt,at]};utils$1.getEstateCenter=getEstateCenter;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(_e,et,tt,nt){nt===void 0&&(nt=tt);var at=Object.getOwnPropertyDescriptor(et,tt);(!at||("get"in at?!et.__esModule:at.writable||at.configurable))&&(at={enumerable:!0,get:function(){return et[tt]}}),Object.defineProperty(_e,nt,at)}:function(_e,et,tt,nt){nt===void 0&&(nt=tt),_e[nt]=et[tt]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(_e,et){Object.defineProperty(_e,"default",{enumerable:!0,value:et})}:function(_e,et){_e.default=et}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var et={};if(_e!=null)for(var tt in _e)tt!=="default"&&Object.prototype.hasOwnProperty.call(_e,tt)&&__createBinding(et,_e,tt);return __setModuleDefault(et,_e),et},__importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(NFTImage$2,"__esModule",{value:!0});var react_1$1=__importStar(reactExports),classnames_1=__importDefault$2(classnamesExports$1),schemas_1$1=dist$a,Atlas_1=Atlas$2,utils_1=utils$1;function NFTImage(_e){var et=_e.nft,tt=_e.className;if(et.category===schemas_1$1.NFTCategory.WEARABLE||et.category===schemas_1$1.NFTCategory.EMOTE){var nt=et.category===schemas_1$1.NFTCategory.EMOTE?et.data.emote.rarity:et.data.wearable.rarity,at=schemas_1$1.Rarity.getGradient(nt),ot=at[0],st=at[1];return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image",tt),style:{backgroundImage:"radial-gradient(".concat(ot,", ").concat(st,")")}},react_1$1.default.createElement("img",{className:"dui-nft-image__image",src:et.image,alt:et.name}))}if(et.category===schemas_1$1.NFTCategory.ENS)return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--ens",tt)},react_1$1.default.createElement("span",{className:".dui-nft-image__subdomain"},et.data.ens.subdomain));if(et.category===schemas_1$1.NFTCategory.ESTATE){var ct=et.data.estate.parcels,dt=(0,react_1$1.useMemo)(function(){return(0,utils_1.getEstateCenter)(ct)},[ct]),ht=dt[0],pt=dt[1],mt=(0,react_1$1.useCallback)(function(St,Tt){return ct.some(function(Pt){var Ot=Pt.x,Nt=Pt.y;return St===Ot&&Nt===Tt})?{color:"#ff0044",scale:1.4}:null},[ct]),yt=(0,react_1$1.useCallback)(function(St,Tt){return ct.some(function(Pt){var Ot=Pt.x,Nt=Pt.y;return St===Ot&&Nt===Tt})?{color:"#ff9990",scale:1.2}:null},[ct]);return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--atlas",tt)},react_1$1.default.createElement(Atlas_1.Atlas,{className:tt,x:ht,y:pt,isDraggable:!1,layers:[mt,yt]}))}if(et.category===schemas_1$1.NFTCategory.PARCEL){var gt=Number(et.data.parcel.x),bt=Number(et.data.parcel.y),$t=(0,react_1$1.useCallback)(function(St,Tt){return gt===St&&bt===Tt?{color:"#ff0044",scale:1.4}:null},[gt,bt]),wt=(0,react_1$1.useCallback)(function(St,Tt){return gt===St&&bt===Tt?{color:"#ff9990",scale:1.2}:null},[gt,bt]);return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--atlas",tt)},react_1$1.default.createElement(Atlas_1.Atlas,{className:tt,x:gt,y:bt,isDraggable:!1,layers:[$t,wt]}))}return null}NFTImage$2.default=react_1$1.default.memo(NFTImage);var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(NFTImage$3,"__esModule",{value:!0});NFTImage$3.NFTImage=void 0;var NFTImage_1=__importDefault$1(NFTImage$2);NFTImage$3.NFTImage=NFTImage_1.default;var utils={},__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(_e,et,tt){if(tt||arguments.length===2)for(var nt=0,at=et.length,ot;nt<at;nt++)(ot||!(nt in et))&&(ot||(ot=Array.prototype.slice.call(et,0,nt)),ot[nt]=et[nt]);return _e.concat(ot||Array.prototype.slice.call(et))},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(utils,"__esModule",{value:!0});utils.getSubtitle=utils.getBadges=void 0;var react_1=__importDefault(reactExports),schemas_1=dist$a,colors_1=colors$1,Profile_1=Profile$3,DEFAULT_BADGE_COLOR="#37333d";function _getEmoteBadges(_e,et){var tt=schemas_1.Rarity.getGradient(_e.rarity),nt=tt[0],at=tt[1],ot=(0,colors_1.hex2rgb)(at);return __spreadArray([{color:"rgb(".concat(ot.r," ").concat(ot.g," ").concat(ot.b," / 20%)"),label:_e.rarity,textColor:nt},{color:DEFAULT_BADGE_COLOR,label:_e.loop?et.playMode.loop:et.playMode.once,icon:_e.loop?"dui-nft-card__badge-icon--loop":"dui-nft-card__badge-icon--once",hideLabel:!0}],_e.hasSound?[{color:DEFAULT_BADGE_COLOR,label:et.withSound,icon:"dui-nft-card__badge-icon--sound",hideLabel:!0}]:[],!0)}function _getWearableBadges(_e,et){var tt=_e.bodyShapes.length===2?"unisex":_e.bodyShapes[0]===schemas_1.BodyShape.MALE?"male":"female",nt=schemas_1.Rarity.getGradient(_e.rarity),at=nt[0],ot=nt[1],st=(0,colors_1.hex2rgb)(ot);return __spreadArray([{color:"rgb(".concat(st.r," ").concat(st.g," ").concat(st.b," / 20%)"),label:_e.rarity,textColor:at},{color:DEFAULT_BADGE_COLOR,label:et.category[_e.category],icon:"dui-nft-card__badge-icon--".concat(_e.category),hideLabel:!0},{color:DEFAULT_BADGE_COLOR,label:et.bodyShape[tt],icon:"dui-nft-card__badge-icon--".concat(tt),hideLabel:!0}],_e.isSmart?[{color:DEFAULT_BADGE_COLOR,label:et.smart,icon:"dui-nft-card__badge-icon--smart",hideLabel:!0}]:[],!0)}function _getEstateBadges(_e){return[{color:DEFAULT_BADGE_COLOR,label:"".concat(_e.parcels.length," LAND")}]}function _getParcelBadges(_e){return[{color:DEFAULT_BADGE_COLOR,label:"".concat(_e.x,",").concat(_e.y),icon:"dui-nft-card__badge-icon--parcel"}]}function getBadges(_e,et){switch(_e.category){case schemas_1.NFTCategory.EMOTE:return _getEmoteBadges(_e.data.emote,et);case schemas_1.NFTCategory.WEARABLE:return _getWearableBadges(_e.data.wearable,et);case schemas_1.NFTCategory.ESTATE:return _getEstateBadges(_e.data.estate);case schemas_1.NFTCategory.PARCEL:return _getParcelBadges(_e.data.parcel);case schemas_1.NFTCategory.ENS:return[]}}utils.getBadges=getBadges;function getSubtitle(_e,et){switch(_e.category){case schemas_1.NFTCategory.EMOTE:case schemas_1.NFTCategory.WEARABLE:return react_1.default.createElement(Profile_1.Profile,{address:_e.owner,textOnly:!0});case schemas_1.NFTCategory.ENS:case schemas_1.NFTCategory.ESTATE:case schemas_1.NFTCategory.PARCEL:return et.network["".concat(_e.network.toLowerCase())]}}utils.getSubtitle=getSubtitle;const NFTCard="";(function(_e){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(wt){for(var St,Tt=1,Pt=arguments.length;Tt<Pt;Tt++){St=arguments[Tt];for(var Ot in St)Object.prototype.hasOwnProperty.call(St,Ot)&&(wt[Ot]=St[Ot])}return wt},et.apply(this,arguments)},tt=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(wt,St,Tt,Pt){Pt===void 0&&(Pt=Tt);var Ot=Object.getOwnPropertyDescriptor(St,Tt);(!Ot||("get"in Ot?!St.__esModule:Ot.writable||Ot.configurable))&&(Ot={enumerable:!0,get:function(){return St[Tt]}}),Object.defineProperty(wt,Pt,Ot)}:function(wt,St,Tt,Pt){Pt===void 0&&(Pt=Tt),wt[Pt]=St[Tt]}),nt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(wt,St){Object.defineProperty(wt,"default",{enumerable:!0,value:St})}:function(wt,St){wt.default=St}),at=commonjsGlobal&&commonjsGlobal.__importStar||function(wt){if(wt&&wt.__esModule)return wt;var St={};if(wt!=null)for(var Tt in wt)Tt!=="default"&&Object.prototype.hasOwnProperty.call(wt,Tt)&&tt(St,wt,Tt);return nt(St,wt),St},ot=commonjsGlobal&&commonjsGlobal.__rest||function(wt,St){var Tt={};for(var Pt in wt)Object.prototype.hasOwnProperty.call(wt,Pt)&&St.indexOf(Pt)<0&&(Tt[Pt]=wt[Pt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,Pt=Object.getOwnPropertySymbols(wt);Ot<Pt.length;Ot++)St.indexOf(Pt[Ot])<0&&Object.prototype.propertyIsEnumerable.call(wt,Pt[Ot])&&(Tt[Pt[Ot]]=wt[Pt[Ot]]);return Tt},st=commonjsGlobal&&commonjsGlobal.__importDefault||function(wt){return wt&&wt.__esModule?wt:{default:wt}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFTCard=void 0;var ct=at(reactExports),dt=st(classnamesExports$1),ht=Card$2,pt=Popup$4,mt=Mana$2,yt=NFTImage$3,gt=utils,bt=function(wt){var St,Tt,Pt=wt.badge;return Pt.icon&&Pt.hideLabel?ct.default.createElement(pt.Popup,{key:Pt.label,content:Pt.label,trigger:ct.default.createElement("span",{className:"dui-nft-card__badge--only-icon",style:{background:Pt.color,color:(St=Pt.textColor)!==null&&St!==void 0?St:"var(--text)"}},ct.default.createElement("i",{className:(0,dt.default)("dui-nft-card__badge-icon",Pt.icon),"aria-label":Pt.label}))}):ct.default.createElement("span",{className:"dui-nft-card__badge",style:{background:Pt.color,color:(Tt=Pt.textColor)!==null&&Tt!==void 0?Tt:"var(--text)"},key:Pt.label},Pt.icon&&ct.default.createElement("i",{className:(0,dt.default)("dui-nft-card__badge-icon",Pt.icon)}),Pt.label)},$t=function(wt){var St=wt.nft,Tt=wt.i18n,Pt=wt.header,Ot=wt.subtitle,Nt=wt.badges,Lt=wt.price,Bt=wt.className,Ut=ot(wt,["nft","i18n","header","subtitle","badges","price","className"]),Ft=(0,ct.useCallback)(function(){return!Pt||typeof Pt=="string"?ct.default.createElement("div",{className:"dui-nft-card__header"},ct.default.createElement("span",{className:"dui-nft-card__title"},Pt||St.name),Lt&&ct.default.createElement(mt.Mana,{network:St.network,inline:!0,className:"dui-nft-card__price"},Lt)):Pt},[Pt]),zt=(0,ct.useCallback)(function(){return!Ot||typeof Ot=="string"?ct.default.createElement("span",{className:"dui-nft-card__subtitle"},Ot||(0,gt.getSubtitle)(St,Tt)):Ot},[Ot]),It=(0,ct.useCallback)(function(){if(Nt)return Nt;var vt=(0,gt.getBadges)(St,Tt);return vt?ct.default.createElement("div",{className:"dui-nft-card__badges"},vt.map(function(Et){return ct.default.createElement(bt,{key:Et.label,badge:Et})})):null},[]);return ct.default.createElement(ht.Card,et({className:(0,dt.default)(Bt,"dui-nft-card"),link:!0,id:St.id},Ut),ct.default.createElement(yt.NFTImage,{nft:St,className:"dui-nft-card__image"}),ct.default.createElement(ht.Card.Content,{className:"dui-nft-card__information"},Ft(),zt(),It()))};_e.NFTCard=$t,_e.NFTCard.defaultProps={i18n:{network:{ethereum:"Ethereum",matic:"Matic"},bodyShape:{male:"Male",female:"Female",unisex:"Unisex"},playMode:{loop:"Loop",once:"Once"},category:{body_shape:"Body Shape",earring:"Earring",eyebrows:"Eyebrows",eyes:"Eyes",eyewear:"Eyewear",facial_hair:"Facial Hair",feet:"Feet",head:"Head",hair:"Hair",hat:"Hat",helmet:"Helmet",lower_body:"Lower Body",mask:"Mask",mouth:"Mouth",tiara:"Tiara",top_head:"Top Head",upper_body:"Upper Body",skin:"Skin",hands_wear:"Handwear"},withSound:"With sound",smart:"Smart"}}})(NFTCard$1);const RarityBadge=_e=>{const et={rarities:{[dist$5.Rarity.COMMON]:t$3("@dapps.rarities.common"),[dist$5.Rarity.UNCOMMON]:t$3("@dapps.rarities.uncommon"),[dist$5.Rarity.EXOTIC]:t$3("@dapps.rarities.exotic"),[dist$5.Rarity.RARE]:t$3("@dapps.rarities.rare"),[dist$5.Rarity.EPIC]:t$3("@dapps.rarities.epic"),[dist$5.Rarity.LEGENDARY]:t$3("@dapps.rarities.legendary"),[dist$5.Rarity.MYTHIC]:t$3("@dapps.rarities.mythic"),[dist$5.Rarity.UNIQUE]:t$3("@dapps.rarities.unique")},rarities_description:{[dist$5.Rarity.COMMON]:t$3("@dapps.rarities_description.common"),[dist$5.Rarity.UNCOMMON]:t$3("@dapps.rarities_description.uncommon"),[dist$5.Rarity.EXOTIC]:t$3("@dapps.rarities_description.exotic"),[dist$5.Rarity.RARE]:t$3("@dapps.rarities_description.rare"),[dist$5.Rarity.EPIC]:t$3("@dapps.rarities_description.epic"),[dist$5.Rarity.LEGENDARY]:t$3("@dapps.rarities_description.legendary"),[dist$5.Rarity.MYTHIC]:t$3("@dapps.rarities_description.mythic"),[dist$5.Rarity.UNIQUE]:t$3("@dapps.rarities_description.unique")}};return React$L.createElement(RarityBadge$4.RarityBadge,{..._e,i18n:et})};React$L.memo(RarityBadge);const Navbar$1="",AUTH_URL=config.get("AUTH_URL");function Navbar(_e){const et=reactExports.useCallback(()=>{window.location.replace(`${AUTH_URL}?redirectTo=${window.location.href}`)},[]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Navbar$2,{..._e,onSignIn:et,withNotifications:!1})})}function isValid$3(_e){return Date.now()<+new Date(_e.expiration)}const getState=_e=>_e.identity,getData=_e=>getState(_e).data,getLoading=_e=>getState(_e).loading;createSelector([getLoading],_e=>isLoadingType(_e,loginRequest.type));const getCurrentIdentity=createSelector([getAddress$2,getData],(_e,et)=>{if(_e){const tt=et[_e];if(et[_e]&&isValid$3(tt))return tt}return null});createSelector([getCurrentIdentity],_e=>!!_e);const mapState$2=_e=>{const et=getAddress$2(_e);return{hasActivity:et?getPendingTransactions(_e,et).length>0:!1,isConnected:isConnected(_e),identity:getCurrentIdentity(_e)||void 0}},Header=connect(mapState$2)(Navbar),Dashboard$2="",Bar$1="";function Bar(_e){const{vested:et,released:tt}=_e;return jsxRuntimeExports.jsxs("div",{className:"bar__container",children:[jsxRuntimeExports.jsx("div",{className:"bar vested",style:{width:`${et}%`}}),jsxRuntimeExports.jsx("div",{className:"bar released",style:{width:`${tt}%`}})]})}const InfoSVG="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/info-0fd81e87.svg";function Info(_e){const{message:et,position:tt}=_e;return jsxRuntimeExports.jsx("span",{className:"info",style:{padding:"5px"},children:jsxRuntimeExports.jsx(distExports$1.Popup,{content:et,position:tt,trigger:jsxRuntimeExports.jsx("img",{src:InfoSVG,alt:""}),on:"hover",style:{height:"100%"},basic:!0})})}const Progress$1="";function Progress(_e){const{contract:et}=_e,{revoked:tt}=et,nt=Math.round(et.vestedAmount/et.total*100),at=Math.round(et.released/et.total*100);return jsxRuntimeExports.jsxs("div",{id:"progress",children:[jsxRuntimeExports.jsxs(Grid$2,{children:[jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"left",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[t$3(tt?"chart.vested":"progress.vested"),jsxRuntimeExports.jsx(Info,{message:t$3("helper.vesting_so_far"),position:"right center"})]}),jsxRuntimeExports.jsxs("div",{className:"amount",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{style:{display:"inline-block"},children:[formatNumber(Math.round(et.vestedAmount),0)," ",et.symbol]}),jsxRuntimeExports.jsxs("span",{className:"percentage vested",children:[nt,"%"]})]})]}),jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"right",textAlign:"right",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[jsxRuntimeExports.jsx(Info,{message:t$3("helper.total_vesting"),position:"left center"}),t$3("progress.total")]}),jsxRuntimeExports.jsxs(distExports$1.Header,{style:{display:"inline-block"},children:[formatNumber(Math.round(et.total),0)," ",et.symbol]})]})]}),jsxRuntimeExports.jsx(Bar,{vested:nt,released:at}),jsxRuntimeExports.jsxs("div",{children:[t$3("progress.released",{b:ot=>jsxRuntimeExports.jsx("b",{children:ot}),amount:formatNumber(Math.round(et.released),0),token:et.symbol}),jsxRuntimeExports.jsxs("span",{className:"percentage released",children:[at,"%"]})]})]})}//! moment.js
327
+ `)));return{entity:ht,entityFile:ct}}DeploymentBuilder.buildEntityAndFile=buildEntityAndFile;async function buildEntity({type:_e,pointers:et,files:tt,metadata:nt,timestamp:at}){const ot=Array.from(tt||[]).map(([ht,pt])=>({key:ht,content:pt})),st=await Promise.all(ot.map(async({key:ht,content:pt})=>({key:ht,content:pt,hash:await(0,hashing_1.hashV1)(pt)}))),ct=new Map(st.map(({hash:ht,key:pt})=>[pt,ht])),dt=new Map(st.map(({hash:ht,content:pt})=>[ht,pt]));return buildEntityInternal(_e,et,{hashesByKey:ct,filesByHash:dt,metadata:nt,timestamp:at})}DeploymentBuilder.buildEntity=buildEntity;async function buildEntityWithoutNewFiles(_e,{contentUrl:et,type:tt,pointers:nt,hashesByKey:at,metadata:ot,timestamp:st}){const ct=at??ot?getHashesByKey(ot):void 0;if(ct&&isObsoleteProfile(tt,ct)){const dt=await downloadAllFiles(_e,et,ct),ht=await updateMetadata(dt,ot);return buildEntity({type:tt,pointers:nt,files:dt,metadata:ht,timestamp:st})}return buildEntityInternal(tt,nt,{hashesByKey:at,metadata:ot,timestamp:st})}buildEntityWithoutNewFiles_1=DeploymentBuilder.buildEntityWithoutNewFiles=buildEntityWithoutNewFiles;async function buildEntityInternal(_e,et,tt){if(et.length===0)throw new Error("All entities must have at least one pointer.");const nt=tt!=null&&tt.hashesByKey?tt==null?void 0:tt.hashesByKey:new Map,at=Array.from(nt.entries()).map(([ht,pt])=>({file:ht,hash:pt})),ot=tt!=null&&tt.timestamp?tt==null?void 0:tt.timestamp:Date.now(),{entity:st,entityFile:ct}=await buildEntityAndFile({type:_e,pointers:et,timestamp:ot,content:at,metadata:tt==null?void 0:tt.metadata}),dt=tt!=null&&tt.filesByHash?tt.filesByHash:new Map;return dt.set(st.id,ct),{files:dt,entityId:st.id}}function isObsoleteProfile(_e,et){return _e===schemas_1$2.EntityType.PROFILE&&Array.from(et).some(([,tt])=>tt.toLowerCase().startsWith("qm"))}async function fetchArrayBuffer(_e,et){const nt=await(await _e.fetch(et)).arrayBuffer();return new Uint8Array(nt)}async function downloadAllFiles(_e,et,tt){const nt=tt.get("body.png"),at=tt.get("face256.png"),ot=new URL(`${et}/contents/${nt}`).toString(),st=new URL(`${et}/contents/${at}`).toString(),[ct,dt]=await Promise.all([fetchArrayBuffer(_e,ot),fetchArrayBuffer(_e,st)]);return new Map([["body.png",ct],["face256.png",dt]])}async function updateMetadata(_e,et){return et&&(et.avatars=await Promise.all(et.avatars.map(async tt=>{const nt={face256:"",body:""},at=_e.get("face256.png");at&&(nt.face256=await(0,hashing_1.hashV1)(at));const ot=_e.get("body.png");return ot&&(nt.body=await(0,hashing_1.hashV1)(ot)),tt.avatar.snapshots=nt,tt})),et)}function getHashesByKey(_e){const et=_e.avatars[0];return new Map([["body.png",et.avatar.snapshots.body],["face256.png",et.avatar.snapshots.face256]])}var LambdasClient={},lambdasClient={},fetcher={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.useCustomClient=void 0;const et=({url:tt,method:nt,params:at,data:ot,headers:st})=>{const ct=tt.substring(9);return async function(dt,ht){return(await ht.fetch(`${dt}/${ct}`+new URLSearchParams(at),{method:nt,headers:st,...ot?{body:JSON.stringify(ot)}:{}})).json()}};_e.useCustomClient=et,_e.default=_e.useCustomClient})(fetcher);Object.defineProperty(lambdasClient,"__esModule",{value:!0});lambdasClient.getThirdPartyIntegrations=lambdasClient.getOutfits=lambdasClient.getAvatarDetails=lambdasClient.getAvatarsDetailsByPost=lambdasClient.getRealms=lambdasClient.getHotScenes=lambdasClient.validateSignature=lambdasClient.getDenylistedUserNames=lambdasClient.getPois=lambdasClient.getCatalystServers=lambdasClient.searchWearables=lambdasClient.getThirdPartyCollection=lambdasClient.getThirdPartyWearables=lambdasClient.getLands=lambdasClient.getNames=lambdasClient.getEmotes=lambdasClient.getWearables=lambdasClient.getStandardErc721=lambdasClient.getImage=lambdasClient.getThumbnail=lambdasClient.getCollections=lambdasClient.getLambdaStatus=void 0;const fetcher_1=fetcher,getLambdaStatus=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/status",method:"get"});lambdasClient.getLambdaStatus=getLambdaStatus;const getCollections=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/collections",method:"get"});lambdasClient.getCollections=getCollections;const getThumbnail=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/contents/${_e}/thumbnail`,method:"get",responseType:"blob"});lambdasClient.getThumbnail=getThumbnail;const getImage=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/contents/${_e}/image`,method:"get",responseType:"blob"});lambdasClient.getImage=getImage;const getStandardErc721=(_e,et,tt,nt)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/collections/standard/erc721/${_e}/${et}/${tt}/${nt}`,method:"get"});lambdasClient.getStandardErc721=getStandardErc721;const getWearables=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/wearables`,method:"get",params:et});lambdasClient.getWearables=getWearables;const getEmotes=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/emotes`,method:"get",params:et});lambdasClient.getEmotes=getEmotes;const getNames=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/names`,method:"get",params:et});lambdasClient.getNames=getNames;const getLands=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/lands`,method:"get",params:et});lambdasClient.getLands=getLands;const getThirdPartyWearables=(_e,et)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/third-party-wearables`,method:"get",params:et});lambdasClient.getThirdPartyWearables=getThirdPartyWearables;const getThirdPartyCollection=(_e,et,tt)=>(0,fetcher_1.useCustomClient)({url:`/lambdas/users/${_e}/third-party-wearables/${et}`,method:"get",params:tt});lambdasClient.getThirdPartyCollection=getThirdPartyCollection;const searchWearables=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/collections/wearables",method:"get",params:_e});lambdasClient.searchWearables=searchWearables;const getCatalystServers=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/servers",method:"get"});lambdasClient.getCatalystServers=getCatalystServers;const getPois=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/pois",method:"get"});lambdasClient.getPois=getPois;const getDenylistedUserNames=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/contracts/denylisted-names",method:"get"});lambdasClient.getDenylistedUserNames=getDenylistedUserNames;const validateSignature=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/crypto/validate-signature",method:"post",headers:{"Content-Type":"application/json; charset=utf-8"},data:_e});lambdasClient.validateSignature=validateSignature;const getHotScenes=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/explore/hot-scenes",method:"get"});lambdasClient.getHotScenes=getHotScenes;const getRealms=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/explore/realms",method:"get"});lambdasClient.getRealms=getRealms;const getAvatarsDetailsByPost=_e=>(0,fetcher_1.useCustomClient)({url:"/lambdas/profiles",method:"post",headers:{"Content-Type":"application/json; charset=utf-8"},data:_e});lambdasClient.getAvatarsDetailsByPost=getAvatarsDetailsByPost;const getAvatarDetails=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/profiles/${_e}`,method:"get"});lambdasClient.getAvatarDetails=getAvatarDetails;const getOutfits=_e=>(0,fetcher_1.useCustomClient)({url:`/lambdas/outfits/${_e}`,method:"get"});lambdasClient.getOutfits=getOutfits;const getThirdPartyIntegrations=()=>(0,fetcher_1.useCustomClient)({url:"/lambdas/third-party-integrations",method:"get"});lambdasClient.getThirdPartyIntegrations=getThirdPartyIntegrations;var __createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(_e,et,tt,nt){nt===void 0&&(nt=tt);var at=Object.getOwnPropertyDescriptor(et,tt);(!at||("get"in at?!et.__esModule:at.writable||at.configurable))&&(at={enumerable:!0,get:function(){return et[tt]}}),Object.defineProperty(_e,nt,at)}:function(_e,et,tt,nt){nt===void 0&&(nt=tt),_e[nt]=et[tt]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(_e,et){Object.defineProperty(_e,"default",{enumerable:!0,value:et})}:function(_e,et){_e.default=et}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var et={};if(_e!=null)for(var tt in _e)tt!=="default"&&Object.prototype.hasOwnProperty.call(_e,tt)&&__createBinding$1(et,_e,tt);return __setModuleDefault$1(et,_e),et};Object.defineProperty(LambdasClient,"__esModule",{value:!0});var createLambdasClient_1=LambdasClient.createLambdasClient=void 0;const Helper_1=Helper,client=__importStar$1(lambdasClient);function createLambdasClient(_e){const et=(0,Helper_1.sanitizeUrl)(_e.url);function tt(nt){return(...at)=>nt(...at)(et,_e.fetcher)}return{getLambdaStatus:tt(client.getLambdaStatus),getCollections:tt(client.getCollections),getThumbnail:tt(client.getThumbnail),getImage:tt(client.getImage),getStandardErc721:tt(client.getStandardErc721),getWearables:tt(client.getWearables),getEmotes:tt(client.getEmotes),getNames:tt(client.getNames),getLands:tt(client.getLands),getThirdPartyWearables:tt(client.getThirdPartyWearables),getThirdPartyCollection:tt(client.getThirdPartyCollection),getHotScenes:tt(client.getHotScenes),getRealms:tt(client.getRealms),getAvatarsDetailsByPost:tt(client.getAvatarsDetailsByPost),getAvatarDetails:tt(client.getAvatarDetails),getThirdPartyIntegrations:tt(client.getThirdPartyIntegrations)}}createLambdasClient_1=LambdasClient.createLambdasClient=createLambdasClient;class PeerAPI extends BaseAPI{constructor(tt){super(tt);Qr(this,"cache",{});Qr(this,"lambdasClient");this.lambdasClient=createLambdasClient_1({url:`${tt}/lambdas`,fetcher:dist$3.createFetchComponent()})}async fetchProfile(tt,nt={useCache:!0}){return nt.useCache&&tt in this.cache?this.cache[tt]:(this.cache[tt]=this.lambdasClient.getAvatarsDetailsByPost({ids:[tt.toLowerCase()]}).then(at=>at[0]),this.cache[tt])}async fetchProfiles(tt){return tt.length===0?[]:this.lambdasClient.getAvatarsDetailsByPost({ids:tt.map(nt=>nt.toLowerCase())})}async getDefaultProfileEntity(){return(await this.request("GET","/content/entities/profile?pointer=default"+Math.floor(Math.random()*128+1)))[0]}}class EntitiesOperator{constructor(et,tt){Qr(this,"peerUrl");Qr(this,"peerWithNoGbCollectorUrl");Qr(this,"catalystContentClient");Qr(this,"catalystContentClientWithoutGbCollector");Qr(this,"peerAPI");this.peerUrl=et,this.peerWithNoGbCollectorUrl=tt,this.catalystContentClient=createContentClient_1({url:`${et}/content`,fetcher:dist$3.createFetchComponent()}),this.catalystContentClientWithoutGbCollector=tt?createContentClient_1({url:`${et}/content`,fetcher:dist$3.createFetchComponent()}):null,this.peerAPI=new PeerAPI(et)}async getProfileEntity(et){const tt=await this.catalystContentClient.fetchEntitiesByPointers([et.toLowerCase()]);return tt.length>0?tt[0]:this.peerAPI.getDefaultProfileEntity()}async deployEntityWithoutNewFiles(et,tt,nt,at,ot){const st={type:nt,pointers:[at],metadata:et,hashesByKey:tt,timestamp:Date.now()},ct=this.catalystContentClientWithoutGbCollector??this.catalystContentClient,dt=this.peerWithNoGbCollectorUrl??this.peerUrl,ht=await buildEntityWithoutNewFiles_1(dist$3.createFetchComponent(),{contentUrl:`${dt}/content`,...st}),pt=dist$e.Authenticator.signPayload(ot,ht.entityId);return ct.deploy({...ht,authChain:pt})}}function isErrorWithMessage(_e){return _e!=null&&typeof _e=="object"&&"message"in _e}const provider=window.ethereum,SWITCH_NETWORK_TIMEOUT=1e4;let cucumberProviderSend;if(isCucumberProvider()){const _e=provider.send;cucumberProviderSend=(...et)=>{try{return Promise.resolve(_e.apply(provider,et)).then(tt=>(tt==null?void 0:tt.result)||[])}catch(tt){return Promise.reject(tt)}}}async function getAccount(_e){isCucumberProvider()&&await cucumberProviderSend("eth_requestAccounts");const{account:et}=await connection.connect(_e===providerType$2.ProviderType.WALLET_CONNECT?providerType$2.ProviderType.WALLET_CONNECT_V2:_e,_getAppChainId());return et}let POLL_INTERVAL=5*60*1e3,polling=!1;function*walletSaga(){yield fork(initializeAppChainId),yield all([takeEvery$1(CONNECT_WALLET_REQUEST,handleConnectWalletRequest),takeEvery$1(ENABLE_WALLET_REQUEST,handleEnableWalletRequest),takeEvery$1(ENABLE_WALLET_SUCCESS,handleEnableWalletSuccess),takeEvery$1(FETCH_WALLET_REQUEST,handleFetchWalletRequest),takeEvery$1(DISCONNECT_WALLET_REQUEST,handleDisconnectWalletRequest),takeEvery$1(CONNECT_WALLET_SUCCESS,handleConnectWalletSuccess$1),takeEvery$1(SWITCH_NETWORK_REQUEST,handleSwitchNetworkRequest),takeEvery$1(SWITCH_NETWORK_SUCCESS,handleSwitchNetworkSuccess)])}function*initializeAppChainId(){yield put(setAppChainId(_getAppChainId()))}function*handleConnectWalletRequest(){try{yield put(fetchWalletRequest());const{success:_e,failure:et}=yield race({success:take(FETCH_WALLET_SUCCESS),failure:take(FETCH_WALLET_FAILURE)});if(_e)yield put(connectWalletSuccess(_e.payload.wallet));else throw new Error(et.payload.error)}catch(_e){yield put(connectWalletFailure(_e.message))}}function*handleEnableWalletRequest(_e){const{providerType:et}=_e.payload;try{if(!(yield call$6(getAccount,et)))throw new Error("Enable did not return any accounts");yield put(enableWalletSuccess(et))}catch(tt){yield put(enableWalletFailure(tt.message))}}function*handleEnableWalletSuccess(_e){yield put(connectWalletRequest())}function*handleDisconnectWalletRequest(_e){try{yield call$6([connection,"disconnect"]),yield put(disconnectWalletSuccess())}catch(et){yield put(disconnectWalletFailure(isErrorWithMessage(et)?et.message:"Error disconnecting wallet"))}polling=!1}function*handleFetchWalletRequest(_e){try{const et=yield select(getAppChainId),tt=yield call$6(buildWallet,et);yield put(fetchWalletSuccess(tt))}catch(et){yield put(fetchWalletFailure(et.message))}}function*handleConnectWalletSuccess$1(){if(!polling&&POLL_INTERVAL>0)for(polling=!0;polling;)yield delay(POLL_INTERVAL),(yield select(isConnected))&&(yield put(fetchWalletRequest()))}function*handleSwitchNetworkRequest(_e){const{chainId:et}=_e.payload,tt=yield call$6(getConnectedProvider);if(!tt)yield put(switchNetworkFailure(et,"Error switching network: Could not get provider"));else try{const{timeout:nt}=yield race({switched:call$6(switchProviderChainId,tt,et),timeout:delay(SWITCH_NETWORK_TIMEOUT)});if(nt)throw yield put(showToast(getSwitchChainErrorToast(et))),new Error("Error switching network: Operation timed out");yield put(switchNetworkSuccess(et))}catch(nt){yield put(switchNetworkFailure(et,nt.message))}}function*handleSwitchNetworkSuccess(_e){yield put(fetchWalletRequest())}function createWalletSaga(_e){if(isValidChainId(_e.CHAIN_ID))_setAppChainId(Number(_e.CHAIN_ID));else throw new Error(`Invalid Chain id ${_e.CHAIN_ID}. Valid options are ${Object.values(chainIdExports.ChainId)}`);return _e.MANA_ADDRESS&&console.warn("Deprecated notice: the MANA_ADDRESS option on `createWalletSaga` has been deprecated and will be removed in future version."),_e.POLL_INTERVAL&&(POLL_INTERVAL=_e.POLL_INTERVAL),_e.TRANSACTIONS_API_URL?setTransactionsApiUrl(_e.TRANSACTIONS_API_URL):console.warn(`"TRANSACTIONS_API_URL" not provided on createWalletSaga, using default value "${getTransactionsApiUrl()}".`),walletSaga}const en={"global.title":"Decentraland's {token} Vesting Contract","global.copied":"Copied!","global.amount.months":"{amount} {amount, plural, one {month} other {months}}","global.amount.days":"{amount} {amount, plural, one {day} other {days}}","global.yes":"Yes","global.no":"No","error.dao_proposal_url":"DAO Proposal URL not found","helper.total_vesting":"Total amount of the project nominated in the currency/token the project was issued. This is the total budget the projects beneficiaries will have to execute their project.","helper.vesting_so_far":"The amount of money that is available to be used by the project beneficiaries. Since the total amount of the project will be.","helper.releasable":"The amount of funds that can be transferred from the project's smart contract to the beneficiary address but have not yet been transferred.","helper.released":"The amount of funds that have been transferred from the project's smart contract to the beneficiary address.","helper.beneficiary":"The authorized address to which the project's smart contract will transfer the funds.","helper.cliff_period":"The period between the start of the project and when the first funds become vested. This is a secure period where project owners will start making progress without receiving funds immediately. It also provides the DAO and the Revocations Committee with an opportunity to revoke a project without jeopardizing DAO funds.","helper.smart_contract_address":"The address where the project's funding strategy is stored and from which funds will be transferred from the DAO treasury to the beneficiary address.","helper.vesting_schedule":"The period during which funds are vested and become available for release. This schedule outlines the time frame in which beneficiaries are expected to make progress on the project while it is active.","helper.landing_page.continue":"Press enter to continue","helper.landing_page.provide_contract":"Please provide a vesting contract address","helper.landing_page.address_not_valid":"That's not a valid Ethereum address","helper.landing_page.no_contract":"There's no vesting contract on that address...","helper.landing_page.network":"Maybe it's because you are on {network}?","helper.error_page":"So this happened: {error}","helper.error_page.no_internet":"Make sure you are connected to the internet.","helper.error_page.message":"Uh-oh... something went wrong.","landing_page.title":"Contract Address","overview.title":"{token} Vesting Contract","overview.details":"This is a contract for {amount} {token} to be vested in {months}{days, plural, =0 {} other { and {days}}}, {showCliff, plural, =0 {no cliff} other {after a {cliff}}}.","overview.details.cliff":"{months, plural, =0 {} other {{months} {months, plural, one {month} other {months}}}}{days, plural, =0 {} other {{days} {days, plural, one {day} other {days}}}} cliff","beneficiary.title":"Project beneficiary","beneficiary.subtitle":"Enabled by the community participating in the Decentraland DAO","beneficiary.button":"View dao proposal","beneficiary.button.mobile":"Dao initiative","revoked_banner.title":"Contract revoked","revoked_banner.subtitle":"The Decentraland DAO Revocations Committee has ceased funding for this initiative","paused_banner.title":"Contract paused","paused_banner.subtitle":"The Decentraland DAO Revocations Committee has paused funding for this initiative","progress.total":"Total vesting","progress.vested":"Vested so far","progress.released":"<b>{amount} {token}</b> released","chart.title":"FUNDS OVER TIME","chart.vested":"Vested","chart.released":"Released","chart.to_be_vested":"To be vested","chart.revoked":"REVOKED","chart.paused":"PAUSED","chart.today":"TODAY","cliff.duration":"{months}-{months, plural, one {month} other {months}} {days, plural, =0 {} other { and {days} {days, plural, one {day} other {days}}}} cliff","schedule.title":"Schedule","schedule.contract_started":"Contract in place","schedule.cliff_started":"{cliff} started","schedule.cliff_ended":"Cliff ended","schedule.vesting_begins":"Vesting begins","schedule.show_more":"Show more","schedule.released":"{amount} {token} released","schedule.fulfilled":"Contract fulfilled","schedule.revoked":"Revoked","schedule.paused":"Paused","schedule.unpaused":"Unpaused","summary.text":"<b>Because of the {cliff}, no funds were vested before {cliffEnd}.</b>{br}{br}{version_description} The beneficiary has <b>released</b> from said funds{nearly}{percentage}% of what is currently vested.{br}{br}By the end of this contract, the beneficiary will have banked, at the current rate, aprox. <b>${amount} USD</b>{br}{br}","summary.linear_version_description":"Vesting is <b>real-time</b> and the beneficiary is able to release funds as they are vested.","summary.periodic_version_description":"Vesting is <b>periodic</b> every 30 days and the beneficiary is able to release funds as they are vested.","summary.nearly":"nearly","summary.review_contract":"Review smart contract","details.beneficiary":"Beneficiary","details.change_beneficiary":"Change","details.start":"Start","details.end":"End","details.cliff_period":"Cliff period","details.total_vesting":"Total vesting","details.released":"Released","details.releasable":"Releasable","details.release_funds":"Release funds","details.revocable":"Revocable","details.pausable":"Pausable","modal.title":"Change Beneficiary","modal.label":"Beneficiary address","modal.warning":"This is an irreversible operation. Please check the address carefully.","modal.button":"Transfer","modal.error":"This is not a valid Ethereum address","modal.success":"{address} {br} is the new beneficiary. Reload the page to see the reflected changes.","pending_funds.requires_more_funding":"The contract requires {pending} more {token} to cover the total vesting. Please contact the issuer to have it funded accordingly.","pending_funds.over_funded":"The contract has {pending} more {token} than the amount required to fund the total vesting."},translations=Object.freeze(Object.defineProperty({__proto__:null,en},Symbol.toStringTag,{value:"Module"})),NETWORK$1="mainnet",CHAIN_ID$1="1",PEER_URL$1="https://peer.decentraland.zone",ENVIRONMENT$1="development",AUTH_URL$3="/auth",VESTINGS_API_URL$1="https://data.decentraland.vote/vestings.json",PROPOSALS_URL$1="https://decentraland.org/governance/proposal/",REVIEW_CONTRACT_URL$1="https://etherscan.io/address/",dev={NETWORK:NETWORK$1,CHAIN_ID:CHAIN_ID$1,PEER_URL:PEER_URL$1,ENVIRONMENT:ENVIRONMENT$1,AUTH_URL:AUTH_URL$3,VESTINGS_API_URL:VESTINGS_API_URL$1,PROPOSALS_URL:PROPOSALS_URL$1,REVIEW_CONTRACT_URL:REVIEW_CONTRACT_URL$1},NETWORK="mainnet",CHAIN_ID="1",PEER_URL="https://peer.decentraland.org",ENVIRONMENT="production",AUTH_URL$2="/auth",VESTINGS_API_URL="https://data.decentraland.vote/vestings.json",PROPOSALS_URL="https://decentraland.org/governance/proposal/",REVIEW_CONTRACT_URL="https://etherscan.io/address/",prod={NETWORK,CHAIN_ID,PEER_URL,ENVIRONMENT,AUTH_URL:AUTH_URL$2,VESTINGS_API_URL,PROPOSALS_URL,REVIEW_CONTRACT_URL},config=dist$b.createConfig({[dist$b.Env.DEVELOPMENT]:dev,[dist$b.Env.PRODUCTION]:prod},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),AUTH_URL$1=config.get("AUTH_URL");function*identitySaga(){yield takeEvery$1(loginRequest.type,_e),yield takeEvery$1(CHANGE_ACCOUNT,nt),yield takeEvery$1(CONNECT_WALLET_SUCCESS,at),yield takeEvery$1(DISCONNECT_WALLET_SUCCESS,tt);function*_e(ot){const st=ot.payload;try{if(yield select(dt=>!isConnected(dt))){if(!st)throw new Error("Undefined provider type");yield put(enableWalletRequest(st));const dt=yield race({success:take(ENABLE_WALLET_SUCCESS),failure:take(ENABLE_WALLET_FAILURE)});if(!dt.success){yield put(loginFailure(dt.failure.payload.error));return}const ht=yield race({success:take(CONNECT_WALLET_SUCCESS),failure:take(CONNECT_WALLET_FAILURE)});if(!ht.success){yield put(loginFailure(ht.failure.payload.error));return}}}catch(ct){yield put(loginFailure(isErrorWithMessage(ct)?ct.message:"Unknown error"))}}let et="";function*tt(){et&&(yield put(logout(et)),yield call$6(dist$c.localStorageClearIdentity,et))}function*nt(){yield location.reload()}function*at(ot){const{wallet:st}=ot.payload,{address:ct}=st,dt=ct.toLowerCase();et=dt;const ht=dist$c.localStorageGetIdentity(dt);if(!ht){window.location.replace(`${AUTH_URL$1}/login?redirectTo=${window.location.href}`);return}yield put(loginSuccess({address:dt,identity:ht}))}}function getAnalytics(){return window.analytics}function trackConnectWallet(_e){const et=getAnalytics();et&&et.track("Connect Wallet",_e)}(function(){var _e=window.analytics=window.analytics||[];if(!_e.initialize){if(_e.invoked){window.console&&console.error&&console.error("Segment snippet included twice.");return}_e.invoked=!0,_e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","user","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],_e.factory=function(nt){return function(){var at=Array.prototype.slice.call(arguments);return at.unshift(nt),_e.push(at),_e}};for(var et=0;et<_e.methods.length;et++){var tt=_e.methods[et];_e[tt]=_e.factory(tt)}_e.load=function(nt,at){var ot=document.createElement("script");ot.type="text/javascript",ot.async=!0,ot.src="https://cdn.segment.com/analytics.js/v1/"+nt+"/analytics.min.js";var st=document.getElementsByTagName("script")[0];st.parentNode.insertBefore(ot,st),_e._loadOptions=at},_e.SNIPPET_VERSION="4.15.2"}})();function createAnalyticsSaga(){return function*(){yield takeLatest$1(CONNECT_WALLET_SUCCESS,handleConnectWalletSuccess)}}function handleConnectWalletSuccess(_e){const{wallet:et}=_e.payload,tt=getAnalytics();tt&&(tt.identify({ethAddress:et.address,chainId:et.chainId}),trackConnectWallet({address:et.address,chainId:et.chainId,providerType:et.providerType,walletName:connection.getWalletName()}))}const lambdaProfileToContentProfile=_e=>({..._e,avatars:_e.avatars.map(et=>({...et,avatar:{...et.avatar,snapshots:Object.entries(et.avatar.snapshots).map(([tt,nt])=>({[tt]:nt.replace(/.*\//,"")})).reduce((tt,nt)=>({...tt,...nt}),{})}}))}),getHashesByKeyMap=_e=>{const et=new Map;return Object.entries(_e.avatar.snapshots).forEach(([tt,nt])=>{et.set(`${tt}.png`,nt)}),et},NO_IDENTITY_FOUND_ERROR_MESSAGE="No identity found";function createProfileSaga({getIdentity:_e,peerUrl:et,peerWithNoGbCollectorUrl:tt}){const nt=new PeerAPI(et),at=new EntitiesOperator(et,tt);function*ot(){yield takeEvery$1(LOAD_PROFILE_REQUEST,st),yield takeEvery$1(LOAD_PROFILES_REQUEST,ct),yield takeEvery$1(SET_PROFILE_AVATAR_DESCRIPTION_REQUEST,pt),yield takeEvery$1(SET_PROFILE_AVATAR_ALIAS_REQUEST,ht),yield takeLatest$1(CONNECT_WALLET_SUCCESS,dt),yield takeLatest$1(CHANGE_ACCOUNT,dt)}function*st(yt){const{address:gt}=yt.payload;try{const bt=yield call$6([nt,"fetchProfile"],gt);yield put(loadProfileSuccess(gt,bt))}catch(bt){yield put(loadProfileFailure(gt,bt.message))}}function*ct(yt){const{addresses:gt}=yt.payload;try{const bt=yield call$6([nt,"fetchProfiles"],gt);yield put(loadProfilesSuccess(bt))}catch(bt){yield put(loadProfilesFailure(bt.message))}}function*dt(yt){yield put(loadProfileRequest(yt.payload.wallet.address))}function*ht(yt){const{address:gt,alias:bt}=yt.payload;try{const $t=yield mt(gt,{hasClaimedName:!0,name:bt});yield put(setProfileAvatarAliasSuccess(gt,bt,$t.version))}catch($t){yield put(setProfileAvatarAliasFailure(gt,$t.message))}}function*pt(yt){try{const{address:gt,description:bt}=yt.payload,$t=yield mt(gt,{description:bt});yield put(setProfileAvatarDescriptionSuccess(yt.payload.address,$t.description,$t.version))}catch(gt){yield put(setProfileAvatarDescriptionFailure(yt.payload.address,gt.message))}}function*mt(yt,gt){const bt=yield call$6([nt,"fetchProfile"],yt,{useCache:!1}),$t=lambdaProfileToContentProfile(bt),wt={...$t.avatars[0],...gt,version:$t.avatars[0].version+1},St={avatars:[wt,...$t.avatars.slice(1)]},Tt=_e();if(Tt)yield call$6([at,"deployEntityWithoutNewFiles"],St,getHashesByKeyMap(wt),entity$1.EntityType.PROFILE,yt,Tt);else throw new Error(NO_IDENTITY_FOUND_ERROR_MESSAGE);return wt}return ot}const analyticsSaga=createAnalyticsSaga(),translationSaga=createTranslationSaga({translations}),profileSaga=()=>createProfileSaga({getIdentity:()=>{},peerUrl:config.get("PEER_URL")});function*rootSaga(){yield all([analyticsSaga(),createWalletSaga({CHAIN_ID:Number(config.get("CHAIN_ID")),POLL_INTERVAL:0,TRANSACTIONS_API_URL:"https://transactions-api.decentraland.org/v1"})(),identitySaga(),profileSaga(),translationSaga(),transactionSaga()])}function initStore(){const _e=sagaMiddlewareFactory(),et=config.is(dist$b.Env.DEVELOPMENT),tt=reduxLoggerExports.createLogger({collapsed:()=>!0,predicate:(st,ct)=>et||ct.type.includes("Failure")}),{storageMiddleware:nt,loadStorageMiddleware:at}=createStorageMiddleware({storageKey:"dcl-vesting-dashboard",paths:[],actions:[],migrations:{}}),ot=createRootReducer([_e,tt,nt]);if(et){const st=window;st.getState=ot.getState}return _e.run(rootSaga),at(ot),ot}let ChainProvider$1=class extends React$L.PureComponent{render(){const{children:et,...tt}=this.props;return et(tt)}};const mapState$a=_e=>{const et=getChainId(_e)||null,tt=et?chainIdExports.getChainName(et):null,nt=et&&getChainConfiguration(et).network,at=getAppChainId(_e),ot=getChainConfiguration(at),st=chainIdExports.getChainName(at),ct=ot.network,dt=!!et&&!!ot,ht=dt&&Object.values(ot.networkMapping).includes(et);return{chainId:et,chainName:tt,network:nt,appChainId:at,appChainName:st,appNetwork:ct,isConnected:dt,isSupported:ht,isUnsupported:dt&&!ht}},mapDispatch$7=_e=>({}),ChainProvider=connect(mapState$a,mapDispatch$7)(ChainProvider$1);class ChainCheck extends React$L.PureComponent{render(){const{chainId:et,children:tt}=this.props;return React$L.createElement(ChainProvider,null,nt=>{const at=nt.isSupported||nt.chainId===et;return React$L.createElement(Popup$4.Popup,{disabled:at,position:"top center",content:React$L.createElement(T,{id:"@dapps.button.network_not_supported",values:{expectedChainName:React$L.createElement("b",null,nt.appChainName)}}),trigger:tt(at)})})}}const disabledStyle$1={opacity:.5,cursor:"not-allowed",transform:"none"};class ChainButton extends React$L.PureComponent{render(){const{chainId:et,onClick:tt,...nt}=this.props;return React$L.createElement(ChainCheck,{chainId:et},at=>{const ot=at?{onClick:tt}:{style:disabledStyle$1};return React$L.createElement(Button$2.Button,{...nt,...ot})})}}let Footer$2=class extends reactExports.PureComponent{constructor(){super(...arguments);Qr(this,"getTranslations",()=>{if(this.props.hasTranslations)return{dropdown:{en:reactExports.createElement(T,{id:"@dapps.footer.dropdown.en"}),es:reactExports.createElement(T,{id:"@dapps.footer.dropdown.es"}),fr:reactExports.createElement(T,{id:"@dapps.footer.dropdown.fr"}),ja:reactExports.createElement(T,{id:"@dapps.footer.dropdown.ja"}),zh:reactExports.createElement(T,{id:"@dapps.footer.dropdown.zh"}),ko:reactExports.createElement(T,{id:"@dapps.footer.dropdown.ko"})},links:{home:reactExports.createElement(T,{id:"@dapps.footer.links.home"}),privacy:reactExports.createElement(T,{id:"@dapps.footer.links.privacy"}),terms:reactExports.createElement(T,{id:"@dapps.footer.links.terms"}),content:reactExports.createElement(T,{id:"@dapps.footer.links.content"}),ethics:reactExports.createElement(T,{id:"@dapps.footer.links.ethics"}),feature:reactExports.createElement(T,{id:"@dapps.footer.links.feature"})}}});Qr(this,"handleChange",(tt,{value:nt})=>{const{locale:at,onChange:ot}=this.props;nt&&nt!==at&&ot&&ot(tt,{value:nt})})}render(){return reactExports.createElement(Footer_2,{...this.props,onChange:this.handleChange,i18n:this.getTranslations()})}};const mapState$9=_e=>({locale:getLocale$1(_e),hasTranslations:isEnabled(_e)}),mapDispatch$6=_e=>({onChange:(et,{value:tt})=>_e(changeLocale(tt))}),mergeProps$4=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$9,mapDispatch$6,mergeProps$4)(Footer$2);const{METAMASK,DAPPER,SAMSUNG,FORTMATIC,COINBASE,WALLET_CONNECT,WALLET_LINK,METAMASK_MOBILE}=LoginModal$2.LoginModalOptionType;function toModalOptionType(_e){switch(_e){case providerType$2.ProviderType.METAMASK_MOBILE:return METAMASK_MOBILE;case providerType$2.ProviderType.INJECTED:return isCucumberProvider()?SAMSUNG:isCoinbaseProvider()?COINBASE:isDapperProvider()?DAPPER:METAMASK;case providerType$2.ProviderType.FORTMATIC:return FORTMATIC;case providerType$2.ProviderType.WALLET_CONNECT:return WALLET_CONNECT;case providerType$2.ProviderType.WALLET_LINK:return WALLET_LINK;default:console.warn(`Invalid provider type ${_e}`);return}}function toProviderType(_e){switch(_e){case METAMASK_MOBILE:return providerType$2.ProviderType.WALLET_CONNECT;case METAMASK:case COINBASE:case DAPPER:case SAMSUNG:return providerType$2.ProviderType.INJECTED;case FORTMATIC:return providerType$2.ProviderType.FORTMATIC;case WALLET_CONNECT:return providerType$2.ProviderType.WALLET_CONNECT;case WALLET_LINK:return providerType$2.ProviderType.WALLET_LINK;default:throw new Error(`Invalid login type ${_e}`)}}class LoginModal extends reactExports.PureComponent{constructor(tt){super(tt);Qr(this,"handleOnConnect",tt=>{var ot;const nt=((ot=this.props.metadata)==null?void 0:ot.onConnect)??this.props.onConnect,at=toProviderType(tt);nt(at)});Qr(this,"getModalTranslations",()=>{if(this.props.hasTranslations)return{title:reactExports.createElement(T,{id:"@dapps.login.modal.title"}),subtitle:reactExports.createElement(T,{id:"@dapps.login.modal.subtitle"}),error:reactExports.createElement(T,{id:"@dapps.login.modal.error"})}});Qr(this,"getOptionTranslations",()=>{if(this.props.hasTranslations)return{browser_extension:reactExports.createElement(T,{id:"@dapps.login.option.browser_extension"}),email:reactExports.createElement(T,{id:"@dapps.login.option.email"}),mobile:reactExports.createElement(T,{id:"@dapps.login.option.mobile"}),mobile_and_browser:reactExports.createElement(T,{id:"@dapps.login.option.mobile_and_browser"}),metamask_mobile:reactExports.createElement(T,{id:"@dapps.login.option.metamask_mobile"})}});Qr(this,"renderLoginModalOption",tt=>{const nt=toModalOptionType(tt);return nt?reactExports.createElement(LoginModal$2.LoginModal.Option,{key:nt,type:nt,i18n:this.getOptionTranslations(),onClick:()=>this.handleOnConnect(nt)}):null});this.state={hasError:!1}}componentDidUpdate(tt){!tt.hasError&&this.props.hasError?this.setState({hasError:!0}):tt.hasError&&!this.props.hasError&&this.setState({hasError:!1})}render(){const{className:tt,isLoading:nt,onClose:at}=this.props,{hasError:ot}=this.state;return reactExports.createElement(LoginModal$2.LoginModal,{open:!0,className:tt,i18n:this.getModalTranslations(),message:reactExports.createElement(T,{id:"@dapps.login.modal.supported_wallets",values:{br:reactExports.createElement("br",null),trezor_link:reactExports.createElement("a",{href:"https://github.com/trezor/trezor-firmware/pull/1568",target:"_blank",rel:"noopener noreferrer"},t$3("@dapps.login.modal.trezor_link"))}}),loading:nt,hasError:ot,onClose:at},connection.getAvailableProviders().map(this.renderLoginModalOption))}}Qr(LoginModal,"defaultProps",{isLoading:!1});const mapState$8=_e=>({hasError:!!getError$1(_e),isLoading:isEnabling(_e)||isConnecting(_e),hasTranslations:isEnabled(_e)}),mapDispatch$5=_e=>({onConnect:et=>_e(enableWalletRequest(et))}),mergeProps$3=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$8,mapDispatch$5,mergeProps$3)(LoginModal);let Modal$1=class extends reactExports.PureComponent{constructor(){super(...arguments);Qr(this,"handleClose",()=>{const{name:tt,onCloseModal:nt}=this.props;nt(tt)})}render(){const{name:tt,onCloseModal:nt,...at}=this.props;return reactExports.createElement(Modal$6.Modal,{open:!0,className:tt,size:"small",onClose:this.handleClose,...at})}};const getModalActions=()=>({openModal:function(_e,et=null){return action(OPEN_MODAL,{name:_e,metadata:et})},closeModal:function(_e){return action(CLOSE_MODAL,{name:_e})},toggleModal:function(_e){return action(TOGGLE_MODAL,{name:_e})}}),{openModal,closeModal,toggleModal}=getModalActions(),OPEN_MODAL="Open modal",CLOSE_MODAL="Close modal",TOGGLE_MODAL="Toggle modal",mapState$7=_e=>({}),mapDispatch$4=_e=>({onCloseModal:et=>_e(closeModal(et))}),mergeProps$2=(_e,et,tt)=>({..._e,...et,...tt}),BaseModal=connect(mapState$7,mapDispatch$4,mergeProps$2)(Modal$1),Modal=BaseModal;Modal.Actions=Modal$6.Modal.Actions;Modal.Content=Modal$6.Modal.Content;Modal.Description=Modal$6.Modal.Description;Modal.Header=Modal$6.Modal.Header;const getState$2=_e=>_e.profile,getData$2=_e=>getState$2(_e).data,UnsupportedNetworkModal=({chainName:_e,expectedChainName:et,isSwitchingNetwork:tt,onSwitchNetwork:nt})=>React$L.createElement(Modal,{open:!0,size:"tiny"},React$L.createElement(ModalNavigation_2,{title:React$L.createElement(T,{id:"@dapps.navbar.wrong_network.header"})}),React$L.createElement(Modal.Content,null,_e?React$L.createElement(T,{id:"@dapps.navbar.wrong_network.message",values:{currentChainName:React$L.createElement("b",null,_e),expectedChainName:React$L.createElement("b",null,et)}}):React$L.createElement(T,{id:"@dapps.navbar.wrong_network.message_unknown_network",values:{expectedChainName:React$L.createElement("b",null,et)}})),React$L.createElement(Modal.Actions,null,React$L.createElement(Button$2.Button,{primary:!0,disabled:tt,loading:tt,onClick:nt},React$L.createElement(T,{id:"@dapps.navbar.wrong_network.switch_button",values:{chainName:React$L.createElement("b",null,et)}})))),NAVBAR_CLICK_EVENT="Click on Navbar",NOTIFICATIONS_QUERY_INTERVAL=6e4,DROPDOWN_MENU_ITEM_CLICK_EVENT="Unified Dropdown Menu Item Click",DROPDOWN_MENU_DISPLAY_EVENT="Unified Dropdown Menu Display",DROPDOWN_MENU_BALANCE_CLICK_EVENT="Unified Dropdown Menu Balance Click",DROPDOWN_MENU_SIGN_OUT_EVENT="Unified Dropdown Menu Sign Out",CHANGE_NETWORK="Change Network",NOTIFICATIONS_LIMIT=50;class NotificationsAPI extends BaseClient{constructor(et){const tt=dist$b.getEnv()===dist$b.Env.DEVELOPMENT?"https://notifications.decentraland.zone":"https://notifications.decentraland.org";super(tt,et)}async getNotifications(et=NOTIFICATIONS_LIMIT,tt){const nt=new URLSearchParams;et&&nt.append("limit",`${et}`),tt&&nt.append("from",`${tt}`);const{notifications:at}=await this.fetch(`/notifications${nt.toString().length?`?${nt.toString()}`:""}`,{metadata:{signer:"dcl:navbar",intent:"dcl:navbar:see-notifications"}});return at.map(parseNotification)}async markNotificationsAsRead(et){await this.fetch("/notifications/read",{method:"PUT",body:JSON.stringify({notificationIds:et}),metadata:{notificationIds:et,signer:"dcl:navbar",intent:"dcl:navbar:read-notifications"},headers:{"Content-Type":"application/json"}})}async getSubscription(){return this.fetch("/subscription",{metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async putSubscription(et){return this.fetch("/subscription",{method:"PUT",body:JSON.stringify(et),headers:{"Content-Type":"application/json"},metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async putEmail(et){return this.fetch("/set-email",{method:"PUT",body:JSON.stringify({email:et}),headers:{"Content-Type":"application/json"},metadata:{signer:"dcl:account",intent:"dcl:account:manage-subscription"}})}async postEmailConfirmationCode(et){return this.fetch("/confirm-email",{method:"PUT",body:JSON.stringify(et),headers:{"Content-Type":"application/json"}})}}const ONBOARDING_KEY="dcl_notifications_onboarding",checkIsOnboarding=()=>{if(typeof window<"u"){const _e=localStorage.getItem(ONBOARDING_KEY);return _e?JSON.parse(_e):(localStorage.setItem(ONBOARDING_KEY,"true"),!0)}},setOnboardingDone=()=>{typeof window<"u"&&localStorage.setItem(ONBOARDING_KEY,"false")},parseNotification=_e=>({..._e,timestamp:Number(_e.timestamp)});var utilsExports=requireUtils();const Profile=function(_e){const{address:et,debounce:tt,inline:nt=!0}=_e,at=useSelector(getData$2),ot=useDispatch(),st=reactExports.useRef(),ct=reactExports.useMemo(()=>{const ht=at[et];return ht?ht.avatars[0]:null},[et,at]),dt=reactExports.useCallback(ht=>ot(loadProfileRequest(ht)),[et]);return reactExports.useEffect(()=>(ct||(tt?(st.current&&clearTimeout(st.current),st.current=window.setTimeout(()=>dt(et),tt)):dt(et)),()=>{st.current&&window.clearTimeout(st.current)}),[et]),React$L.createElement(Profile_2,{..._e,avatar:ct,inline:nt})},useNotifications=(_e,et)=>{const[{isLoading:tt,notifications:nt},at]=reactExports.useState({isLoading:!1,notifications:[]}),[{activeTab:ot,isOnboarding:st,isOpen:ct},dt]=reactExports.useState({activeTab:types$1.NotificationActiveTab.NEWEST,isOnboarding:checkIsOnboarding(),isOpen:!1}),ht=reactExports.useMemo(()=>_e?new NotificationsAPI({identity:_e}):null,[_e]),pt=()=>{setOnboardingDone(),dt($t=>({...$t,isOnboarding:!1}))},mt=async()=>{const $t=ct;if(dt(wt=>({...wt,isOpen:!wt.isOpen})),$t){const wt=nt.map(St=>St.read?St:{...St,read:!0});at({isLoading:tt,notifications:wt})}else{const wt=nt.filter(St=>!St.read).map(({id:St})=>St);wt.length&&await(ht==null?void 0:ht.markNotificationsAsRead(wt))}},yt=$t=>dt(wt=>({...wt,activeTab:$t})),gt=()=>{at({notifications:[],isLoading:!0}),ht==null||ht.getNotifications().then($t=>{at({isLoading:!1,notifications:$t.filter(wt=>utilsExports.CURRENT_AVAILABLE_NOTIFICATIONS.includes(wt.type))})})},bt=reactExports.useCallback($t=>React$L.createElement(Profile,{address:$t,as:"a",href:`${getBaseUrl()}/profile/accounts/${$t}`,style:{fontWeight:500,color:"white",textDecoration:"none"},target:"_blank"}),[]);return reactExports.useEffect(()=>{if(_e&&et){gt();const $t=setInterval(()=>{gt()},NOTIFICATIONS_QUERY_INTERVAL);return()=>{clearInterval($t)}}return()=>{}},[_e]),{notificationsClient:ht,notifications:nt,isLoading:tt,isModalOpen:ct,modalActiveTab:ot,isNotificationsOnboarding:st,handleOnBegin:pt,handleNotificationsOpen:mt,handleOnChangeModalTab:yt,handleRenderProfile:bt}},BASE_URL=getBaseUrl(),Navbar$3=({appChainId:_e,isSwitchingNetwork:et,withNotifications:tt,withChainSelector:nt,identity:at,docsUrl:ot="https://docs.decentraland.org",enablePartialSupportAlert:st=!0,walletError:ct,...dt})=>{const ht=chainIdExports.getChainName(_e),pt=getAnalytics(),{isModalOpen:mt,isNotificationsOnboarding:yt,modalActiveTab:gt,isLoading:bt,notifications:$t,handleNotificationsOpen:wt,handleOnBegin:St,handleOnChangeModalTab:Tt,handleRenderProfile:Pt}=useNotifications(at,tt||!1),Ot=reactExports.useCallback(()=>{dt.onSwitchNetwork(_e)},[]),[Nt,Lt]=reactExports.useState(void 0);reactExports.useEffect(()=>{ct&&Nt&&nt&&Lt(void 0)},[ct,Nt,nt]);const Bt=reactExports.useCallback(At=>{Lt(At),dt.onSwitchNetwork(At,dt.chainId),pt.track(CHANGE_NETWORK,{from_chain_id:dt.chainId,to_chain_id:At})},[pt]),Ut=reactExports.useCallback((At,xt)=>{At.preventDefault(),pt.track(DROPDOWN_MENU_BALANCE_CLICK_EVENT,{network:xt}),setTimeout(()=>{window.open(`${BASE_URL}/account`,"_blank","noopener")},300)},[pt]),Ft=reactExports.useCallback((At,xt)=>{pt.track(NAVBAR_CLICK_EVENT,xt)},[pt]),zt=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_ITEM_CLICK_EVENT,xt)},[pt]),It=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_DISPLAY_EVENT,{track_uuid:xt})},[pt]),vt=reactExports.useCallback(At=>{dt.onSignIn()},[pt]),Et=reactExports.useCallback((At,xt)=>{pt.track(DROPDOWN_MENU_SIGN_OUT_EVENT,{track_uuid:xt}),setTimeout(()=>{dt.onSignOut()},300)},[pt]);return React$L.createElement(React$L.Fragment,null,React$L.createElement(ChainProvider,null,({chainId:At,isUnsupported:xt})=>React$L.createElement(React$L.Fragment,null,React$L.createElement(Navbar_1,{...dt,notifications:tt?{locale:dt.locale,isLoading:bt,isOnboarding:yt,isOpen:mt,items:$t,activeTab:gt,onClick:wt,onClose:wt,onBegin:St,onChangeTab:(Ct,Dt)=>Tt(Dt),renderProfile:Pt}:void 0,onClickBalance:Ut,onClickNavbarItem:Ft,onClickUserMenuItem:zt,onClickOpen:It,onClickSignIn:vt,onClickSignOut:Et,...nt&&{chains:getAvailableChains(),selectedChain:At??void 0,chainBeingConfirmed:Nt!==At?Nt:void 0,onSelectChain:Bt,i18nChainSelector:{title:t$3("@dapps.chain_selector.title"),connected:t$3("@dapps.chain_selector.connected"),confirmInWallet:getConnectedProviderType()===dist$5.ProviderType.INJECTED?t$3("@dapps.chain_selector.confirm_in_wallet"):t$3("@dapps.chain_selector.switching")}}}),xt?React$L.createElement(UnsupportedNetworkModal,{chainName:chainIdExports.getChainName(At),expectedChainName:ht,isSwitchingNetwork:et,onSwitchNetwork:Ot}):null)))},Navbar$4=React$L.memo(Navbar$3),mapState$6=_e=>{const et=getAddress$2(_e),tt=et?getData$2(_e)[et]:void 0;return{avatar:tt?tt.avatars[0]:void 0,chainId:getChainId(_e),manaBalances:getManaBalances(_e),address:getAddress$2(_e),locale:getLocale$1(_e),isSignedIn:isConnected(_e),isDisconnecting:isDisconnecting(_e),isSigningIn:isConnecting(_e),appChainId:getAppChainId(_e),isSwitchingNetwork:isSwitchingNetwork(_e),walletError:getError$1(_e)}},mapDispatch$3=_e=>({onSwitchNetwork:(et,tt)=>_e(switchNetworkRequest(et,tt)),onSignOut:()=>_e(disconnectWalletRequest())}),mergeProps$1=(_e,et,tt)=>({..._e,...et,...tt}),Navbar$2=connect(mapState$6,mapDispatch$3,mergeProps$1)(Navbar$4);class NetworkCheck extends React$L.PureComponent{constructor(){super(...arguments);Qr(this,"getChainId",()=>{const{network:tt}=this.props;try{return getChainIdByNetwork(tt)}catch{return null}})}render(){const{children:tt}=this.props;return React$L.createElement(ChainProvider,null,nt=>{const at=nt.isSupported||nt.chainId===this.getChainId();return React$L.createElement(Popup$4.Popup,{disabled:at,position:"top center",content:React$L.createElement(T,{id:"@dapps.button.network_not_supported",values:{expectedChainName:React$L.createElement("b",null,nt.appChainName)}}),trigger:tt(at)})})}}const disabledStyle={opacity:.5,cursor:"not-allowed",transform:"none"};class NetworkButton extends React$L.PureComponent{render(){const{network:et,onClick:tt,...nt}=this.props;return React$L.createElement(NetworkCheck,{network:et},at=>{const ot=at?{onClick:tt}:{style:disabledStyle};return React$L.createElement(Button$2.Button,{...nt,...ot})})}}class SignInPage extends reactExports.PureComponent{constructor(tt){super(tt);Qr(this,"getTranslations",()=>{const{hasTranslations:tt,isConnected:nt}=this.props;if(tt)return{header:reactExports.createElement(T,{id:"@dapps.sign_in.get_started"}),error:reactExports.createElement(T,{id:"@dapps.sign_in.error"}),connect:reactExports.createElement(T,{id:"@dapps.sign_in.connect"}),connecting:reactExports.createElement(T,{id:"@dapps.sign_in.connecting"}),connected:reactExports.createElement(T,{id:"@dapps.sign_in.connected"}),message:nt?reactExports.createElement(T,{id:"@dapps.sign_in.options.connected"}):isCucumberProvider()?reactExports.createElement(T,{id:"@dapps.sign_in.options.samsung",values:{samsung_link:reactExports.createElement("a",{href:"https://www.samsung.com/global/galaxy/apps/samsung-blockchain/",target:"_blank",rel:"noopener noreferrer"},"Samsung Blockchain Wallet")}}):isMobile()?reactExports.createElement(T,{id:"@dapps.sign_in.options.mobile",values:{metamask_link:reactExports.createElement("a",{href:"https://metamask.io",target:"_blank",rel:"noopener noreferrer"},"MetaMask"),coinbase_link:reactExports.createElement("a",{href:"https://wallet.coinbase.com",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet"),imtoken_link:reactExports.createElement("a",{href:"https://token.im",target:"_blank",rel:"noopener noreferrer"},"imToken")}}):reactExports.createElement(T,{id:"@dapps.sign_in.options.desktop",values:{metamask_link:reactExports.createElement("a",{href:"https://metamask.io",target:"_blank",rel:"noopener noreferrer"},"MetaMask"),ledger_nano_link:reactExports.createElement("a",{href:"https://www.ledger.com/",target:"_blank",rel:"noopener noreferrer"},"Ledger Nano S")}})}})}render(){const{center:tt,isConnected:nt,isConnecting:at,hasError:ot,onConnect:st}=this.props;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(SignIn_2,{center:tt,isConnected:nt,isConnecting:at,hasError:ot,onConnect:st,i18n:this.getTranslations()}))}}const mapState$5=_e=>{const et=getData$a(_e),tt=et?dist$c.localStorageGetIdentity(et==null?void 0:et.address):null;return{isConnecting:isConnecting(_e),isConnected:isConnected(_e)&&!!tt,hasError:!!getError$1(_e),hasTranslations:isEnabled(_e)}},mapDispatch$2=(_e,et)=>({onConnect:et.onConnect?et.onConnect:()=>_e(openModal("LoginModal",{onConnect:et.handleLoginConnect}))}),mergeProps=(_e,et,tt)=>({..._e,...et,...tt});connect(mapState$5,mapDispatch$2,mergeProps)(SignInPage);var Lm;let TransactionLink$1=(Lm=class extends reactExports.PureComponent{render(){const{address:et,txHash:tt}=this.props;if(!et&&!tt)return console.warn("Tried to render an TransactionLink without either an address or tx hash. Please supply one of those"),null;const{chainId:nt,className:at,target:ot,text:st,children:ct}=this.props,dt=getTransactionHref({address:et,txHash:tt},nt);return reactExports.createElement("a",{className:at,href:dt,target:ot},ct||st||dt)}},Qr(Lm,"defaultProps",{className:"etherscan-link",target:"_blank",text:""}),Lm);const mapState$4=(_e,et)=>({chainId:et.chainId||getChainId(_e)}),mapDispatch$1=_e=>({}),TransactionLink=connect(mapState$4,mapDispatch$1)(TransactionLink$1);var AuthorizationType;(function(_e){_e.ALLOWANCE="allowance",_e.APPROVAL="approval",_e.MINT="mint"})(AuthorizationType||(AuthorizationType={}));var AuthorizationAction;(function(_e){_e.GRANT="grant",_e.REVOKE="revoke"})(AuthorizationAction||(AuthorizationAction={}));var AuthorizationError;(function(_e){_e.REVOKE_FAILED="revoke-failed-error",_e.GRANT_FAILED="grant-failed-error",_e.INSUFFICIENT_ALLOWANCE="insufficient-allowance",_e.FETCH_AUTHORIZATIONS_FAILURE="fetch-authorizations-failure"})(AuthorizationError||(AuthorizationError={}));function hasAuthorization(_e,et){return _e.some(tt=>areEqual(tt,et))}function hasAuthorizationAndEnoughAllowance(_e,et,tt){const nt=_e.find(ct=>areEqual(ct,et));if(!nt)return!1;if(et.type!==AuthorizationType.ALLOWANCE)return!0;const{allowance:at}=nt;if(!at)return!1;const ot=parseEther(tt),st=parseEther(at);return ot.lte(st)}function areEqual(_e,et){return _e.type===et.type&&_e.authorizedAddress.toLowerCase()===et.authorizedAddress.toLowerCase()&&_e.contractAddress.toLowerCase()===et.contractAddress.toLowerCase()&&_e.chainId===et.chainId&&_e.address.toLowerCase()===et.address.toLowerCase()}const FETCH_AUTHORIZATIONS_REQUEST="[Request] Fetch Authorizations",fetchAuthorizationsRequest=_e=>action(FETCH_AUTHORIZATIONS_REQUEST,{authorizations:_e}),GRANT_TOKEN_REQUEST="[Request] Grant Token",REVOKE_TOKEN_REQUEST="[Request] Revoke Token",AUTHORIZATION_FLOW_REQUEST="[Request] Authorization Flow",authorizationFlowRequest=(_e,et,tt,nt)=>action(AUTHORIZATION_FLOW_REQUEST,{authorization:_e,authorizationAction:et,allowance:tt,traceId:nt}),getState$1=_e=>_e.authorization,getData$1=_e=>getState$1(_e).data,getLoading$1=_e=>getState$1(_e).loading,getError=_e=>getState$1(_e).error,getAuthorizationFlowError=_e=>getState$1(_e).authorizationFlowError;let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let _e=0;_e<256;++_e)byteToHex.push((_e+256).toString(16).slice(1));function unsafeStringify(_e,et=0){return byteToHex[_e[et+0]]+byteToHex[_e[et+1]]+byteToHex[_e[et+2]]+byteToHex[_e[et+3]]+"-"+byteToHex[_e[et+4]]+byteToHex[_e[et+5]]+"-"+byteToHex[_e[et+6]]+byteToHex[_e[et+7]]+"-"+byteToHex[_e[et+8]]+byteToHex[_e[et+9]]+"-"+byteToHex[_e[et+10]]+byteToHex[_e[et+11]]+byteToHex[_e[et+12]]+byteToHex[_e[et+13]]+byteToHex[_e[et+14]]+byteToHex[_e[et+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(_e,et,tt){if(native.randomUUID&&!et&&!_e)return native.randomUUID();_e=_e||{};const nt=_e.random||(_e.rng||rng)();if(nt[6]=nt[6]&15|64,nt[8]=nt[8]&63|128,et){tt=tt||0;for(let at=0;at<16;++at)et[tt+at]=nt[at];return et}return unsafeStringify(nt)}var AuthorizedAction;(function(_e){_e.BID="bid",_e.BUY="buy",_e.MINT="mint",_e.RENT="rent",_e.CLAIM_NAME="claim_name",_e.SWAP_MANA="swap_mana",_e.SELL="sell",_e.PUBLISH_COLLECTION="publish_collection"})(AuthorizedAction||(AuthorizedAction={}));var AuthorizationStepStatus;(function(_e){_e.LOADING_INFO="loading_info",_e.PENDING="pending",_e.WAITING="waiting",_e.PROCESSING="processing",_e.ALLOWANCE_AMOUNT_ERROR="allowance_amount_error",_e.ERROR="error",_e.DONE="done"})(AuthorizationStepStatus||(AuthorizationStepStatus={}));var AuthorizationStepAction;(function(_e){_e.REVOKE="revoke",_e.GRANT="grant",_e.CONFIRM="confirm"})(AuthorizationStepAction||(AuthorizationStepAction={}));const MAX_ERROR_LENGTH=150;function safeGet(_e,et){const nt=et.split(".").reduce((at,ot)=>{if(at!==void 0)return at[ot]},_e);return typeof nt!="string"?void 0:nt}function getTranslation(_e,et,tt){return t_cond(safeGet(_e,et),`@dapps.authorization_modal.${et}`,tt)}function getStepStatus(_e,et,tt,nt){const at=et===AuthorizationAction.REVOKE?REVOKE_TOKEN_REQUEST:GRANT_TOKEN_REQUEST;if(isLoadingType(getLoading$1(_e),at))return AuthorizationStepStatus.WAITING;if(getTransactions(_e,tt.address).filter(ht=>isPending(ht.status)&&getType({type:at})===getType({type:ht.actionType})&&areEqual(ht.payload.authorization,tt)).length)return AuthorizationStepStatus.PROCESSING;const st=getAuthorizationFlowError(_e);if(st===AuthorizationError.INSUFFICIENT_ALLOWANCE)return AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR;if(st||getError(_e))return AuthorizationStepStatus.ERROR;let ct=!1;const dt=getData$1(_e);return tt.type===AuthorizationType.ALLOWANCE?nt?ct=hasAuthorizationAndEnoughAllowance(dt,tt,nt.toString()):ct=!hasAuthorization(dt,tt):ct=hasAuthorization(dt,tt),ct?AuthorizationStepStatus.DONE:isLoadingType(getLoading$1(_e),AUTHORIZATION_FLOW_REQUEST)&&getLoading$1(_e).find(ht=>{var pt;return((pt=ht.payload)==null?void 0:pt.authorizationAction)===et})?AuthorizationStepStatus.LOADING_INFO:AuthorizationStepStatus.PENDING}function getStepError(_e,et,tt){if(_e)return et===AuthorizationStepAction.REVOKE?getTranslation(tt,"revoke_cap_error"):_e.length>MAX_ERROR_LENGTH?getTranslation(tt,"generic_error"):_e}function getStepMessage(_e,et,tt,nt,at,ot,st){if(_e>nt)return"";if(_e<nt)return getTranslation(st,"done");switch(et){case AuthorizationStepStatus.WAITING:return getTranslation(st,"waiting_wallet");case AuthorizationStepStatus.PROCESSING:return getTranslation(st,"waiting_confirmation");case AuthorizationStepStatus.ERROR:return React$L.createElement("div",{className:"authorization-error"},getStepError(tt,ot,st));case AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR:return React$L.createElement("div",{className:"authorization-error"},getTranslation(st,"spending_cap_error",{price:at}));case AuthorizationStepStatus.DONE:return getTranslation(st,"done");default:return}}function getPriceInMana(_e){if(!_e)return"";const et=Number.parseFloat(formatEther(_e));return(Math.ceil(et*100)/100).toString().replace(/\.0+$/,"")}function getSteps({authorization:_e,authorizationType:et,network:tt,requiredAllowance:nt,authorizedContractLabel:at,targetContractLabel:ot,currentAllowance:st,translationKeys:ct}){const dt=getPriceInMana(nt);if((!st||!st.isZero())&&et===AuthorizationType.ALLOWANCE&&tt===dist$5.Network.ETHEREUM)return[{title:getTranslation(ct,"revoke_cap.title"),description:getTranslation(ct,"revoke_cap.description",{price:dt}),actionType:AuthorizationStepAction.REVOKE},{title:getTranslation(ct,"set_cap.title"),description:getTranslation(ct,"set_cap.description",{price:dt}),actionType:AuthorizationStepAction.GRANT}];if(et===AuthorizationType.ALLOWANCE)return[{title:getTranslation(ct,"authorize_mana.title",{contract:()=>React$L.createElement(TransactionLink,{address:_e.authorizedAddress||"",chainId:_e.chainId,txHash:""},at||_e.authorizedAddress)}),description:getTranslation(ct,"authorize_mana.description",{price:dt}),actionType:AuthorizationStepAction.GRANT}];const ht=et===AuthorizationType.APPROVAL?"authorize_nft.title":"authorize_item.title";return[{title:getTranslation(ct,ht,{contract:()=>React$L.createElement(TransactionLink,{address:_e.authorizedAddress||"",chainId:_e.chainId,txHash:""},at||_e.authorizedAddress),targetContract:()=>React$L.createElement(TransactionLink,{address:_e.contractAddress||"",chainId:_e.chainId,txHash:""},ot||_e.contractAddress)}),actionType:AuthorizationStepAction.GRANT}]}const LOADING_STATUS=[AuthorizationStepStatus.LOADING_INFO,AuthorizationStepStatus.PROCESSING,AuthorizationStepStatus.WAITING];function AuthorizationModal({authorization:_e,requiredAllowance:et,currentAllowance:tt,action:nt,authorizationType:at,revokeStatus:ot,grantStatus:st,confirmationStatus:ct,error:dt,confirmationError:ht,network:pt,authorizedContractLabel:mt,targetContractLabel:yt,translationKeys:gt,onClose:bt,onRevoke:$t,onGrant:wt,onAuthorized:St,onFetchAuthorizations:Tt}){const Pt=getAnalytics(),[Ot]=reactExports.useState(v4()),[Nt,Lt]=reactExports.useState(0),[Bt,Ut]=reactExports.useState(),[Ft,zt]=reactExports.useState(!1),It=getPriceInMana(et);reactExports.useEffect(()=>{Pt.track("[Authorization Flow] Modal Opened",{action:nt,requiredAllowance:et,traceId:Ot})},[]),reactExports.useEffect(()=>{Tt()},[Tt]);const vt=reactExports.useCallback(()=>{$t(Ot),Pt.track("[Authorization Flow] Authorize Revoke Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.REVOKE)},[$t]),Et=reactExports.useCallback(()=>{wt(Ot),Pt.track("[Authorization Flow] Authorize Grant Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.GRANT)},[wt]),At=reactExports.useCallback(()=>{St(),Pt.track("[Authorization Flow] Confirm Transaction Click",{action:nt,traceId:Ot}),Ut(AuthorizationStepAction.CONFIRM)},[St]),xt=reactExports.useMemo(()=>[...getSteps({authorizationType:at,network:pt,requiredAllowance:et,currentAllowance:tt,authorization:_e,authorizedContractLabel:mt,translationKeys:gt,targetContractLabel:yt}),{title:getTranslation(gt,"confirm_transaction.title",{action:getTranslation(gt,"action")}),action:getTranslation(gt,"confirm_transaction.action"),status:ct,actionType:AuthorizationStepAction.CONFIRM,error:ht,onActionClick:At}].map(Dt=>Dt.actionType===AuthorizationStepAction.GRANT?Ft||st===AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR&&pt===dist$5.Network.ETHEREUM?{...Dt,error:getTranslation(gt,"insufficient_amount_error.message",{price:It}),action:"Revoke",status:ot,message:LOADING_STATUS.includes(ot)?void 0:React$L.createElement("div",{className:"authorization-error"},getTranslation(gt,"insufficient_amount_error.message",{price:It})),actionType:AuthorizationStepAction.REVOKE,testId:"reauthorize-step",onActionClick:vt}:{...Dt,action:st===AuthorizationStepStatus.DONE?void 0:getTranslation(gt,"set_cap.action"),error:dt,status:st,onActionClick:Et}:Dt.actionType===AuthorizationStepAction.REVOKE?{...Dt,action:ot===AuthorizationStepStatus.DONE?void 0:getTranslation(gt,"revoke_cap.action"),error:dt,status:ot,onActionClick:vt}:Dt).map((Dt,kt)=>({...Dt,isLoading:kt===Nt&&LOADING_STATUS.includes(Dt.status),message:"message"in Dt&&Dt.message?Dt.message:getStepMessage(kt,Dt.status,Dt.error,Nt,It,Dt.actionType,gt),testId:"testId"in Dt?Dt.testId:`${Dt.actionType}-step`})),[st,ot,at,et,tt,pt,nt,ct,ht,mt,yt,Ft,Nt,dt,Et,vt,At]);return reactExports.useEffect(()=>{const Ct=xt[Nt];Ct.status===AuthorizationStepStatus.DONE&&Ct.actionType===Bt&&(Ft?zt(!1):(Lt(Nt+1),Ut(void 0)))},[xt[Nt].status]),reactExports.useEffect(()=>{st===AuthorizationStepStatus.ALLOWANCE_AMOUNT_ERROR&&pt===dist$5.Network.ETHEREUM&&zt(!0)},[st,pt,zt]),React$L.createElement(distExports$1.AuthorizationModal,{onClose:bt,currentStep:Nt,steps:xt,header:getTranslation(gt,"title",{action:getTranslation(gt,"title_action")})})}const mapState$3=(_e,et)=>{const{authorization:tt,requiredAllowance:nt,getConfirmationStatus:at,getConfirmationError:ot}=et;return{revokeStatus:getStepStatus(_e,AuthorizationAction.REVOKE,tt,void 0),grantStatus:getStepStatus(_e,AuthorizationAction.GRANT,tt,nt),confirmationStatus:at?at(_e):AuthorizationStepStatus.PENDING,confirmationError:ot?ot(_e):null,error:getAuthorizationFlowError(_e)||getError(_e)||""}},mapDispatch=(_e,et)=>({onRevoke:tt=>_e(authorizationFlowRequest(et.authorization,AuthorizationAction.REVOKE,"",tt)),onGrant:tt=>{var nt;return _e(authorizationFlowRequest(et.authorization,AuthorizationAction.GRANT,((nt=et.requiredAllowance)==null?void 0:nt.toString())||"",tt))},onFetchAuthorizations:()=>_e(fetchAuthorizationsRequest([et.authorization]))});connect(mapState$3,mapDispatch)(AuthorizationModal);var NFTCard$1={},NFTImage$3={},NFTImage$2={};const NFTImage$1="";var utils$1={};Object.defineProperty(utils$1,"__esModule",{value:!0});utils$1.getEstateCenter=void 0;var getEstateCenter=function(_e){var et=Array.from(new Set(_e.map(function(ot){return ot.x}).sort())),tt=Array.from(new Set(_e.map(function(ot){return ot.y}).sort())),nt=et[et.length/2|0],at=tt[tt.length/2|0];return[nt,at]};utils$1.getEstateCenter=getEstateCenter;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(_e,et,tt,nt){nt===void 0&&(nt=tt);var at=Object.getOwnPropertyDescriptor(et,tt);(!at||("get"in at?!et.__esModule:at.writable||at.configurable))&&(at={enumerable:!0,get:function(){return et[tt]}}),Object.defineProperty(_e,nt,at)}:function(_e,et,tt,nt){nt===void 0&&(nt=tt),_e[nt]=et[tt]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(_e,et){Object.defineProperty(_e,"default",{enumerable:!0,value:et})}:function(_e,et){_e.default=et}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var et={};if(_e!=null)for(var tt in _e)tt!=="default"&&Object.prototype.hasOwnProperty.call(_e,tt)&&__createBinding(et,_e,tt);return __setModuleDefault(et,_e),et},__importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(NFTImage$2,"__esModule",{value:!0});var react_1$1=__importStar(reactExports),classnames_1=__importDefault$2(classnamesExports$1),schemas_1$1=dist$a,Atlas_1=Atlas$2,utils_1=utils$1;function NFTImage(_e){var et=_e.nft,tt=_e.className;if(et.category===schemas_1$1.NFTCategory.WEARABLE||et.category===schemas_1$1.NFTCategory.EMOTE){var nt=et.category===schemas_1$1.NFTCategory.EMOTE?et.data.emote.rarity:et.data.wearable.rarity,at=schemas_1$1.Rarity.getGradient(nt),ot=at[0],st=at[1];return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image",tt),style:{backgroundImage:"radial-gradient(".concat(ot,", ").concat(st,")")}},react_1$1.default.createElement("img",{className:"dui-nft-image__image",src:et.image,alt:et.name}))}if(et.category===schemas_1$1.NFTCategory.ENS)return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--ens",tt)},react_1$1.default.createElement("span",{className:".dui-nft-image__subdomain"},et.data.ens.subdomain));if(et.category===schemas_1$1.NFTCategory.ESTATE){var ct=et.data.estate.parcels,dt=(0,react_1$1.useMemo)(function(){return(0,utils_1.getEstateCenter)(ct)},[ct]),ht=dt[0],pt=dt[1],mt=(0,react_1$1.useCallback)(function(St,Tt){return ct.some(function(Pt){var Ot=Pt.x,Nt=Pt.y;return St===Ot&&Nt===Tt})?{color:"#ff0044",scale:1.4}:null},[ct]),yt=(0,react_1$1.useCallback)(function(St,Tt){return ct.some(function(Pt){var Ot=Pt.x,Nt=Pt.y;return St===Ot&&Nt===Tt})?{color:"#ff9990",scale:1.2}:null},[ct]);return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--atlas",tt)},react_1$1.default.createElement(Atlas_1.Atlas,{className:tt,x:ht,y:pt,isDraggable:!1,layers:[mt,yt]}))}if(et.category===schemas_1$1.NFTCategory.PARCEL){var gt=Number(et.data.parcel.x),bt=Number(et.data.parcel.y),$t=(0,react_1$1.useCallback)(function(St,Tt){return gt===St&&bt===Tt?{color:"#ff0044",scale:1.4}:null},[gt,bt]),wt=(0,react_1$1.useCallback)(function(St,Tt){return gt===St&&bt===Tt?{color:"#ff9990",scale:1.2}:null},[gt,bt]);return react_1$1.default.createElement("div",{className:(0,classnames_1.default)("dui-nft-image--atlas",tt)},react_1$1.default.createElement(Atlas_1.Atlas,{className:tt,x:gt,y:bt,isDraggable:!1,layers:[$t,wt]}))}return null}NFTImage$2.default=react_1$1.default.memo(NFTImage);var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(NFTImage$3,"__esModule",{value:!0});NFTImage$3.NFTImage=void 0;var NFTImage_1=__importDefault$1(NFTImage$2);NFTImage$3.NFTImage=NFTImage_1.default;var utils={},__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(_e,et,tt){if(tt||arguments.length===2)for(var nt=0,at=et.length,ot;nt<at;nt++)(ot||!(nt in et))&&(ot||(ot=Array.prototype.slice.call(et,0,nt)),ot[nt]=et[nt]);return _e.concat(ot||Array.prototype.slice.call(et))},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(utils,"__esModule",{value:!0});utils.getSubtitle=utils.getBadges=void 0;var react_1=__importDefault(reactExports),schemas_1=dist$a,colors_1=colors$1,Profile_1=Profile$3,DEFAULT_BADGE_COLOR="#37333d";function _getEmoteBadges(_e,et){var tt=schemas_1.Rarity.getGradient(_e.rarity),nt=tt[0],at=tt[1],ot=(0,colors_1.hex2rgb)(at);return __spreadArray([{color:"rgb(".concat(ot.r," ").concat(ot.g," ").concat(ot.b," / 20%)"),label:_e.rarity,textColor:nt},{color:DEFAULT_BADGE_COLOR,label:_e.loop?et.playMode.loop:et.playMode.once,icon:_e.loop?"dui-nft-card__badge-icon--loop":"dui-nft-card__badge-icon--once",hideLabel:!0}],_e.hasSound?[{color:DEFAULT_BADGE_COLOR,label:et.withSound,icon:"dui-nft-card__badge-icon--sound",hideLabel:!0}]:[],!0)}function _getWearableBadges(_e,et){var tt=_e.bodyShapes.length===2?"unisex":_e.bodyShapes[0]===schemas_1.BodyShape.MALE?"male":"female",nt=schemas_1.Rarity.getGradient(_e.rarity),at=nt[0],ot=nt[1],st=(0,colors_1.hex2rgb)(ot);return __spreadArray([{color:"rgb(".concat(st.r," ").concat(st.g," ").concat(st.b," / 20%)"),label:_e.rarity,textColor:at},{color:DEFAULT_BADGE_COLOR,label:et.category[_e.category],icon:"dui-nft-card__badge-icon--".concat(_e.category),hideLabel:!0},{color:DEFAULT_BADGE_COLOR,label:et.bodyShape[tt],icon:"dui-nft-card__badge-icon--".concat(tt),hideLabel:!0}],_e.isSmart?[{color:DEFAULT_BADGE_COLOR,label:et.smart,icon:"dui-nft-card__badge-icon--smart",hideLabel:!0}]:[],!0)}function _getEstateBadges(_e){return[{color:DEFAULT_BADGE_COLOR,label:"".concat(_e.parcels.length," LAND")}]}function _getParcelBadges(_e){return[{color:DEFAULT_BADGE_COLOR,label:"".concat(_e.x,",").concat(_e.y),icon:"dui-nft-card__badge-icon--parcel"}]}function getBadges(_e,et){switch(_e.category){case schemas_1.NFTCategory.EMOTE:return _getEmoteBadges(_e.data.emote,et);case schemas_1.NFTCategory.WEARABLE:return _getWearableBadges(_e.data.wearable,et);case schemas_1.NFTCategory.ESTATE:return _getEstateBadges(_e.data.estate);case schemas_1.NFTCategory.PARCEL:return _getParcelBadges(_e.data.parcel);case schemas_1.NFTCategory.ENS:return[]}}utils.getBadges=getBadges;function getSubtitle(_e,et){switch(_e.category){case schemas_1.NFTCategory.EMOTE:case schemas_1.NFTCategory.WEARABLE:return react_1.default.createElement(Profile_1.Profile,{address:_e.owner,textOnly:!0});case schemas_1.NFTCategory.ENS:case schemas_1.NFTCategory.ESTATE:case schemas_1.NFTCategory.PARCEL:return et.network["".concat(_e.network.toLowerCase())]}}utils.getSubtitle=getSubtitle;const NFTCard="";(function(_e){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(wt){for(var St,Tt=1,Pt=arguments.length;Tt<Pt;Tt++){St=arguments[Tt];for(var Ot in St)Object.prototype.hasOwnProperty.call(St,Ot)&&(wt[Ot]=St[Ot])}return wt},et.apply(this,arguments)},tt=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(wt,St,Tt,Pt){Pt===void 0&&(Pt=Tt);var Ot=Object.getOwnPropertyDescriptor(St,Tt);(!Ot||("get"in Ot?!St.__esModule:Ot.writable||Ot.configurable))&&(Ot={enumerable:!0,get:function(){return St[Tt]}}),Object.defineProperty(wt,Pt,Ot)}:function(wt,St,Tt,Pt){Pt===void 0&&(Pt=Tt),wt[Pt]=St[Tt]}),nt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(wt,St){Object.defineProperty(wt,"default",{enumerable:!0,value:St})}:function(wt,St){wt.default=St}),at=commonjsGlobal&&commonjsGlobal.__importStar||function(wt){if(wt&&wt.__esModule)return wt;var St={};if(wt!=null)for(var Tt in wt)Tt!=="default"&&Object.prototype.hasOwnProperty.call(wt,Tt)&&tt(St,wt,Tt);return nt(St,wt),St},ot=commonjsGlobal&&commonjsGlobal.__rest||function(wt,St){var Tt={};for(var Pt in wt)Object.prototype.hasOwnProperty.call(wt,Pt)&&St.indexOf(Pt)<0&&(Tt[Pt]=wt[Pt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,Pt=Object.getOwnPropertySymbols(wt);Ot<Pt.length;Ot++)St.indexOf(Pt[Ot])<0&&Object.prototype.propertyIsEnumerable.call(wt,Pt[Ot])&&(Tt[Pt[Ot]]=wt[Pt[Ot]]);return Tt},st=commonjsGlobal&&commonjsGlobal.__importDefault||function(wt){return wt&&wt.__esModule?wt:{default:wt}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.NFTCard=void 0;var ct=at(reactExports),dt=st(classnamesExports$1),ht=Card$2,pt=Popup$4,mt=Mana$2,yt=NFTImage$3,gt=utils,bt=function(wt){var St,Tt,Pt=wt.badge;return Pt.icon&&Pt.hideLabel?ct.default.createElement(pt.Popup,{key:Pt.label,content:Pt.label,trigger:ct.default.createElement("span",{className:"dui-nft-card__badge--only-icon",style:{background:Pt.color,color:(St=Pt.textColor)!==null&&St!==void 0?St:"var(--text)"}},ct.default.createElement("i",{className:(0,dt.default)("dui-nft-card__badge-icon",Pt.icon),"aria-label":Pt.label}))}):ct.default.createElement("span",{className:"dui-nft-card__badge",style:{background:Pt.color,color:(Tt=Pt.textColor)!==null&&Tt!==void 0?Tt:"var(--text)"},key:Pt.label},Pt.icon&&ct.default.createElement("i",{className:(0,dt.default)("dui-nft-card__badge-icon",Pt.icon)}),Pt.label)},$t=function(wt){var St=wt.nft,Tt=wt.i18n,Pt=wt.header,Ot=wt.subtitle,Nt=wt.badges,Lt=wt.price,Bt=wt.className,Ut=ot(wt,["nft","i18n","header","subtitle","badges","price","className"]),Ft=(0,ct.useCallback)(function(){return!Pt||typeof Pt=="string"?ct.default.createElement("div",{className:"dui-nft-card__header"},ct.default.createElement("span",{className:"dui-nft-card__title"},Pt||St.name),Lt&&ct.default.createElement(mt.Mana,{network:St.network,inline:!0,className:"dui-nft-card__price"},Lt)):Pt},[Pt]),zt=(0,ct.useCallback)(function(){return!Ot||typeof Ot=="string"?ct.default.createElement("span",{className:"dui-nft-card__subtitle"},Ot||(0,gt.getSubtitle)(St,Tt)):Ot},[Ot]),It=(0,ct.useCallback)(function(){if(Nt)return Nt;var vt=(0,gt.getBadges)(St,Tt);return vt?ct.default.createElement("div",{className:"dui-nft-card__badges"},vt.map(function(Et){return ct.default.createElement(bt,{key:Et.label,badge:Et})})):null},[]);return ct.default.createElement(ht.Card,et({className:(0,dt.default)(Bt,"dui-nft-card"),link:!0,id:St.id},Ut),ct.default.createElement(yt.NFTImage,{nft:St,className:"dui-nft-card__image"}),ct.default.createElement(ht.Card.Content,{className:"dui-nft-card__information"},Ft(),zt(),It()))};_e.NFTCard=$t,_e.NFTCard.defaultProps={i18n:{network:{ethereum:"Ethereum",matic:"Matic"},bodyShape:{male:"Male",female:"Female",unisex:"Unisex"},playMode:{loop:"Loop",once:"Once"},category:{body_shape:"Body Shape",earring:"Earring",eyebrows:"Eyebrows",eyes:"Eyes",eyewear:"Eyewear",facial_hair:"Facial Hair",feet:"Feet",head:"Head",hair:"Hair",hat:"Hat",helmet:"Helmet",lower_body:"Lower Body",mask:"Mask",mouth:"Mouth",tiara:"Tiara",top_head:"Top Head",upper_body:"Upper Body",skin:"Skin",hands_wear:"Handwear"},withSound:"With sound",smart:"Smart"}}})(NFTCard$1);const RarityBadge=_e=>{const et={rarities:{[dist$5.Rarity.COMMON]:t$3("@dapps.rarities.common"),[dist$5.Rarity.UNCOMMON]:t$3("@dapps.rarities.uncommon"),[dist$5.Rarity.EXOTIC]:t$3("@dapps.rarities.exotic"),[dist$5.Rarity.RARE]:t$3("@dapps.rarities.rare"),[dist$5.Rarity.EPIC]:t$3("@dapps.rarities.epic"),[dist$5.Rarity.LEGENDARY]:t$3("@dapps.rarities.legendary"),[dist$5.Rarity.MYTHIC]:t$3("@dapps.rarities.mythic"),[dist$5.Rarity.UNIQUE]:t$3("@dapps.rarities.unique")},rarities_description:{[dist$5.Rarity.COMMON]:t$3("@dapps.rarities_description.common"),[dist$5.Rarity.UNCOMMON]:t$3("@dapps.rarities_description.uncommon"),[dist$5.Rarity.EXOTIC]:t$3("@dapps.rarities_description.exotic"),[dist$5.Rarity.RARE]:t$3("@dapps.rarities_description.rare"),[dist$5.Rarity.EPIC]:t$3("@dapps.rarities_description.epic"),[dist$5.Rarity.LEGENDARY]:t$3("@dapps.rarities_description.legendary"),[dist$5.Rarity.MYTHIC]:t$3("@dapps.rarities_description.mythic"),[dist$5.Rarity.UNIQUE]:t$3("@dapps.rarities_description.unique")}};return React$L.createElement(RarityBadge$4.RarityBadge,{..._e,i18n:et})};React$L.memo(RarityBadge);const Navbar$1="",AUTH_URL=config.get("AUTH_URL");function Navbar(_e){const et=reactExports.useCallback(()=>{window.location.replace(`${AUTH_URL}?redirectTo=${window.location.href}`)},[]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Navbar$2,{..._e,onSignIn:et,withNotifications:!1})})}function isValid$3(_e){return Date.now()<+new Date(_e.expiration)}const getState=_e=>_e.identity,getData=_e=>getState(_e).data,getLoading=_e=>getState(_e).loading;createSelector([getLoading],_e=>isLoadingType(_e,loginRequest.type));const getCurrentIdentity=createSelector([getAddress$2,getData],(_e,et)=>{if(_e){const tt=et[_e];if(et[_e]&&isValid$3(tt))return tt}return null});createSelector([getCurrentIdentity],_e=>!!_e);const mapState$2=_e=>{const et=getAddress$2(_e);return{hasActivity:et?getPendingTransactions(_e,et).length>0:!1,isConnected:isConnected(_e),identity:getCurrentIdentity(_e)||void 0}},Header=connect(mapState$2)(Navbar),Dashboard$2="",Bar$1="";function Bar(_e){const{vested:et,released:tt}=_e;return jsxRuntimeExports.jsxs("div",{className:"bar__container",children:[jsxRuntimeExports.jsx("div",{className:"bar vested",style:{width:`${et}%`}}),jsxRuntimeExports.jsx("div",{className:"bar released",style:{width:`${tt}%`}})]})}const InfoSVG="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/info-0fd81e87.svg";function Info(_e){const{message:et,position:tt}=_e;return jsxRuntimeExports.jsx("span",{className:"info",style:{padding:"5px"},children:jsxRuntimeExports.jsx(distExports$1.Popup,{content:et,position:tt,trigger:jsxRuntimeExports.jsx("img",{src:InfoSVG,alt:""}),on:"hover",style:{height:"100%"},basic:!0})})}const Progress$1="";function Progress(_e){const{contract:et}=_e,{revoked:tt}=et,nt=Math.round(et.vestedAmount/et.total*100),at=Math.round(et.released/et.total*100);return jsxRuntimeExports.jsxs("div",{id:"progress",children:[jsxRuntimeExports.jsxs(Grid$2,{children:[jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"left",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[t$3(tt?"chart.vested":"progress.vested"),jsxRuntimeExports.jsx(Info,{message:t$3("helper.vesting_so_far"),position:"right center"})]}),jsxRuntimeExports.jsxs("div",{className:"amount",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{style:{display:"inline-block"},children:[formatNumber(Math.round(et.vestedAmount),0)," ",et.symbol]}),jsxRuntimeExports.jsxs("span",{className:"percentage vested",children:[nt,"%"]})]})]}),jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"right",textAlign:"right",children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[jsxRuntimeExports.jsx(Info,{message:t$3("helper.total_vesting"),position:"left center"}),t$3("progress.total")]}),jsxRuntimeExports.jsxs(distExports$1.Header,{style:{display:"inline-block"},children:[formatNumber(Math.round(et.total),0)," ",et.symbol]})]})]}),jsxRuntimeExports.jsx(Bar,{vested:nt,released:at}),jsxRuntimeExports.jsxs("div",{children:[t$3("progress.released",{b:ot=>jsxRuntimeExports.jsx("b",{children:ot}),amount:formatNumber(Math.round(et.released),0),token:et.symbol}),jsxRuntimeExports.jsxs("span",{className:"percentage released",children:[at,"%"]})]})]})}//! moment.js
328
328
  //! version : 2.29.4
329
329
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
330
330
  //! license : MIT
@@ -333,7 +333,7 @@ var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}func
333
333
  [`+ot+"] ";for(st in arguments[0])hasOwnProp(arguments[0],st)&&(at+=st+": "+arguments[0][st]+", ");at=at.slice(0,-2)}else at=arguments[ot];nt.push(at)}warn$2(_e+`
334
334
  Arguments: `+Array.prototype.slice.call(nt).join("")+`
335
335
  `+new Error().stack),tt=!1}return et.apply(this,arguments)},et)}var deprecations={};function deprecateSimple(_e,et){hooks.deprecationHandler!=null&&hooks.deprecationHandler(_e,et),deprecations[_e]||(warn$2(et),deprecations[_e]=!0)}hooks.suppressDeprecationWarnings=!1;hooks.deprecationHandler=null;function isFunction$1(_e){return typeof Function<"u"&&_e instanceof Function||Object.prototype.toString.call(_e)==="[object Function]"}function set$1(_e){var et,tt;for(tt in _e)hasOwnProp(_e,tt)&&(et=_e[tt],isFunction$1(et)?this[tt]=et:this["_"+tt]=et);this._config=_e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(_e,et){var tt=extend$1({},_e),nt;for(nt in et)hasOwnProp(et,nt)&&(isObject$4(_e[nt])&&isObject$4(et[nt])?(tt[nt]={},extend$1(tt[nt],_e[nt]),extend$1(tt[nt],et[nt])):et[nt]!=null?tt[nt]=et[nt]:delete tt[nt]);for(nt in _e)hasOwnProp(_e,nt)&&!hasOwnProp(et,nt)&&isObject$4(_e[nt])&&(tt[nt]=extend$1({},tt[nt]));return tt}function Locale(_e){_e!=null&&this.set(_e)}var keys$1;Object.keys?keys$1=Object.keys:keys$1=function(_e){var et,tt=[];for(et in _e)hasOwnProp(_e,et)&&tt.push(et);return tt};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(_e,et,tt){var nt=this._calendar[_e]||this._calendar.sameElse;return isFunction$1(nt)?nt.call(et,tt):nt}function zeroFill(_e,et,tt){var nt=""+Math.abs(_e),at=et-nt.length,ot=_e>=0;return(ot?tt?"+":"":"-")+Math.pow(10,Math.max(0,at)).toString().substr(1)+nt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(_e,et,tt,nt){var at=nt;typeof nt=="string"&&(at=function(){return this[nt]()}),_e&&(formatTokenFunctions[_e]=at),et&&(formatTokenFunctions[et[0]]=function(){return zeroFill(at.apply(this,arguments),et[1],et[2])}),tt&&(formatTokenFunctions[tt]=function(){return this.localeData().ordinal(at.apply(this,arguments),_e)})}function removeFormattingTokens(_e){return _e.match(/\[[\s\S]/)?_e.replace(/^\[|\]$/g,""):_e.replace(/\\/g,"")}function makeFormatFunction(_e){var et=_e.match(formattingTokens),tt,nt;for(tt=0,nt=et.length;tt<nt;tt++)formatTokenFunctions[et[tt]]?et[tt]=formatTokenFunctions[et[tt]]:et[tt]=removeFormattingTokens(et[tt]);return function(at){var ot="",st;for(st=0;st<nt;st++)ot+=isFunction$1(et[st])?et[st].call(at,_e):et[st];return ot}}function formatMoment(_e,et){return _e.isValid()?(et=expandFormat(et,_e.localeData()),formatFunctions[et]=formatFunctions[et]||makeFormatFunction(et),formatFunctions[et](_e)):_e.localeData().invalidDate()}function expandFormat(_e,et){var tt=5;function nt(at){return et.longDateFormat(at)||at}for(localFormattingTokens.lastIndex=0;tt>=0&&localFormattingTokens.test(_e);)_e=_e.replace(localFormattingTokens,nt),localFormattingTokens.lastIndex=0,tt-=1;return _e}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(_e){var et=this._longDateFormat[_e],tt=this._longDateFormat[_e.toUpperCase()];return et||!tt?et:(this._longDateFormat[_e]=tt.match(formattingTokens).map(function(nt){return nt==="MMMM"||nt==="MM"||nt==="DD"||nt==="dddd"?nt.slice(1):nt}).join(""),this._longDateFormat[_e])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(_e){return this._ordinal.replace("%d",_e)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(_e,et,tt,nt){var at=this._relativeTime[tt];return isFunction$1(at)?at(_e,et,tt,nt):at.replace(/%d/i,_e)}function pastFuture(_e,et){var tt=this._relativeTime[_e>0?"future":"past"];return isFunction$1(tt)?tt(et):tt.replace(/%s/i,et)}var aliases={};function addUnitAlias(_e,et){var tt=_e.toLowerCase();aliases[tt]=aliases[tt+"s"]=aliases[et]=_e}function normalizeUnits(_e){return typeof _e=="string"?aliases[_e]||aliases[_e.toLowerCase()]:void 0}function normalizeObjectUnits(_e){var et={},tt,nt;for(nt in _e)hasOwnProp(_e,nt)&&(tt=normalizeUnits(nt),tt&&(et[tt]=_e[nt]));return et}var priorities={};function addUnitPriority(_e,et){priorities[_e]=et}function getPrioritizedUnits(_e){var et=[],tt;for(tt in _e)hasOwnProp(_e,tt)&&et.push({unit:tt,priority:priorities[tt]});return et.sort(function(nt,at){return nt.priority-at.priority}),et}function isLeapYear(_e){return _e%4===0&&_e%100!==0||_e%400===0}function absFloor(_e){return _e<0?Math.ceil(_e)||0:Math.floor(_e)}function toInt(_e){var et=+_e,tt=0;return et!==0&&isFinite(et)&&(tt=absFloor(et)),tt}function makeGetSet(_e,et){return function(tt){return tt!=null?(set$1$1(this,_e,tt),hooks.updateOffset(this,et),this):get$1(this,_e)}}function get$1(_e,et){return _e.isValid()?_e._d["get"+(_e._isUTC?"UTC":"")+et]():NaN}function set$1$1(_e,et,tt){_e.isValid()&&!isNaN(tt)&&(et==="FullYear"&&isLeapYear(_e.year())&&_e.month()===1&&_e.date()===29?(tt=toInt(tt),_e._d["set"+(_e._isUTC?"UTC":"")+et](tt,_e.month(),daysInMonth(tt,_e.month()))):_e._d["set"+(_e._isUTC?"UTC":"")+et](tt))}function stringGet(_e){return _e=normalizeUnits(_e),isFunction$1(this[_e])?this[_e]():this}function stringSet(_e,et){if(typeof _e=="object"){_e=normalizeObjectUnits(_e);var tt=getPrioritizedUnits(_e),nt,at=tt.length;for(nt=0;nt<at;nt++)this[tt[nt].unit](_e[tt[nt].unit])}else if(_e=normalizeUnits(_e),isFunction$1(this[_e]))return this[_e](et);return this}var match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes;regexes={};function addRegexToken(_e,et,tt){regexes[_e]=isFunction$1(et)?et:function(nt,at){return nt&&tt?tt:et}}function getParseRegexForToken(_e,et){return hasOwnProp(regexes,_e)?regexes[_e](et._strict,et._locale):new RegExp(unescapeFormat(_e))}function unescapeFormat(_e){return regexEscape(_e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(et,tt,nt,at,ot){return tt||nt||at||ot}))}function regexEscape(_e){return _e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var tokens={};function addParseToken(_e,et){var tt,nt=et,at;for(typeof _e=="string"&&(_e=[_e]),isNumber$1(et)&&(nt=function(ot,st){st[et]=toInt(ot)}),at=_e.length,tt=0;tt<at;tt++)tokens[_e[tt]]=nt}function addWeekParseToken(_e,et){addParseToken(_e,function(tt,nt,at,ot){at._w=at._w||{},et(tt,at._w,at,ot)})}function addTimeToArrayFromToken(_e,et,tt){et!=null&&hasOwnProp(tokens,_e)&&tokens[_e](et,tt._a,tt,_e)}var YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;function mod(_e,et){return(_e%et+et)%et}var indexOf$1;Array.prototype.indexOf?indexOf$1=Array.prototype.indexOf:indexOf$1=function(_e){var et;for(et=0;et<this.length;++et)if(this[et]===_e)return et;return-1};function daysInMonth(_e,et){if(isNaN(_e)||isNaN(et))return NaN;var tt=mod(et,12);return _e+=(et-tt)/12,tt===1?isLeapYear(_e)?29:28:31-tt%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1});addFormatToken("MMM",0,0,function(_e){return this.localeData().monthsShort(this,_e)});addFormatToken("MMMM",0,0,function(_e){return this.localeData().months(this,_e)});addUnitAlias("month","M");addUnitPriority("month",8);addRegexToken("M",match1to2);addRegexToken("MM",match1to2,match2);addRegexToken("MMM",function(_e,et){return et.monthsShortRegex(_e)});addRegexToken("MMMM",function(_e,et){return et.monthsRegex(_e)});addParseToken(["M","MM"],function(_e,et){et[MONTH]=toInt(_e)-1});addParseToken(["MMM","MMMM"],function(_e,et,tt,nt){var at=tt._locale.monthsParse(_e,nt,tt._strict);at!=null?et[MONTH]=at:getParsingFlags(tt).invalidMonth=_e});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;function localeMonths(_e,et){return _e?isArray$2(this._months)?this._months[_e.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(et)?"format":"standalone"][_e.month()]:isArray$2(this._months)?this._months:this._months.standalone}function localeMonthsShort(_e,et){return _e?isArray$2(this._monthsShort)?this._monthsShort[_e.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(et)?"format":"standalone"][_e.month()]:isArray$2(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(_e,et,tt){var nt,at,ot,st=_e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],nt=0;nt<12;++nt)ot=createUTC([2e3,nt]),this._shortMonthsParse[nt]=this.monthsShort(ot,"").toLocaleLowerCase(),this._longMonthsParse[nt]=this.months(ot,"").toLocaleLowerCase();return tt?et==="MMM"?(at=indexOf$1.call(this._shortMonthsParse,st),at!==-1?at:null):(at=indexOf$1.call(this._longMonthsParse,st),at!==-1?at:null):et==="MMM"?(at=indexOf$1.call(this._shortMonthsParse,st),at!==-1?at:(at=indexOf$1.call(this._longMonthsParse,st),at!==-1?at:null)):(at=indexOf$1.call(this._longMonthsParse,st),at!==-1?at:(at=indexOf$1.call(this._shortMonthsParse,st),at!==-1?at:null))}function localeMonthsParse(_e,et,tt){var nt,at,ot;if(this._monthsParseExact)return handleStrictParse.call(this,_e,et,tt);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),nt=0;nt<12;nt++){if(at=createUTC([2e3,nt]),tt&&!this._longMonthsParse[nt]&&(this._longMonthsParse[nt]=new RegExp("^"+this.months(at,"").replace(".","")+"$","i"),this._shortMonthsParse[nt]=new RegExp("^"+this.monthsShort(at,"").replace(".","")+"$","i")),!tt&&!this._monthsParse[nt]&&(ot="^"+this.months(at,"")+"|^"+this.monthsShort(at,""),this._monthsParse[nt]=new RegExp(ot.replace(".",""),"i")),tt&&et==="MMMM"&&this._longMonthsParse[nt].test(_e))return nt;if(tt&&et==="MMM"&&this._shortMonthsParse[nt].test(_e))return nt;if(!tt&&this._monthsParse[nt].test(_e))return nt}}function setMonth(_e,et){var tt;if(!_e.isValid())return _e;if(typeof et=="string"){if(/^\d+$/.test(et))et=toInt(et);else if(et=_e.localeData().monthsParse(et),!isNumber$1(et))return _e}return tt=Math.min(_e.date(),daysInMonth(_e.year(),et)),_e._d["set"+(_e._isUTC?"UTC":"")+"Month"](et,tt),_e}function getSetMonth(_e){return _e!=null?(setMonth(this,_e),hooks.updateOffset(this,!0),this):get$1(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(_e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),_e?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&_e?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(_e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),_e?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&_e?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function _e(st,ct){return ct.length-st.length}var et=[],tt=[],nt=[],at,ot;for(at=0;at<12;at++)ot=createUTC([2e3,at]),et.push(this.monthsShort(ot,"")),tt.push(this.months(ot,"")),nt.push(this.months(ot,"")),nt.push(this.monthsShort(ot,""));for(et.sort(_e),tt.sort(_e),nt.sort(_e),at=0;at<12;at++)et[at]=regexEscape(et[at]),tt[at]=regexEscape(tt[at]);for(at=0;at<24;at++)nt[at]=regexEscape(nt[at]);this._monthsRegex=new RegExp("^("+nt.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+tt.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+et.join("|")+")","i")}addFormatToken("Y",0,0,function(){var _e=this.year();return _e<=9999?zeroFill(_e,4):"+"+_e});addFormatToken(0,["YY",2],0,function(){return this.year()%100});addFormatToken(0,["YYYY",4],0,"year");addFormatToken(0,["YYYYY",5],0,"year");addFormatToken(0,["YYYYYY",6,!0],0,"year");addUnitAlias("year","y");addUnitPriority("year",1);addRegexToken("Y",matchSigned);addRegexToken("YY",match1to2,match2);addRegexToken("YYYY",match1to4,match4);addRegexToken("YYYYY",match1to6,match6);addRegexToken("YYYYYY",match1to6,match6);addParseToken(["YYYYY","YYYYYY"],YEAR);addParseToken("YYYY",function(_e,et){et[YEAR]=_e.length===2?hooks.parseTwoDigitYear(_e):toInt(_e)});addParseToken("YY",function(_e,et){et[YEAR]=hooks.parseTwoDigitYear(_e)});addParseToken("Y",function(_e,et){et[YEAR]=parseInt(_e,10)});function daysInYear(_e){return isLeapYear(_e)?366:365}hooks.parseTwoDigitYear=function(_e){return toInt(_e)+(toInt(_e)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(_e,et,tt,nt,at,ot,st){var ct;return _e<100&&_e>=0?(ct=new Date(_e+400,et,tt,nt,at,ot,st),isFinite(ct.getFullYear())&&ct.setFullYear(_e)):ct=new Date(_e,et,tt,nt,at,ot,st),ct}function createUTCDate(_e){var et,tt;return _e<100&&_e>=0?(tt=Array.prototype.slice.call(arguments),tt[0]=_e+400,et=new Date(Date.UTC.apply(null,tt)),isFinite(et.getUTCFullYear())&&et.setUTCFullYear(_e)):et=new Date(Date.UTC.apply(null,arguments)),et}function firstWeekOffset(_e,et,tt){var nt=7+et-tt,at=(7+createUTCDate(_e,0,nt).getUTCDay()-et)%7;return-at+nt-1}function dayOfYearFromWeeks(_e,et,tt,nt,at){var ot=(7+tt-nt)%7,st=firstWeekOffset(_e,nt,at),ct=1+7*(et-1)+ot+st,dt,ht;return ct<=0?(dt=_e-1,ht=daysInYear(dt)+ct):ct>daysInYear(_e)?(dt=_e+1,ht=ct-daysInYear(_e)):(dt=_e,ht=ct),{year:dt,dayOfYear:ht}}function weekOfYear(_e,et,tt){var nt=firstWeekOffset(_e.year(),et,tt),at=Math.floor((_e.dayOfYear()-nt-1)/7)+1,ot,st;return at<1?(st=_e.year()-1,ot=at+weeksInYear(st,et,tt)):at>weeksInYear(_e.year(),et,tt)?(ot=at-weeksInYear(_e.year(),et,tt),st=_e.year()+1):(st=_e.year(),ot=at),{week:ot,year:st}}function weeksInYear(_e,et,tt){var nt=firstWeekOffset(_e,et,tt),at=firstWeekOffset(_e+1,et,tt);return(daysInYear(_e)-nt+at)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(_e,et,tt,nt){et[nt.substr(0,1)]=toInt(_e)});function localeWeek(_e){return weekOfYear(_e,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(_e){var et=this.localeData().week(this);return _e==null?et:this.add((_e-et)*7,"d")}function getSetISOWeek(_e){var et=weekOfYear(this,1,4).week;return _e==null?et:this.add((_e-et)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(_e){return this.localeData().weekdaysMin(this,_e)});addFormatToken("ddd",0,0,function(_e){return this.localeData().weekdaysShort(this,_e)});addFormatToken("dddd",0,0,function(_e){return this.localeData().weekdays(this,_e)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(_e,et){return et.weekdaysMinRegex(_e)});addRegexToken("ddd",function(_e,et){return et.weekdaysShortRegex(_e)});addRegexToken("dddd",function(_e,et){return et.weekdaysRegex(_e)});addWeekParseToken(["dd","ddd","dddd"],function(_e,et,tt,nt){var at=tt._locale.weekdaysParse(_e,nt,tt._strict);at!=null?et.d=at:getParsingFlags(tt).invalidWeekday=_e});addWeekParseToken(["d","e","E"],function(_e,et,tt,nt){et[nt]=toInt(_e)});function parseWeekday(_e,et){return typeof _e!="string"?_e:isNaN(_e)?(_e=et.weekdaysParse(_e),typeof _e=="number"?_e:null):parseInt(_e,10)}function parseIsoWeekday(_e,et){return typeof _e=="string"?et.weekdaysParse(_e)%7||7:isNaN(_e)?null:_e}function shiftWeekdays(_e,et){return _e.slice(et,7).concat(_e.slice(0,et))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(_e,et){var tt=isArray$2(this._weekdays)?this._weekdays:this._weekdays[_e&&_e!==!0&&this._weekdays.isFormat.test(et)?"format":"standalone"];return _e===!0?shiftWeekdays(tt,this._week.dow):_e?tt[_e.day()]:tt}function localeWeekdaysShort(_e){return _e===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):_e?this._weekdaysShort[_e.day()]:this._weekdaysShort}function localeWeekdaysMin(_e){return _e===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):_e?this._weekdaysMin[_e.day()]:this._weekdaysMin}function handleStrictParse$1(_e,et,tt){var nt,at,ot,st=_e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],nt=0;nt<7;++nt)ot=createUTC([2e3,1]).day(nt),this._minWeekdaysParse[nt]=this.weekdaysMin(ot,"").toLocaleLowerCase(),this._shortWeekdaysParse[nt]=this.weekdaysShort(ot,"").toLocaleLowerCase(),this._weekdaysParse[nt]=this.weekdays(ot,"").toLocaleLowerCase();return tt?et==="dddd"?(at=indexOf$1.call(this._weekdaysParse,st),at!==-1?at:null):et==="ddd"?(at=indexOf$1.call(this._shortWeekdaysParse,st),at!==-1?at:null):(at=indexOf$1.call(this._minWeekdaysParse,st),at!==-1?at:null):et==="dddd"?(at=indexOf$1.call(this._weekdaysParse,st),at!==-1||(at=indexOf$1.call(this._shortWeekdaysParse,st),at!==-1)?at:(at=indexOf$1.call(this._minWeekdaysParse,st),at!==-1?at:null)):et==="ddd"?(at=indexOf$1.call(this._shortWeekdaysParse,st),at!==-1||(at=indexOf$1.call(this._weekdaysParse,st),at!==-1)?at:(at=indexOf$1.call(this._minWeekdaysParse,st),at!==-1?at:null)):(at=indexOf$1.call(this._minWeekdaysParse,st),at!==-1||(at=indexOf$1.call(this._weekdaysParse,st),at!==-1)?at:(at=indexOf$1.call(this._shortWeekdaysParse,st),at!==-1?at:null))}function localeWeekdaysParse(_e,et,tt){var nt,at,ot;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,_e,et,tt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),nt=0;nt<7;nt++){if(at=createUTC([2e3,1]).day(nt),tt&&!this._fullWeekdaysParse[nt]&&(this._fullWeekdaysParse[nt]=new RegExp("^"+this.weekdays(at,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[nt]=new RegExp("^"+this.weekdaysShort(at,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[nt]=new RegExp("^"+this.weekdaysMin(at,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[nt]||(ot="^"+this.weekdays(at,"")+"|^"+this.weekdaysShort(at,"")+"|^"+this.weekdaysMin(at,""),this._weekdaysParse[nt]=new RegExp(ot.replace(".",""),"i")),tt&&et==="dddd"&&this._fullWeekdaysParse[nt].test(_e))return nt;if(tt&&et==="ddd"&&this._shortWeekdaysParse[nt].test(_e))return nt;if(tt&&et==="dd"&&this._minWeekdaysParse[nt].test(_e))return nt;if(!tt&&this._weekdaysParse[nt].test(_e))return nt}}function getSetDayOfWeek(_e){if(!this.isValid())return _e!=null?this:NaN;var et=this._isUTC?this._d.getUTCDay():this._d.getDay();return _e!=null?(_e=parseWeekday(_e,this.localeData()),this.add(_e-et,"d")):et}function getSetLocaleDayOfWeek(_e){if(!this.isValid())return _e!=null?this:NaN;var et=(this.day()+7-this.localeData()._week.dow)%7;return _e==null?et:this.add(_e-et,"d")}function getSetISODayOfWeek(_e){if(!this.isValid())return _e!=null?this:NaN;if(_e!=null){var et=parseIsoWeekday(_e,this.localeData());return this.day(this.day()%7?et:et-7)}else return this.day()||7}function weekdaysRegex(_e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),_e?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&_e?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(_e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),_e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&_e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(_e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),_e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&_e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function _e(pt,mt){return mt.length-pt.length}var et=[],tt=[],nt=[],at=[],ot,st,ct,dt,ht;for(ot=0;ot<7;ot++)st=createUTC([2e3,1]).day(ot),ct=regexEscape(this.weekdaysMin(st,"")),dt=regexEscape(this.weekdaysShort(st,"")),ht=regexEscape(this.weekdays(st,"")),et.push(ct),tt.push(dt),nt.push(ht),at.push(ct),at.push(dt),at.push(ht);et.sort(_e),tt.sort(_e),nt.sort(_e),at.sort(_e),this._weekdaysRegex=new RegExp("^("+at.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+tt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+et.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(_e,et){addFormatToken(_e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),et)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(_e,et){return et._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(_e,et,tt){var nt=toInt(_e);et[HOUR]=nt===24?0:nt});addParseToken(["a","A"],function(_e,et,tt){tt._isPm=tt._locale.isPM(_e),tt._meridiem=_e});addParseToken(["h","hh"],function(_e,et,tt){et[HOUR]=toInt(_e),getParsingFlags(tt).bigHour=!0});addParseToken("hmm",function(_e,et,tt){var nt=_e.length-2;et[HOUR]=toInt(_e.substr(0,nt)),et[MINUTE]=toInt(_e.substr(nt)),getParsingFlags(tt).bigHour=!0});addParseToken("hmmss",function(_e,et,tt){var nt=_e.length-4,at=_e.length-2;et[HOUR]=toInt(_e.substr(0,nt)),et[MINUTE]=toInt(_e.substr(nt,2)),et[SECOND]=toInt(_e.substr(at)),getParsingFlags(tt).bigHour=!0});addParseToken("Hmm",function(_e,et,tt){var nt=_e.length-2;et[HOUR]=toInt(_e.substr(0,nt)),et[MINUTE]=toInt(_e.substr(nt))});addParseToken("Hmmss",function(_e,et,tt){var nt=_e.length-4,at=_e.length-2;et[HOUR]=toInt(_e.substr(0,nt)),et[MINUTE]=toInt(_e.substr(nt,2)),et[SECOND]=toInt(_e.substr(at))});function localeIsPM(_e){return(_e+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(_e,et,tt){return _e>11?tt?"pm":"PM":tt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(_e,et){var tt,nt=Math.min(_e.length,et.length);for(tt=0;tt<nt;tt+=1)if(_e[tt]!==et[tt])return tt;return nt}function normalizeLocale(_e){return _e&&_e.toLowerCase().replace("_","-")}function chooseLocale(_e){for(var et=0,tt,nt,at,ot;et<_e.length;){for(ot=normalizeLocale(_e[et]).split("-"),tt=ot.length,nt=normalizeLocale(_e[et+1]),nt=nt?nt.split("-"):null;tt>0;){if(at=loadLocale(ot.slice(0,tt).join("-")),at)return at;if(nt&&nt.length>=tt&&commonPrefix(ot,nt)>=tt-1)break;tt--}et++}return globalLocale}function isLocaleNameSane(_e){return _e.match("^[^/\\\\]*$")!=null}function loadLocale(_e){var et=null,tt;if(locales[_e]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(_e))try{et=globalLocale._abbr,tt=require,tt("./locale/"+_e),getSetGlobalLocale(et)}catch{locales[_e]=null}return locales[_e]}function getSetGlobalLocale(_e,et){var tt;return _e&&(isUndefined(et)?tt=getLocale(_e):tt=defineLocale(_e,et),tt?globalLocale=tt:typeof console<"u"&&console.warn&&console.warn("Locale "+_e+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(_e,et){if(et!==null){var tt,nt=baseConfig;if(et.abbr=_e,locales[_e]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),nt=locales[_e]._config;else if(et.parentLocale!=null)if(locales[et.parentLocale]!=null)nt=locales[et.parentLocale]._config;else if(tt=loadLocale(et.parentLocale),tt!=null)nt=tt._config;else return localeFamilies[et.parentLocale]||(localeFamilies[et.parentLocale]=[]),localeFamilies[et.parentLocale].push({name:_e,config:et}),null;return locales[_e]=new Locale(mergeConfigs(nt,et)),localeFamilies[_e]&&localeFamilies[_e].forEach(function(at){defineLocale(at.name,at.config)}),getSetGlobalLocale(_e),locales[_e]}else return delete locales[_e],null}function updateLocale(_e,et){if(et!=null){var tt,nt,at=baseConfig;locales[_e]!=null&&locales[_e].parentLocale!=null?locales[_e].set(mergeConfigs(locales[_e]._config,et)):(nt=loadLocale(_e),nt!=null&&(at=nt._config),et=mergeConfigs(at,et),nt==null&&(et.abbr=_e),tt=new Locale(et),tt.parentLocale=locales[_e],locales[_e]=tt),getSetGlobalLocale(_e)}else locales[_e]!=null&&(locales[_e].parentLocale!=null?(locales[_e]=locales[_e].parentLocale,_e===getSetGlobalLocale()&&getSetGlobalLocale(_e)):locales[_e]!=null&&delete locales[_e]);return locales[_e]}function getLocale(_e){var et;if(_e&&_e._locale&&_e._locale._abbr&&(_e=_e._locale._abbr),!_e)return globalLocale;if(!isArray$2(_e)){if(et=loadLocale(_e),et)return et;_e=[_e]}return chooseLocale(_e)}function listLocales(){return keys$1(locales)}function checkOverflow(_e){var et,tt=_e._a;return tt&&getParsingFlags(_e).overflow===-2&&(et=tt[MONTH]<0||tt[MONTH]>11?MONTH:tt[DATE]<1||tt[DATE]>daysInMonth(tt[YEAR],tt[MONTH])?DATE:tt[HOUR]<0||tt[HOUR]>24||tt[HOUR]===24&&(tt[MINUTE]!==0||tt[SECOND]!==0||tt[MILLISECOND]!==0)?HOUR:tt[MINUTE]<0||tt[MINUTE]>59?MINUTE:tt[SECOND]<0||tt[SECOND]>59?SECOND:tt[MILLISECOND]<0||tt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(_e)._overflowDayOfYear&&(et<YEAR||et>DATE)&&(et=DATE),getParsingFlags(_e)._overflowWeeks&&et===-1&&(et=WEEK),getParsingFlags(_e)._overflowWeekday&&et===-1&&(et=WEEKDAY),getParsingFlags(_e).overflow=et),_e}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(_e){var et,tt,nt=_e._i,at=extendedIsoRegex.exec(nt)||basicIsoRegex.exec(nt),ot,st,ct,dt,ht=isoDates.length,pt=isoTimes.length;if(at){for(getParsingFlags(_e).iso=!0,et=0,tt=ht;et<tt;et++)if(isoDates[et][1].exec(at[1])){st=isoDates[et][0],ot=isoDates[et][2]!==!1;break}if(st==null){_e._isValid=!1;return}if(at[3]){for(et=0,tt=pt;et<tt;et++)if(isoTimes[et][1].exec(at[3])){ct=(at[2]||" ")+isoTimes[et][0];break}if(ct==null){_e._isValid=!1;return}}if(!ot&&ct!=null){_e._isValid=!1;return}if(at[4])if(tzRegex.exec(at[4]))dt="Z";else{_e._isValid=!1;return}_e._f=st+(ct||"")+(dt||""),configFromStringAndFormat(_e)}else _e._isValid=!1}function extractFromRFC2822Strings(_e,et,tt,nt,at,ot){var st=[untruncateYear(_e),defaultLocaleMonthsShort.indexOf(et),parseInt(tt,10),parseInt(nt,10),parseInt(at,10)];return ot&&st.push(parseInt(ot,10)),st}function untruncateYear(_e){var et=parseInt(_e,10);return et<=49?2e3+et:et<=999?1900+et:et}function preprocessRFC2822(_e){return _e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(_e,et,tt){if(_e){var nt=defaultLocaleWeekdaysShort.indexOf(_e),at=new Date(et[0],et[1],et[2]).getDay();if(nt!==at)return getParsingFlags(tt).weekdayMismatch=!0,tt._isValid=!1,!1}return!0}function calculateOffset(_e,et,tt){if(_e)return obsOffsets[_e];if(et)return 0;var nt=parseInt(tt,10),at=nt%100,ot=(nt-at)/100;return ot*60+at}function configFromRFC2822(_e){var et=rfc2822.exec(preprocessRFC2822(_e._i)),tt;if(et){if(tt=extractFromRFC2822Strings(et[4],et[3],et[2],et[5],et[6],et[7]),!checkWeekday(et[1],tt,_e))return;_e._a=tt,_e._tzm=calculateOffset(et[8],et[9],et[10]),_e._d=createUTCDate.apply(null,_e._a),_e._d.setUTCMinutes(_e._d.getUTCMinutes()-_e._tzm),getParsingFlags(_e).rfc2822=!0}else _e._isValid=!1}function configFromString(_e){var et=aspNetJsonRegex.exec(_e._i);if(et!==null){_e._d=new Date(+et[1]);return}if(configFromISO(_e),_e._isValid===!1)delete _e._isValid;else return;if(configFromRFC2822(_e),_e._isValid===!1)delete _e._isValid;else return;_e._strict?_e._isValid=!1:hooks.createFromInputFallback(_e)}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(_e){_e._d=new Date(_e._i+(_e._useUTC?" UTC":""))});function defaults$1(_e,et,tt){return _e??et??tt}function currentDateArray(_e){var et=new Date(hooks.now());return _e._useUTC?[et.getUTCFullYear(),et.getUTCMonth(),et.getUTCDate()]:[et.getFullYear(),et.getMonth(),et.getDate()]}function configFromArray(_e){var et,tt,nt=[],at,ot,st;if(!_e._d){for(at=currentDateArray(_e),_e._w&&_e._a[DATE]==null&&_e._a[MONTH]==null&&dayOfYearFromWeekInfo(_e),_e._dayOfYear!=null&&(st=defaults$1(_e._a[YEAR],at[YEAR]),(_e._dayOfYear>daysInYear(st)||_e._dayOfYear===0)&&(getParsingFlags(_e)._overflowDayOfYear=!0),tt=createUTCDate(st,0,_e._dayOfYear),_e._a[MONTH]=tt.getUTCMonth(),_e._a[DATE]=tt.getUTCDate()),et=0;et<3&&_e._a[et]==null;++et)_e._a[et]=nt[et]=at[et];for(;et<7;et++)_e._a[et]=nt[et]=_e._a[et]==null?et===2?1:0:_e._a[et];_e._a[HOUR]===24&&_e._a[MINUTE]===0&&_e._a[SECOND]===0&&_e._a[MILLISECOND]===0&&(_e._nextDay=!0,_e._a[HOUR]=0),_e._d=(_e._useUTC?createUTCDate:createDate).apply(null,nt),ot=_e._useUTC?_e._d.getUTCDay():_e._d.getDay(),_e._tzm!=null&&_e._d.setUTCMinutes(_e._d.getUTCMinutes()-_e._tzm),_e._nextDay&&(_e._a[HOUR]=24),_e._w&&typeof _e._w.d<"u"&&_e._w.d!==ot&&(getParsingFlags(_e).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(_e){var et,tt,nt,at,ot,st,ct,dt,ht;et=_e._w,et.GG!=null||et.W!=null||et.E!=null?(ot=1,st=4,tt=defaults$1(et.GG,_e._a[YEAR],weekOfYear(createLocal(),1,4).year),nt=defaults$1(et.W,1),at=defaults$1(et.E,1),(at<1||at>7)&&(dt=!0)):(ot=_e._locale._week.dow,st=_e._locale._week.doy,ht=weekOfYear(createLocal(),ot,st),tt=defaults$1(et.gg,_e._a[YEAR],ht.year),nt=defaults$1(et.w,ht.week),et.d!=null?(at=et.d,(at<0||at>6)&&(dt=!0)):et.e!=null?(at=et.e+ot,(et.e<0||et.e>6)&&(dt=!0)):at=ot),nt<1||nt>weeksInYear(tt,ot,st)?getParsingFlags(_e)._overflowWeeks=!0:dt!=null?getParsingFlags(_e)._overflowWeekday=!0:(ct=dayOfYearFromWeeks(tt,nt,at,ot,st),_e._a[YEAR]=ct.year,_e._dayOfYear=ct.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(_e){if(_e._f===hooks.ISO_8601){configFromISO(_e);return}if(_e._f===hooks.RFC_2822){configFromRFC2822(_e);return}_e._a=[],getParsingFlags(_e).empty=!0;var et=""+_e._i,tt,nt,at,ot,st,ct=et.length,dt=0,ht,pt;for(at=expandFormat(_e._f,_e._locale).match(formattingTokens)||[],pt=at.length,tt=0;tt<pt;tt++)ot=at[tt],nt=(et.match(getParseRegexForToken(ot,_e))||[])[0],nt&&(st=et.substr(0,et.indexOf(nt)),st.length>0&&getParsingFlags(_e).unusedInput.push(st),et=et.slice(et.indexOf(nt)+nt.length),dt+=nt.length),formatTokenFunctions[ot]?(nt?getParsingFlags(_e).empty=!1:getParsingFlags(_e).unusedTokens.push(ot),addTimeToArrayFromToken(ot,nt,_e)):_e._strict&&!nt&&getParsingFlags(_e).unusedTokens.push(ot);getParsingFlags(_e).charsLeftOver=ct-dt,et.length>0&&getParsingFlags(_e).unusedInput.push(et),_e._a[HOUR]<=12&&getParsingFlags(_e).bigHour===!0&&_e._a[HOUR]>0&&(getParsingFlags(_e).bigHour=void 0),getParsingFlags(_e).parsedDateParts=_e._a.slice(0),getParsingFlags(_e).meridiem=_e._meridiem,_e._a[HOUR]=meridiemFixWrap(_e._locale,_e._a[HOUR],_e._meridiem),ht=getParsingFlags(_e).era,ht!==null&&(_e._a[YEAR]=_e._locale.erasConvertYear(ht,_e._a[YEAR])),configFromArray(_e),checkOverflow(_e)}function meridiemFixWrap(_e,et,tt){var nt;return tt==null?et:_e.meridiemHour!=null?_e.meridiemHour(et,tt):(_e.isPM!=null&&(nt=_e.isPM(tt),nt&&et<12&&(et+=12),!nt&&et===12&&(et=0)),et)}function configFromStringAndArray(_e){var et,tt,nt,at,ot,st,ct=!1,dt=_e._f.length;if(dt===0){getParsingFlags(_e).invalidFormat=!0,_e._d=new Date(NaN);return}for(at=0;at<dt;at++)ot=0,st=!1,et=copyConfig({},_e),_e._useUTC!=null&&(et._useUTC=_e._useUTC),et._f=_e._f[at],configFromStringAndFormat(et),isValid(et)&&(st=!0),ot+=getParsingFlags(et).charsLeftOver,ot+=getParsingFlags(et).unusedTokens.length*10,getParsingFlags(et).score=ot,ct?ot<nt&&(nt=ot,tt=et):(nt==null||ot<nt||st)&&(nt=ot,tt=et,st&&(ct=!0));extend$1(_e,tt||et)}function configFromObject(_e){if(!_e._d){var et=normalizeObjectUnits(_e._i),tt=et.day===void 0?et.date:et.day;_e._a=map$2([et.year,et.month,tt,et.hour,et.minute,et.second,et.millisecond],function(nt){return nt&&parseInt(nt,10)}),configFromArray(_e)}}function createFromConfig(_e){var et=new Moment(checkOverflow(prepareConfig(_e)));return et._nextDay&&(et.add(1,"d"),et._nextDay=void 0),et}function prepareConfig(_e){var et=_e._i,tt=_e._f;return _e._locale=_e._locale||getLocale(_e._l),et===null||tt===void 0&&et===""?createInvalid({nullInput:!0}):(typeof et=="string"&&(_e._i=et=_e._locale.preparse(et)),isMoment(et)?new Moment(checkOverflow(et)):(isDate(et)?_e._d=et:isArray$2(tt)?configFromStringAndArray(_e):tt?configFromStringAndFormat(_e):configFromInput(_e),isValid(_e)||(_e._d=null),_e))}function configFromInput(_e){var et=_e._i;isUndefined(et)?_e._d=new Date(hooks.now()):isDate(et)?_e._d=new Date(et.valueOf()):typeof et=="string"?configFromString(_e):isArray$2(et)?(_e._a=map$2(et.slice(0),function(tt){return parseInt(tt,10)}),configFromArray(_e)):isObject$4(et)?configFromObject(_e):isNumber$1(et)?_e._d=new Date(et):hooks.createFromInputFallback(_e)}function createLocalOrUTC(_e,et,tt,nt,at){var ot={};return(et===!0||et===!1)&&(nt=et,et=void 0),(tt===!0||tt===!1)&&(nt=tt,tt=void 0),(isObject$4(_e)&&isObjectEmpty(_e)||isArray$2(_e)&&_e.length===0)&&(_e=void 0),ot._isAMomentObject=!0,ot._useUTC=ot._isUTC=at,ot._l=tt,ot._i=_e,ot._f=et,ot._strict=nt,createFromConfig(ot)}function createLocal(_e,et,tt,nt){return createLocalOrUTC(_e,et,tt,nt,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var _e=createLocal.apply(null,arguments);return this.isValid()&&_e.isValid()?_e<this?this:_e:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var _e=createLocal.apply(null,arguments);return this.isValid()&&_e.isValid()?_e>this?this:_e:createInvalid()});function pickBy(_e,et){var tt,nt;if(et.length===1&&isArray$2(et[0])&&(et=et[0]),!et.length)return createLocal();for(tt=et[0],nt=1;nt<et.length;++nt)(!et[nt].isValid()||et[nt][_e](tt))&&(tt=et[nt]);return tt}function min$2(){var _e=[].slice.call(arguments,0);return pickBy("isBefore",_e)}function max$2(){var _e=[].slice.call(arguments,0);return pickBy("isAfter",_e)}var now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(_e){var et,tt=!1,nt,at=ordering.length;for(et in _e)if(hasOwnProp(_e,et)&&!(indexOf$1.call(ordering,et)!==-1&&(_e[et]==null||!isNaN(_e[et]))))return!1;for(nt=0;nt<at;++nt)if(_e[ordering[nt]]){if(tt)return!1;parseFloat(_e[ordering[nt]])!==toInt(_e[ordering[nt]])&&(tt=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(_e){var et=normalizeObjectUnits(_e),tt=et.year||0,nt=et.quarter||0,at=et.month||0,ot=et.week||et.isoWeek||0,st=et.day||0,ct=et.hour||0,dt=et.minute||0,ht=et.second||0,pt=et.millisecond||0;this._isValid=isDurationValid(et),this._milliseconds=+pt+ht*1e3+dt*6e4+ct*1e3*60*60,this._days=+st+ot*7,this._months=+at+nt*3+tt*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(_e){return _e instanceof Duration}function absRound(_e){return _e<0?Math.round(-1*_e)*-1:Math.round(_e)}function compareArrays(_e,et,tt){var nt=Math.min(_e.length,et.length),at=Math.abs(_e.length-et.length),ot=0,st;for(st=0;st<nt;st++)(tt&&_e[st]!==et[st]||!tt&&toInt(_e[st])!==toInt(et[st]))&&ot++;return ot+at}function offset(_e,et){addFormatToken(_e,0,0,function(){var tt=this.utcOffset(),nt="+";return tt<0&&(tt=-tt,nt="-"),nt+zeroFill(~~(tt/60),2)+et+zeroFill(~~tt%60,2)})}offset("Z",":");offset("ZZ","");addRegexToken("Z",matchShortOffset);addRegexToken("ZZ",matchShortOffset);addParseToken(["Z","ZZ"],function(_e,et,tt){tt._useUTC=!0,tt._tzm=offsetFromString(matchShortOffset,_e)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(_e,et){var tt=(et||"").match(_e),nt,at,ot;return tt===null?null:(nt=tt[tt.length-1]||[],at=(nt+"").match(chunkOffset)||["-",0,0],ot=+(at[1]*60)+toInt(at[2]),ot===0?0:at[0]==="+"?ot:-ot)}function cloneWithOffset(_e,et){var tt,nt;return et._isUTC?(tt=et.clone(),nt=(isMoment(_e)||isDate(_e)?_e.valueOf():createLocal(_e).valueOf())-tt.valueOf(),tt._d.setTime(tt._d.valueOf()+nt),hooks.updateOffset(tt,!1),tt):createLocal(_e).local()}function getDateOffset(_e){return-Math.round(_e._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(_e,et,tt){var nt=this._offset||0,at;if(!this.isValid())return _e!=null?this:NaN;if(_e!=null){if(typeof _e=="string"){if(_e=offsetFromString(matchShortOffset,_e),_e===null)return this}else Math.abs(_e)<16&&!tt&&(_e=_e*60);return!this._isUTC&&et&&(at=getDateOffset(this)),this._offset=_e,this._isUTC=!0,at!=null&&this.add(at,"m"),nt!==_e&&(!et||this._changeInProgress?addSubtract(this,createDuration(_e-nt,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?nt:getDateOffset(this)}function getSetZone(_e,et){return _e!=null?(typeof _e!="string"&&(_e=-_e),this.utcOffset(_e,et),this):-this.utcOffset()}function setOffsetToUTC(_e){return this.utcOffset(0,_e)}function setOffsetToLocal(_e){return this._isUTC&&(this.utcOffset(0,_e),this._isUTC=!1,_e&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var _e=offsetFromString(matchOffset,this._i);_e!=null?this.utcOffset(_e):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(_e){return this.isValid()?(_e=_e?createLocal(_e).utcOffset():0,(this.utcOffset()-_e)%60===0):!1}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var _e={},et;return copyConfig(_e,this),_e=prepareConfig(_e),_e._a?(et=_e._isUTC?createUTC(_e._a):createLocal(_e._a),this._isDSTShifted=this.isValid()&&compareArrays(_e._a,et.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(_e,et){var tt=_e,nt=null,at,ot,st;return isDuration(_e)?tt={ms:_e._milliseconds,d:_e._days,M:_e._months}:isNumber$1(_e)||!isNaN(+_e)?(tt={},et?tt[et]=+_e:tt.milliseconds=+_e):(nt=aspNetRegex.exec(_e))?(at=nt[1]==="-"?-1:1,tt={y:0,d:toInt(nt[DATE])*at,h:toInt(nt[HOUR])*at,m:toInt(nt[MINUTE])*at,s:toInt(nt[SECOND])*at,ms:toInt(absRound(nt[MILLISECOND]*1e3))*at}):(nt=isoRegex.exec(_e))?(at=nt[1]==="-"?-1:1,tt={y:parseIso(nt[2],at),M:parseIso(nt[3],at),w:parseIso(nt[4],at),d:parseIso(nt[5],at),h:parseIso(nt[6],at),m:parseIso(nt[7],at),s:parseIso(nt[8],at)}):tt==null?tt={}:typeof tt=="object"&&("from"in tt||"to"in tt)&&(st=momentsDifference(createLocal(tt.from),createLocal(tt.to)),tt={},tt.ms=st.milliseconds,tt.M=st.months),ot=new Duration(tt),isDuration(_e)&&hasOwnProp(_e,"_locale")&&(ot._locale=_e._locale),isDuration(_e)&&hasOwnProp(_e,"_isValid")&&(ot._isValid=_e._isValid),ot}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(_e,et){var tt=_e&&parseFloat(_e.replace(",","."));return(isNaN(tt)?0:tt)*et}function positiveMomentsDifference(_e,et){var tt={};return tt.months=et.month()-_e.month()+(et.year()-_e.year())*12,_e.clone().add(tt.months,"M").isAfter(et)&&--tt.months,tt.milliseconds=+et-+_e.clone().add(tt.months,"M"),tt}function momentsDifference(_e,et){var tt;return _e.isValid()&&et.isValid()?(et=cloneWithOffset(et,_e),_e.isBefore(et)?tt=positiveMomentsDifference(_e,et):(tt=positiveMomentsDifference(et,_e),tt.milliseconds=-tt.milliseconds,tt.months=-tt.months),tt):{milliseconds:0,months:0}}function createAdder(_e,et){return function(tt,nt){var at,ot;return nt!==null&&!isNaN(+nt)&&(deprecateSimple(et,"moment()."+et+"(period, number) is deprecated. Please use moment()."+et+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),ot=tt,tt=nt,nt=ot),at=createDuration(tt,nt),addSubtract(this,at,_e),this}}function addSubtract(_e,et,tt,nt){var at=et._milliseconds,ot=absRound(et._days),st=absRound(et._months);_e.isValid()&&(nt=nt??!0,st&&setMonth(_e,get$1(_e,"Month")+st*tt),ot&&set$1$1(_e,"Date",get$1(_e,"Date")+ot*tt),at&&_e._d.setTime(_e._d.valueOf()+at*tt),nt&&hooks.updateOffset(_e,ot||st))}var add$1=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString$1(_e){return typeof _e=="string"||_e instanceof String}function isMomentInput(_e){return isMoment(_e)||isDate(_e)||isString$1(_e)||isNumber$1(_e)||isNumberOrStringArray(_e)||isMomentInputObject(_e)||_e===null||_e===void 0}function isMomentInputObject(_e){var et=isObject$4(_e)&&!isObjectEmpty(_e),tt=!1,nt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],at,ot,st=nt.length;for(at=0;at<st;at+=1)ot=nt[at],tt=tt||hasOwnProp(_e,ot);return et&&tt}function isNumberOrStringArray(_e){var et=isArray$2(_e),tt=!1;return et&&(tt=_e.filter(function(nt){return!isNumber$1(nt)&&isString$1(_e)}).length===0),et&&tt}function isCalendarSpec(_e){var et=isObject$4(_e)&&!isObjectEmpty(_e),tt=!1,nt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],at,ot;for(at=0;at<nt.length;at+=1)ot=nt[at],tt=tt||hasOwnProp(_e,ot);return et&&tt}function getCalendarFormat(_e,et){var tt=_e.diff(et,"days",!0);return tt<-6?"sameElse":tt<-1?"lastWeek":tt<0?"lastDay":tt<1?"sameDay":tt<2?"nextDay":tt<7?"nextWeek":"sameElse"}function calendar$1(_e,et){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(_e=arguments[0],et=void 0):isCalendarSpec(arguments[0])&&(et=arguments[0],_e=void 0):(_e=void 0,et=void 0));var tt=_e||createLocal(),nt=cloneWithOffset(tt,this).startOf("day"),at=hooks.calendarFormat(this,nt)||"sameElse",ot=et&&(isFunction$1(et[at])?et[at].call(this,tt):et[at]);return this.format(ot||this.localeData().calendar(at,this,createLocal(tt)))}function clone$4(){return new Moment(this)}function isAfter(_e,et){var tt=isMoment(_e)?_e:createLocal(_e);return this.isValid()&&tt.isValid()?(et=normalizeUnits(et)||"millisecond",et==="millisecond"?this.valueOf()>tt.valueOf():tt.valueOf()<this.clone().startOf(et).valueOf()):!1}function isBefore(_e,et){var tt=isMoment(_e)?_e:createLocal(_e);return this.isValid()&&tt.isValid()?(et=normalizeUnits(et)||"millisecond",et==="millisecond"?this.valueOf()<tt.valueOf():this.clone().endOf(et).valueOf()<tt.valueOf()):!1}function isBetween(_e,et,tt,nt){var at=isMoment(_e)?_e:createLocal(_e),ot=isMoment(et)?et:createLocal(et);return this.isValid()&&at.isValid()&&ot.isValid()?(nt=nt||"()",(nt[0]==="("?this.isAfter(at,tt):!this.isBefore(at,tt))&&(nt[1]===")"?this.isBefore(ot,tt):!this.isAfter(ot,tt))):!1}function isSame(_e,et){var tt=isMoment(_e)?_e:createLocal(_e),nt;return this.isValid()&&tt.isValid()?(et=normalizeUnits(et)||"millisecond",et==="millisecond"?this.valueOf()===tt.valueOf():(nt=tt.valueOf(),this.clone().startOf(et).valueOf()<=nt&&nt<=this.clone().endOf(et).valueOf())):!1}function isSameOrAfter(_e,et){return this.isSame(_e,et)||this.isAfter(_e,et)}function isSameOrBefore(_e,et){return this.isSame(_e,et)||this.isBefore(_e,et)}function diff(_e,et,tt){var nt,at,ot;if(!this.isValid())return NaN;if(nt=cloneWithOffset(_e,this),!nt.isValid())return NaN;switch(at=(nt.utcOffset()-this.utcOffset())*6e4,et=normalizeUnits(et),et){case"year":ot=monthDiff(this,nt)/12;break;case"month":ot=monthDiff(this,nt);break;case"quarter":ot=monthDiff(this,nt)/3;break;case"second":ot=(this-nt)/1e3;break;case"minute":ot=(this-nt)/6e4;break;case"hour":ot=(this-nt)/36e5;break;case"day":ot=(this-nt-at)/864e5;break;case"week":ot=(this-nt-at)/6048e5;break;default:ot=this-nt}return tt?ot:absFloor(ot)}function monthDiff(_e,et){if(_e.date()<et.date())return-monthDiff(et,_e);var tt=(et.year()-_e.year())*12+(et.month()-_e.month()),nt=_e.clone().add(tt,"months"),at,ot;return et-nt<0?(at=_e.clone().add(tt-1,"months"),ot=(et-nt)/(nt-at)):(at=_e.clone().add(tt+1,"months"),ot=(et-nt)/(at-nt)),-(tt+ot)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString$1(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(_e){if(!this.isValid())return null;var et=_e!==!0,tt=et?this.clone().utc():this;return tt.year()<0||tt.year()>9999?formatMoment(tt,et?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$1(Date.prototype.toISOString)?et?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(tt,"Z")):formatMoment(tt,et?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var _e="moment",et="",tt,nt,at,ot;return this.isLocal()||(_e=this.utcOffset()===0?"moment.utc":"moment.parseZone",et="Z"),tt="["+_e+'("]',nt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",at="-MM-DD[T]HH:mm:ss.SSS",ot=et+'[")]',this.format(tt+nt+at+ot)}function format$1(_e){_e||(_e=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var et=formatMoment(this,_e);return this.localeData().postformat(et)}function from(_e,et){return this.isValid()&&(isMoment(_e)&&_e.isValid()||createLocal(_e).isValid())?createDuration({to:this,from:_e}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function fromNow(_e){return this.from(createLocal(),_e)}function to(_e,et){return this.isValid()&&(isMoment(_e)&&_e.isValid()||createLocal(_e).isValid())?createDuration({from:this,to:_e}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function toNow(_e){return this.to(createLocal(),_e)}function locale(_e){var et;return _e===void 0?this._locale._abbr:(et=getLocale(_e),et!=null&&(this._locale=et),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(_e){return _e===void 0?this.localeData():this.locale(_e)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(_e,et){return(_e%et+et)%et}function localStartOfDate(_e,et,tt){return _e<100&&_e>=0?new Date(_e+400,et,tt)-MS_PER_400_YEARS:new Date(_e,et,tt).valueOf()}function utcStartOfDate(_e,et,tt){return _e<100&&_e>=0?Date.UTC(_e+400,et,tt)-MS_PER_400_YEARS:Date.UTC(_e,et,tt)}function startOf(_e){var et,tt;if(_e=normalizeUnits(_e),_e===void 0||_e==="millisecond"||!this.isValid())return this;switch(tt=this._isUTC?utcStartOfDate:localStartOfDate,_e){case"year":et=tt(this.year(),0,1);break;case"quarter":et=tt(this.year(),this.month()-this.month()%3,1);break;case"month":et=tt(this.year(),this.month(),1);break;case"week":et=tt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":et=tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":et=tt(this.year(),this.month(),this.date());break;case"hour":et=this._d.valueOf(),et-=mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":et=this._d.valueOf(),et-=mod$1(et,MS_PER_MINUTE);break;case"second":et=this._d.valueOf(),et-=mod$1(et,MS_PER_SECOND);break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function endOf(_e){var et,tt;if(_e=normalizeUnits(_e),_e===void 0||_e==="millisecond"||!this.isValid())return this;switch(tt=this._isUTC?utcStartOfDate:localStartOfDate,_e){case"year":et=tt(this.year()+1,0,1)-1;break;case"quarter":et=tt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":et=tt(this.year(),this.month()+1,1)-1;break;case"week":et=tt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":et=tt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":et=tt(this.year(),this.month(),this.date()+1)-1;break;case"hour":et=this._d.valueOf(),et+=MS_PER_HOUR-mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":et=this._d.valueOf(),et+=MS_PER_MINUTE-mod$1(et,MS_PER_MINUTE)-1;break;case"second":et=this._d.valueOf(),et+=MS_PER_SECOND-mod$1(et,MS_PER_SECOND)-1;break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var _e=this;return[_e.year(),_e.month(),_e.date(),_e.hour(),_e.minute(),_e.second(),_e.millisecond()]}function toObject(){var _e=this;return{years:_e.year(),months:_e.month(),date:_e.date(),hours:_e.hours(),minutes:_e.minutes(),seconds:_e.seconds(),milliseconds:_e.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$1({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(_e,et,tt,nt){var at=tt._locale.erasParse(_e,nt,tt._strict);at?getParsingFlags(tt).era=at:getParsingFlags(tt).invalidEra=_e});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(_e,et,tt,nt){var at;tt._locale._eraYearOrdinalRegex&&(at=_e.match(tt._locale._eraYearOrdinalRegex)),tt._locale.eraYearOrdinalParse?et[YEAR]=tt._locale.eraYearOrdinalParse(_e,at):et[YEAR]=parseInt(_e,10)});function localeEras(_e,et){var tt,nt,at,ot=this._eras||getLocale("en")._eras;for(tt=0,nt=ot.length;tt<nt;++tt){switch(typeof ot[tt].since){case"string":at=hooks(ot[tt].since).startOf("day"),ot[tt].since=at.valueOf();break}switch(typeof ot[tt].until){case"undefined":ot[tt].until=1/0;break;case"string":at=hooks(ot[tt].until).startOf("day").valueOf(),ot[tt].until=at.valueOf();break}}return ot}function localeErasParse(_e,et,tt){var nt,at,ot=this.eras(),st,ct,dt;for(_e=_e.toUpperCase(),nt=0,at=ot.length;nt<at;++nt)if(st=ot[nt].name.toUpperCase(),ct=ot[nt].abbr.toUpperCase(),dt=ot[nt].narrow.toUpperCase(),tt)switch(et){case"N":case"NN":case"NNN":if(ct===_e)return ot[nt];break;case"NNNN":if(st===_e)return ot[nt];break;case"NNNNN":if(dt===_e)return ot[nt];break}else if([st,ct,dt].indexOf(_e)>=0)return ot[nt]}function localeErasConvertYear(_e,et){var tt=_e.since<=_e.until?1:-1;return et===void 0?hooks(_e.since).year():hooks(_e.since).year()+(et-_e.offset)*tt}function getEraName(){var _e,et,tt,nt=this.localeData().eras();for(_e=0,et=nt.length;_e<et;++_e)if(tt=this.clone().startOf("day").valueOf(),nt[_e].since<=tt&&tt<=nt[_e].until||nt[_e].until<=tt&&tt<=nt[_e].since)return nt[_e].name;return""}function getEraNarrow(){var _e,et,tt,nt=this.localeData().eras();for(_e=0,et=nt.length;_e<et;++_e)if(tt=this.clone().startOf("day").valueOf(),nt[_e].since<=tt&&tt<=nt[_e].until||nt[_e].until<=tt&&tt<=nt[_e].since)return nt[_e].narrow;return""}function getEraAbbr(){var _e,et,tt,nt=this.localeData().eras();for(_e=0,et=nt.length;_e<et;++_e)if(tt=this.clone().startOf("day").valueOf(),nt[_e].since<=tt&&tt<=nt[_e].until||nt[_e].until<=tt&&tt<=nt[_e].since)return nt[_e].abbr;return""}function getEraYear(){var _e,et,tt,nt,at=this.localeData().eras();for(_e=0,et=at.length;_e<et;++_e)if(tt=at[_e].since<=at[_e].until?1:-1,nt=this.clone().startOf("day").valueOf(),at[_e].since<=nt&&nt<=at[_e].until||at[_e].until<=nt&&nt<=at[_e].since)return(this.year()-hooks(at[_e].since).year())*tt+at[_e].offset;return this.year()}function erasNameRegex(_e){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),_e?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(_e){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),_e?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(_e){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),_e?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(_e,et){return et.erasAbbrRegex(_e)}function matchEraName(_e,et){return et.erasNameRegex(_e)}function matchEraNarrow(_e,et){return et.erasNarrowRegex(_e)}function matchEraYearOrdinal(_e,et){return et._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var _e=[],et=[],tt=[],nt=[],at,ot,st=this.eras();for(at=0,ot=st.length;at<ot;++at)et.push(regexEscape(st[at].name)),_e.push(regexEscape(st[at].abbr)),tt.push(regexEscape(st[at].narrow)),nt.push(regexEscape(st[at].name)),nt.push(regexEscape(st[at].abbr)),nt.push(regexEscape(st[at].narrow));this._erasRegex=new RegExp("^("+nt.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+et.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+_e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+tt.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100});addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(_e,et){addFormatToken(0,[_e,_e.length],0,et)}addWeekYearFormatToken("gggg","weekYear");addWeekYearFormatToken("ggggg","weekYear");addWeekYearFormatToken("GGGG","isoWeekYear");addWeekYearFormatToken("GGGGG","isoWeekYear");addUnitAlias("weekYear","gg");addUnitAlias("isoWeekYear","GG");addUnitPriority("weekYear",1);addUnitPriority("isoWeekYear",1);addRegexToken("G",matchSigned);addRegexToken("g",matchSigned);addRegexToken("GG",match1to2,match2);addRegexToken("gg",match1to2,match2);addRegexToken("GGGG",match1to4,match4);addRegexToken("gggg",match1to4,match4);addRegexToken("GGGGG",match1to6,match6);addRegexToken("ggggg",match1to6,match6);addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(_e,et,tt,nt){et[nt.substr(0,2)]=toInt(_e)});addWeekParseToken(["gg","GG"],function(_e,et,tt,nt){et[nt]=hooks.parseTwoDigitYear(_e)});function getSetWeekYear(_e){return getSetWeekYearHelper.call(this,_e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(_e){return getSetWeekYearHelper.call(this,_e,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var _e=this.localeData()._week;return weeksInYear(this.year(),_e.dow,_e.doy)}function getWeeksInWeekYear(){var _e=this.localeData()._week;return weeksInYear(this.weekYear(),_e.dow,_e.doy)}function getSetWeekYearHelper(_e,et,tt,nt,at){var ot;return _e==null?weekOfYear(this,nt,at).year:(ot=weeksInYear(_e,nt,at),et>ot&&(et=ot),setWeekAll.call(this,_e,et,tt,nt,at))}function setWeekAll(_e,et,tt,nt,at){var ot=dayOfYearFromWeeks(_e,et,tt,nt,at),st=createUTCDate(ot.year,0,ot.dayOfYear);return this.year(st.getUTCFullYear()),this.month(st.getUTCMonth()),this.date(st.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(_e,et){et[MONTH]=(toInt(_e)-1)*3});function getSetQuarter(_e){return _e==null?Math.ceil((this.month()+1)/3):this.month((_e-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(_e,et){return _e?et._dayOfMonthOrdinalParse||et._ordinalParse:et._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(_e,et){et[DATE]=toInt(_e.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(_e,et,tt){tt._dayOfYear=toInt(_e)});function getSetDayOfYear(_e){var et=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return _e==null?et:this.add(_e-et,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(_e,et){et[MILLISECOND]=toInt(("0."+_e)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto$1=Moment.prototype;proto$1.add=add$1;proto$1.calendar=calendar$1;proto$1.clone=clone$4;proto$1.diff=diff;proto$1.endOf=endOf;proto$1.format=format$1;proto$1.from=from;proto$1.fromNow=fromNow;proto$1.to=to;proto$1.toNow=toNow;proto$1.get=stringGet;proto$1.invalidAt=invalidAt;proto$1.isAfter=isAfter;proto$1.isBefore=isBefore;proto$1.isBetween=isBetween;proto$1.isSame=isSame;proto$1.isSameOrAfter=isSameOrAfter;proto$1.isSameOrBefore=isSameOrBefore;proto$1.isValid=isValid$2;proto$1.lang=lang;proto$1.locale=locale;proto$1.localeData=localeData;proto$1.max=prototypeMax;proto$1.min=prototypeMin;proto$1.parsingFlags=parsingFlags;proto$1.set=stringSet;proto$1.startOf=startOf;proto$1.subtract=subtract;proto$1.toArray=toArray;proto$1.toObject=toObject;proto$1.toDate=toDate;proto$1.toISOString=toISOString;proto$1.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto$1[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto$1.toJSON=toJSON;proto$1.toString=toString$1;proto$1.unix=unix;proto$1.valueOf=valueOf;proto$1.creationData=creationData;proto$1.eraName=getEraName;proto$1.eraNarrow=getEraNarrow;proto$1.eraAbbr=getEraAbbr;proto$1.eraYear=getEraYear;proto$1.year=getSetYear;proto$1.isLeapYear=getIsLeapYear;proto$1.weekYear=getSetWeekYear;proto$1.isoWeekYear=getSetISOWeekYear;proto$1.quarter=proto$1.quarters=getSetQuarter;proto$1.month=getSetMonth;proto$1.daysInMonth=getDaysInMonth;proto$1.week=proto$1.weeks=getSetWeek;proto$1.isoWeek=proto$1.isoWeeks=getSetISOWeek;proto$1.weeksInYear=getWeeksInYear;proto$1.weeksInWeekYear=getWeeksInWeekYear;proto$1.isoWeeksInYear=getISOWeeksInYear;proto$1.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto$1.date=getSetDayOfMonth;proto$1.day=proto$1.days=getSetDayOfWeek;proto$1.weekday=getSetLocaleDayOfWeek;proto$1.isoWeekday=getSetISODayOfWeek;proto$1.dayOfYear=getSetDayOfYear;proto$1.hour=proto$1.hours=getSetHour;proto$1.minute=proto$1.minutes=getSetMinute;proto$1.second=proto$1.seconds=getSetSecond;proto$1.millisecond=proto$1.milliseconds=getSetMillisecond;proto$1.utcOffset=getSetOffset;proto$1.utc=setOffsetToUTC;proto$1.local=setOffsetToLocal;proto$1.parseZone=setOffsetToParsedOffset;proto$1.hasAlignedHourOffset=hasAlignedHourOffset;proto$1.isDST=isDaylightSavingTime;proto$1.isLocal=isLocal;proto$1.isUtcOffset=isUtcOffset;proto$1.isUtc=isUtc;proto$1.isUTC=isUtc;proto$1.zoneAbbr=getZoneAbbr;proto$1.zoneName=getZoneName;proto$1.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto$1.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto$1.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto$1.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto$1.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(_e){return createLocal(_e*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(_e){return _e}var proto$1$1=Locale.prototype;proto$1$1.calendar=calendar;proto$1$1.longDateFormat=longDateFormat;proto$1$1.invalidDate=invalidDate;proto$1$1.ordinal=ordinal;proto$1$1.preparse=preParsePostFormat;proto$1$1.postformat=preParsePostFormat;proto$1$1.relativeTime=relativeTime;proto$1$1.pastFuture=pastFuture;proto$1$1.set=set$1;proto$1$1.eras=localeEras;proto$1$1.erasParse=localeErasParse;proto$1$1.erasConvertYear=localeErasConvertYear;proto$1$1.erasAbbrRegex=erasAbbrRegex;proto$1$1.erasNameRegex=erasNameRegex;proto$1$1.erasNarrowRegex=erasNarrowRegex;proto$1$1.months=localeMonths;proto$1$1.monthsShort=localeMonthsShort;proto$1$1.monthsParse=localeMonthsParse;proto$1$1.monthsRegex=monthsRegex;proto$1$1.monthsShortRegex=monthsShortRegex;proto$1$1.week=localeWeek;proto$1$1.firstDayOfYear=localeFirstDayOfYear;proto$1$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1$1.weekdays=localeWeekdays;proto$1$1.weekdaysMin=localeWeekdaysMin;proto$1$1.weekdaysShort=localeWeekdaysShort;proto$1$1.weekdaysParse=localeWeekdaysParse;proto$1$1.weekdaysRegex=weekdaysRegex;proto$1$1.weekdaysShortRegex=weekdaysShortRegex;proto$1$1.weekdaysMinRegex=weekdaysMinRegex;proto$1$1.isPM=localeIsPM;proto$1$1.meridiem=localeMeridiem;function get$1$1(_e,et,tt,nt){var at=getLocale(),ot=createUTC().set(nt,et);return at[tt](ot,_e)}function listMonthsImpl(_e,et,tt){if(isNumber$1(_e)&&(et=_e,_e=void 0),_e=_e||"",et!=null)return get$1$1(_e,et,tt,"month");var nt,at=[];for(nt=0;nt<12;nt++)at[nt]=get$1$1(_e,nt,tt,"month");return at}function listWeekdaysImpl(_e,et,tt,nt){typeof _e=="boolean"?(isNumber$1(et)&&(tt=et,et=void 0),et=et||""):(et=_e,tt=et,_e=!1,isNumber$1(et)&&(tt=et,et=void 0),et=et||"");var at=getLocale(),ot=_e?at._week.dow:0,st,ct=[];if(tt!=null)return get$1$1(et,(tt+ot)%7,nt,"day");for(st=0;st<7;st++)ct[st]=get$1$1(et,(st+ot)%7,nt,"day");return ct}function listMonths(_e,et){return listMonthsImpl(_e,et,"months")}function listMonthsShort(_e,et){return listMonthsImpl(_e,et,"monthsShort")}function listWeekdays(_e,et,tt){return listWeekdaysImpl(_e,et,tt,"weekdays")}function listWeekdaysShort(_e,et,tt){return listWeekdaysImpl(_e,et,tt,"weekdaysShort")}function listWeekdaysMin(_e,et,tt){return listWeekdaysImpl(_e,et,tt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(_e){var et=_e%10,tt=toInt(_e%100/10)===1?"th":et===1?"st":et===2?"nd":et===3?"rd":"th";return _e+tt}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs$2=Math.abs;function abs$1(){var _e=this._data;return this._milliseconds=mathAbs$2(this._milliseconds),this._days=mathAbs$2(this._days),this._months=mathAbs$2(this._months),_e.milliseconds=mathAbs$2(_e.milliseconds),_e.seconds=mathAbs$2(_e.seconds),_e.minutes=mathAbs$2(_e.minutes),_e.hours=mathAbs$2(_e.hours),_e.months=mathAbs$2(_e.months),_e.years=mathAbs$2(_e.years),this}function addSubtract$1(_e,et,tt,nt){var at=createDuration(et,tt);return _e._milliseconds+=nt*at._milliseconds,_e._days+=nt*at._days,_e._months+=nt*at._months,_e._bubble()}function add$1$1(_e,et){return addSubtract$1(this,_e,et,1)}function subtract$1(_e,et){return addSubtract$1(this,_e,et,-1)}function absCeil(_e){return _e<0?Math.floor(_e):Math.ceil(_e)}function bubble(){var _e=this._milliseconds,et=this._days,tt=this._months,nt=this._data,at,ot,st,ct,dt;return _e>=0&&et>=0&&tt>=0||_e<=0&&et<=0&&tt<=0||(_e+=absCeil(monthsToDays(tt)+et)*864e5,et=0,tt=0),nt.milliseconds=_e%1e3,at=absFloor(_e/1e3),nt.seconds=at%60,ot=absFloor(at/60),nt.minutes=ot%60,st=absFloor(ot/60),nt.hours=st%24,et+=absFloor(st/24),dt=absFloor(daysToMonths(et)),tt+=dt,et-=absCeil(monthsToDays(dt)),ct=absFloor(tt/12),tt%=12,nt.days=et,nt.months=tt,nt.years=ct,this}function daysToMonths(_e){return _e*4800/146097}function monthsToDays(_e){return _e*146097/4800}function as(_e){if(!this.isValid())return NaN;var et,tt,nt=this._milliseconds;if(_e=normalizeUnits(_e),_e==="month"||_e==="quarter"||_e==="year")switch(et=this._days+nt/864e5,tt=this._months+daysToMonths(et),_e){case"month":return tt;case"quarter":return tt/3;case"year":return tt/12}else switch(et=this._days+Math.round(monthsToDays(this._months)),_e){case"week":return et/7+nt/6048e5;case"day":return et+nt/864e5;case"hour":return et*24+nt/36e5;case"minute":return et*1440+nt/6e4;case"second":return et*86400+nt/1e3;case"millisecond":return Math.floor(et*864e5)+nt;default:throw new Error("Unknown unit "+_e)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(_e){return function(){return this.as(_e)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2(_e){return _e=normalizeUnits(_e),this.isValid()?this[_e+"s"]():NaN}function makeGetter(_e){return function(){return this.isValid()?this._data[_e]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$4=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(_e,et,tt,nt,at){return at.relativeTime(et||1,!!tt,_e,nt)}function relativeTime$1(_e,et,tt,nt){var at=createDuration(_e).abs(),ot=round$4(at.as("s")),st=round$4(at.as("m")),ct=round$4(at.as("h")),dt=round$4(at.as("d")),ht=round$4(at.as("M")),pt=round$4(at.as("w")),mt=round$4(at.as("y")),yt=ot<=tt.ss&&["s",ot]||ot<tt.s&&["ss",ot]||st<=1&&["m"]||st<tt.m&&["mm",st]||ct<=1&&["h"]||ct<tt.h&&["hh",ct]||dt<=1&&["d"]||dt<tt.d&&["dd",dt];return tt.w!=null&&(yt=yt||pt<=1&&["w"]||pt<tt.w&&["ww",pt]),yt=yt||ht<=1&&["M"]||ht<tt.M&&["MM",ht]||mt<=1&&["y"]||["yy",mt],yt[2]=et,yt[3]=+_e>0,yt[4]=nt,substituteTimeAgo.apply(null,yt)}function getSetRelativeTimeRounding(_e){return _e===void 0?round$4:typeof _e=="function"?(round$4=_e,!0):!1}function getSetRelativeTimeThreshold(_e,et){return thresholds[_e]===void 0?!1:et===void 0?thresholds[_e]:(thresholds[_e]=et,_e==="s"&&(thresholds.ss=et-1),!0)}function humanize(_e,et){if(!this.isValid())return this.localeData().invalidDate();var tt=!1,nt=thresholds,at,ot;return typeof _e=="object"&&(et=_e,_e=!1),typeof _e=="boolean"&&(tt=_e),typeof et=="object"&&(nt=Object.assign({},thresholds,et),et.s!=null&&et.ss==null&&(nt.ss=et.s-1)),at=this.localeData(),ot=relativeTime$1(this,!tt,nt,at),tt&&(ot=at.pastFuture(+this,ot)),at.postformat(ot)}var abs$1$1=Math.abs;function sign(_e){return(_e>0)-(_e<0)||+_e}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var _e=abs$1$1(this._milliseconds)/1e3,et=abs$1$1(this._days),tt=abs$1$1(this._months),nt,at,ot,st,ct=this.asSeconds(),dt,ht,pt,mt;return ct?(nt=absFloor(_e/60),at=absFloor(nt/60),_e%=60,nt%=60,ot=absFloor(tt/12),tt%=12,st=_e?_e.toFixed(3).replace(/\.?0+$/,""):"",dt=ct<0?"-":"",ht=sign(this._months)!==sign(ct)?"-":"",pt=sign(this._days)!==sign(ct)?"-":"",mt=sign(this._milliseconds)!==sign(ct)?"-":"",dt+"P"+(ot?ht+ot+"Y":"")+(tt?ht+tt+"M":"")+(et?pt+et+"D":"")+(at||nt||_e?"T":"")+(at?mt+at+"H":"")+(nt?mt+nt+"M":"")+(_e?mt+st+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs$1;proto$2.add=add$1$1;proto$2.subtract=subtract$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1$1;proto$2.get=get$2;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(_e,et,tt){tt._d=new Date(parseFloat(_e)*1e3)});addParseToken("x",function(_e,et,tt){tt._d=new Date(toInt(_e))});//! moment.js
336
- hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$1;hooks.min=min$2;hooks.max=max$2;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$1;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};if(typeof moment>"u"&&typeof require=="function")var moment=require("moment");function momentPreciseRangePlugin(_e){var et={nodiff:"",year:"year",years:"years",month:"month",months:"months",day:"day",days:"days",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds",delimiter:" "};function tt(ot,st){return ot+" "+et[st+(ot===1?"":"s")]}function nt(ot,st,ct,dt,ht,pt){var mt=[];return ot&&mt.push(tt(ot,"year")),st&&mt.push(tt(st,"month")),ct&&mt.push(tt(ct,"day")),dt&&mt.push(tt(dt,"hour")),ht&&mt.push(tt(ht,"minute")),pt&&mt.push(tt(pt,"second")),mt.join(et.delimiter)}function at(ot,st,ct,dt,ht,pt,mt){return{years:ot,months:st,days:ct,hours:dt,minutes:ht,seconds:pt,firstDateWasLater:mt}}_e.fn.preciseDiff=function(ot,st){return _e.preciseDiff(this,ot,st)},_e.preciseDiff=function(ot,st,ct){var dt=_e(ot),ht=_e(st),pt;if(dt.add(ht.utcOffset()-dt.utcOffset(),"minutes"),dt.isSame(ht))return ct?at(0,0,0,0,0,0,!1):et.nodiff;if(dt.isAfter(ht)){var mt=dt;dt=ht,ht=mt,pt=!0}else pt=!1;var yt=ht.year()-dt.year(),gt=ht.month()-dt.month(),bt=ht.date()-dt.date(),$t=ht.hour()-dt.hour(),wt=ht.minute()-dt.minute(),St=ht.second()-dt.second();if(St<0&&(St=60+St,wt--),wt<0&&(wt=60+wt,$t--),$t<0&&($t=24+$t,bt--),bt<0){var Tt=_e(ht.year()+"-"+(ht.month()+1),"YYYY-MM").subtract(1,"M").daysInMonth();Tt<dt.date()?bt=Tt+bt+(dt.date()-Tt):bt=Tt+bt,gt--}return gt<0&&(gt=12+gt,yt--),ct?at(yt,gt,bt,$t,wt,St,pt):nt(yt,gt,bt,$t,wt,St)}}momentPreciseRangePlugin(hooks);const DATE_FORMAT_LONG="MMMM D, YYYY",DATE_FORMAT_SHORT="MMM D, YYYY";function isValidAddress(_e){return/^(0x)?[0-9a-f]{40}$/i.test(_e)}function getPreciseDiff(_e,et){const tt=hooks.preciseDiff(hooks(_e*1e3),hooks(et*1e3),!0);return{months:tt.years*12+tt.months,days:tt.days}}function openInNewTab(_e,et=null){window.open(_e,"_blank").focus(),et&&et.preventDefault()}function copyToClipboard(_e){return navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(_e):Promise.reject("The Clipboard API is not available.")}const AddressIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/address_icon-f840b960.svg",onlyMobileMaxWidth=767;let CURRENT_WIDTH=onlyMobileMaxWidth;function useResponsive(){const[_e,et]=reactExports.useState(CURRENT_WIDTH);return reactExports.useEffect(()=>{function tt(){const nt=window.innerWidth;CURRENT_WIDTH!==nt&&(CURRENT_WIDTH=nt),_e!==nt&&et(nt)}return tt(),window.addEventListener("resize",tt),()=>{window.removeEventListener("resize",tt)}},[_e]),reactExports.useCallback(function(nt={}){return!(nt.minWidth!==void 0&&_e<nt.minWidth||nt.maxWidth!==void 0&&_e>nt.maxWidth)},[_e])}const ChangeBeneficiaryModal$1="";var DP=20,RM=1,MAX_DP=1e6,MAX_POWER=1e6,NE=-7,PE=21,STRICT=!1,NAME="[big.js] ",INVALID=NAME+"Invalid ",INVALID_DP=INVALID+"decimal places",INVALID_RM=INVALID+"rounding mode",DIV_BY_ZERO=NAME+"Division by zero",P={},UNDEFINED$1=void 0,NUMERIC=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function _Big_(){function _e(et){var tt=this;if(!(tt instanceof _e))return et===UNDEFINED$1?_Big_():new _e(et);if(et instanceof _e)tt.s=et.s,tt.e=et.e,tt.c=et.c.slice();else{if(typeof et!="string"){if(_e.strict===!0&&typeof et!="bigint")throw TypeError(INVALID+"value");et=et===0&&1/et<0?"-0":String(et)}parse$1(tt,et)}tt.constructor=_e}return _e.prototype=P,_e.DP=DP,_e.RM=RM,_e.NE=NE,_e.PE=PE,_e.strict=STRICT,_e.roundDown=0,_e.roundHalfUp=1,_e.roundHalfEven=2,_e.roundUp=3,_e}function parse$1(_e,et){var tt,nt,at;if(!NUMERIC.test(et))throw Error(INVALID+"number");for(_e.s=et.charAt(0)=="-"?(et=et.slice(1),-1):1,(tt=et.indexOf("."))>-1&&(et=et.replace(".","")),(nt=et.search(/e/i))>0?(tt<0&&(tt=nt),tt+=+et.slice(nt+1),et=et.substring(0,nt)):tt<0&&(tt=et.length),at=et.length,nt=0;nt<at&&et.charAt(nt)=="0";)++nt;if(nt==at)_e.c=[_e.e=0];else{for(;at>0&&et.charAt(--at)=="0";);for(_e.e=tt-nt-1,_e.c=[],tt=0;nt<=at;)_e.c[tt++]=+et.charAt(nt++)}return _e}function round$3(_e,et,tt,nt){var at=_e.c;if(tt===UNDEFINED$1&&(tt=_e.constructor.RM),tt!==0&&tt!==1&&tt!==2&&tt!==3)throw Error(INVALID_RM);if(et<1)nt=tt===3&&(nt||!!at[0])||et===0&&(tt===1&&at[0]>=5||tt===2&&(at[0]>5||at[0]===5&&(nt||at[1]!==UNDEFINED$1))),at.length=1,nt?(_e.e=_e.e-et+1,at[0]=1):at[0]=_e.e=0;else if(et<at.length){if(nt=tt===1&&at[et]>=5||tt===2&&(at[et]>5||at[et]===5&&(nt||at[et+1]!==UNDEFINED$1||at[et-1]&1))||tt===3&&(nt||!!at[0]),at.length=et,nt){for(;++at[--et]>9;)if(at[et]=0,et===0){++_e.e,at.unshift(1);break}}for(et=at.length;!at[--et];)at.pop()}return _e}function stringify$1(_e,et,tt){var nt=_e.e,at=_e.c.join(""),ot=at.length;if(et)at=at.charAt(0)+(ot>1?"."+at.slice(1):"")+(nt<0?"e":"e+")+nt;else if(nt<0){for(;++nt;)at="0"+at;at="0."+at}else if(nt>0)if(++nt>ot)for(nt-=ot;nt--;)at+="0";else nt<ot&&(at=at.slice(0,nt)+"."+at.slice(nt));else ot>1&&(at=at.charAt(0)+"."+at.slice(1));return _e.s<0&&tt?"-"+at:at}P.abs=function(){var _e=new this.constructor(this);return _e.s=1,_e};P.cmp=function(_e){var et,tt=this,nt=tt.c,at=(_e=new tt.constructor(_e)).c,ot=tt.s,st=_e.s,ct=tt.e,dt=_e.e;if(!nt[0]||!at[0])return nt[0]?ot:at[0]?-st:0;if(ot!=st)return ot;if(et=ot<0,ct!=dt)return ct>dt^et?1:-1;for(st=(ct=nt.length)<(dt=at.length)?ct:dt,ot=-1;++ot<st;)if(nt[ot]!=at[ot])return nt[ot]>at[ot]^et?1:-1;return ct==dt?0:ct>dt^et?1:-1};P.div=function(_e){var et=this,tt=et.constructor,nt=et.c,at=(_e=new tt(_e)).c,ot=et.s==_e.s?1:-1,st=tt.DP;if(st!==~~st||st<0||st>MAX_DP)throw Error(INVALID_DP);if(!at[0])throw Error(DIV_BY_ZERO);if(!nt[0])return _e.s=ot,_e.c=[_e.e=0],_e;var ct,dt,ht,pt,mt,yt=at.slice(),gt=ct=at.length,bt=nt.length,$t=nt.slice(0,ct),wt=$t.length,St=_e,Tt=St.c=[],Pt=0,Ot=st+(St.e=et.e-_e.e)+1;for(St.s=ot,ot=Ot<0?0:Ot,yt.unshift(0);wt++<ct;)$t.push(0);do{for(ht=0;ht<10;ht++){if(ct!=(wt=$t.length))pt=ct>wt?1:-1;else for(mt=-1,pt=0;++mt<ct;)if(at[mt]!=$t[mt]){pt=at[mt]>$t[mt]?1:-1;break}if(pt<0){for(dt=wt==ct?at:yt;wt;){if($t[--wt]<dt[wt]){for(mt=wt;mt&&!$t[--mt];)$t[mt]=9;--$t[mt],$t[wt]+=10}$t[wt]-=dt[wt]}for(;!$t[0];)$t.shift()}else break}Tt[Pt++]=pt?ht:++ht,$t[0]&&pt?$t[wt]=nt[gt]||0:$t=[nt[gt]]}while((gt++<bt||$t[0]!==UNDEFINED$1)&&ot--);return!Tt[0]&&Pt!=1&&(Tt.shift(),St.e--,Ot--),Pt>Ot&&round$3(St,Ot,tt.RM,$t[0]!==UNDEFINED$1),St};P.eq=function(_e){return this.cmp(_e)===0};P.gt=function(_e){return this.cmp(_e)>0};P.gte=function(_e){return this.cmp(_e)>-1};P.lt=function(_e){return this.cmp(_e)<0};P.lte=function(_e){return this.cmp(_e)<1};P.minus=P.sub=function(_e){var et,tt,nt,at,ot=this,st=ot.constructor,ct=ot.s,dt=(_e=new st(_e)).s;if(ct!=dt)return _e.s=-dt,ot.plus(_e);var ht=ot.c.slice(),pt=ot.e,mt=_e.c,yt=_e.e;if(!ht[0]||!mt[0])return mt[0]?_e.s=-dt:ht[0]?_e=new st(ot):_e.s=1,_e;if(ct=pt-yt){for((at=ct<0)?(ct=-ct,nt=ht):(yt=pt,nt=mt),nt.reverse(),dt=ct;dt--;)nt.push(0);nt.reverse()}else for(tt=((at=ht.length<mt.length)?ht:mt).length,ct=dt=0;dt<tt;dt++)if(ht[dt]!=mt[dt]){at=ht[dt]<mt[dt];break}if(at&&(nt=ht,ht=mt,mt=nt,_e.s=-_e.s),(dt=(tt=mt.length)-(et=ht.length))>0)for(;dt--;)ht[et++]=0;for(dt=et;tt>ct;){if(ht[--tt]<mt[tt]){for(et=tt;et&&!ht[--et];)ht[et]=9;--ht[et],ht[tt]+=10}ht[tt]-=mt[tt]}for(;ht[--dt]===0;)ht.pop();for(;ht[0]===0;)ht.shift(),--yt;return ht[0]||(_e.s=1,ht=[yt=0]),_e.c=ht,_e.e=yt,_e};P.mod=function(_e){var et,tt=this,nt=tt.constructor,at=tt.s,ot=(_e=new nt(_e)).s;if(!_e.c[0])throw Error(DIV_BY_ZERO);return tt.s=_e.s=1,et=_e.cmp(tt)==1,tt.s=at,_e.s=ot,et?new nt(tt):(at=nt.DP,ot=nt.RM,nt.DP=nt.RM=0,tt=tt.div(_e),nt.DP=at,nt.RM=ot,this.minus(tt.times(_e)))};P.neg=function(){var _e=new this.constructor(this);return _e.s=-_e.s,_e};P.plus=P.add=function(_e){var et,tt,nt,at=this,ot=at.constructor;if(_e=new ot(_e),at.s!=_e.s)return _e.s=-_e.s,at.minus(_e);var st=at.e,ct=at.c,dt=_e.e,ht=_e.c;if(!ct[0]||!ht[0])return ht[0]||(ct[0]?_e=new ot(at):_e.s=at.s),_e;if(ct=ct.slice(),et=st-dt){for(et>0?(dt=st,nt=ht):(et=-et,nt=ct),nt.reverse();et--;)nt.push(0);nt.reverse()}for(ct.length-ht.length<0&&(nt=ht,ht=ct,ct=nt),et=ht.length,tt=0;et;ct[et]%=10)tt=(ct[--et]=ct[et]+ht[et]+tt)/10|0;for(tt&&(ct.unshift(tt),++dt),et=ct.length;ct[--et]===0;)ct.pop();return _e.c=ct,_e.e=dt,_e};P.pow=function(_e){var et=this,tt=new et.constructor("1"),nt=tt,at=_e<0;if(_e!==~~_e||_e<-MAX_POWER||_e>MAX_POWER)throw Error(INVALID+"exponent");for(at&&(_e=-_e);_e&1&&(nt=nt.times(et)),_e>>=1,!!_e;)et=et.times(et);return at?tt.div(nt):nt};P.prec=function(_e,et){if(_e!==~~_e||_e<1||_e>MAX_DP)throw Error(INVALID+"precision");return round$3(new this.constructor(this),_e,et)};P.round=function(_e,et){if(_e===UNDEFINED$1)_e=0;else if(_e!==~~_e||_e<-MAX_DP||_e>MAX_DP)throw Error(INVALID_DP);return round$3(new this.constructor(this),_e+this.e+1,et)};P.sqrt=function(){var _e,et,tt,nt=this,at=nt.constructor,ot=nt.s,st=nt.e,ct=new at("0.5");if(!nt.c[0])return new at(nt);if(ot<0)throw Error(NAME+"No square root");ot=Math.sqrt(nt+""),ot===0||ot===1/0?(et=nt.c.join(""),et.length+st&1||(et+="0"),ot=Math.sqrt(et),st=((st+1)/2|0)-(st<0||st&1),_e=new at((ot==1/0?"5e":(ot=ot.toExponential()).slice(0,ot.indexOf("e")+1))+st)):_e=new at(ot+""),st=_e.e+(at.DP+=4);do tt=_e,_e=ct.times(tt.plus(nt.div(tt)));while(tt.c.slice(0,st).join("")!==_e.c.slice(0,st).join(""));return round$3(_e,(at.DP-=4)+_e.e+1,at.RM)};P.times=P.mul=function(_e){var et,tt=this,nt=tt.constructor,at=tt.c,ot=(_e=new nt(_e)).c,st=at.length,ct=ot.length,dt=tt.e,ht=_e.e;if(_e.s=tt.s==_e.s?1:-1,!at[0]||!ot[0])return _e.c=[_e.e=0],_e;for(_e.e=dt+ht,st<ct&&(et=at,at=ot,ot=et,ht=st,st=ct,ct=ht),et=new Array(ht=st+ct);ht--;)et[ht]=0;for(dt=ct;dt--;){for(ct=0,ht=st+dt;ht>dt;)ct=et[ht]+ot[dt]*at[ht-dt-1]+ct,et[ht--]=ct%10,ct=ct/10|0;et[ht]=ct}for(ct?++_e.e:et.shift(),dt=et.length;!et[--dt];)et.pop();return _e.c=et,_e};P.toExponential=function(_e,et){var tt=this,nt=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<0||_e>MAX_DP)throw Error(INVALID_DP);for(tt=round$3(new tt.constructor(tt),++_e,et);tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,!0,!!nt)};P.toFixed=function(_e,et){var tt=this,nt=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<0||_e>MAX_DP)throw Error(INVALID_DP);for(tt=round$3(new tt.constructor(tt),_e+tt.e+1,et),_e=_e+tt.e+1;tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,!1,!!nt)};P[Symbol.for("nodejs.util.inspect.custom")]=P.toJSON=P.toString=function(){var _e=this,et=_e.constructor;return stringify$1(_e,_e.e<=et.NE||_e.e>=et.PE,!!_e.c[0])};P.toNumber=function(){var _e=Number(stringify$1(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(_e.toString()))throw Error(NAME+"Imprecise conversion");return _e};P.toPrecision=function(_e,et){var tt=this,nt=tt.constructor,at=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<1||_e>MAX_DP)throw Error(INVALID+"precision");for(tt=round$3(new nt(tt),_e,et);tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,_e<=tt.e||tt.e<=nt.NE||tt.e>=nt.PE,!!at)};P.valueOf=function(){var _e=this,et=_e.constructor;if(et.strict===!0)throw Error(NAME+"valueOf disallowed");return stringify$1(_e,_e.e<=et.NE||_e.e>=et.PE,!0)};var Big=_Big_();const manaAbi=[{constant:!0,inputs:[],name:"mintingFinished",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"unpause",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_amount",type:"uint256"}],name:"mint",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"burn",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"paused",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"finishMinting",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"pause",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[],name:"MintFinished",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"burner",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],daiAbi=[{inputs:[{internalType:"uint256",name:"chainId_",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!0,inputs:[{indexed:!0,internalType:"bytes4",name:"sig",type:"bytes4"},{indexed:!0,internalType:"address",name:"usr",type:"address"},{indexed:!0,internalType:"bytes32",name:"arg1",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"arg2",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"LogNote",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"guy",type:"address"}],name:"deny",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"move",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"holder",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"pull",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"push",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"guy",type:"address"}],name:"rely",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"wards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],usdtAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_upgradedAddress",type:"address"}],name:"deprecate",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"deprecated",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_evilUser",type:"address"}],name:"addBlackList",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"upgradedAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balances",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"maximumFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"unpause",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_maker",type:"address"}],name:"getBlackListStatus",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowed",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"paused",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"who",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"pause",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newBasisPoints",type:"uint256"},{name:"newMaxFee",type:"uint256"}],name:"setParams",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"issue",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"redeem",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"basisPointsRate",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"isBlackListed",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_clearedUser",type:"address"}],name:"removeBlackList",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"MAX_UINT",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_blackListedUser",type:"address"}],name:"destroyBlackFunds",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"_initialSupply",type:"uint256"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_decimals",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Issue",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Redeem",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newAddress",type:"address"}],name:"Deprecate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"feeBasisPoints",type:"uint256"},{indexed:!1,name:"maxFee",type:"uint256"}],name:"Params",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_blackListedUser",type:"address"},{indexed:!1,name:"_balance",type:"uint256"}],name:"DestroyedBlackFunds",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_user",type:"address"}],name:"AddedBlackList",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_user",type:"address"}],name:"RemovedBlackList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"}],usdcAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationUsed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"Blacklisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newBlacklister",type:"address"}],name:"BlacklisterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"burner",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newMasterMinter",type:"address"}],name:"MasterMinterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"MinterConfigured",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldMinter",type:"address"}],name:"MinterRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newAddress",type:"address"}],name:"PauserChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newRescuer",type:"address"}],name:"RescuerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"UnBlacklisted",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"},{inputs:[],name:"CANCEL_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"RECEIVE_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"TRANSFER_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"authorizationState",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"blacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"blacklister",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"cancelAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"configureMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currency",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"decrement",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"increment",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"tokenName",type:"string"},{internalType:"string",name:"tokenSymbol",type:"string"},{internalType:"string",name:"tokenCurrency",type:"string"},{internalType:"uint8",name:"tokenDecimals",type:"uint8"},{internalType:"address",name:"newMasterMinter",type:"address"},{internalType:"address",name:"newPauser",type:"address"},{internalType:"address",name:"newBlacklister",type:"address"},{internalType:"address",name:"newOwner",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"newName",type:"string"}],name:"initializeV2",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"lostAndFound",type:"address"}],name:"initializeV2_1",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"isBlacklisted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"masterMinter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"minterAllowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"pauser",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"receiveWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"removeMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenContract",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"rescueERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescuer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"transferWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"unBlacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newBlacklister",type:"address"}],name:"updateBlacklister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newMasterMinter",type:"address"}],name:"updateMasterMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPauser",type:"address"}],name:"updatePauser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newRescuer",type:"address"}],name:"updateRescuer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],vestingAbi=[{constant:!0,inputs:[],name:"duration",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cliff",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"beneficiary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"terraformReserve",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"returnVesting",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"vestedAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"releasableAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"revoked",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"release",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"revocable",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"released",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_token",type:"address"},{name:"amount",type:"uint256"}],name:"releaseForeignToken",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"revoke",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"start",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"lockMana",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"target",type:"address"}],name:"releaseTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"target",type:"address"}],name:"changeBeneficiary",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_beneficiary",type:"address"},{name:"_start",type:"uint256"},{name:"_cliff",type:"uint256"},{name:"_duration",type:"uint256"},{name:"_revocable",type:"bool"},{name:"_token",type:"address"},{name:"_returnVesting",type:"address"},{name:"_terraformReserve",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"LockedMANA",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Released",type:"event"},{anonymous:!1,inputs:[],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"}],periodicTokenVestingAbi=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_newBeneficiary",type:"address"}],name:"BeneficiaryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"Released",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"_token",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"ReleasedForeign",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"ReleasedSurplus",type:"event"},{anonymous:!1,inputs:[],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"getBeneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCliff",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsLinear",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsPausable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsRevocable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReleasable",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReleased",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStart",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStop",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotal",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVested",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVestedPerPeriod",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_isRevocable",type:"bool"},{internalType:"bool",name:"_isPausable",type:"bool"},{internalType:"bool",name:"_isLinear",type:"bool"},{internalType:"uint256",name:"_start",type:"uint256"},{internalType:"uint256",name:"_period",type:"uint256"},{internalType:"uint256",name:"_cliff",type:"uint256"},{internalType:"uint256[]",name:"_vestedPerPeriod",type:"uint256[]"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"releaseForeignToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"releaseSurplus",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newBeneficiary",type:"address"}],name:"setBeneficiary",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}],TokenAddressByChainId={1:{MANA:"0x0f5d2fb29fb7d3cfee444a200298f468908cc942",DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",USDT:"0xdac17f958d2ee523a2206206994597c13d831ec7",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},11155111:{MANA:"0xfa04d2e2ba9aec166c93dfeeba7427b2303befa9",DAI:"0x0000000000000000000000000000000000000000",USDT:"0x0000000000000000000000000000000000000000",USDC:"0x0000000000000000000000000000000000000000"}},ContractVersion={V1:"v1",V2:"v2"},TopicByVersion={[ContractVersion.V1]:{RELEASE:"0xfb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565",REVOKE:"0x44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee6",TRANSFER_OWNERSHIP:"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",PAUSED:"0x0000000000000000000000000000000000000000000000000000000000000000",UNPAUSED:"0x0000000000000000000000000000000000000000000000000000000000000000"},[ContractVersion.V2]:{RELEASE:"0xb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e",REVOKE:"0x44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee6",TRANSFER_OWNERSHIP:"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",PAUSED:"0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258",UNPAUSED:"0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa"}},DAY_IN_SECONDS=86400;function getDurationInDays(_e){return Math.ceil(_e/DAY_IN_SECONDS)+1}function getCliffEndDay(_e,et){return Math.floor((et-_e)/DAY_IN_SECONDS)}function getDaysFromStart(_e){return Math.ceil((new Date-new Date(_e*1e3))/(DAY_IN_SECONDS*1e3))}function getDaysFromRevoke(_e,et){return Math.floor((_e-et)/DAY_IN_SECONDS)+1}function toDataArray(_e,et){return Array.from(new Array(_e>=0?_e:0),et)}function emptyDataArray(_e){return toDataArray(_e,()=>"-")}async function fetchTicker(_e="decentraland"){try{const tt=await(await fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${_e}&vs_currencies=usd`,{mode:"cors"})).json(),{usd:nt}=tt[_e];return nt}catch{return 0}}function getEth(){return new JsonRpcProvider$1("https://rpc.decentraland.org/mainnet")}async function fetchTokenContracts(_e=1){if(_e!==1)throw new Error(`Unsupported chain id ${_e}`);const et=getEth(),tt=TokenAddressByChainId[_e];return{[tt.MANA]:new Contract$1(tt.MANA,manaAbi,et),[tt.DAI]:new Contract$1(tt.DAI,daiAbi,et),[tt.USDT]:new Contract$1(tt.USDT,usdtAbi,et),[tt.USDC]:new Contract$1(tt.USDC,usdcAbi,et)}}async function fetchContract(_e,et){const tt=getEth();let nt,at;try{at=new Contract$1(_e,periodicTokenVestingAbi,tt),await at.getIsLinear(),nt=ContractVersion.V2}catch{at=new Contract$1(_e,vestingAbi,tt),nt=ContractVersion.V1}let ot;if(nt===ContractVersion.V1?ot=await at.token():ot=await at.getToken(),ot=ot.toLowerCase(),!(ot in et))throw new Error("Token not supported");const st=await et[ot].decimals(),ct={v1:{duration:()=>at.duration(),cliff:()=>at.cliff(),beneficiary:()=>at.beneficiary(),vestedAmount:()=>at.vestedAmount(),releasableAmount:()=>at.releasableAmount(),revoked:()=>at.revoked(),revocable:()=>at.revocable(),released:()=>at.released(),start:()=>at.start(),periodDuration:()=>Promise.resolve("0"),vestedPerPeriod:()=>Promise.resolve([]),paused:()=>Promise.resolve(!1),pausable:()=>Promise.resolve(!1),stop:()=>Promise.resolve("0"),linear:()=>Promise.resolve(!0)},v2:{duration:()=>Promise.resolve("0"),cliff:()=>at.getCliff(),beneficiary:()=>at.getBeneficiary(),vestedAmount:()=>at.getVested(),releasableAmount:()=>at.getReleasable(),revoked:()=>at.getIsRevoked(),revocable:()=>at.getIsRevocable(),released:()=>at.getReleased(),start:()=>at.getStart(),periodDuration:()=>at.getPeriod(),vestedPerPeriod:()=>at.getVestedPerPeriod(),paused:()=>at.paused(),pausable:()=>at.getIsPausable(),stop:()=>at.getStop(),linear:()=>at.getIsLinear()}},[dt,ht,pt,mt,yt,gt,bt,$t,wt,St,Tt,Pt,Ot,Nt,Lt,Bt,Ut,Ft,zt]=await Promise.all([et[ot].symbol(),et[ot].balanceOf(_e),getLogs(_e,st,nt),at.owner(),ct[nt].duration(),ct[nt].cliff(),ct[nt].beneficiary(),ct[nt].vestedAmount(),ct[nt].releasableAmount(),ct[nt].revoked(),ct[nt].revocable(),ct[nt].released(),ct[nt].start(),ct[nt].periodDuration(),ct[nt].vestedPerPeriod(),ct[nt].paused(),ct[nt].pausable(),ct[nt].stop(),ct[nt].linear()]),It=Number(st),vt={version:nt,symbol:dt,address:_e,balance:Number(ht)/10**It,duration:nt===ContractVersion.V1?parseInt(yt,10):Lt.length*parseInt(Nt,10),cliff:nt===ContractVersion.V1?parseInt(gt,10):parseInt(gt,10)+parseInt(Ot,10),beneficiary:bt,vestedAmount:Number($t)/10**It,releasableAmount:Number(wt)/10**It,revoked:St,revocable:Tt,owner:mt,released:Number(Pt)/10**It,start:parseInt(Ot,10),logs:pt,periodDuration:Nt,vestedPerPeriod:Lt.map(At=>parseInt(At,10)/10**It),paused:Bt,pausable:Ut,stop:parseInt(Ft,10),linear:zt,total:void 0},Et=()=>{if(nt===ContractVersion.V1){if(vt.revoked){const At=vt.logs.find(Rt=>Rt.topic===TopicByVersion[nt].REVOKE),{timestamp:xt}=At.data,Ct=getDaysFromRevoke(xt,vt.start),Dt=getDurationInDays(vt.duration),kt=vt.vestedAmount/Ct*Dt;return Math.floor(kt/100)*100}return vt.balance+vt.released}return vt.vestedPerPeriod.reduce((At,xt)=>At+xt,0)};return vt.total=Number(Et()),vt}async function getLogs(_e,et,tt){const nt=getEth(),at=await nt.getLogs({address:_e,fromBlock:0,toBlock:"latest"}),ot=await Promise.all(at.map(ht=>nt.getBlock(ht.blockNumber))),st=[];let ct=0;const dt=TopicByVersion[tt];for(const ht in at)switch(at[ht].topics[0]){case dt.TRANSFER_OWNERSHIP:st.push(getTransferOwnershipLog([...at[ht].topics],ot[ht].timestamp,dt));break;case dt.RELEASE:const pt=getReleaseLog(et,at[ht].data,ct,ot[ht].timestamp,tt,dt);st.push(pt),ct=Big(pt.data.acum).mul(Big(10)**Big(et)).toNumber();break;case dt.REVOKE:st.push(getRevokeLog(ot[ht].timestamp,dt));break;case dt.PAUSED:st.push(getPausedLog(ot[ht].timestamp,dt));break;case dt.UNPAUSED:st.push(getUnpausedLog(ot[ht].timestamp,dt));break}return st}function getTransferOwnershipLog(_e,et,tt){return{topic:tt.TRANSFER_OWNERSHIP,data:{previousOwner:_e[1].slice(0,2)+_e[1].slice(26),newOwner:_e[2].slice(0,2)+_e[2].slice(26),timestamp:et}}}function getReleaseLog(_e,et,tt,nt,at,ot){const st=Big(Number(tt)||0).div(Big(10)**Big(_e));let ct,dt;return at===ContractVersion.V1?(ct=Big(Number(et)||0).div(Big(10)**Big(_e)),dt=ct.minus(st)):(dt=Big(Number(et)||0).div(Big(10)**Big(_e)),ct=Big(Number(tt)||0).div(Big(10)**Big(_e)).add(dt)),{topic:ot.RELEASE,data:{amount:dt.toNumber(),acum:ct.toNumber(),timestamp:nt}}}function getRevokeLog(_e,et){return{topic:et.REVOKE,data:{timestamp:_e}}}function getPausedLog(_e,et){return{topic:et.PAUSED,data:{timestamp:_e}}}function getUnpausedLog(_e,et){return{topic:et.UNPAUSED,data:{timestamp:_e}}}async function release(_e,et,tt){const nt=await tt.getSigner();if(et.version===ContractVersion.V1)return await new Contract$1(et.address,vestingAbi,nt).release();const at=new Contract$1(et.address,periodicTokenVestingAbi,nt),ot=await at.getReleasable();return await at.release(_e,ot)}async function changeBeneficiary(_e,et,tt){const nt=await tt.getSigner();return et.version===ContractVersion.V1?new Contract$1(et.address,vestingAbi,nt).changeBeneficiary(_e):new Contract$1(et.address,periodicTokenVestingAbi,nt).setBeneficiary(_e)}function isSameAddress(_e,et){return _e&&et&&_e.toLowerCase()===et.toLowerCase()}async function getEthProvider(){const _e=await getConnectedProvider();if(!_e)throw new Error("Could not get a valid connected Wallet");return new BrowserProvider(_e)}function ChangeBeneficiaryModal({open:_e,onClose:et,contract:tt}){const[nt,at]=reactExports.useState({address:"",error:!1,errorMessage:"",loading:!1,successMessage:""}),ot=pt=>at(mt=>({...mt,address:pt})),st=(pt,mt="")=>at(yt=>({...yt,error:pt,errorMessage:mt})),ct=pt=>at(mt=>({...mt,loading:pt})),dt=(pt="")=>at(mt=>({...mt,successMessage:pt})),ht=async()=>{if(isValidAddress(nt.address)){ct(!0),st(!1);try{const pt=await getEthProvider();await changeBeneficiary(nt.address,tt,pt),ct(!1),dt(t$3("modal.success",{address:nt.address,br:jsxRuntimeExports.jsx("br",{})}))}catch(pt){ct(!1),st(!0,pt.message)}}else st(!0,t$3("modal.error"))};return jsxRuntimeExports.jsxs(distExports$1.Modal,{className:"changeBeneficiaryModal",size:"small",open:_e,onClose:et,closeIcon:jsxRuntimeExports.jsx(distExports$1.Close,{}),children:[jsxRuntimeExports.jsx(distExports$1.Modal.Header,{children:t$3("modal.title")}),jsxRuntimeExports.jsxs(distExports$1.Modal.Content,{children:[jsxRuntimeExports.jsx("p",{children:t$3("modal.warning")}),jsxRuntimeExports.jsx(distExports$1.Field,{onChange:(pt,mt)=>{ot(mt.value),st(!1)},label:t$3("modal.label"),placeholder:"0x...",error:nt.error,message:nt.errorMessage,loading:nt.loading,disabled:nt.loading})]}),jsxRuntimeExports.jsx(distExports$1.Modal.Actions,{children:jsxRuntimeExports.jsx(distExports$1.Button,{primary:!0,onClick:ht,disabled:nt.loading,children:t$3("modal.button")})}),jsxRuntimeExports.jsx(distExports$1.Modal.Content,{children:jsxRuntimeExports.jsx("p",{className:"success",children:nt.successMessage})})]})}const Details$2="";function addressShortener(_e){return _e.substring(0,6)+"..."+_e.substring(38,42)}function getBeneficiary(_e){return jsxRuntimeExports.jsxs("div",{className:"item beneficiary",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.beneficiary")}),jsxRuntimeExports.jsxs(distExports$1.Header,{onClick:()=>copyToClipboard(_e),style:{cursor:"pointer"},children:[jsxRuntimeExports.jsx("img",{src:AddressIcon,alt:""}),jsxRuntimeExports.jsx(distExports$1.Popup,{content:t$3("global.copied"),position:"bottom center",trigger:jsxRuntimeExports.jsx("span",{children:addressShortener(_e)}),on:"click"}),jsxRuntimeExports.jsx(Info,{message:t$3("helper.beneficiary"),position:"left center"})]})]})}function getDate(_e,et){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3(_e)}),jsxRuntimeExports.jsx(distExports$1.Header,{children:formatDate$1(new Date(et*1e3).getTime(),DATE_FORMAT_LONG)})]})}function getCliffPeriod(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.cliff_period")}),jsxRuntimeExports.jsxs(distExports$1.Header,{children:[t$3("cliff.duration",{months:_e.months,days:_e.days}),jsxRuntimeExports.jsx(Info,{message:t$3("helper.cliff_period"),position:"left center"})]})]})}function getAmount(_e,et,tt,nt){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3(_e)}),jsxRuntimeExports.jsxs(distExports$1.Header,{children:[formatNumber(et,0)," ",tt,jsxRuntimeExports.jsx(Info,{message:t$3(nt),position:"left center"})]})]})}function getRevocable(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.revocable")}),jsxRuntimeExports.jsx(distExports$1.Header,{children:t$3(_e?"global.yes":"global.no")})]})}function getPausable(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.pausable")}),jsxRuntimeExports.jsx(distExports$1.Header,{children:t$3(_e?"global.yes":"global.no")})]})}function getActionButton(_e,et){return jsxRuntimeExports.jsx(distExports$1.Button,{basic:!0,className:"action",onClick:et,children:_e})}function Details({contract:_e,address:et}){const{version:tt,symbol:nt,released:at,start:ot,cliff:st,duration:ct,releasableAmount:dt,revocable:ht,pausable:pt,total:mt,beneficiary:yt}=_e,gt=async()=>{const Nt=await getEthProvider();await release(et,_e,Nt)},bt=isSameAddress(et,yt),$t=getPreciseDiff(ot,st),St=useResponsive()({maxWidth:onlyMobileMaxWidth}),[Tt,Pt]=reactExports.useState(!1),Ot=()=>Pt(!1);return jsxRuntimeExports.jsxs("div",{id:"details",className:St&&"mobile"||"",children:[jsxRuntimeExports.jsxs("div",{className:"divToStyle",children:[getBeneficiary(yt),!St&&bt&&getActionButton(t$3("details.change_beneficiary"),()=>Pt(!0)),jsxRuntimeExports.jsxs("div",{className:"dates",children:[getDate("details.start",ot),getDate("details.end",ot+ct)]})]}),getCliffPeriod($t),getAmount("details.total_vesting",mt,nt,"helper.total_vesting"),getAmount("details.released",at,nt,"helper.released"),getAmount("details.releasable",dt,nt,"helper.releasable"),!St&&bt&&dt>0&&getActionButton(t$3("details.release_funds"),gt),getRevocable(ht),tt===ContractVersion.V2&&getPausable(pt),jsxRuntimeExports.jsx(ChangeBeneficiaryModal,{open:Tt,onClose:Ot,contract:_e})]})}const Details$1=React$L.memo(Details);function _interopDefault(_e){return _e&&typeof _e=="object"&&"default"in _e?_e.default:_e}var React=reactExports,React__default=_interopDefault(React);function _defineProperty(_e,et,tt){return et in _e?Object.defineProperty(_e,et,{value:tt,enumerable:!0,configurable:!0,writable:!0}):_e[et]=tt,_e}function _inheritsLoose(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement);function withSideEffect(_e,et,tt){if(typeof _e!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof et!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof tt<"u"&&typeof tt!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function nt(at){return at.displayName||at.name||"Component"}return function(ot){if(typeof ot!="function")throw new Error("Expected WrappedComponent to be a React component.");var st=[],ct;function dt(){ct=_e(st.map(function(pt){return pt.props})),ht.canUseDOM?et(ct):tt&&(ct=tt(ct))}var ht=function(pt){_inheritsLoose(mt,pt);function mt(){return pt.apply(this,arguments)||this}mt.peek=function(){return ct},mt.rewind=function(){if(mt.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var bt=ct;return ct=void 0,st=[],bt};var yt=mt.prototype;return yt.UNSAFE_componentWillMount=function(){st.push(this),dt()},yt.componentDidUpdate=function(){dt()},yt.componentWillUnmount=function(){var bt=st.indexOf(this);st.splice(bt,1),dt()},yt.render=function(){return React__default.createElement(ot,this.props)},mt}(React.PureComponent);return _defineProperty(ht,"displayName","SideEffect("+nt(ot)+")"),_defineProperty(ht,"canUseDOM",canUseDOM),ht}}var lib=withSideEffect;const withSideEffect$1=getDefaultExportFromCjs$1(lib);var ATTRIBUTE_NAMES={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},TAG_NAMES={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(TAG_NAMES).map(function(_e){return TAG_NAMES[_e]});var TAG_PROPERTIES={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},HTML_TAG_MAP=Object.keys(REACT_TAG_MAP).reduce(function(_e,et){return _e[REACT_TAG_MAP[et]]=et,_e},{}),SELF_CLOSING_TAGS=[TAG_NAMES.NOSCRIPT,TAG_NAMES.SCRIPT,TAG_NAMES.STYLE],HELMET_ATTRIBUTE="data-react-helmet",_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},classCallCheck=function(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")},createClass=function(){function _e(et,tt){for(var nt=0;nt<tt.length;nt++){var at=tt[nt];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(et,at.key,at)}}return function(et,tt,nt){return tt&&_e(et.prototype,tt),nt&&_e(et,nt),et}}(),_extends=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},inherits$1=function(_e,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);_e.prototype=Object.create(et&&et.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(_e,et):_e.__proto__=et)},objectWithoutProperties=function(_e,et){var tt={};for(var nt in _e)et.indexOf(nt)>=0||Object.prototype.hasOwnProperty.call(_e,nt)&&(tt[nt]=_e[nt]);return tt},possibleConstructorReturn=function(_e,et){if(!_e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:_e},encodeSpecialCharacters=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return tt===!1?String(et):String(et).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},getTitleFromPropsList=function _e(et){var tt=getInnermostProperty(et,TAG_NAMES.TITLE),nt=getInnermostProperty(et,HELMET_PROPS.TITLE_TEMPLATE);if(nt&&tt)return nt.replace(/%s/g,function(){return Array.isArray(tt)?tt.join(""):tt});var at=getInnermostProperty(et,HELMET_PROPS.DEFAULT_TITLE);return tt||at||void 0},getOnChangeClientState=function _e(et){return getInnermostProperty(et,HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},getAttributesFromPropsList=function _e(et,tt){return tt.filter(function(nt){return typeof nt[et]<"u"}).map(function(nt){return nt[et]}).reduce(function(nt,at){return _extends({},nt,at)},{})},getBaseTagFromPropsList=function _e(et,tt){return tt.filter(function(nt){return typeof nt[TAG_NAMES.BASE]<"u"}).map(function(nt){return nt[TAG_NAMES.BASE]}).reverse().reduce(function(nt,at){if(!nt.length)for(var ot=Object.keys(at),st=0;st<ot.length;st++){var ct=ot[st],dt=ct.toLowerCase();if(et.indexOf(dt)!==-1&&at[dt])return nt.concat(at)}return nt},[])},getTagsFromPropsList=function _e(et,tt,nt){var at={};return nt.filter(function(ot){return Array.isArray(ot[et])?!0:(typeof ot[et]<"u"&&warn$1("Helmet: "+et+' should be of type "Array". Instead found type "'+_typeof(ot[et])+'"'),!1)}).map(function(ot){return ot[et]}).reverse().reduce(function(ot,st){var ct={};st.filter(function(yt){for(var gt=void 0,bt=Object.keys(yt),$t=0;$t<bt.length;$t++){var wt=bt[$t],St=wt.toLowerCase();tt.indexOf(St)!==-1&&!(gt===TAG_PROPERTIES.REL&&yt[gt].toLowerCase()==="canonical")&&!(St===TAG_PROPERTIES.REL&&yt[St].toLowerCase()==="stylesheet")&&(gt=St),tt.indexOf(wt)!==-1&&(wt===TAG_PROPERTIES.INNER_HTML||wt===TAG_PROPERTIES.CSS_TEXT||wt===TAG_PROPERTIES.ITEM_PROP)&&(gt=wt)}if(!gt||!yt[gt])return!1;var Tt=yt[gt].toLowerCase();return at[gt]||(at[gt]={}),ct[gt]||(ct[gt]={}),at[gt][Tt]?!1:(ct[gt][Tt]=!0,!0)}).reverse().forEach(function(yt){return ot.push(yt)});for(var dt=Object.keys(ct),ht=0;ht<dt.length;ht++){var pt=dt[ht],mt=objectAssign$1({},at[pt],ct[pt]);at[pt]=mt}return ot},[]).reverse()},getInnermostProperty=function _e(et,tt){for(var nt=et.length-1;nt>=0;nt--){var at=et[nt];if(at.hasOwnProperty(tt))return at[tt]}return null},reducePropsToState=function _e(et){return{baseTag:getBaseTagFromPropsList([TAG_PROPERTIES.HREF,TAG_PROPERTIES.TARGET],et),bodyAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY,et),defer:getInnermostProperty(et,HELMET_PROPS.DEFER),encode:getInnermostProperty(et,HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML,et),linkTags:getTagsFromPropsList(TAG_NAMES.LINK,[TAG_PROPERTIES.REL,TAG_PROPERTIES.HREF],et),metaTags:getTagsFromPropsList(TAG_NAMES.META,[TAG_PROPERTIES.NAME,TAG_PROPERTIES.CHARSET,TAG_PROPERTIES.HTTPEQUIV,TAG_PROPERTIES.PROPERTY,TAG_PROPERTIES.ITEM_PROP],et),noscriptTags:getTagsFromPropsList(TAG_NAMES.NOSCRIPT,[TAG_PROPERTIES.INNER_HTML],et),onChangeClientState:getOnChangeClientState(et),scriptTags:getTagsFromPropsList(TAG_NAMES.SCRIPT,[TAG_PROPERTIES.SRC,TAG_PROPERTIES.INNER_HTML],et),styleTags:getTagsFromPropsList(TAG_NAMES.STYLE,[TAG_PROPERTIES.CSS_TEXT],et),title:getTitleFromPropsList(et),titleAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE,et)}},rafPolyfill=function(){var _e=Date.now();return function(et){var tt=Date.now();tt-_e>16?(_e=tt,et(tt)):setTimeout(function(){rafPolyfill(et)},0)}}(),cafPolyfill=function _e(et){return clearTimeout(et)},requestAnimationFrame$3=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||rafPolyfill:global$a.requestAnimationFrame||rafPolyfill,cancelAnimationFrame$1=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||cafPolyfill:global$a.cancelAnimationFrame||cafPolyfill,warn$1=function _e(et){return console&&typeof console.warn=="function"&&console.warn(et)},_helmetCallback=null,handleClientStateChange=function _e(et){_helmetCallback&&cancelAnimationFrame$1(_helmetCallback),et.defer?_helmetCallback=requestAnimationFrame$3(function(){commitTagChanges(et,function(){_helmetCallback=null})}):(commitTagChanges(et),_helmetCallback=null)},commitTagChanges=function _e(et,tt){var nt=et.baseTag,at=et.bodyAttributes,ot=et.htmlAttributes,st=et.linkTags,ct=et.metaTags,dt=et.noscriptTags,ht=et.onChangeClientState,pt=et.scriptTags,mt=et.styleTags,yt=et.title,gt=et.titleAttributes;updateAttributes(TAG_NAMES.BODY,at),updateAttributes(TAG_NAMES.HTML,ot),updateTitle(yt,gt);var bt={baseTag:updateTags(TAG_NAMES.BASE,nt),linkTags:updateTags(TAG_NAMES.LINK,st),metaTags:updateTags(TAG_NAMES.META,ct),noscriptTags:updateTags(TAG_NAMES.NOSCRIPT,dt),scriptTags:updateTags(TAG_NAMES.SCRIPT,pt),styleTags:updateTags(TAG_NAMES.STYLE,mt)},$t={},wt={};Object.keys(bt).forEach(function(St){var Tt=bt[St],Pt=Tt.newTags,Ot=Tt.oldTags;Pt.length&&($t[St]=Pt),Ot.length&&(wt[St]=bt[St].oldTags)}),tt&&tt(),ht(et,$t,wt)},flattenArray=function _e(et){return Array.isArray(et)?et.join(""):et},updateTitle=function _e(et,tt){typeof et<"u"&&document.title!==et&&(document.title=flattenArray(et)),updateAttributes(TAG_NAMES.TITLE,tt)},updateAttributes=function _e(et,tt){var nt=document.getElementsByTagName(et)[0];if(nt){for(var at=nt.getAttribute(HELMET_ATTRIBUTE),ot=at?at.split(","):[],st=[].concat(ot),ct=Object.keys(tt),dt=0;dt<ct.length;dt++){var ht=ct[dt],pt=tt[ht]||"";nt.getAttribute(ht)!==pt&&nt.setAttribute(ht,pt),ot.indexOf(ht)===-1&&ot.push(ht);var mt=st.indexOf(ht);mt!==-1&&st.splice(mt,1)}for(var yt=st.length-1;yt>=0;yt--)nt.removeAttribute(st[yt]);ot.length===st.length?nt.removeAttribute(HELMET_ATTRIBUTE):nt.getAttribute(HELMET_ATTRIBUTE)!==ct.join(",")&&nt.setAttribute(HELMET_ATTRIBUTE,ct.join(","))}},updateTags=function _e(et,tt){var nt=document.head||document.querySelector(TAG_NAMES.HEAD),at=nt.querySelectorAll(et+"["+HELMET_ATTRIBUTE+"]"),ot=Array.prototype.slice.call(at),st=[],ct=void 0;return tt&&tt.length&&tt.forEach(function(dt){var ht=document.createElement(et);for(var pt in dt)if(dt.hasOwnProperty(pt))if(pt===TAG_PROPERTIES.INNER_HTML)ht.innerHTML=dt.innerHTML;else if(pt===TAG_PROPERTIES.CSS_TEXT)ht.styleSheet?ht.styleSheet.cssText=dt.cssText:ht.appendChild(document.createTextNode(dt.cssText));else{var mt=typeof dt[pt]>"u"?"":dt[pt];ht.setAttribute(pt,mt)}ht.setAttribute(HELMET_ATTRIBUTE,"true"),ot.some(function(yt,gt){return ct=gt,ht.isEqualNode(yt)})?ot.splice(ct,1):st.push(ht)}),ot.forEach(function(dt){return dt.parentNode.removeChild(dt)}),st.forEach(function(dt){return nt.appendChild(dt)}),{oldTags:ot,newTags:st}},generateElementAttributesAsString=function _e(et){return Object.keys(et).reduce(function(tt,nt){var at=typeof et[nt]<"u"?nt+'="'+et[nt]+'"':""+nt;return tt?tt+" "+at:at},"")},generateTitleAsString=function _e(et,tt,nt,at){var ot=generateElementAttributesAsString(nt),st=flattenArray(tt);return ot?"<"+et+" "+HELMET_ATTRIBUTE+'="true" '+ot+">"+encodeSpecialCharacters(st,at)+"</"+et+">":"<"+et+" "+HELMET_ATTRIBUTE+'="true">'+encodeSpecialCharacters(st,at)+"</"+et+">"},generateTagsAsString=function _e(et,tt,nt){return tt.reduce(function(at,ot){var st=Object.keys(ot).filter(function(ht){return!(ht===TAG_PROPERTIES.INNER_HTML||ht===TAG_PROPERTIES.CSS_TEXT)}).reduce(function(ht,pt){var mt=typeof ot[pt]>"u"?pt:pt+'="'+encodeSpecialCharacters(ot[pt],nt)+'"';return ht?ht+" "+mt:mt},""),ct=ot.innerHTML||ot.cssText||"",dt=SELF_CLOSING_TAGS.indexOf(et)===-1;return at+"<"+et+" "+HELMET_ATTRIBUTE+'="true" '+st+(dt?"/>":">"+ct+"</"+et+">")},"")},convertElementAttributestoReactProps=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(et).reduce(function(nt,at){return nt[REACT_TAG_MAP[at]||at]=et[at],nt},tt)},convertReactPropstoHtmlAttributes=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(et).reduce(function(nt,at){return nt[HTML_TAG_MAP[at]||at]=et[at],nt},tt)},generateTitleAsReactComponent=function _e(et,tt,nt){var at,ot=(at={key:tt},at[HELMET_ATTRIBUTE]=!0,at),st=convertElementAttributestoReactProps(nt,ot);return[React$L.createElement(TAG_NAMES.TITLE,st,tt)]},generateTagsAsReactComponent=function _e(et,tt){return tt.map(function(nt,at){var ot,st=(ot={key:at},ot[HELMET_ATTRIBUTE]=!0,ot);return Object.keys(nt).forEach(function(ct){var dt=REACT_TAG_MAP[ct]||ct;if(dt===TAG_PROPERTIES.INNER_HTML||dt===TAG_PROPERTIES.CSS_TEXT){var ht=nt.innerHTML||nt.cssText;st.dangerouslySetInnerHTML={__html:ht}}else st[dt]=nt[ct]}),React$L.createElement(et,st)})},getMethodsForTag=function _e(et,tt,nt){switch(et){case TAG_NAMES.TITLE:return{toComponent:function(){return generateTitleAsReactComponent(et,tt.title,tt.titleAttributes)},toString:function(){return generateTitleAsString(et,tt.title,tt.titleAttributes,nt)}};case ATTRIBUTE_NAMES.BODY:case ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return convertElementAttributestoReactProps(tt)},toString:function(){return generateElementAttributesAsString(tt)}};default:return{toComponent:function(){return generateTagsAsReactComponent(et,tt)},toString:function(){return generateTagsAsString(et,tt,nt)}}}},mapStateOnServer=function _e(et){var tt=et.baseTag,nt=et.bodyAttributes,at=et.encode,ot=et.htmlAttributes,st=et.linkTags,ct=et.metaTags,dt=et.noscriptTags,ht=et.scriptTags,pt=et.styleTags,mt=et.title,yt=mt===void 0?"":mt,gt=et.titleAttributes;return{base:getMethodsForTag(TAG_NAMES.BASE,tt,at),bodyAttributes:getMethodsForTag(ATTRIBUTE_NAMES.BODY,nt,at),htmlAttributes:getMethodsForTag(ATTRIBUTE_NAMES.HTML,ot,at),link:getMethodsForTag(TAG_NAMES.LINK,st,at),meta:getMethodsForTag(TAG_NAMES.META,ct,at),noscript:getMethodsForTag(TAG_NAMES.NOSCRIPT,dt,at),script:getMethodsForTag(TAG_NAMES.SCRIPT,ht,at),style:getMethodsForTag(TAG_NAMES.STYLE,pt,at),title:getMethodsForTag(TAG_NAMES.TITLE,{title:yt,titleAttributes:gt},at)}},Helmet=function _e(et){var tt,nt;return nt=tt=function(at){inherits$1(ot,at);function ot(){return classCallCheck(this,ot),possibleConstructorReturn(this,at.apply(this,arguments))}return ot.prototype.shouldComponentUpdate=function(ct){return!isEqual$3(this.props,ct)},ot.prototype.mapNestedChildrenToProps=function(ct,dt){if(!dt)return null;switch(ct.type){case TAG_NAMES.SCRIPT:case TAG_NAMES.NOSCRIPT:return{innerHTML:dt};case TAG_NAMES.STYLE:return{cssText:dt}}throw new Error("<"+ct.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},ot.prototype.flattenArrayTypeChildren=function(ct){var dt,ht=ct.child,pt=ct.arrayTypeChildren,mt=ct.newChildProps,yt=ct.nestedChildren;return _extends({},pt,(dt={},dt[ht.type]=[].concat(pt[ht.type]||[],[_extends({},mt,this.mapNestedChildrenToProps(ht,yt))]),dt))},ot.prototype.mapObjectTypeChildren=function(ct){var dt,ht,pt=ct.child,mt=ct.newProps,yt=ct.newChildProps,gt=ct.nestedChildren;switch(pt.type){case TAG_NAMES.TITLE:return _extends({},mt,(dt={},dt[pt.type]=gt,dt.titleAttributes=_extends({},yt),dt));case TAG_NAMES.BODY:return _extends({},mt,{bodyAttributes:_extends({},yt)});case TAG_NAMES.HTML:return _extends({},mt,{htmlAttributes:_extends({},yt)})}return _extends({},mt,(ht={},ht[pt.type]=_extends({},yt),ht))},ot.prototype.mapArrayTypeChildrenToProps=function(ct,dt){var ht=_extends({},dt);return Object.keys(ct).forEach(function(pt){var mt;ht=_extends({},ht,(mt={},mt[pt]=ct[pt],mt))}),ht},ot.prototype.warnOnInvalidChildren=function(ct,dt){return!0},ot.prototype.mapChildrenToProps=function(ct,dt){var ht=this,pt={};return React$L.Children.forEach(ct,function(mt){if(!(!mt||!mt.props)){var yt=mt.props,gt=yt.children,bt=objectWithoutProperties(yt,["children"]),$t=convertReactPropstoHtmlAttributes(bt);switch(ht.warnOnInvalidChildren(mt,gt),mt.type){case TAG_NAMES.LINK:case TAG_NAMES.META:case TAG_NAMES.NOSCRIPT:case TAG_NAMES.SCRIPT:case TAG_NAMES.STYLE:pt=ht.flattenArrayTypeChildren({child:mt,arrayTypeChildren:pt,newChildProps:$t,nestedChildren:gt});break;default:dt=ht.mapObjectTypeChildren({child:mt,newProps:dt,newChildProps:$t,nestedChildren:gt});break}}}),dt=this.mapArrayTypeChildrenToProps(pt,dt),dt},ot.prototype.render=function(){var ct=this.props,dt=ct.children,ht=objectWithoutProperties(ct,["children"]),pt=_extends({},ht);return dt&&(pt=this.mapChildrenToProps(dt,pt)),React$L.createElement(et,pt)},createClass(ot,null,[{key:"canUseDOM",set:function(ct){et.canUseDOM=ct}}]),ot}(React$L.Component),tt.propTypes={base:PropTypes.object,bodyAttributes:PropTypes.object,children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node),PropTypes.node]),defaultTitle:PropTypes.string,defer:PropTypes.bool,encodeSpecialCharacters:PropTypes.bool,htmlAttributes:PropTypes.object,link:PropTypes.arrayOf(PropTypes.object),meta:PropTypes.arrayOf(PropTypes.object),noscript:PropTypes.arrayOf(PropTypes.object),onChangeClientState:PropTypes.func,script:PropTypes.arrayOf(PropTypes.object),style:PropTypes.arrayOf(PropTypes.object),title:PropTypes.string,titleAttributes:PropTypes.object,titleTemplate:PropTypes.string},tt.defaultProps={defer:!0,encodeSpecialCharacters:!0},tt.peek=et.peek,tt.rewind=function(){var at=et.rewind();return at||(at=mapStateOnServer({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),at},nt},NullComponent=function _e(){return null},HelmetSideEffects=withSideEffect$1(reducePropsToState,handleClientStateChange,mapStateOnServer)(NullComponent),HelmetExport=Helmet(HelmetSideEffects);HelmetExport.renderStatic=HelmetExport.rewind;function ManaWidget(){const _e="https://crypto.com/price/static/widget/index.js",et=reactExports.useRef(null);return reactExports.useEffect(()=>{(()=>{et.current=document.createElement("script"),et.current.src=_e,document.body.appendChild(et.current)})();const nt=()=>{document.body.removeChild(et.current)};return()=>nt()},[]),jsxRuntimeExports.jsx("div",{id:"crypto-widget-CoinList","data-design":"classic","data-coins":"decentraland",style:{width:"100%"}})}const Copy="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/copy-aaa77b43.svg",Link="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/link-2c78ddb8.svg",DaiLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/dai_logo-b5489c4a.svg",UsdtLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/usdt_logo-4ed36654.svg",UsdcLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/usdc_logo-913adf09.svg",Overview$1="";function useReviewUrl(_e){const et=`${config.get("REVIEW_CONTRACT_URL")}${_e}`;return{reviewUrl:et,onReviewUrlClick:nt=>openInNewTab(et,nt)}}const logo={DAI:DaiLogo,USDT:UsdtLogo,USDC:UsdcLogo};function Overview(_e){const{address:et,contract:tt}=_e,{symbol:nt,start:at,cliff:ot,duration:st,total:ct}=tt,dt=getPreciseDiff(at,at+st),ht=getPreciseDiff(at,ot),{reviewUrl:pt,onReviewUrlClick:mt}=useReviewUrl(et),gt=useResponsive()({maxWidth:onlyMobileMaxWidth}),bt=ht.months+ht.days;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HelmetExport,{children:jsxRuntimeExports.jsx("title",{children:t$3("global.title",{token:nt})})}),jsxRuntimeExports.jsx(Grid$2,{columns:nt==="MANA"&&!gt?2:1,className:"overview",children:jsxRuntimeExports.jsxs(Grid$2.Row,{children:[jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"left",style:{padding:0},children:[jsxRuntimeExports.jsxs(Grid$2,{className:"contract",style:{width:"100%"},children:[nt!=="MANA"?jsxRuntimeExports.jsx(Grid$2.Column,{className:"TokenLogo",children:jsxRuntimeExports.jsx("img",{src:logo[nt],style:{width:gt?"48px":"72px"},alt:""})}):gt&&jsxRuntimeExports.jsx(Grid$2.Column,{className:"TokenLogo",children:jsxRuntimeExports.jsx(distExports$1.Logo,{})}),jsxRuntimeExports.jsxs(Grid$2.Column,{className:"Info",children:[jsxRuntimeExports.jsx(distExports$1.Header,{size:"large",className:`TokenContract ${nt}`,children:t$3("overview.title",{token:nt})}),jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[et," ",jsxRuntimeExports.jsx("a",{href:pt,onClick:mt,children:jsxRuntimeExports.jsx("img",{src:Link,alt:""})}),jsxRuntimeExports.jsx(distExports$1.Popup,{content:t$3("global.copied"),position:"bottom center",trigger:jsxRuntimeExports.jsx("img",{src:Copy,alt:"",onClick:()=>copyToClipboard(et)}),on:"click"})]})]})]}),jsxRuntimeExports.jsx(distExports$1.Header,{style:nt==="MANA"&&!gt&&{maxWidth:"500px"}||{},children:t$3("overview.details",{amount:formatNumber(Math.round(ct),0),token:nt,months:t$3("global.amount.months",{amount:dt.months}),days:dt.days&&t$3("global.amount.days",{amount:dt.days}),cliff:t$3("overview.details.cliff",{months:ht.months,days:ht.days}),showCliff:bt})})]}),nt==="MANA"&&!gt&&jsxRuntimeExports.jsx(Grid$2.Column,{floated:"right",children:jsxRuntimeExports.jsx(ManaWidget,{})})]})})]})}const Icon$2="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/grant_icon-fe328b80.svg",ButtonIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/proposal_button_icon-2936cda4.svg",DaoInitiativeButton$1="";function DaoInitiativeButton({proposalUrl:_e}){const tt=useResponsive()({maxWidth:onlyMobileMaxWidth});return jsxRuntimeExports.jsxs(distExports$1.Button,{primary:!0,onClick:nt=>openInNewTab(_e,nt),href:_e,className:"daoProposal__button",children:[t$3(tt?"beneficiary.button.mobile":"beneficiary.button"),jsxRuntimeExports.jsx("img",{src:ButtonIcon,alt:""})]})}const Banner$1="";function Banner(_e){const{icon:et,title:tt,subtitle:nt,action:at,className:ot}=_e;return jsxRuntimeExports.jsxs("div",{className:`banner ${ot||""}`,children:[jsxRuntimeExports.jsxs("div",{className:"bannerContainer",children:[jsxRuntimeExports.jsx("div",{style:{width:"fit-content"},children:et&&jsxRuntimeExports.jsx("img",{src:et,alt:"",style:{marginTop:"5px"}})}),jsxRuntimeExports.jsxs("div",{className:"bannerText",children:[jsxRuntimeExports.jsx(distExports$1.Header,{children:tt}),jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:nt})]})]}),jsxRuntimeExports.jsx("div",{className:"bannerAction",children:at})]})}const Beneficiary$1="";function Beneficiary({address:_e}){const[et,tt]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{const at=await(await fetch(config.get("VESTINGS_API_URL"))).json();if(at){let ot=at.filter(st=>isSameAddress(st.vesting_address,_e));if(ot.length===1){ot=ot[0];const st=new URL(config.get("PROPOSALS_URL"));st.searchParams.append("id",ot.proposal_id),tt(st)}else console.error(t$3("error.dao_proposal_url"))}})()},[_e,tt]),!!et&&jsxRuntimeExports.jsx(Banner,{className:"beneficiary",icon:Icon$2,title:t$3("beneficiary.title"),subtitle:t$3("beneficiary.subtitle"),action:jsxRuntimeExports.jsx(DaoInitiativeButton,{proposalUrl:et})})}const Schedule$2="",FutureIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/future_events_icon-d66bd0d4.svg";function ScheduleEvent(_e){const{message:et,timestamp:tt=0,future:nt=!1}=_e;return jsxRuntimeExports.jsx("li",{className:`${nt?"future":""}`,children:jsxRuntimeExports.jsxs("div",{className:"timeline__event",children:[!nt&&jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,style:{textTransform:"none",margin:0},children:formatDate$1(new Date(tt*1e3).getTime(),DATE_FORMAT_LONG)}),jsxRuntimeExports.jsx(distExports$1.Header,{style:{fontSize:"15px",margin:0},children:et})]})})}const ScheduleEvent$1=React$L.memo(ScheduleEvent);function ShowMore(_e){const{onClick:et}=_e;return jsxRuntimeExports.jsx("li",{className:"more",style:{cursor:"pointer"},onClick:et,children:jsxRuntimeExports.jsx("div",{className:"timeline__event",children:jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,style:{fontSize:"11px"},children:t$3("schedule.show_more")})})})}const ShowMore$1=React$L.memo(ShowMore);function addReleasedEvent(_e,et,tt,nt){const at={timestamp:nt,key:nt};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.released",{amount:formatNumber(Math.round(et),0),token:tt}),...at}))}function addFulfilledEvent(_e,et,tt=!1){const nt={timestamp:et,future:tt,key:"fulfilled"};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.fulfilled"),...nt}))}function addRevokedEvent(_e,et){const tt={timestamp:et,key:"revoked"};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.revoked"),...tt}))}function addPausedEvent(_e,et){const tt={timestamp:et,key:`paused-${et}`};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.paused"),...tt}))}function addUnpausedEvent(_e,et){const tt={timestamp:et,key:`unpaused-${et}`};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.unpaused"),...tt}))}function Schedule(_e){const{contract:et}=_e,{symbol:tt,start:nt,cliff:at,duration:ot,logs:st,version:ct,paused:dt,revoked:ht}=et,pt=getPreciseDiff(nt,at),mt=reactExports.useMemo(()=>st.filter(Pt=>Pt.topic!==TopicByVersion[ct].TRANSFER_OWNERSHIP),[st,ct]),[yt,gt]=reactExports.useState([]),bt=ht||dt,$t=TopicByVersion[ct],wt=(Pt=!1)=>{const Ot=[];Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.contract_started"),timestamp:nt},"contract_started")),Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.cliff_started",{cliff:t$3("cliff.duration",{months:pt.months,days:pt.days})}),timestamp:nt},"cliff_started")),new Date(at*1e3)<new Date&&(Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.cliff_ended"),timestamp:at},"cliff_ended")),Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.vesting_begins"),timestamp:at},"vesting_begins")));const Nt=nt+ot,Lt=new Date(Nt*1e3);let Bt=!1;const Ut=Ft=>{const zt=Ft.data;switch(Ft.topic){case $t.RELEASE:addReleasedEvent(Ot,zt.amount,tt,zt.timestamp);break;case $t.REVOKE:addRevokedEvent(Ot,zt.timestamp);break;case $t.PAUSED:addPausedEvent(Ot,zt.timestamp);break;case $t.UNPAUSED:addUnpausedEvent(Ot,zt.timestamp);break}};if(mt.length>0)if(mt.length>1&&!Pt){Ot.push(jsxRuntimeExports.jsx(ShowMore$1,{onClick:()=>wt(!0)},"showMore"));const Ft=mt[mt.length-1],{timestamp:zt}=Ft.data;new Date(zt*1e3)>Lt&&(Bt=!0),Ut(Ft)}else for(const Ft of mt){const{timestamp:zt}=Ft.data;!Bt&&new Date(zt*1e3)>Lt&&(Bt=!0,addFulfilledEvent(Ot,Nt)),Ut(Ft)}bt||Bt||(new Date>=new Date(Nt*1e3)?addFulfilledEvent(Ot,Nt):(Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:jsxRuntimeExports.jsx("img",{src:FutureIcon,className:"Future__Icon",alt:""}),future:!0},"Future__Icon")),addFulfilledEvent(Ot,0,!0))),gt(Ot)};reactExports.useEffect(()=>{wt()},[bt]);const Tt=useResponsive()({maxWidth:onlyMobileMaxWidth});return jsxRuntimeExports.jsxs("div",{className:`timeline ${ht?"revoked":dt?"paused":""}`,children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[t$3("schedule.title"),jsxRuntimeExports.jsx(Info,{message:t$3("helper.vesting_schedule"),position:`${Tt?"right":"top"} center`})]}),jsxRuntimeExports.jsx("ul",{children:yt})]})}const Schedule$1=React$L.memo(Schedule),Chart$2="";/*! *****************************************************************************
336
+ hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$1;hooks.min=min$2;hooks.max=max$2;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$1;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};if(typeof moment>"u"&&typeof require=="function")var moment=require("moment");function momentPreciseRangePlugin(_e){var et={nodiff:"",year:"year",years:"years",month:"month",months:"months",day:"day",days:"days",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds",delimiter:" "};function tt(ot,st){return ot+" "+et[st+(ot===1?"":"s")]}function nt(ot,st,ct,dt,ht,pt){var mt=[];return ot&&mt.push(tt(ot,"year")),st&&mt.push(tt(st,"month")),ct&&mt.push(tt(ct,"day")),dt&&mt.push(tt(dt,"hour")),ht&&mt.push(tt(ht,"minute")),pt&&mt.push(tt(pt,"second")),mt.join(et.delimiter)}function at(ot,st,ct,dt,ht,pt,mt){return{years:ot,months:st,days:ct,hours:dt,minutes:ht,seconds:pt,firstDateWasLater:mt}}_e.fn.preciseDiff=function(ot,st){return _e.preciseDiff(this,ot,st)},_e.preciseDiff=function(ot,st,ct){var dt=_e(ot),ht=_e(st),pt;if(dt.add(ht.utcOffset()-dt.utcOffset(),"minutes"),dt.isSame(ht))return ct?at(0,0,0,0,0,0,!1):et.nodiff;if(dt.isAfter(ht)){var mt=dt;dt=ht,ht=mt,pt=!0}else pt=!1;var yt=ht.year()-dt.year(),gt=ht.month()-dt.month(),bt=ht.date()-dt.date(),$t=ht.hour()-dt.hour(),wt=ht.minute()-dt.minute(),St=ht.second()-dt.second();if(St<0&&(St=60+St,wt--),wt<0&&(wt=60+wt,$t--),$t<0&&($t=24+$t,bt--),bt<0){var Tt=_e(ht.year()+"-"+(ht.month()+1),"YYYY-MM").subtract(1,"M").daysInMonth();Tt<dt.date()?bt=Tt+bt+(dt.date()-Tt):bt=Tt+bt,gt--}return gt<0&&(gt=12+gt,yt--),ct?at(yt,gt,bt,$t,wt,St,pt):nt(yt,gt,bt,$t,wt,St)}}momentPreciseRangePlugin(hooks);const DATE_FORMAT_LONG="MMMM D, YYYY",DATE_FORMAT_SHORT="MMM D, YYYY";function isValidAddress(_e){return/^(0x)?[0-9a-f]{40}$/i.test(_e)}function getPreciseDiff(_e,et){const tt=hooks.preciseDiff(hooks(_e*1e3),hooks(et*1e3),!0);return{months:tt.years*12+tt.months,days:tt.days}}function openInNewTab(_e,et=null){window.open(_e,"_blank").focus(),et&&et.preventDefault()}function copyToClipboard(_e){return navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(_e):Promise.reject("The Clipboard API is not available.")}const AddressIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/address_icon-f840b960.svg",onlyMobileMaxWidth=767;let CURRENT_WIDTH=onlyMobileMaxWidth;function useResponsive(){const[_e,et]=reactExports.useState(CURRENT_WIDTH);return reactExports.useEffect(()=>{function tt(){const nt=window.innerWidth;CURRENT_WIDTH!==nt&&(CURRENT_WIDTH=nt),_e!==nt&&et(nt)}return tt(),window.addEventListener("resize",tt),()=>{window.removeEventListener("resize",tt)}},[_e]),reactExports.useCallback(function(nt={}){return!(nt.minWidth!==void 0&&_e<nt.minWidth||nt.maxWidth!==void 0&&_e>nt.maxWidth)},[_e])}const ChangeBeneficiaryModal$1="";var DP=20,RM=1,MAX_DP=1e6,MAX_POWER=1e6,NE=-7,PE=21,STRICT=!1,NAME="[big.js] ",INVALID=NAME+"Invalid ",INVALID_DP=INVALID+"decimal places",INVALID_RM=INVALID+"rounding mode",DIV_BY_ZERO=NAME+"Division by zero",P={},UNDEFINED$1=void 0,NUMERIC=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function _Big_(){function _e(et){var tt=this;if(!(tt instanceof _e))return et===UNDEFINED$1?_Big_():new _e(et);if(et instanceof _e)tt.s=et.s,tt.e=et.e,tt.c=et.c.slice();else{if(typeof et!="string"){if(_e.strict===!0&&typeof et!="bigint")throw TypeError(INVALID+"value");et=et===0&&1/et<0?"-0":String(et)}parse$1(tt,et)}tt.constructor=_e}return _e.prototype=P,_e.DP=DP,_e.RM=RM,_e.NE=NE,_e.PE=PE,_e.strict=STRICT,_e.roundDown=0,_e.roundHalfUp=1,_e.roundHalfEven=2,_e.roundUp=3,_e}function parse$1(_e,et){var tt,nt,at;if(!NUMERIC.test(et))throw Error(INVALID+"number");for(_e.s=et.charAt(0)=="-"?(et=et.slice(1),-1):1,(tt=et.indexOf("."))>-1&&(et=et.replace(".","")),(nt=et.search(/e/i))>0?(tt<0&&(tt=nt),tt+=+et.slice(nt+1),et=et.substring(0,nt)):tt<0&&(tt=et.length),at=et.length,nt=0;nt<at&&et.charAt(nt)=="0";)++nt;if(nt==at)_e.c=[_e.e=0];else{for(;at>0&&et.charAt(--at)=="0";);for(_e.e=tt-nt-1,_e.c=[],tt=0;nt<=at;)_e.c[tt++]=+et.charAt(nt++)}return _e}function round$3(_e,et,tt,nt){var at=_e.c;if(tt===UNDEFINED$1&&(tt=_e.constructor.RM),tt!==0&&tt!==1&&tt!==2&&tt!==3)throw Error(INVALID_RM);if(et<1)nt=tt===3&&(nt||!!at[0])||et===0&&(tt===1&&at[0]>=5||tt===2&&(at[0]>5||at[0]===5&&(nt||at[1]!==UNDEFINED$1))),at.length=1,nt?(_e.e=_e.e-et+1,at[0]=1):at[0]=_e.e=0;else if(et<at.length){if(nt=tt===1&&at[et]>=5||tt===2&&(at[et]>5||at[et]===5&&(nt||at[et+1]!==UNDEFINED$1||at[et-1]&1))||tt===3&&(nt||!!at[0]),at.length=et,nt){for(;++at[--et]>9;)if(at[et]=0,et===0){++_e.e,at.unshift(1);break}}for(et=at.length;!at[--et];)at.pop()}return _e}function stringify$1(_e,et,tt){var nt=_e.e,at=_e.c.join(""),ot=at.length;if(et)at=at.charAt(0)+(ot>1?"."+at.slice(1):"")+(nt<0?"e":"e+")+nt;else if(nt<0){for(;++nt;)at="0"+at;at="0."+at}else if(nt>0)if(++nt>ot)for(nt-=ot;nt--;)at+="0";else nt<ot&&(at=at.slice(0,nt)+"."+at.slice(nt));else ot>1&&(at=at.charAt(0)+"."+at.slice(1));return _e.s<0&&tt?"-"+at:at}P.abs=function(){var _e=new this.constructor(this);return _e.s=1,_e};P.cmp=function(_e){var et,tt=this,nt=tt.c,at=(_e=new tt.constructor(_e)).c,ot=tt.s,st=_e.s,ct=tt.e,dt=_e.e;if(!nt[0]||!at[0])return nt[0]?ot:at[0]?-st:0;if(ot!=st)return ot;if(et=ot<0,ct!=dt)return ct>dt^et?1:-1;for(st=(ct=nt.length)<(dt=at.length)?ct:dt,ot=-1;++ot<st;)if(nt[ot]!=at[ot])return nt[ot]>at[ot]^et?1:-1;return ct==dt?0:ct>dt^et?1:-1};P.div=function(_e){var et=this,tt=et.constructor,nt=et.c,at=(_e=new tt(_e)).c,ot=et.s==_e.s?1:-1,st=tt.DP;if(st!==~~st||st<0||st>MAX_DP)throw Error(INVALID_DP);if(!at[0])throw Error(DIV_BY_ZERO);if(!nt[0])return _e.s=ot,_e.c=[_e.e=0],_e;var ct,dt,ht,pt,mt,yt=at.slice(),gt=ct=at.length,bt=nt.length,$t=nt.slice(0,ct),wt=$t.length,St=_e,Tt=St.c=[],Pt=0,Ot=st+(St.e=et.e-_e.e)+1;for(St.s=ot,ot=Ot<0?0:Ot,yt.unshift(0);wt++<ct;)$t.push(0);do{for(ht=0;ht<10;ht++){if(ct!=(wt=$t.length))pt=ct>wt?1:-1;else for(mt=-1,pt=0;++mt<ct;)if(at[mt]!=$t[mt]){pt=at[mt]>$t[mt]?1:-1;break}if(pt<0){for(dt=wt==ct?at:yt;wt;){if($t[--wt]<dt[wt]){for(mt=wt;mt&&!$t[--mt];)$t[mt]=9;--$t[mt],$t[wt]+=10}$t[wt]-=dt[wt]}for(;!$t[0];)$t.shift()}else break}Tt[Pt++]=pt?ht:++ht,$t[0]&&pt?$t[wt]=nt[gt]||0:$t=[nt[gt]]}while((gt++<bt||$t[0]!==UNDEFINED$1)&&ot--);return!Tt[0]&&Pt!=1&&(Tt.shift(),St.e--,Ot--),Pt>Ot&&round$3(St,Ot,tt.RM,$t[0]!==UNDEFINED$1),St};P.eq=function(_e){return this.cmp(_e)===0};P.gt=function(_e){return this.cmp(_e)>0};P.gte=function(_e){return this.cmp(_e)>-1};P.lt=function(_e){return this.cmp(_e)<0};P.lte=function(_e){return this.cmp(_e)<1};P.minus=P.sub=function(_e){var et,tt,nt,at,ot=this,st=ot.constructor,ct=ot.s,dt=(_e=new st(_e)).s;if(ct!=dt)return _e.s=-dt,ot.plus(_e);var ht=ot.c.slice(),pt=ot.e,mt=_e.c,yt=_e.e;if(!ht[0]||!mt[0])return mt[0]?_e.s=-dt:ht[0]?_e=new st(ot):_e.s=1,_e;if(ct=pt-yt){for((at=ct<0)?(ct=-ct,nt=ht):(yt=pt,nt=mt),nt.reverse(),dt=ct;dt--;)nt.push(0);nt.reverse()}else for(tt=((at=ht.length<mt.length)?ht:mt).length,ct=dt=0;dt<tt;dt++)if(ht[dt]!=mt[dt]){at=ht[dt]<mt[dt];break}if(at&&(nt=ht,ht=mt,mt=nt,_e.s=-_e.s),(dt=(tt=mt.length)-(et=ht.length))>0)for(;dt--;)ht[et++]=0;for(dt=et;tt>ct;){if(ht[--tt]<mt[tt]){for(et=tt;et&&!ht[--et];)ht[et]=9;--ht[et],ht[tt]+=10}ht[tt]-=mt[tt]}for(;ht[--dt]===0;)ht.pop();for(;ht[0]===0;)ht.shift(),--yt;return ht[0]||(_e.s=1,ht=[yt=0]),_e.c=ht,_e.e=yt,_e};P.mod=function(_e){var et,tt=this,nt=tt.constructor,at=tt.s,ot=(_e=new nt(_e)).s;if(!_e.c[0])throw Error(DIV_BY_ZERO);return tt.s=_e.s=1,et=_e.cmp(tt)==1,tt.s=at,_e.s=ot,et?new nt(tt):(at=nt.DP,ot=nt.RM,nt.DP=nt.RM=0,tt=tt.div(_e),nt.DP=at,nt.RM=ot,this.minus(tt.times(_e)))};P.neg=function(){var _e=new this.constructor(this);return _e.s=-_e.s,_e};P.plus=P.add=function(_e){var et,tt,nt,at=this,ot=at.constructor;if(_e=new ot(_e),at.s!=_e.s)return _e.s=-_e.s,at.minus(_e);var st=at.e,ct=at.c,dt=_e.e,ht=_e.c;if(!ct[0]||!ht[0])return ht[0]||(ct[0]?_e=new ot(at):_e.s=at.s),_e;if(ct=ct.slice(),et=st-dt){for(et>0?(dt=st,nt=ht):(et=-et,nt=ct),nt.reverse();et--;)nt.push(0);nt.reverse()}for(ct.length-ht.length<0&&(nt=ht,ht=ct,ct=nt),et=ht.length,tt=0;et;ct[et]%=10)tt=(ct[--et]=ct[et]+ht[et]+tt)/10|0;for(tt&&(ct.unshift(tt),++dt),et=ct.length;ct[--et]===0;)ct.pop();return _e.c=ct,_e.e=dt,_e};P.pow=function(_e){var et=this,tt=new et.constructor("1"),nt=tt,at=_e<0;if(_e!==~~_e||_e<-MAX_POWER||_e>MAX_POWER)throw Error(INVALID+"exponent");for(at&&(_e=-_e);_e&1&&(nt=nt.times(et)),_e>>=1,!!_e;)et=et.times(et);return at?tt.div(nt):nt};P.prec=function(_e,et){if(_e!==~~_e||_e<1||_e>MAX_DP)throw Error(INVALID+"precision");return round$3(new this.constructor(this),_e,et)};P.round=function(_e,et){if(_e===UNDEFINED$1)_e=0;else if(_e!==~~_e||_e<-MAX_DP||_e>MAX_DP)throw Error(INVALID_DP);return round$3(new this.constructor(this),_e+this.e+1,et)};P.sqrt=function(){var _e,et,tt,nt=this,at=nt.constructor,ot=nt.s,st=nt.e,ct=new at("0.5");if(!nt.c[0])return new at(nt);if(ot<0)throw Error(NAME+"No square root");ot=Math.sqrt(nt+""),ot===0||ot===1/0?(et=nt.c.join(""),et.length+st&1||(et+="0"),ot=Math.sqrt(et),st=((st+1)/2|0)-(st<0||st&1),_e=new at((ot==1/0?"5e":(ot=ot.toExponential()).slice(0,ot.indexOf("e")+1))+st)):_e=new at(ot+""),st=_e.e+(at.DP+=4);do tt=_e,_e=ct.times(tt.plus(nt.div(tt)));while(tt.c.slice(0,st).join("")!==_e.c.slice(0,st).join(""));return round$3(_e,(at.DP-=4)+_e.e+1,at.RM)};P.times=P.mul=function(_e){var et,tt=this,nt=tt.constructor,at=tt.c,ot=(_e=new nt(_e)).c,st=at.length,ct=ot.length,dt=tt.e,ht=_e.e;if(_e.s=tt.s==_e.s?1:-1,!at[0]||!ot[0])return _e.c=[_e.e=0],_e;for(_e.e=dt+ht,st<ct&&(et=at,at=ot,ot=et,ht=st,st=ct,ct=ht),et=new Array(ht=st+ct);ht--;)et[ht]=0;for(dt=ct;dt--;){for(ct=0,ht=st+dt;ht>dt;)ct=et[ht]+ot[dt]*at[ht-dt-1]+ct,et[ht--]=ct%10,ct=ct/10|0;et[ht]=ct}for(ct?++_e.e:et.shift(),dt=et.length;!et[--dt];)et.pop();return _e.c=et,_e};P.toExponential=function(_e,et){var tt=this,nt=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<0||_e>MAX_DP)throw Error(INVALID_DP);for(tt=round$3(new tt.constructor(tt),++_e,et);tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,!0,!!nt)};P.toFixed=function(_e,et){var tt=this,nt=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<0||_e>MAX_DP)throw Error(INVALID_DP);for(tt=round$3(new tt.constructor(tt),_e+tt.e+1,et),_e=_e+tt.e+1;tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,!1,!!nt)};P[Symbol.for("nodejs.util.inspect.custom")]=P.toJSON=P.toString=function(){var _e=this,et=_e.constructor;return stringify$1(_e,_e.e<=et.NE||_e.e>=et.PE,!!_e.c[0])};P.toNumber=function(){var _e=Number(stringify$1(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(_e.toString()))throw Error(NAME+"Imprecise conversion");return _e};P.toPrecision=function(_e,et){var tt=this,nt=tt.constructor,at=tt.c[0];if(_e!==UNDEFINED$1){if(_e!==~~_e||_e<1||_e>MAX_DP)throw Error(INVALID+"precision");for(tt=round$3(new nt(tt),_e,et);tt.c.length<_e;)tt.c.push(0)}return stringify$1(tt,_e<=tt.e||tt.e<=nt.NE||tt.e>=nt.PE,!!at)};P.valueOf=function(){var _e=this,et=_e.constructor;if(et.strict===!0)throw Error(NAME+"valueOf disallowed");return stringify$1(_e,_e.e<=et.NE||_e.e>=et.PE,!0)};var Big=_Big_();const manaAbi=[{constant:!0,inputs:[],name:"mintingFinished",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"unpause",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_amount",type:"uint256"}],name:"mint",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"burn",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"paused",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"finishMinting",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"pause",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[],name:"MintFinished",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"burner",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],daiAbi=[{inputs:[{internalType:"uint256",name:"chainId_",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"guy",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!0,inputs:[{indexed:!0,internalType:"bytes4",name:"sig",type:"bytes4"},{indexed:!0,internalType:"address",name:"usr",type:"address"},{indexed:!0,internalType:"bytes32",name:"arg1",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"arg2",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"LogNote",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"guy",type:"address"}],name:"deny",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"move",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"holder",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"pull",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"usr",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"push",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"guy",type:"address"}],name:"rely",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"wards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],usdtAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_upgradedAddress",type:"address"}],name:"deprecate",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"deprecated",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_evilUser",type:"address"}],name:"addBlackList",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"upgradedAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balances",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"maximumFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"unpause",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_maker",type:"address"}],name:"getBlackListStatus",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowed",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"paused",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"who",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"pause",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newBasisPoints",type:"uint256"},{name:"newMaxFee",type:"uint256"}],name:"setParams",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"issue",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"redeem",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"basisPointsRate",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"isBlackListed",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_clearedUser",type:"address"}],name:"removeBlackList",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"MAX_UINT",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_blackListedUser",type:"address"}],name:"destroyBlackFunds",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"_initialSupply",type:"uint256"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_decimals",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Issue",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Redeem",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newAddress",type:"address"}],name:"Deprecate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"feeBasisPoints",type:"uint256"},{indexed:!1,name:"maxFee",type:"uint256"}],name:"Params",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_blackListedUser",type:"address"},{indexed:!1,name:"_balance",type:"uint256"}],name:"DestroyedBlackFunds",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_user",type:"address"}],name:"AddedBlackList",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"_user",type:"address"}],name:"RemovedBlackList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"}],usdcAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"authorizer",type:"address"},{indexed:!0,internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"AuthorizationUsed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"Blacklisted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newBlacklister",type:"address"}],name:"BlacklisterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"burner",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newMasterMinter",type:"address"}],name:"MasterMinterChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"MinterConfigured",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldMinter",type:"address"}],name:"MinterRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[],name:"Pause",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newAddress",type:"address"}],name:"PauserChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newRescuer",type:"address"}],name:"RescuerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_account",type:"address"}],name:"UnBlacklisted",type:"event"},{anonymous:!1,inputs:[],name:"Unpause",type:"event"},{inputs:[],name:"CANCEL_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"RECEIVE_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"TRANSFER_WITH_AUTHORIZATION_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"authorizationState",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"blacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"blacklister",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"authorizer",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"cancelAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"uint256",name:"minterAllowedAmount",type:"uint256"}],name:"configureMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currency",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"decrement",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"increment",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"tokenName",type:"string"},{internalType:"string",name:"tokenSymbol",type:"string"},{internalType:"string",name:"tokenCurrency",type:"string"},{internalType:"uint8",name:"tokenDecimals",type:"uint8"},{internalType:"address",name:"newMasterMinter",type:"address"},{internalType:"address",name:"newPauser",type:"address"},{internalType:"address",name:"newBlacklister",type:"address"},{internalType:"address",name:"newOwner",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"newName",type:"string"}],name:"initializeV2",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"lostAndFound",type:"address"}],name:"initializeV2_1",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"isBlacklisted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"masterMinter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"minterAllowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"pauser",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"receiveWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"removeMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenContract",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"rescueERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescuer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"validAfter",type:"uint256"},{internalType:"uint256",name:"validBefore",type:"uint256"},{internalType:"bytes32",name:"nonce",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"transferWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_account",type:"address"}],name:"unBlacklist",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newBlacklister",type:"address"}],name:"updateBlacklister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newMasterMinter",type:"address"}],name:"updateMasterMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPauser",type:"address"}],name:"updatePauser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newRescuer",type:"address"}],name:"updateRescuer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],vestingAbi=[{constant:!0,inputs:[],name:"duration",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cliff",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"beneficiary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"terraformReserve",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"returnVesting",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"vestedAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"releasableAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"revoked",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"release",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"revocable",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"released",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_token",type:"address"},{name:"amount",type:"uint256"}],name:"releaseForeignToken",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"revoke",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"start",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"amount",type:"uint256"}],name:"lockMana",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"target",type:"address"}],name:"releaseTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"target",type:"address"}],name:"changeBeneficiary",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_beneficiary",type:"address"},{name:"_start",type:"uint256"},{name:"_cliff",type:"uint256"},{name:"_duration",type:"uint256"},{name:"_revocable",type:"bool"},{name:"_token",type:"address"},{name:"_returnVesting",type:"address"},{name:"_terraformReserve",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"LockedMANA",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"amount",type:"uint256"}],name:"Released",type:"event"},{anonymous:!1,inputs:[],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"}],periodicTokenVestingAbi=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_newBeneficiary",type:"address"}],name:"BeneficiaryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"Released",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"_token",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"ReleasedForeign",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_receiver",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"ReleasedSurplus",type:"event"},{anonymous:!1,inputs:[],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"getBeneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCliff",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsLinear",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsPausable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsRevocable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getIsRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReleasable",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReleased",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStart",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStop",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotal",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVested",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVestedPerPeriod",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"address",name:"_token",type:"address"},{internalType:"bool",name:"_isRevocable",type:"bool"},{internalType:"bool",name:"_isPausable",type:"bool"},{internalType:"bool",name:"_isLinear",type:"bool"},{internalType:"uint256",name:"_start",type:"uint256"},{internalType:"uint256",name:"_period",type:"uint256"},{internalType:"uint256",name:"_cliff",type:"uint256"},{internalType:"uint256[]",name:"_vestedPerPeriod",type:"uint256[]"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"releaseForeignToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"releaseSurplus",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newBeneficiary",type:"address"}],name:"setBeneficiary",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}],TokenAddressByChainId={1:{MANA:"0x0f5d2fb29fb7d3cfee444a200298f468908cc942",DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",USDT:"0xdac17f958d2ee523a2206206994597c13d831ec7",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},11155111:{MANA:"0xfa04d2e2ba9aec166c93dfeeba7427b2303befa9",DAI:"0x0000000000000000000000000000000000000000",USDT:"0x0000000000000000000000000000000000000000",USDC:"0x0000000000000000000000000000000000000000"}},ContractVersion={V1:"v1",V2:"v2"},TopicByVersion={[ContractVersion.V1]:{RELEASE:"0xfb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565",REVOKE:"0x44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee6",TRANSFER_OWNERSHIP:"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",PAUSED:"0x0000000000000000000000000000000000000000000000000000000000000000",UNPAUSED:"0x0000000000000000000000000000000000000000000000000000000000000000"},[ContractVersion.V2]:{RELEASE:"0xb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e",REVOKE:"0x44825a4b2df8acb19ce4e1afba9aa850c8b65cdb7942e2078f27d0b0960efee6",TRANSFER_OWNERSHIP:"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",PAUSED:"0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258",UNPAUSED:"0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa"}},DAY_IN_SECONDS=86400;function getDurationInDays(_e){return Math.ceil(_e/DAY_IN_SECONDS)+1}function getCliffEndDay(_e,et){return Math.floor((et-_e)/DAY_IN_SECONDS)}function getDaysFromStart(_e){return Math.ceil((new Date-new Date(_e*1e3))/(DAY_IN_SECONDS*1e3))}function getDaysFromRevoke(_e,et){return Math.floor((_e-et)/DAY_IN_SECONDS)+1}function toDataArray(_e,et){return Array.from(new Array(_e>=0?_e:0),et)}function emptyDataArray(_e){return toDataArray(_e,()=>"-")}async function fetchTicker(_e="decentraland"){try{const tt=await(await fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${_e}&vs_currencies=usd`,{mode:"cors"})).json(),{usd:nt}=tt[_e];return nt}catch{return 0}}function getEth(){return new JsonRpcProvider$1("https://rpc.decentraland.org/mainnet")}async function fetchTokenContracts(_e=1){if(_e!==1)throw new Error(`Unsupported chain id ${_e}`);const et=getEth(),tt=TokenAddressByChainId[_e];return{[tt.MANA]:new Contract$1(tt.MANA,manaAbi,et),[tt.DAI]:new Contract$1(tt.DAI,daiAbi,et),[tt.USDT]:new Contract$1(tt.USDT,usdtAbi,et),[tt.USDC]:new Contract$1(tt.USDC,usdcAbi,et)}}async function fetchContract(_e,et){const tt=getEth();let nt,at;try{at=new Contract$1(_e,periodicTokenVestingAbi,tt),await at.getIsLinear(),nt=ContractVersion.V2}catch{at=new Contract$1(_e,vestingAbi,tt),nt=ContractVersion.V1}let ot;if(nt===ContractVersion.V1?ot=await at.token():ot=await at.getToken(),ot=ot.toLowerCase(),!(ot in et))throw new Error("Token not supported");const st=await et[ot].decimals(),ct={v1:{duration:()=>at.duration(),cliff:()=>at.cliff(),beneficiary:()=>at.beneficiary(),vestedAmount:()=>at.vestedAmount(),releasableAmount:()=>at.releasableAmount(),revoked:()=>at.revoked(),revocable:()=>at.revocable(),released:()=>at.released(),start:()=>at.start(),periodDuration:()=>Promise.resolve("0"),vestedPerPeriod:()=>Promise.resolve([]),paused:()=>Promise.resolve(!1),pausable:()=>Promise.resolve(!1),stop:()=>Promise.resolve("0"),linear:()=>Promise.resolve(!0)},v2:{duration:()=>Promise.resolve("0"),cliff:()=>at.getCliff(),beneficiary:()=>at.getBeneficiary(),vestedAmount:()=>at.getVested(),releasableAmount:()=>at.getReleasable(),revoked:()=>at.getIsRevoked(),revocable:()=>at.getIsRevocable(),released:()=>at.getReleased(),start:()=>at.getStart(),periodDuration:()=>at.getPeriod(),vestedPerPeriod:()=>at.getVestedPerPeriod(),paused:()=>at.paused(),pausable:()=>at.getIsPausable(),stop:()=>at.getStop(),linear:()=>at.getIsLinear()}},[dt,ht,pt,mt,yt,gt,bt,$t,wt,St,Tt,Pt,Ot,Nt,Lt,Bt,Ut,Ft,zt]=await Promise.all([et[ot].symbol(),et[ot].balanceOf(_e),getLogs(_e,st,nt),at.owner(),ct[nt].duration(),ct[nt].cliff(),ct[nt].beneficiary(),ct[nt].vestedAmount(),ct[nt].releasableAmount(),ct[nt].revoked(),ct[nt].revocable(),ct[nt].released(),ct[nt].start(),ct[nt].periodDuration(),ct[nt].vestedPerPeriod(),ct[nt].paused(),ct[nt].pausable(),ct[nt].stop(),ct[nt].linear()]),It=Number(st),vt={version:nt,symbol:dt,address:_e,balance:Number(ht)/10**It,duration:nt===ContractVersion.V1?parseInt(yt,10):Lt.length*parseInt(Nt,10),cliff:nt===ContractVersion.V1?parseInt(gt,10):parseInt(gt,10)+parseInt(Ot,10),beneficiary:bt,vestedAmount:Number($t)/10**It,releasableAmount:Number(wt)/10**It,revoked:St,revocable:Tt,owner:mt,released:Number(Pt)/10**It,start:parseInt(Ot,10),logs:pt,periodDuration:Nt,vestedPerPeriod:Lt.map(At=>parseInt(At,10)/10**It),paused:Bt,pausable:Ut,stop:parseInt(Ft,10),linear:zt,total:void 0},Et=()=>{if(nt===ContractVersion.V1){if(vt.revoked){const At=vt.logs.find(Rt=>Rt.topic===TopicByVersion[nt].REVOKE),{timestamp:xt}=At.data,Ct=getDaysFromRevoke(xt,vt.start),Dt=getDurationInDays(vt.duration),kt=vt.vestedAmount/Ct*Dt;return Math.floor(kt/100)*100}return vt.balance+vt.released}return vt.vestedPerPeriod.reduce((At,xt)=>At+xt,0)};return vt.total=Number(Et()),vt}async function getLogs(_e,et,tt){const nt=getEth(),at=await nt.getLogs({address:_e,fromBlock:0,toBlock:"latest"}),ot=await Promise.all(at.map(ht=>nt.getBlock(ht.blockNumber))),st=[];let ct=0;const dt=TopicByVersion[tt];for(const ht in at)switch(at[ht].topics[0]){case dt.TRANSFER_OWNERSHIP:st.push(getTransferOwnershipLog([...at[ht].topics],ot[ht].timestamp,dt));break;case dt.RELEASE:const pt=getReleaseLog(et,at[ht].data,ct,ot[ht].timestamp,tt,dt);st.push(pt),ct=Big(pt.data.acum).mul(Big(10)**Big(et)).toNumber();break;case dt.REVOKE:st.push(getRevokeLog(ot[ht].timestamp,dt));break;case dt.PAUSED:st.push(getPausedLog(ot[ht].timestamp,dt));break;case dt.UNPAUSED:st.push(getUnpausedLog(ot[ht].timestamp,dt));break}return st}function getTransferOwnershipLog(_e,et,tt){return{topic:tt.TRANSFER_OWNERSHIP,data:{previousOwner:_e[1].slice(0,2)+_e[1].slice(26),newOwner:_e[2].slice(0,2)+_e[2].slice(26),timestamp:et}}}function getReleaseLog(_e,et,tt,nt,at,ot){const st=Big(Number(tt)||0).div(Big(10)**Big(_e));let ct,dt;return at===ContractVersion.V1?(ct=Big(Number(et)||0).div(Big(10)**Big(_e)),dt=ct.minus(st)):(dt=Big(Number(et)||0).div(Big(10)**Big(_e)),ct=Big(Number(tt)||0).div(Big(10)**Big(_e)).add(dt)),{topic:ot.RELEASE,data:{amount:dt.toNumber(),acum:ct.toNumber(),timestamp:nt}}}function getRevokeLog(_e,et){return{topic:et.REVOKE,data:{timestamp:_e}}}function getPausedLog(_e,et){return{topic:et.PAUSED,data:{timestamp:_e}}}function getUnpausedLog(_e,et){return{topic:et.UNPAUSED,data:{timestamp:_e}}}async function release(_e,et,tt){const nt=await tt.getSigner();if(et.version===ContractVersion.V1)return await new Contract$1(et.address,vestingAbi,nt).release();const at=new Contract$1(et.address,periodicTokenVestingAbi,nt),ot=await at.getReleasable();return await at.release(_e,ot)}async function changeBeneficiary(_e,et,tt){const nt=await tt.getSigner();return et.version===ContractVersion.V1?new Contract$1(et.address,vestingAbi,nt).changeBeneficiary(_e):new Contract$1(et.address,periodicTokenVestingAbi,nt).setBeneficiary(_e)}function isSameAddress(_e,et){return _e&&et&&_e.toLowerCase()===et.toLowerCase()}async function getEthProvider(){const _e=await getConnectedProvider();if(!_e)throw new Error("Could not get a valid connected Wallet");return new BrowserProvider(_e)}function ChangeBeneficiaryModal({open:_e,onClose:et,contract:tt}){const[nt,at]=reactExports.useState({address:"",error:!1,errorMessage:"",loading:!1,successMessage:""}),ot=pt=>at(mt=>({...mt,address:pt})),st=(pt,mt="")=>at(yt=>({...yt,error:pt,errorMessage:mt})),ct=pt=>at(mt=>({...mt,loading:pt})),dt=(pt="")=>at(mt=>({...mt,successMessage:pt})),ht=async()=>{if(isValidAddress(nt.address)){ct(!0),st(!1);try{const pt=await getEthProvider();await changeBeneficiary(nt.address,tt,pt),ct(!1),dt(t$3("modal.success",{address:nt.address,br:jsxRuntimeExports.jsx("br",{})}))}catch(pt){ct(!1),st(!0,pt.message)}}else st(!0,t$3("modal.error"))};return jsxRuntimeExports.jsxs(distExports$1.Modal,{className:"changeBeneficiaryModal",size:"small",open:_e,onClose:et,closeIcon:jsxRuntimeExports.jsx(distExports$1.Close,{}),children:[jsxRuntimeExports.jsx(distExports$1.Modal.Header,{children:t$3("modal.title")}),jsxRuntimeExports.jsxs(distExports$1.Modal.Content,{children:[jsxRuntimeExports.jsx("p",{children:t$3("modal.warning")}),jsxRuntimeExports.jsx(distExports$1.Field,{onChange:(pt,mt)=>{ot(mt.value),st(!1)},label:t$3("modal.label"),placeholder:"0x...",error:nt.error,message:nt.errorMessage,loading:nt.loading,disabled:nt.loading})]}),jsxRuntimeExports.jsx(distExports$1.Modal.Actions,{children:jsxRuntimeExports.jsx(distExports$1.Button,{primary:!0,onClick:ht,disabled:nt.loading,children:t$3("modal.button")})}),jsxRuntimeExports.jsx(distExports$1.Modal.Content,{children:jsxRuntimeExports.jsx("p",{className:"success",children:nt.successMessage})})]})}const Details$2="";function addressShortener(_e){return _e.substring(0,6)+"..."+_e.substring(38,42)}function getBeneficiary(_e){return jsxRuntimeExports.jsxs("div",{className:"item beneficiary",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.beneficiary")}),jsxRuntimeExports.jsxs(distExports$1.Header,{onClick:()=>copyToClipboard(_e),style:{cursor:"pointer"},children:[jsxRuntimeExports.jsx("img",{src:AddressIcon,alt:""}),jsxRuntimeExports.jsx(distExports$1.Popup,{content:t$3("global.copied"),position:"bottom center",trigger:jsxRuntimeExports.jsx("span",{children:addressShortener(_e)}),on:"click"}),jsxRuntimeExports.jsx(Info,{message:t$3("helper.beneficiary"),position:"left center"})]})]})}function getDate(_e,et){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3(_e)}),jsxRuntimeExports.jsx(distExports$1.Header,{children:formatDate$1(new Date(et*1e3).getTime(),DATE_FORMAT_LONG)})]})}function getCliffPeriod(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.cliff_period")}),jsxRuntimeExports.jsxs(distExports$1.Header,{children:[t$3("cliff.duration",{months:_e.months,days:_e.days}),jsxRuntimeExports.jsx(Info,{message:t$3("helper.cliff_period"),position:"left center"})]})]})}function getAmount(_e,et,tt,nt){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3(_e)}),jsxRuntimeExports.jsxs(distExports$1.Header,{children:[formatNumber(et,0)," ",tt,jsxRuntimeExports.jsx(Info,{message:t$3(nt),position:"left center"})]})]})}function getRevocable(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.revocable")}),jsxRuntimeExports.jsx(distExports$1.Header,{children:t$3(_e?"global.yes":"global.no")})]})}function getPausable(_e){return jsxRuntimeExports.jsxs("div",{className:"item",children:[jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:t$3("details.pausable")}),jsxRuntimeExports.jsx(distExports$1.Header,{children:t$3(_e?"global.yes":"global.no")})]})}function getActionButton(_e,et){return jsxRuntimeExports.jsx(distExports$1.Button,{basic:!0,className:"action",onClick:et,children:_e})}function Details({contract:_e,address:et}){const{version:tt,symbol:nt,released:at,start:ot,cliff:st,duration:ct,releasableAmount:dt,revocable:ht,pausable:pt,total:mt,beneficiary:yt}=_e,gt=async()=>{const Nt=await getEthProvider();await release(et,_e,Nt)},bt=isSameAddress(et,yt),$t=getPreciseDiff(ot,st),St=useResponsive()({maxWidth:onlyMobileMaxWidth}),[Tt,Pt]=reactExports.useState(!1),Ot=()=>Pt(!1);return jsxRuntimeExports.jsxs("div",{id:"details",className:St&&"mobile"||"",children:[jsxRuntimeExports.jsxs("div",{className:"divToStyle",children:[getBeneficiary(yt),!St&&bt&&getActionButton(t$3("details.change_beneficiary"),()=>Pt(!0)),jsxRuntimeExports.jsxs("div",{className:"dates",children:[getDate("details.start",ot),getDate("details.end",ot+ct)]})]}),getCliffPeriod($t),getAmount("details.total_vesting",mt,nt,"helper.total_vesting"),getAmount("details.released",at,nt,"helper.released"),getAmount("details.releasable",dt,nt,"helper.releasable"),!St&&bt&&dt>0&&getActionButton(t$3("details.release_funds"),gt),getRevocable(ht),tt===ContractVersion.V2&&getPausable(pt),jsxRuntimeExports.jsx(ChangeBeneficiaryModal,{open:Tt,onClose:Ot,contract:_e})]})}const Details$1=React$L.memo(Details);function _interopDefault(_e){return _e&&typeof _e=="object"&&"default"in _e?_e.default:_e}var React=reactExports,React__default=_interopDefault(React);function _defineProperty(_e,et,tt){return et in _e?Object.defineProperty(_e,et,{value:tt,enumerable:!0,configurable:!0,writable:!0}):_e[et]=tt,_e}function _inheritsLoose(_e,et){_e.prototype=Object.create(et.prototype),_e.prototype.constructor=_e,_e.__proto__=et}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement);function withSideEffect(_e,et,tt){if(typeof _e!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof et!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof tt<"u"&&typeof tt!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function nt(at){return at.displayName||at.name||"Component"}return function(ot){if(typeof ot!="function")throw new Error("Expected WrappedComponent to be a React component.");var st=[],ct;function dt(){ct=_e(st.map(function(pt){return pt.props})),ht.canUseDOM?et(ct):tt&&(ct=tt(ct))}var ht=function(pt){_inheritsLoose(mt,pt);function mt(){return pt.apply(this,arguments)||this}mt.peek=function(){return ct},mt.rewind=function(){if(mt.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var bt=ct;return ct=void 0,st=[],bt};var yt=mt.prototype;return yt.UNSAFE_componentWillMount=function(){st.push(this),dt()},yt.componentDidUpdate=function(){dt()},yt.componentWillUnmount=function(){var bt=st.indexOf(this);st.splice(bt,1),dt()},yt.render=function(){return React__default.createElement(ot,this.props)},mt}(React.PureComponent);return _defineProperty(ht,"displayName","SideEffect("+nt(ot)+")"),_defineProperty(ht,"canUseDOM",canUseDOM),ht}}var lib=withSideEffect;const withSideEffect$1=getDefaultExportFromCjs$1(lib);var ATTRIBUTE_NAMES={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},TAG_NAMES={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(TAG_NAMES).map(function(_e){return TAG_NAMES[_e]});var TAG_PROPERTIES={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},HTML_TAG_MAP=Object.keys(REACT_TAG_MAP).reduce(function(_e,et){return _e[REACT_TAG_MAP[et]]=et,_e},{}),SELF_CLOSING_TAGS=[TAG_NAMES.NOSCRIPT,TAG_NAMES.SCRIPT,TAG_NAMES.STYLE],HELMET_ATTRIBUTE="data-react-helmet",_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},classCallCheck=function(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")},createClass=function(){function _e(et,tt){for(var nt=0;nt<tt.length;nt++){var at=tt[nt];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(et,at.key,at)}}return function(et,tt,nt){return tt&&_e(et.prototype,tt),nt&&_e(et,nt),et}}(),_extends=Object.assign||function(_e){for(var et=1;et<arguments.length;et++){var tt=arguments[et];for(var nt in tt)Object.prototype.hasOwnProperty.call(tt,nt)&&(_e[nt]=tt[nt])}return _e},inherits$1=function(_e,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);_e.prototype=Object.create(et&&et.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(_e,et):_e.__proto__=et)},objectWithoutProperties=function(_e,et){var tt={};for(var nt in _e)et.indexOf(nt)>=0||Object.prototype.hasOwnProperty.call(_e,nt)&&(tt[nt]=_e[nt]);return tt},possibleConstructorReturn=function(_e,et){if(!_e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:_e},encodeSpecialCharacters=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return tt===!1?String(et):String(et).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},getTitleFromPropsList=function _e(et){var tt=getInnermostProperty(et,TAG_NAMES.TITLE),nt=getInnermostProperty(et,HELMET_PROPS.TITLE_TEMPLATE);if(nt&&tt)return nt.replace(/%s/g,function(){return Array.isArray(tt)?tt.join(""):tt});var at=getInnermostProperty(et,HELMET_PROPS.DEFAULT_TITLE);return tt||at||void 0},getOnChangeClientState=function _e(et){return getInnermostProperty(et,HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},getAttributesFromPropsList=function _e(et,tt){return tt.filter(function(nt){return typeof nt[et]<"u"}).map(function(nt){return nt[et]}).reduce(function(nt,at){return _extends({},nt,at)},{})},getBaseTagFromPropsList=function _e(et,tt){return tt.filter(function(nt){return typeof nt[TAG_NAMES.BASE]<"u"}).map(function(nt){return nt[TAG_NAMES.BASE]}).reverse().reduce(function(nt,at){if(!nt.length)for(var ot=Object.keys(at),st=0;st<ot.length;st++){var ct=ot[st],dt=ct.toLowerCase();if(et.indexOf(dt)!==-1&&at[dt])return nt.concat(at)}return nt},[])},getTagsFromPropsList=function _e(et,tt,nt){var at={};return nt.filter(function(ot){return Array.isArray(ot[et])?!0:(typeof ot[et]<"u"&&warn$1("Helmet: "+et+' should be of type "Array". Instead found type "'+_typeof(ot[et])+'"'),!1)}).map(function(ot){return ot[et]}).reverse().reduce(function(ot,st){var ct={};st.filter(function(yt){for(var gt=void 0,bt=Object.keys(yt),$t=0;$t<bt.length;$t++){var wt=bt[$t],St=wt.toLowerCase();tt.indexOf(St)!==-1&&!(gt===TAG_PROPERTIES.REL&&yt[gt].toLowerCase()==="canonical")&&!(St===TAG_PROPERTIES.REL&&yt[St].toLowerCase()==="stylesheet")&&(gt=St),tt.indexOf(wt)!==-1&&(wt===TAG_PROPERTIES.INNER_HTML||wt===TAG_PROPERTIES.CSS_TEXT||wt===TAG_PROPERTIES.ITEM_PROP)&&(gt=wt)}if(!gt||!yt[gt])return!1;var Tt=yt[gt].toLowerCase();return at[gt]||(at[gt]={}),ct[gt]||(ct[gt]={}),at[gt][Tt]?!1:(ct[gt][Tt]=!0,!0)}).reverse().forEach(function(yt){return ot.push(yt)});for(var dt=Object.keys(ct),ht=0;ht<dt.length;ht++){var pt=dt[ht],mt=objectAssign$1({},at[pt],ct[pt]);at[pt]=mt}return ot},[]).reverse()},getInnermostProperty=function _e(et,tt){for(var nt=et.length-1;nt>=0;nt--){var at=et[nt];if(at.hasOwnProperty(tt))return at[tt]}return null},reducePropsToState=function _e(et){return{baseTag:getBaseTagFromPropsList([TAG_PROPERTIES.HREF,TAG_PROPERTIES.TARGET],et),bodyAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY,et),defer:getInnermostProperty(et,HELMET_PROPS.DEFER),encode:getInnermostProperty(et,HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML,et),linkTags:getTagsFromPropsList(TAG_NAMES.LINK,[TAG_PROPERTIES.REL,TAG_PROPERTIES.HREF],et),metaTags:getTagsFromPropsList(TAG_NAMES.META,[TAG_PROPERTIES.NAME,TAG_PROPERTIES.CHARSET,TAG_PROPERTIES.HTTPEQUIV,TAG_PROPERTIES.PROPERTY,TAG_PROPERTIES.ITEM_PROP],et),noscriptTags:getTagsFromPropsList(TAG_NAMES.NOSCRIPT,[TAG_PROPERTIES.INNER_HTML],et),onChangeClientState:getOnChangeClientState(et),scriptTags:getTagsFromPropsList(TAG_NAMES.SCRIPT,[TAG_PROPERTIES.SRC,TAG_PROPERTIES.INNER_HTML],et),styleTags:getTagsFromPropsList(TAG_NAMES.STYLE,[TAG_PROPERTIES.CSS_TEXT],et),title:getTitleFromPropsList(et),titleAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE,et)}},rafPolyfill=function(){var _e=Date.now();return function(et){var tt=Date.now();tt-_e>16?(_e=tt,et(tt)):setTimeout(function(){rafPolyfill(et)},0)}}(),cafPolyfill=function _e(et){return clearTimeout(et)},requestAnimationFrame$3=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||rafPolyfill:global$a.requestAnimationFrame||rafPolyfill,cancelAnimationFrame$1=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||cafPolyfill:global$a.cancelAnimationFrame||cafPolyfill,warn$1=function _e(et){return console&&typeof console.warn=="function"&&console.warn(et)},_helmetCallback=null,handleClientStateChange=function _e(et){_helmetCallback&&cancelAnimationFrame$1(_helmetCallback),et.defer?_helmetCallback=requestAnimationFrame$3(function(){commitTagChanges(et,function(){_helmetCallback=null})}):(commitTagChanges(et),_helmetCallback=null)},commitTagChanges=function _e(et,tt){var nt=et.baseTag,at=et.bodyAttributes,ot=et.htmlAttributes,st=et.linkTags,ct=et.metaTags,dt=et.noscriptTags,ht=et.onChangeClientState,pt=et.scriptTags,mt=et.styleTags,yt=et.title,gt=et.titleAttributes;updateAttributes(TAG_NAMES.BODY,at),updateAttributes(TAG_NAMES.HTML,ot),updateTitle(yt,gt);var bt={baseTag:updateTags(TAG_NAMES.BASE,nt),linkTags:updateTags(TAG_NAMES.LINK,st),metaTags:updateTags(TAG_NAMES.META,ct),noscriptTags:updateTags(TAG_NAMES.NOSCRIPT,dt),scriptTags:updateTags(TAG_NAMES.SCRIPT,pt),styleTags:updateTags(TAG_NAMES.STYLE,mt)},$t={},wt={};Object.keys(bt).forEach(function(St){var Tt=bt[St],Pt=Tt.newTags,Ot=Tt.oldTags;Pt.length&&($t[St]=Pt),Ot.length&&(wt[St]=bt[St].oldTags)}),tt&&tt(),ht(et,$t,wt)},flattenArray=function _e(et){return Array.isArray(et)?et.join(""):et},updateTitle=function _e(et,tt){typeof et<"u"&&document.title!==et&&(document.title=flattenArray(et)),updateAttributes(TAG_NAMES.TITLE,tt)},updateAttributes=function _e(et,tt){var nt=document.getElementsByTagName(et)[0];if(nt){for(var at=nt.getAttribute(HELMET_ATTRIBUTE),ot=at?at.split(","):[],st=[].concat(ot),ct=Object.keys(tt),dt=0;dt<ct.length;dt++){var ht=ct[dt],pt=tt[ht]||"";nt.getAttribute(ht)!==pt&&nt.setAttribute(ht,pt),ot.indexOf(ht)===-1&&ot.push(ht);var mt=st.indexOf(ht);mt!==-1&&st.splice(mt,1)}for(var yt=st.length-1;yt>=0;yt--)nt.removeAttribute(st[yt]);ot.length===st.length?nt.removeAttribute(HELMET_ATTRIBUTE):nt.getAttribute(HELMET_ATTRIBUTE)!==ct.join(",")&&nt.setAttribute(HELMET_ATTRIBUTE,ct.join(","))}},updateTags=function _e(et,tt){var nt=document.head||document.querySelector(TAG_NAMES.HEAD),at=nt.querySelectorAll(et+"["+HELMET_ATTRIBUTE+"]"),ot=Array.prototype.slice.call(at),st=[],ct=void 0;return tt&&tt.length&&tt.forEach(function(dt){var ht=document.createElement(et);for(var pt in dt)if(dt.hasOwnProperty(pt))if(pt===TAG_PROPERTIES.INNER_HTML)ht.innerHTML=dt.innerHTML;else if(pt===TAG_PROPERTIES.CSS_TEXT)ht.styleSheet?ht.styleSheet.cssText=dt.cssText:ht.appendChild(document.createTextNode(dt.cssText));else{var mt=typeof dt[pt]>"u"?"":dt[pt];ht.setAttribute(pt,mt)}ht.setAttribute(HELMET_ATTRIBUTE,"true"),ot.some(function(yt,gt){return ct=gt,ht.isEqualNode(yt)})?ot.splice(ct,1):st.push(ht)}),ot.forEach(function(dt){return dt.parentNode.removeChild(dt)}),st.forEach(function(dt){return nt.appendChild(dt)}),{oldTags:ot,newTags:st}},generateElementAttributesAsString=function _e(et){return Object.keys(et).reduce(function(tt,nt){var at=typeof et[nt]<"u"?nt+'="'+et[nt]+'"':""+nt;return tt?tt+" "+at:at},"")},generateTitleAsString=function _e(et,tt,nt,at){var ot=generateElementAttributesAsString(nt),st=flattenArray(tt);return ot?"<"+et+" "+HELMET_ATTRIBUTE+'="true" '+ot+">"+encodeSpecialCharacters(st,at)+"</"+et+">":"<"+et+" "+HELMET_ATTRIBUTE+'="true">'+encodeSpecialCharacters(st,at)+"</"+et+">"},generateTagsAsString=function _e(et,tt,nt){return tt.reduce(function(at,ot){var st=Object.keys(ot).filter(function(ht){return!(ht===TAG_PROPERTIES.INNER_HTML||ht===TAG_PROPERTIES.CSS_TEXT)}).reduce(function(ht,pt){var mt=typeof ot[pt]>"u"?pt:pt+'="'+encodeSpecialCharacters(ot[pt],nt)+'"';return ht?ht+" "+mt:mt},""),ct=ot.innerHTML||ot.cssText||"",dt=SELF_CLOSING_TAGS.indexOf(et)===-1;return at+"<"+et+" "+HELMET_ATTRIBUTE+'="true" '+st+(dt?"/>":">"+ct+"</"+et+">")},"")},convertElementAttributestoReactProps=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(et).reduce(function(nt,at){return nt[REACT_TAG_MAP[at]||at]=et[at],nt},tt)},convertReactPropstoHtmlAttributes=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(et).reduce(function(nt,at){return nt[HTML_TAG_MAP[at]||at]=et[at],nt},tt)},generateTitleAsReactComponent=function _e(et,tt,nt){var at,ot=(at={key:tt},at[HELMET_ATTRIBUTE]=!0,at),st=convertElementAttributestoReactProps(nt,ot);return[React$L.createElement(TAG_NAMES.TITLE,st,tt)]},generateTagsAsReactComponent=function _e(et,tt){return tt.map(function(nt,at){var ot,st=(ot={key:at},ot[HELMET_ATTRIBUTE]=!0,ot);return Object.keys(nt).forEach(function(ct){var dt=REACT_TAG_MAP[ct]||ct;if(dt===TAG_PROPERTIES.INNER_HTML||dt===TAG_PROPERTIES.CSS_TEXT){var ht=nt.innerHTML||nt.cssText;st.dangerouslySetInnerHTML={__html:ht}}else st[dt]=nt[ct]}),React$L.createElement(et,st)})},getMethodsForTag=function _e(et,tt,nt){switch(et){case TAG_NAMES.TITLE:return{toComponent:function(){return generateTitleAsReactComponent(et,tt.title,tt.titleAttributes)},toString:function(){return generateTitleAsString(et,tt.title,tt.titleAttributes,nt)}};case ATTRIBUTE_NAMES.BODY:case ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return convertElementAttributestoReactProps(tt)},toString:function(){return generateElementAttributesAsString(tt)}};default:return{toComponent:function(){return generateTagsAsReactComponent(et,tt)},toString:function(){return generateTagsAsString(et,tt,nt)}}}},mapStateOnServer=function _e(et){var tt=et.baseTag,nt=et.bodyAttributes,at=et.encode,ot=et.htmlAttributes,st=et.linkTags,ct=et.metaTags,dt=et.noscriptTags,ht=et.scriptTags,pt=et.styleTags,mt=et.title,yt=mt===void 0?"":mt,gt=et.titleAttributes;return{base:getMethodsForTag(TAG_NAMES.BASE,tt,at),bodyAttributes:getMethodsForTag(ATTRIBUTE_NAMES.BODY,nt,at),htmlAttributes:getMethodsForTag(ATTRIBUTE_NAMES.HTML,ot,at),link:getMethodsForTag(TAG_NAMES.LINK,st,at),meta:getMethodsForTag(TAG_NAMES.META,ct,at),noscript:getMethodsForTag(TAG_NAMES.NOSCRIPT,dt,at),script:getMethodsForTag(TAG_NAMES.SCRIPT,ht,at),style:getMethodsForTag(TAG_NAMES.STYLE,pt,at),title:getMethodsForTag(TAG_NAMES.TITLE,{title:yt,titleAttributes:gt},at)}},Helmet=function _e(et){var tt,nt;return nt=tt=function(at){inherits$1(ot,at);function ot(){return classCallCheck(this,ot),possibleConstructorReturn(this,at.apply(this,arguments))}return ot.prototype.shouldComponentUpdate=function(ct){return!isEqual$3(this.props,ct)},ot.prototype.mapNestedChildrenToProps=function(ct,dt){if(!dt)return null;switch(ct.type){case TAG_NAMES.SCRIPT:case TAG_NAMES.NOSCRIPT:return{innerHTML:dt};case TAG_NAMES.STYLE:return{cssText:dt}}throw new Error("<"+ct.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},ot.prototype.flattenArrayTypeChildren=function(ct){var dt,ht=ct.child,pt=ct.arrayTypeChildren,mt=ct.newChildProps,yt=ct.nestedChildren;return _extends({},pt,(dt={},dt[ht.type]=[].concat(pt[ht.type]||[],[_extends({},mt,this.mapNestedChildrenToProps(ht,yt))]),dt))},ot.prototype.mapObjectTypeChildren=function(ct){var dt,ht,pt=ct.child,mt=ct.newProps,yt=ct.newChildProps,gt=ct.nestedChildren;switch(pt.type){case TAG_NAMES.TITLE:return _extends({},mt,(dt={},dt[pt.type]=gt,dt.titleAttributes=_extends({},yt),dt));case TAG_NAMES.BODY:return _extends({},mt,{bodyAttributes:_extends({},yt)});case TAG_NAMES.HTML:return _extends({},mt,{htmlAttributes:_extends({},yt)})}return _extends({},mt,(ht={},ht[pt.type]=_extends({},yt),ht))},ot.prototype.mapArrayTypeChildrenToProps=function(ct,dt){var ht=_extends({},dt);return Object.keys(ct).forEach(function(pt){var mt;ht=_extends({},ht,(mt={},mt[pt]=ct[pt],mt))}),ht},ot.prototype.warnOnInvalidChildren=function(ct,dt){return!0},ot.prototype.mapChildrenToProps=function(ct,dt){var ht=this,pt={};return React$L.Children.forEach(ct,function(mt){if(!(!mt||!mt.props)){var yt=mt.props,gt=yt.children,bt=objectWithoutProperties(yt,["children"]),$t=convertReactPropstoHtmlAttributes(bt);switch(ht.warnOnInvalidChildren(mt,gt),mt.type){case TAG_NAMES.LINK:case TAG_NAMES.META:case TAG_NAMES.NOSCRIPT:case TAG_NAMES.SCRIPT:case TAG_NAMES.STYLE:pt=ht.flattenArrayTypeChildren({child:mt,arrayTypeChildren:pt,newChildProps:$t,nestedChildren:gt});break;default:dt=ht.mapObjectTypeChildren({child:mt,newProps:dt,newChildProps:$t,nestedChildren:gt});break}}}),dt=this.mapArrayTypeChildrenToProps(pt,dt),dt},ot.prototype.render=function(){var ct=this.props,dt=ct.children,ht=objectWithoutProperties(ct,["children"]),pt=_extends({},ht);return dt&&(pt=this.mapChildrenToProps(dt,pt)),React$L.createElement(et,pt)},createClass(ot,null,[{key:"canUseDOM",set:function(ct){et.canUseDOM=ct}}]),ot}(React$L.Component),tt.propTypes={base:PropTypes.object,bodyAttributes:PropTypes.object,children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node),PropTypes.node]),defaultTitle:PropTypes.string,defer:PropTypes.bool,encodeSpecialCharacters:PropTypes.bool,htmlAttributes:PropTypes.object,link:PropTypes.arrayOf(PropTypes.object),meta:PropTypes.arrayOf(PropTypes.object),noscript:PropTypes.arrayOf(PropTypes.object),onChangeClientState:PropTypes.func,script:PropTypes.arrayOf(PropTypes.object),style:PropTypes.arrayOf(PropTypes.object),title:PropTypes.string,titleAttributes:PropTypes.object,titleTemplate:PropTypes.string},tt.defaultProps={defer:!0,encodeSpecialCharacters:!0},tt.peek=et.peek,tt.rewind=function(){var at=et.rewind();return at||(at=mapStateOnServer({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),at},nt},NullComponent=function _e(){return null},HelmetSideEffects=withSideEffect$1(reducePropsToState,handleClientStateChange,mapStateOnServer)(NullComponent),HelmetExport=Helmet(HelmetSideEffects);HelmetExport.renderStatic=HelmetExport.rewind;function ManaWidget(){const _e="https://crypto.com/price/static/widget/index.js",et=reactExports.useRef(null);return reactExports.useEffect(()=>{(()=>{et.current=document.createElement("script"),et.current.src=_e,document.body.appendChild(et.current)})();const nt=()=>{document.body.removeChild(et.current)};return()=>nt()},[]),jsxRuntimeExports.jsx("div",{id:"crypto-widget-CoinList","data-design":"classic","data-coins":"decentraland",style:{width:"100%"}})}const Copy="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/copy-aaa77b43.svg",Link="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/link-2c78ddb8.svg",DaiLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/dai_logo-b5489c4a.svg",UsdtLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/usdt_logo-4ed36654.svg",UsdcLogo="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/usdc_logo-913adf09.svg",Overview$1="";function useReviewUrl(_e){const et=`${config.get("REVIEW_CONTRACT_URL")}${_e}`;return{reviewUrl:et,onReviewUrlClick:nt=>openInNewTab(et,nt)}}const logo={DAI:DaiLogo,USDT:UsdtLogo,USDC:UsdcLogo};function Overview(_e){const{address:et,contract:tt}=_e,{symbol:nt,start:at,cliff:ot,duration:st,total:ct}=tt,dt=getPreciseDiff(at,at+st),ht=getPreciseDiff(at,ot),{reviewUrl:pt,onReviewUrlClick:mt}=useReviewUrl(et),gt=useResponsive()({maxWidth:onlyMobileMaxWidth}),bt=ht.months+ht.days;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HelmetExport,{children:jsxRuntimeExports.jsx("title",{children:t$3("global.title",{token:nt})})}),jsxRuntimeExports.jsx(Grid$2,{columns:nt==="MANA"&&!gt?2:1,className:"overview",children:jsxRuntimeExports.jsxs(Grid$2.Row,{children:[jsxRuntimeExports.jsxs(Grid$2.Column,{floated:"left",style:{padding:0},children:[jsxRuntimeExports.jsxs(Grid$2,{className:"contract",style:{width:"100%"},children:[nt!=="MANA"?jsxRuntimeExports.jsx(Grid$2.Column,{className:"TokenLogo",children:jsxRuntimeExports.jsx("img",{src:logo[nt],style:{width:gt?"48px":"72px"},alt:""})}):gt&&jsxRuntimeExports.jsx(Grid$2.Column,{className:"TokenLogo",children:jsxRuntimeExports.jsx(distExports$1.Logo,{})}),jsxRuntimeExports.jsxs(Grid$2.Column,{className:"Info",children:[jsxRuntimeExports.jsx(distExports$1.Header,{size:"large",className:`TokenContract ${nt}`,children:t$3("overview.title",{token:nt})}),jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[et," ",jsxRuntimeExports.jsx("a",{href:pt,onClick:mt,children:jsxRuntimeExports.jsx("img",{src:Link,alt:""})}),jsxRuntimeExports.jsx(distExports$1.Popup,{content:t$3("global.copied"),position:"bottom center",trigger:jsxRuntimeExports.jsx("img",{src:Copy,alt:"",onClick:()=>copyToClipboard(et)}),on:"click"})]})]})]}),jsxRuntimeExports.jsx(distExports$1.Header,{style:nt==="MANA"&&!gt&&{maxWidth:"500px"}||{},children:t$3("overview.details",{amount:formatNumber(Math.round(ct),0),token:nt,months:t$3("global.amount.months",{amount:dt.months}),days:dt.days&&t$3("global.amount.days",{amount:dt.days}),cliff:t$3("overview.details.cliff",{months:ht.months,days:ht.days}),showCliff:bt})})]}),nt==="MANA"&&!gt&&jsxRuntimeExports.jsx(Grid$2.Column,{floated:"right",children:jsxRuntimeExports.jsx(ManaWidget,{})})]})})]})}const Icon$2="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/grant_icon-fe328b80.svg",ButtonIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/proposal_button_icon-2936cda4.svg",DaoInitiativeButton$1="";function DaoInitiativeButton({proposalUrl:_e}){const tt=useResponsive()({maxWidth:onlyMobileMaxWidth});return jsxRuntimeExports.jsxs(distExports$1.Button,{primary:!0,onClick:nt=>openInNewTab(_e,nt),href:_e,className:"daoProposal__button",children:[t$3(tt?"beneficiary.button.mobile":"beneficiary.button"),jsxRuntimeExports.jsx("img",{src:ButtonIcon,alt:""})]})}const Banner$1="";function Banner(_e){const{icon:et,title:tt,subtitle:nt,action:at,className:ot}=_e;return jsxRuntimeExports.jsxs("div",{className:`banner ${ot||""}`,children:[jsxRuntimeExports.jsxs("div",{className:"bannerContainer",children:[jsxRuntimeExports.jsx("div",{style:{width:"fit-content"},children:et&&jsxRuntimeExports.jsx("img",{src:et,alt:"",style:{marginTop:"5px"}})}),jsxRuntimeExports.jsxs("div",{className:"bannerText",children:[jsxRuntimeExports.jsx(distExports$1.Header,{children:tt}),jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,children:nt})]})]}),jsxRuntimeExports.jsx("div",{className:"bannerAction",children:at})]})}const Beneficiary$1="";function Beneficiary({address:_e}){const[et,tt]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{const at=await(await fetch(config.get("VESTINGS_API_URL"))).json();if(at){let ot=at.filter(st=>isSameAddress(st.vesting_address,_e));if(ot.length===1){ot=ot[0];const st=new URL(config.get("PROPOSALS_URL"));st.searchParams.append("id",ot.proposal_id),tt(st)}else console.error(t$3("error.dao_proposal_url"))}})()},[_e,tt]),!!et&&jsxRuntimeExports.jsx(Banner,{className:"beneficiary",icon:Icon$2,title:t$3("beneficiary.title"),subtitle:t$3("beneficiary.subtitle"),action:jsxRuntimeExports.jsx(DaoInitiativeButton,{proposalUrl:et})})}const Schedule$2="",FutureIcon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/future_events_icon-d66bd0d4.svg";function ScheduleEvent(_e){const{message:et,timestamp:tt=0,future:nt=!1}=_e;return jsxRuntimeExports.jsx("li",{className:`${nt?"future":""}`,children:jsxRuntimeExports.jsxs("div",{className:"timeline__event",children:[!nt&&jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,style:{textTransform:"none",margin:0},children:formatDate$1(new Date(tt*1e3).getTime(),DATE_FORMAT_LONG)}),jsxRuntimeExports.jsx(distExports$1.Header,{style:{fontSize:"15px",margin:0},children:et})]})})}const ScheduleEvent$1=React$L.memo(ScheduleEvent);function ShowMore(_e){const{onClick:et}=_e;return jsxRuntimeExports.jsx("li",{className:"more",style:{cursor:"pointer"},onClick:et,children:jsxRuntimeExports.jsx("div",{className:"timeline__event",children:jsxRuntimeExports.jsx(distExports$1.Header,{sub:!0,style:{fontSize:"11px"},children:t$3("schedule.show_more")})})})}const ShowMore$1=React$L.memo(ShowMore);function addReleasedEvent(_e,et,tt,nt){const at={timestamp:nt,key:nt};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.released",{amount:formatNumber(Math.round(et),0),token:tt}),...at}))}function addFulfilledEvent(_e,et,tt=!1){const nt={timestamp:et,future:tt,key:"fulfilled"};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.fulfilled"),...nt}))}function addRevokedEvent(_e,et){const tt={timestamp:et,key:"revoked"};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.revoked"),...tt}))}function addPausedEvent(_e,et){const tt={timestamp:et,key:`paused-${et}`};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.paused"),...tt}))}function addUnpausedEvent(_e,et){const tt={timestamp:et,key:`unpaused-${et}`};_e.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.unpaused"),...tt}))}function Schedule(_e){const{contract:et}=_e,{symbol:tt,start:nt,cliff:at,duration:ot,logs:st,version:ct,paused:dt,revoked:ht}=et,pt=getPreciseDiff(nt,at),mt=reactExports.useMemo(()=>st.filter(Pt=>Pt.topic!==TopicByVersion[ct].TRANSFER_OWNERSHIP),[st,ct]),[yt,gt]=reactExports.useState([]),bt=ht||dt,$t=TopicByVersion[ct],wt=(Pt=!1)=>{const Ot=[];Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.contract_started"),timestamp:nt},"contract_started")),Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.cliff_started",{cliff:t$3("cliff.duration",{months:pt.months,days:pt.days})}),timestamp:nt},"cliff_started")),new Date(at*1e3)<new Date&&(Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.cliff_ended"),timestamp:at},"cliff_ended")),Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:t$3("schedule.vesting_begins"),timestamp:at},"vesting_begins")));const Nt=nt+ot,Lt=new Date(Nt*1e3);let Bt=!1;const Ut=Ft=>{const zt=Ft.data;switch(Ft.topic){case $t.RELEASE:addReleasedEvent(Ot,zt.amount,tt,zt.timestamp);break;case $t.REVOKE:addRevokedEvent(Ot,zt.timestamp);break;case $t.PAUSED:addPausedEvent(Ot,zt.timestamp);break;case $t.UNPAUSED:addUnpausedEvent(Ot,zt.timestamp);break}};if(mt.length>0)if(mt.length>1&&!Pt){Ot.push(jsxRuntimeExports.jsx(ShowMore$1,{onClick:()=>wt(!0)},"showMore"));const Ft=mt[mt.length-1],{timestamp:zt}=Ft.data;new Date(zt*1e3)>Lt&&(Bt=!0),Ut(Ft)}else for(const Ft of mt){const{timestamp:zt}=Ft.data;!Bt&&new Date(zt*1e3)>Lt&&(Bt=!0,addFulfilledEvent(Ot,Nt)),Ut(Ft)}bt||Bt||(new Date>=new Date(Nt*1e3)?addFulfilledEvent(Ot,Nt):(Ot.push(jsxRuntimeExports.jsx(ScheduleEvent$1,{message:jsxRuntimeExports.jsx("img",{src:FutureIcon,className:"Future__Icon",alt:""}),future:!0},"Future__Icon")),addFulfilledEvent(Ot,0,!0))),gt(Ot)};reactExports.useEffect(()=>{wt()},[bt]);const Tt=useResponsive()({maxWidth:onlyMobileMaxWidth});return jsxRuntimeExports.jsxs("div",{className:`timeline ${ht?"revoked":dt?"paused":""}`,children:[jsxRuntimeExports.jsxs(distExports$1.Header,{sub:!0,children:[t$3("schedule.title"),jsxRuntimeExports.jsx(Info,{message:t$3("helper.vesting_schedule"),position:`${Tt?"right":"top"} center`})]}),jsxRuntimeExports.jsx("ul",{children:yt})]})}const Schedule$1=React$L.memo(Schedule),Chart$2="";/*! *****************************************************************************
337
337
  Copyright (c) Microsoft Corporation.
338
338
 
339
339
  Permission to use, copy, modify, and/or distribute this software for any
@@ -398,5 +398,5 @@ PERFORMANCE OF THIS SOFTWARE.
398
398
  </div>
399
399
  </td>
400
400
  </tr>
401
- `}),ot+"</table></div>"}function resizeHandler(_e){_e&&_e.resize()}function getFormatterFn(_e,et,tt){return nt=>getTooltipFormatter(_e+1,t$3("chart.to_be_vested"),nt,et,et==="MANA"?tt:0)}function Chart({contract:_e,ticker:et}){const{version:tt,symbol:nt,start:at,cliff:ot,duration:st,logs:ct,vestedPerPeriod:dt,periodDuration:ht,linear:pt,paused:mt,revoked:yt,stop:gt,total:bt}=_e,$t=Math.floor(new Date().getTime()/1e3),wt=at>$t?0:getDaysFromStart(at),St=TopicByVersion[tt],Tt=ct.filter(xt=>xt.topic===St.RELEASE).map(xt=>xt.data),Pt=ct.filter(xt=>xt.topic===St.REVOKE);let Ot,Nt,Lt=!1;tt===ContractVersion.V1?[Ot,Nt]=getRevokedData(Pt,at):[Ot,Nt,Lt]=getPausedAndRevokedData(at,mt,yt,gt);const Bt=Ot||Lt,Ft=useResponsive()({maxWidth:onlyMobileMaxWidth}),zt=Ot||Lt?Nt:wt,It=()=>yt?"var(--revoked-color)":mt?"var(--paused-color)":"var(--today-color)",vt={title:{text:t$3("chart.title"),textStyle:{fontSize:"13px"}},color:["#44B600","#FF7439"],tooltip:{trigger:"axis",formatter:xt=>getTooltipFormatter(zt+1,t$3("chart.to_be_vested"),xt,nt,nt==="MANA"?et:0)},legend:{data:[t$3("chart.vested"),t$3("chart.released")]},grid:{left:"0",right:"0",bottom:"3%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:getXAxisData(at,st),axisLabel:{align:"left",lineHeight:30,color:"#B0AFB1",interval:getLabelInterval(st,Ft)},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{formatter:xt=>{if(!Ft)return`${formatNumber(xt,0)} ${nt}`;const Ct=[{magnitude:1,abv:""},{magnitude:1e3,abv:"k"},{magnitude:1e6,abv:"M"},{magnitude:1e9,abv:"G"},{magnitude:1e12,abv:"T"},{magnitude:1e15,abv:"P"},{magnitude:1e18,abv:"E"}],Dt=Ct.map(jt=>jt.magnitude),kt=10**Math.floor(Math.log10(xt)),Rt=Dt.map(jt=>Math.abs(kt-jt)),_t=Math.min(...Rt),Mt=Rt.findIndex(jt=>jt===_t);return`${formatNumber(xt/Ct[Mt].magnitude,0)}${Ct[Mt].abv} ${nt}`},inside:!1,margin:0,verticalAlign:"bottom",showMinLabel:!1,lineHeight:30}},series:[{name:t$3("chart.vested"),type:"line",data:tt===ContractVersion.V1?getVestingData(at,ot,st,bt,Ot,Nt):getVestingDataV2(at,ot,st,ht,dt,pt,Ot,Nt),symbol:"none",markLine:{symbol:"none",data:[{name:`${t$3(Ot?"chart.revoked":Lt?"chart.paused":"chart.today")}`,xAxis:Ot||Lt?Nt:getDaysFromStart(at),label:{formatter:"{b}",show:!0,color:"white",backgroundColor:It(),padding:[3,6],borderRadius:5},lineStyle:{type:"solid",color:It()}}]}},{name:t$3("chart.released"),type:"line",data:getReleaseData(at,ot,Tt,Bt,Nt),symbol:"none"}],visualMap:{type:"piecewise",seriesIndex:0,show:!1,dimension:0,pieces:[{lte:Ot||Lt?Nt:wt,gt:-1e3,color:"#44B600"},{gt:Ot||Lt?Nt:wt,color:"rgba(115, 110, 125, 0.3)"}]}},[Et,At]=reactExports.useState(null);return reactExports.useEffect(()=>{use([install$8,install$9,install$a,install$4,install$d,install,installUniversalTransition,install$1,install$7]);const xt=document.getElementById("chart");At(init(xt))},[]),reactExports.useEffect(()=>{window.onresize=()=>resizeHandler(Et)}),reactExports.useEffect(()=>{Et&&(Ft?(vt.legend.top="bottom",vt.grid.bottom="10%"):(vt.legend.top="top",vt.grid.bottom="3%"),vt.tooltip.formatter=getFormatterFn(zt,nt,et),Et.setOption(vt,!0))},[Ft,Et,et]),jsxRuntimeExports.jsx("div",{id:"chart"})}const Chart$1=React$L.memo(Chart),Summary$2="";function Summary({address:_e,contract:et,ticker:tt}){const{symbol:nt,released:at,start:ot,cliff:st,vestedAmount:ct,total:dt,linear:ht}=et;let pt=Math.round(at/ct*100);isNaN(pt)&&(pt=0);const mt=getPreciseDiff(ot,st),{reviewUrl:yt,onReviewUrlClick:gt}=useReviewUrl(_e);return jsxRuntimeExports.jsxs("div",{id:"summary",style:{textAlign:"justify"},children:[t$3("summary.text",{b:bt=>jsxRuntimeExports.jsx("b",{children:bt}),br:jsxRuntimeExports.jsx("br",{}),cliff:t$3("cliff.duration",{months:mt.months,days:mt.days}),cliffEnd:formatDate$1(new Date(st*1e3).getTime(),DATE_FORMAT_LONG),nearly:pt>0?`, ${t$3("summary.nearly")} `:" ",percentage:formatNumber(pt,0),amount:formatNumber(nt==="MANA"?dt*tt:dt,0),version_description:t$3(ht?"summary.linear_version_description":"summary.periodic_version_description",{b:bt=>jsxRuntimeExports.jsx("b",{children:bt})})}),jsxRuntimeExports.jsx("a",{href:yt,onClick:gt,children:t$3("summary.review_contract")})]})}const Summary$1=React$L.memo(Summary);function PendingFunds(_e){const{contract:et}=_e;if(!et||et.version!==ContractVersion.V2)return null;const{symbol:tt,balance:nt,released:at,total:ot,vestedAmount:st,revoked:ct}=et,ht=(ct?st:ot)-(nt+at);if(-1<ht&&ht<1)return null;const pt=ht>0?"pending_funds.requires_more_funding":"pending_funds.over_funded";return jsxRuntimeExports.jsx(distExports$1.Segment,{children:jsxRuntimeExports.jsx("p",{children:t$3(pt,{pending:jsxRuntimeExports.jsx("b",{children:formatNumber(Math.abs(ht),0)}),token:jsxRuntimeExports.jsx("b",{children:tt})})})})}const Icon$1="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/revoke_icon-40494e1a.svg",RevokedBanner$1="";function RevokedBanner(){return jsxRuntimeExports.jsx(Banner,{className:"revoked",icon:Icon$1,title:t$3("revoked_banner.title"),subtitle:t$3("revoked_banner.subtitle")})}const Icon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1-11501425816.commit-f9cd158/assets/pause_icon-b9ff4d26.svg",PausedBanner$1="";function PausedBanner(){return jsxRuntimeExports.jsx(Banner,{className:"paused",icon:Icon,title:t$3("paused_banner.title"),subtitle:t$3("paused_banner.subtitle")})}function useTokenContracts(){const{data:_e}=useQuery({queryKey:["tokenContracts"],queryFn:()=>fetchTokenContracts()});return{tokenContracts:_e}}function useContract(_e){const{tokenContracts:et}=useTokenContracts(),[tt,nt]=reactExports.useState(""),at=useLocation();reactExports.useEffect(()=>{if(at){const pt=at.hash.split("#/")[1];isValidAddress(pt)&&nt(pt)}},[at]);const ot=tt||_e,{data:st,isLoading:ct,error:dt,fetchStatus:ht}=useQuery({queryKey:[`contract-${ot}`],queryFn:()=>fetchContract(ot,et),enabled:!!ot&&!!et});return{contract:st,isLoading:ct&&ht==="fetching",error:dt}}function useTicker(){const{data:_e,isLoading:et,error:tt}=useQuery({queryKey:["ticker"],queryFn:()=>fetchTicker("decentraland")});return{ticker:_e,isLoading:et,error:tt}}function Dashboard$1({address:_e,contractAddress:et}){const{contract:tt}=useContract(et),{paused:nt,revoked:at}=tt,st=useResponsive()({maxWidth:onlyMobileMaxWidth}),{ticker:ct}=useTicker();return jsxRuntimeExports.jsxs(Container,{className:"dashboard",children:[jsxRuntimeExports.jsx(Overview,{address:tt==null?void 0:tt.address,contract:tt}),jsxRuntimeExports.jsx(Beneficiary,{address:tt==null?void 0:tt.address}),at&&jsxRuntimeExports.jsx(RevokedBanner,{}),nt&&jsxRuntimeExports.jsx(PausedBanner,{}),jsxRuntimeExports.jsxs(Grid$2,{stackable:!0,columns:2,padded:!0,style:{width:"100%"},children:[jsxRuntimeExports.jsxs(Grid$2.Column,{width:12,style:{paddingLeft:0},children:[jsxRuntimeExports.jsx(PendingFunds,{contract:tt}),jsxRuntimeExports.jsx(Progress,{contract:tt}),jsxRuntimeExports.jsx(Chart$1,{contract:tt,ticker:ct}),jsxRuntimeExports.jsx(Summary$1,{address:tt.address,contract:tt,ticker:ct})]}),jsxRuntimeExports.jsx(Grid$2.Column,{width:4,style:{paddingRight:0,paddingLeft:"41px"},children:st?jsxRuntimeExports.jsx(Grid$2,{children:jsxRuntimeExports.jsxs(Grid$2.Row,{columns:1,children:[jsxRuntimeExports.jsx(Grid$2.Column,{children:jsxRuntimeExports.jsx(Schedule$1,{contract:tt})}),jsxRuntimeExports.jsx(Grid$2.Column,{className:"detailsMobile",children:jsxRuntimeExports.jsx(Details$1,{address:_e,contract:tt})})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Schedule$1,{contract:tt}),jsxRuntimeExports.jsx(Details$1,{address:_e,contract:tt})]})})]})]})}const mapState$1=_e=>({address:getAddress$2(_e)}),Dashboard=connect(mapState$1)(Dashboard$1),Footer$1="";class Footer extends reactExports.Component{render(){return jsxRuntimeExports.jsxs("div",{className:"footer",children:[jsxRuntimeExports.jsxs("div",{className:"footer-top",children:[jsxRuntimeExports.jsx("div",{className:"footer-foundation"}),jsxRuntimeExports.jsx("div",{className:"footer-links"}),jsxRuntimeExports.jsx("div",{className:"footer-icons"})]}),jsxRuntimeExports.jsx("div",{className:"footer-bottom",children:jsxRuntimeExports.jsxs("span",{className:"footer-copyright",children:["© ",new Date().getFullYear()," Decentraland"]})})]})}}const Input="";function LandingPage(_e){const{stateAddress:et,isNotFound:tt,address:nt,network:at,onAddressChange:ot}=_e;let st=t$3("helper.landing_page.continue");return et?isValidAddress(et)?tt&&et===nt&&(st=t$3("helper.landing_page.no_contract")+(at&&at.name!=="mainnet"&&`
401
+ `}),ot+"</table></div>"}function resizeHandler(_e){_e&&_e.resize()}function getFormatterFn(_e,et,tt){return nt=>getTooltipFormatter(_e+1,t$3("chart.to_be_vested"),nt,et,et==="MANA"?tt:0)}function Chart({contract:_e,ticker:et}){const{version:tt,symbol:nt,start:at,cliff:ot,duration:st,logs:ct,vestedPerPeriod:dt,periodDuration:ht,linear:pt,paused:mt,revoked:yt,stop:gt,total:bt}=_e,$t=Math.floor(new Date().getTime()/1e3),wt=at>$t?0:getDaysFromStart(at),St=TopicByVersion[tt],Tt=ct.filter(xt=>xt.topic===St.RELEASE).map(xt=>xt.data),Pt=ct.filter(xt=>xt.topic===St.REVOKE);let Ot,Nt,Lt=!1;tt===ContractVersion.V1?[Ot,Nt]=getRevokedData(Pt,at):[Ot,Nt,Lt]=getPausedAndRevokedData(at,mt,yt,gt);const Bt=Ot||Lt,Ft=useResponsive()({maxWidth:onlyMobileMaxWidth}),zt=Ot||Lt?Nt:wt,It=()=>yt?"var(--revoked-color)":mt?"var(--paused-color)":"var(--today-color)",vt={title:{text:t$3("chart.title"),textStyle:{fontSize:"13px"}},color:["#44B600","#FF7439"],tooltip:{trigger:"axis",formatter:xt=>getTooltipFormatter(zt+1,t$3("chart.to_be_vested"),xt,nt,nt==="MANA"?et:0)},legend:{data:[t$3("chart.vested"),t$3("chart.released")]},grid:{left:"0",right:"0",bottom:"3%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:getXAxisData(at,st),axisLabel:{align:"left",lineHeight:30,color:"#B0AFB1",interval:getLabelInterval(st,Ft)},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{formatter:xt=>{if(!Ft)return`${formatNumber(xt,0)} ${nt}`;const Ct=[{magnitude:1,abv:""},{magnitude:1e3,abv:"k"},{magnitude:1e6,abv:"M"},{magnitude:1e9,abv:"G"},{magnitude:1e12,abv:"T"},{magnitude:1e15,abv:"P"},{magnitude:1e18,abv:"E"}],Dt=Ct.map(jt=>jt.magnitude),kt=10**Math.floor(Math.log10(xt)),Rt=Dt.map(jt=>Math.abs(kt-jt)),_t=Math.min(...Rt),Mt=Rt.findIndex(jt=>jt===_t);return`${formatNumber(xt/Ct[Mt].magnitude,0)}${Ct[Mt].abv} ${nt}`},inside:!1,margin:0,verticalAlign:"bottom",showMinLabel:!1,lineHeight:30}},series:[{name:t$3("chart.vested"),type:"line",data:tt===ContractVersion.V1?getVestingData(at,ot,st,bt,Ot,Nt):getVestingDataV2(at,ot,st,ht,dt,pt,Ot,Nt),symbol:"none",markLine:{symbol:"none",data:[{name:`${t$3(Ot?"chart.revoked":Lt?"chart.paused":"chart.today")}`,xAxis:Ot||Lt?Nt:getDaysFromStart(at),label:{formatter:"{b}",show:!0,color:"white",backgroundColor:It(),padding:[3,6],borderRadius:5},lineStyle:{type:"solid",color:It()}}]}},{name:t$3("chart.released"),type:"line",data:getReleaseData(at,ot,Tt,Bt,Nt),symbol:"none"}],visualMap:{type:"piecewise",seriesIndex:0,show:!1,dimension:0,pieces:[{lte:Ot||Lt?Nt:wt,gt:-1e3,color:"#44B600"},{gt:Ot||Lt?Nt:wt,color:"rgba(115, 110, 125, 0.3)"}]}},[Et,At]=reactExports.useState(null);return reactExports.useEffect(()=>{use([install$8,install$9,install$a,install$4,install$d,install,installUniversalTransition,install$1,install$7]);const xt=document.getElementById("chart");At(init(xt))},[]),reactExports.useEffect(()=>{window.onresize=()=>resizeHandler(Et)}),reactExports.useEffect(()=>{Et&&(Ft?(vt.legend.top="bottom",vt.grid.bottom="10%"):(vt.legend.top="top",vt.grid.bottom="3%"),vt.tooltip.formatter=getFormatterFn(zt,nt,et),Et.setOption(vt,!0))},[Ft,Et,et]),jsxRuntimeExports.jsx("div",{id:"chart"})}const Chart$1=React$L.memo(Chart),Summary$2="";function Summary({address:_e,contract:et,ticker:tt}){const{symbol:nt,released:at,start:ot,cliff:st,vestedAmount:ct,total:dt,linear:ht}=et;let pt=Math.round(at/ct*100);isNaN(pt)&&(pt=0);const mt=getPreciseDiff(ot,st),{reviewUrl:yt,onReviewUrlClick:gt}=useReviewUrl(_e);return jsxRuntimeExports.jsxs("div",{id:"summary",style:{textAlign:"justify"},children:[t$3("summary.text",{b:bt=>jsxRuntimeExports.jsx("b",{children:bt}),br:jsxRuntimeExports.jsx("br",{}),cliff:t$3("cliff.duration",{months:mt.months,days:mt.days}),cliffEnd:formatDate$1(new Date(st*1e3).getTime(),DATE_FORMAT_LONG),nearly:pt>0?`, ${t$3("summary.nearly")} `:" ",percentage:formatNumber(pt,0),amount:formatNumber(nt==="MANA"?dt*tt:dt,0),version_description:t$3(ht?"summary.linear_version_description":"summary.periodic_version_description",{b:bt=>jsxRuntimeExports.jsx("b",{children:bt})})}),jsxRuntimeExports.jsx("a",{href:yt,onClick:gt,children:t$3("summary.review_contract")})]})}const Summary$1=React$L.memo(Summary);function PendingFunds(_e){const{contract:et}=_e;if(!et||et.version!==ContractVersion.V2)return null;const{symbol:tt,balance:nt,released:at,total:ot,vestedAmount:st,revoked:ct}=et,ht=(ct?st:ot)-(nt+at);if(-1<ht&&ht<1)return null;const pt=ht>0?"pending_funds.requires_more_funding":"pending_funds.over_funded";return jsxRuntimeExports.jsx(distExports$1.Segment,{children:jsxRuntimeExports.jsx("p",{children:t$3(pt,{pending:jsxRuntimeExports.jsx("b",{children:formatNumber(Math.abs(ht),0)}),token:jsxRuntimeExports.jsx("b",{children:tt})})})})}const Icon$1="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/revoke_icon-40494e1a.svg",RevokedBanner$1="";function RevokedBanner(){return jsxRuntimeExports.jsx(Banner,{className:"revoked",icon:Icon$1,title:t$3("revoked_banner.title"),subtitle:t$3("revoked_banner.subtitle")})}const Icon="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.4.1/assets/pause_icon-b9ff4d26.svg",PausedBanner$1="";function PausedBanner(){return jsxRuntimeExports.jsx(Banner,{className:"paused",icon:Icon,title:t$3("paused_banner.title"),subtitle:t$3("paused_banner.subtitle")})}function useTokenContracts(){const{data:_e}=useQuery({queryKey:["tokenContracts"],queryFn:()=>fetchTokenContracts()});return{tokenContracts:_e}}function useContract(_e){const{tokenContracts:et}=useTokenContracts(),[tt,nt]=reactExports.useState(""),at=useLocation();reactExports.useEffect(()=>{if(at){const pt=at.hash.split("#/")[1];isValidAddress(pt)&&nt(pt)}},[at]);const ot=tt||_e,{data:st,isLoading:ct,error:dt,fetchStatus:ht}=useQuery({queryKey:[`contract-${ot}`],queryFn:()=>fetchContract(ot,et),enabled:!!ot&&!!et});return{contract:st,isLoading:ct&&ht==="fetching",error:dt}}function useTicker(){const{data:_e,isLoading:et,error:tt}=useQuery({queryKey:["ticker"],queryFn:()=>fetchTicker("decentraland")});return{ticker:_e,isLoading:et,error:tt}}function Dashboard$1({address:_e,contractAddress:et}){const{contract:tt}=useContract(et),{paused:nt,revoked:at}=tt,st=useResponsive()({maxWidth:onlyMobileMaxWidth}),{ticker:ct}=useTicker();return jsxRuntimeExports.jsxs(Container,{className:"dashboard",children:[jsxRuntimeExports.jsx(Overview,{address:tt==null?void 0:tt.address,contract:tt}),jsxRuntimeExports.jsx(Beneficiary,{address:tt==null?void 0:tt.address}),at&&jsxRuntimeExports.jsx(RevokedBanner,{}),nt&&jsxRuntimeExports.jsx(PausedBanner,{}),jsxRuntimeExports.jsxs(Grid$2,{stackable:!0,columns:2,padded:!0,style:{width:"100%"},children:[jsxRuntimeExports.jsxs(Grid$2.Column,{width:12,style:{paddingLeft:0},children:[jsxRuntimeExports.jsx(PendingFunds,{contract:tt}),jsxRuntimeExports.jsx(Progress,{contract:tt}),jsxRuntimeExports.jsx(Chart$1,{contract:tt,ticker:ct}),jsxRuntimeExports.jsx(Summary$1,{address:tt.address,contract:tt,ticker:ct})]}),jsxRuntimeExports.jsx(Grid$2.Column,{width:4,style:{paddingRight:0,paddingLeft:"41px"},children:st?jsxRuntimeExports.jsx(Grid$2,{children:jsxRuntimeExports.jsxs(Grid$2.Row,{columns:1,children:[jsxRuntimeExports.jsx(Grid$2.Column,{children:jsxRuntimeExports.jsx(Schedule$1,{contract:tt})}),jsxRuntimeExports.jsx(Grid$2.Column,{className:"detailsMobile",children:jsxRuntimeExports.jsx(Details$1,{address:_e,contract:tt})})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Schedule$1,{contract:tt}),jsxRuntimeExports.jsx(Details$1,{address:_e,contract:tt})]})})]})]})}const mapState$1=_e=>({address:getAddress$2(_e)}),Dashboard=connect(mapState$1)(Dashboard$1),Footer$1="";class Footer extends reactExports.Component{render(){return jsxRuntimeExports.jsxs("div",{className:"footer",children:[jsxRuntimeExports.jsxs("div",{className:"footer-top",children:[jsxRuntimeExports.jsx("div",{className:"footer-foundation"}),jsxRuntimeExports.jsx("div",{className:"footer-links"}),jsxRuntimeExports.jsx("div",{className:"footer-icons"})]}),jsxRuntimeExports.jsx("div",{className:"footer-bottom",children:jsxRuntimeExports.jsxs("span",{className:"footer-copyright",children:["© ",new Date().getFullYear()," Decentraland"]})})]})}}const Input="";function LandingPage(_e){const{stateAddress:et,isNotFound:tt,address:nt,network:at,onAddressChange:ot}=_e;let st=t$3("helper.landing_page.continue");return et?isValidAddress(et)?tt&&et===nt&&(st=t$3("helper.landing_page.no_contract")+(at&&at.name!=="mainnet"&&`
402
402
  ${t$3("helper.landing_page.network",{network:at.name})}`)):st=t$3("helper.landing_page.address_not_valid"):st=t$3("helper.landing_page.provide_contract"),jsxRuntimeExports.jsxs(Container,{className:"Landing",children:[jsxRuntimeExports.jsx(distExports$1.Logo,{}),jsxRuntimeExports.jsx("h3",{children:t$3("landing_page.title")}),jsxRuntimeExports.jsx("input",{className:"Input",value:et,placeholder:"0x...",onChange:ot}),jsxRuntimeExports.jsx("p",{className:"help",children:st})]})}const LandingPage$1=React$L.memo(LandingPage);function ErrorPage({connectionError:_e}){return jsxRuntimeExports.jsxs(Container,{className:"Error",children:[jsxRuntimeExports.jsx(distExports$1.Logo,{}),jsxRuntimeExports.jsx("h3",{children:t$3("helper.error_page.message")}),jsxRuntimeExports.jsx("p",{children:_e})]})}const ErrorPage$1=React$L.memo(ErrorPage);function LoadingPage(_e){const{msg:et}=_e;return jsxRuntimeExports.jsxs(Container,{className:"Loading",children:[jsxRuntimeExports.jsx(distExports$1.Logo,{}),jsxRuntimeExports.jsx("p",{className:"loading-message",children:et})]})}const LoadingPage$1=React$L.memo(LoadingPage),App$2="";function App$1({network:_e,isConnecting:et}){const[tt,nt]=reactExports.useState(),{contract:at,error:ot,isLoading:st}=useContract(tt),ct=useNavigate(),dt=ht=>{const pt=ht.target.value.trim();isValidAddress(pt)&&(nt(pt),ct(`/#/${pt}`))};return et||st?jsxRuntimeExports.jsx("div",{className:"app start",children:jsxRuntimeExports.jsx(LoadingPage$1,{msg:et?"Loading...":"Loading data..."})}):ot?jsxRuntimeExports.jsx("div",{className:"app start",children:jsxRuntimeExports.jsx(ErrorPage$1,{connectionError:`${ot}`})}):at?jsxRuntimeExports.jsxs("div",{className:"app",children:[jsxRuntimeExports.jsx(Header,{}),jsxRuntimeExports.jsx(Dashboard,{contractAddress:at.address}),jsxRuntimeExports.jsx(Footer,{})]}):jsxRuntimeExports.jsx("div",{className:"app start",children:jsxRuntimeExports.jsx(LandingPage$1,{stateAddress:tt,address:tt,network:_e,onAddressChange:ht=>dt(ht)})})}const mapState=_e=>{const et=getNetwork$1(_e),tt=getChainId(_e);return{network:et,chainId:tt,isConnecting:isConnecting(_e)}},App=connect(mapState)(App$1),index="",styles="",queryClient=new QueryClient,basename=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/vesting":"/";ReactDOM.render(jsxRuntimeExports.jsx(React$L.StrictMode,{children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsx(BrowserRouter,{basename,children:jsxRuntimeExports.jsx(Provider$2,{store:initStore(),children:jsxRuntimeExports.jsx(WalletProvider,{children:jsxRuntimeExports.jsx(TranslationProvider,{locales:["en"],children:jsxRuntimeExports.jsx(Routes,{children:jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(App,{})})})})})})})})}),document.getElementById("root"));export{Buffer$C as B,__vitePreload as _,commonjsRequire$1 as a,require$$0$5 as b,concat$1 as c,commonjsGlobal as d,requireBrorand as e,hmacDrbg$1 as f,getAugmentedNamespace as g,hash$6 as h,inherits_browserExports as i,global$a as j,keccak256 as k,recoverAddress as l,minimalisticAssert$1 as m,eventsExports as n,getDefaultExportFromCjs$1 as o,process$1$1 as p,it as q,requireCryptoBrowserify as r,o as s,toUtf8Bytes as t,utils$O as u,bnExports$5 as v,sha_jsExports as w,require$$0$6 as x,readableBrowserExports$1 as y};